Skip to content

perf(build): narrow SDK dependencies and external-source test targets - #2216

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/sdk-host-explicit-core-closure
Aug 11, 2026
Merged

perf(build): narrow SDK dependencies and external-source test targets#2216
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/sdk-host-explicit-core-closure

Conversation

@limityan

Copy link
Copy Markdown
Collaborator

Summary

  • replace the SDK Host product-full dependency with the explicit Core capability closure used by its current local protocol and construction path
  • keep TLS initialization host-owned while removing the unused Remote Exec port binding
  • consolidate runtime-free External Sources integration tests from 22 targets to 7 without merging MCP process, plugin-service, or script-runtime failure domains
  • extend the existing Core boundary checker to ratchet the SDK closure and the exact reviewed test target/leaf topology

Build and dependency impact

Normal/build package-version closure for bitfun-sdk-host-app:

Target Before After Delta
x86_64-pc-windows-msvc 578 512 -66
aarch64-apple-darwin 565 497 -68
x86_64-unknown-linux-gnu 609 533 -76

The current SDK protocol does not expose Remote Connect, SSH workspace execution, or Function Agent capabilities. Those owners now leave the SDK Host graph instead of being inherited through product-full. Debug Agent behavior still retains its reviewed LSP owner.

Cargo.lock is byte-identical to the base and remains at 1176 packages. This PR adds no crate, third-party package, root dependency, broad feature umbrella, workflow, CI job, or CI command. The dependency graph reduction is not presented as a measured wall-clock improvement.

Test topology

Owner Before After Integration tests
OpenCode adapter 8 4 130
Claude Code adapter 4 1 51
Codex adapter 3 1 47
External Sources assembly 7 1 30
Total 22 7 258

All 19 moved test leaves are byte-for-byte moves. Runtime-free tests with identical owner, dependency, platform, and failure semantics share wrapper targets. OpenCode MCP child-process tests, managed plugin/service tests, and Node script-runtime tests remain separate. Focused execution remains available through --test <target> <module>::.

The boundary checker now locks the exact reviewed leaves and rejects Cargo required-features only on the four grouped targets. It handles bare, quoted, and Unicode-escaped TOML keys while leaving independent targets free to adopt legitimate feature gates.

Behavior and architecture

  • SDK session creation continues to set remote connection and SSH metadata to None; unsupported remote execution does not fall back to local execution.
  • the SDK delivery profile is documented as an explicit Core capability closure
  • ring TLS provider installation remains process-entrypoint initialization and is behaviorally equivalent to the previous helper
  • product-full Desktop/CLI behavior and all other product profiles are unchanged
  • grouping reduces process-level crash isolation only within the four reviewed runtime-free groups; ordinary test failures remain isolated by the Rust test harness

Validation

  • cargo test --offline --locked -p bitfun-sdk-host -p bitfun-sdk-host-app -p bitfun-product-capabilities -p bitfun-opencode-adapter -p bitfun-claude-code-adapter -p bitfun-codex-adapter -p bitfun-external-sources
  • four grouped targets executed repeatedly, including module-filtered focused runs
  • node --test scripts/check-core-boundaries.test.mjs — 79/79
  • node scripts/check-core-boundaries.mjs
  • three-platform cargo tree -e normal,build closure comparison
  • git diff --check

Three independent adversarial review passes covered architecture/feature ownership, test semantics/failure isolation, and scope/performance evidence. Review findings around removable test leaves, hidden required-features, Unicode-escaped TOML keys, and target-level scoping were fixed and re-reviewed before publishing.

@limityan
limityan marked this pull request as ready for review August 11, 2026 07:36
@limityan
limityan merged commit 3d8ee4b into GCWing:main Aug 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant