Repository navigation
[CTX-1409] chore(architecture): retire Core dependency resolver (Refs #1999) - #2354
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6bfc27d to
dda5676
Compare
dda5676 to
c67ded9
Compare
W-72 assigns dependency resolution to bitty-plugin-manager and no Core path consumed bitty-package's draft resolver: startup re-verification uses manifest/lock/integrity primitives, and the plugin-host registry only needed its own in-memory graph check. Retire the module, its re-exports, the test-only prerelease plumbing (as_package_edge), and the resolver-specific hostile tests. Retained deliberately: publisher trust and Ed25519 verification (security corpus R-015/P0-AC-028, signature-depth split still open), lockfile digest triple, integrity pipeline, source grammar, transactional activation/rollback (P0-AC-029 evidence), the install pipeline/local install paths, and the bitty plugin CLI. The W-72 migration rule forbids removing install or verification behavior before the manager replacement (manager #11) exists. New named guard tests/distribution_boundary.rs:: resolver_module_is_retired_from_core rejects the retired module path, resolver module declarations, and the resolver's public symbols across Core sources, including duplicates without a Cargo edge. Mutation proof: planting the module (or a PackageIndex symbol in another crate's source) fails the guard; removing it passes. Refs #1999. Remainder on the issue: manager #11 replacement, install verification/trust/lock/source/activation/CLI migration, and the signature-depth decision.
c67ded9 to
d2520b2
Compare
|
Approval at
#1999 remains OPEN on purpose ( |
Priority: P1 | Area: architecture | Labels: chore,P1,area:architecture | Milestone: 0.0.25 | RFC: W-72 / OQ-021 | Task: CTX-1409
Refs #1999. Partial, well-specified slice; the remaining migration is blocked on
bitty-plugin-manager#11and on the undecided signature-depth split, so this PR does not close the issue.Scope of this PR
W-72 assigns dependency resolution to the external
bitty-plugin-manager. Core's draft resolver had zero live consumers: startup re-verification uses the manifest/lock/integrity primitives, andbitty-plugin-host's runtime registry keeps its own in-memory graph check (resolve_all, cycles/missing deps/service satisfaction) without the package resolver. Retire the module and the plumbing that existed only to feed it:crates/bitty-package/src/resolver.rs(911 lines:PackageIndex,IndexEntry,resolve,resolve_preserving_locked, budgets, yank/prerelease solving);bitty-package/src/lib.rs, plus the crate README claims;PluginDependency::as_package_edge(the manifest-to-resolver conversion; no production caller) and the two tests that only exercised it (registry.rsresolver plumbing test,manifest_toml.rsresolver-edge assertion; the parsedprereleasebit stays covered);Retained deliberately, with the reason recorded in
boundary.rs:trust.rs, V-A/V-B/V-C), because security corpus R-015/P0-AC-028 requires it andpackage-manager-boundary.mdleaves install-time vs startup signature depth undecided.bitty pluginCLI: the accepted W-72 migration rule says install or verification behavior is not removed before the replacement boundary exists. Manager feat(term-state): implement bitty-term-state crate: Terminal Truth core #11 is still open and its repository still has only the downstream git fleet.Guard and mutation proof
New
crates/bitty-package/tests/distribution_boundary.rs:resolver_module_is_retired_from_corerejects the retired module path, a re-declaredmod resolver;inbitty-package, and the resolver's public symbols across all Core sources — including a duplicate with no Cargo edge or module declaration (the W-147 fence's source-level blind spot).dependency_resolution_stays_manager_ownedpinsPackageOperation::DependencyResolutiontoExternalManager.Mutation runs (probes deleted afterwards, nothing committed):
crates/bitty-package/src/resolver.rswithpub struct PackageIndex;->FAIL [bitty-package::distribution_boundary resolver_module_is_retired_from_core], panic:retired distribution module must stay absent: crates/bitty-package/src/resolver.rs.crates/bitty-plugin-host/src/resolver_probe.rscontainingpub struct PackageIndex;with no module declaration and no Cargo edge -> same named guardFAIL, panic lists.../crates/bitty-plugin-host/src/resolver_probe.rs: PackageIndex.2 tests run: 2 passed.rgfor the retired identifiers/symbols incrates/*/srcis clean; the only matches are the guard test's own denylist.Verification (head c67ded9, rebased on 2d23dba)
cargo fmt --all -- --check: clean.cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo nextest run --workspace --locked: 7647 passed, 0 failed, 3 skipped.cargo test --workspace --doc --locked: pass.cargo check --target x86_64-pc-windows-gnu --workspace --all-targets --locked: clean.bitty-terminal::{cli_plugin,fetch_env,verify_w147_small_core_graph}-> 37 passed (install/verify/refuse, hostile archive members, zip-bomb pre-extraction, remote-source refusal, W-147 graph + source fence incl.every_direct_extension_dependency_is_fenced).bitty-package: 201 passed (retained hostile + transaction suites + the new guard).just markdownlint: 0 issues.just scratch-paths: OK.just ci-local/actintentionally not run (task instruction). First clippy attempt hit a full filesystem; reran withCARGO_INCREMENTAL=0after clearing this task's incremental cache and it passed. After the rebase onto2d23dbac, the affected suites and the distribution flows were re-run on the rebased tree:bitty-package+bitty-plugin-host716 passed;cli_plugin+fetch_env+verify_w14738 passed.Docs sync
bitty-terminal-docs#264(Markdown-only, merged as9d98dd50) drops the retired resolver from the release-ladder and core-boundaries implemented-status claims.boundary.rs,lib.rs, and the crate README record the retirement and the retained set in-repo.Open points / remainder (not implemented here)
bitty-plugin-manager#11is open; no registry reader, solver, or upstream fleet exists, so Core cannot delegatebitty plugin install|remove|enable|disable|revoke|infoyet. The CLI and install pipeline stay fail-closed and unchanged.bitty-docs/docs/development/package-manager-boundary.md; no contract is invented here.54c24691:crates/bitty-package/src/resolver.rs(local mirror sha25608bad8d873cb08695599c4b6b0fcdd97d29d9b11d7ad6c5122ea31c276ff8eab). Manager feat(term-state): implement bitty-term-state crate: Terminal Truth core #11 owns its own solving contract; this is not a proposed merge source.Do not merge without independent review + CI, per lifecycle. Commander integrates.