perf(build): isolate Core service capability profiles - #1977
Merged
Conversation
Gate Core LSP, terminal, workspace, watcher, and remote services behind additive feature profiles. Move stable workspace identity helpers into services-core, isolate libgit2-backed session support, and enforce the closed profiles with boundary checks and focused fail-closed coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bitfun-coreprofiles for dispatch storage, LSP, terminal, local workspace runtime/watch, remote workspace facade, and concrete SSHservices-coredefault empty, isolate libgit2 memory-workspace behavior behindsession-git, and move stable workspace/session identity helpers to that reusable ownerremote_ssh::pathsas a compatibility re-exportArchitecture
This keeps
bitfun-coreas the compatibility facade andproduct-fullcomposition root without usingproduct-fullas a shortcut for narrow builds.workspace-runtimeowns local workspace/layout capabilities only.workspace-watchadds the identity watcher.remote-workspaceadds the registry-backed remote facade without russh.ssh-remoteadds concrete SSH transport.product-fullexplicitly restores all product-only owners, including permission, runtime ownership, session Git, dispatch, LSP, terminal, and workspace capabilities.services-core::workspace_identity; remote runtime ownership does not move.A registered remote path now fails explicitly when its file provider is unavailable instead of silently falling back to a same-named local path.
Dependency closure
Unique normal/build packages from
cargo tree, compared with the exact pre-change Core feature-closure base:bitfun-services-coredefaultbitfun-core --no-default-featuresbitfun-core service-integrationsbitfun-core ssh-remotebitfun-core product-fullThe empty Core profile no longer contains git2, SQLite, notify, terminal-core, services-integrations, or russh. The full product closure is intentionally unchanged.
Verification
Passed:
pnpm run check:core-boundaries:test(33/33)pnpm run check:core-boundariescargo test -p bitfun-core --no-default-features --features remote-workspace --lib registered_remote_path_without_file_provider_fails_closedcargo test -p bitfun-core --no-default-features --features dispatch-store --lib service::dispatch::tests(12/12)cargo test -p bitfun-services-core --no-default-features --features session-git memory_workspace(3/3)cargo test -p bitfun-services-integrations --no-default-features --features remote-ssh --test remote_ssh_contracts(9/9)cargo test -p bitfun-services-integrations --no-default-features --features remote-ssh --test remote_ssh_disabled_contracts(2/2)cargo check -p bitfun-core --no-default-featurescargo check -p bitfun-core --no-default-features --features workspace-runtimecargo check -p bitfun-core --no-default-features --features remote-workspacecargo check -p bitfun-core --no-default-features --features ssh-remotecargo check -p bitfun-core --no-default-features --features product-fullgit diff --check gcwing/main...HEADcargo check --workspacereached unrelated app/native build prerequisites, then stopped becausesrc/mobile-web/distwas absent for the Desktop Tauri build script and the sherpa-onnx prebuilt archive download ended early. No CI or product code was changed to mask those environment failures.Review
An isolated adversarial review found one Important issue: remote provider absence could fall through to local filesystem access. The implementation now distinguishes an unregistered local path from a registered remote path with an unavailable provider, and the regression test proves the latter fails closed. Re-review result: Ready.