feat: unify external source control and runtime containment#1661
Merged
limityan merged 1 commit intoJul 21, 2026
Conversation
limityan
force-pushed
the
yanzhn/external-source-control-plane
branch
2 times, most recently
from
July 21, 2026 12:44
3651a11 to
7ce7a28
Compare
Add a versioned cross-host control contract with Safe Mode and shared refresh coordination. Reuse one managed process-tree owner across executable integrations and align the extension architecture documentation.
limityan
force-pushed
the
yanzhn/external-source-control-plane
branch
from
July 21, 2026 12:55
7ce7a28 to
a4de3d8
Compare
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
ExternalSourceControlV1contract for catalog state, host capabilities, closed common actions, typed errors, recovery actions, causation, logs, and metrics.services-core::process_tree, using process groups on Unix and fail-closed kill-on-close Job Objects on Windows.Why
External-source state and actions previously differed by host and refresh kind. That made GUI, TUI, Peer, and Server behavior harder to reason about, left no shared Safe Mode, and allowed process cleanup semantics to diverge between executable integrations. This change creates one stable cross-host contract and one reusable lifecycle owner while preserving typed ecosystem adapters and product policy boundaries.
Architecture impact
services-coreprocess-tree owner for worker, MCP, Node probe, and FlashgrepContracts remain behavior-light. Assembly owns policy, generation, and product projection; external-source coordinators own provider-neutral refresh state; services own concrete OS process lifecycle. Public API budgets and feature-owner checks were updated to keep those boundaries enforceable.
User impact
/extensionsstatus, refresh, source enable/disable, and Safe Mode actions without adding another scheduler; zero-item provider failures retain support, bounded Issues, and Recovery output.code/dataand Peer message-only typed errors both retain their categories, stages, correlation/causation ids, and recovery actions through the shared API client.Validation
cargo check --workspacecargo test -p bitfun-services-core process_treecargo test -p bitfun-external-sourcescargo test -p bitfun-core external_sourcescargo test -p bitfun-product-domains --features external-sources --test external_source_contracts(36 tests)cargo test -p bitfun-cli --bin bitfun(292 tests)cargo test -p bitfun-server external_sources -- --nocapture(6 tests)cargo test -p bitfun-desktop remote_workspace_policy -- --nocapture(3 tests)pnpm --dir src/web-ui run test:run src/infrastructure/api/service-api/ApiClient.test.ts src/infrastructure/api/service-api/ExternalSourcesAPI.test.ts src/infrastructure/config/components/ExternalSourcesConfig.test.tsx src/infrastructure/config/externalSourcePresentation.test.ts(85 tests)pnpm run type-check:webpnpm run i18n:auditpnpm run i18n:contract:test(37 tests)node scripts/check-core-boundaries.mjspnpm run check:repo-hygienegit diff --check gcwing/main...HEADResidual risks and exclusions
The local three-PR scope/design working document is intentionally excluded from this PR.