refactor(cli): expose the CLI product plan in doctor - #1551
Merged
Conversation
limityan
force-pushed
the
yanzhn/cli-product-assembly-pr1
branch
from
July 14, 2026 12:13
93b5b85 to
201e50b
Compare
Select DeliveryProfile::Cli for doctor without treating static requirements as runtime availability. Add isolated binary tests and efficient CLI CI coverage.
limityan
force-pushed
the
yanzhn/cli-product-assembly-pr1
branch
from
July 14, 2026 12:21
201e50b to
7cd2567
Compare
limityan
marked this pull request as ready for review
July 14, 2026 12:28
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 doctorthe first production CLI path to selectDeliveryProfile::Cliand consume its staticProductAssemblyPlancliprofile and state that runtime readiness is not evaluated; do not project static requirements or extension enums as live availabilityPathManagerfor guarded CLI config isolation and fail closed unless both E2E user and home roots are presentWhy
The CLI already had profile and capability contracts, but no production entrypoint consumed
DeliveryProfile::Cli. The safe first slice is a read-only plan selection with an entrypoint test. Runtime availability remains unknown until real owner-provided services and policy paths are connected.The CI shape keeps an early CLI-specific test result without maintaining a second three-platform Rust matrix. Cross-platform compilation is handled by the existing workspace jobs.
Scope and non-goals
This PR includes only static plan selection, focused diagnostics/tests, guarded test storage, CI coverage, and current-state documentation.
It intentionally does not:
ProductAssembleror constructProductRuntimePartsbitfun-core/product-fullFollow-up work remains independently scoped: Runtime Services and the first behavior-equivalent execution slice; invocation-scoped approval; and versioned automation output/exit contracts. None is claimed complete by this PR.
User-visible behavior
bitfun doctornow reports:It no longer exposes requirement-edge counts or internal extension states such as
not_built. Existing doctor checks and exit behavior are unchanged.Architecture and risk controls
ProductAssemblyPlanremains a static eligibility/dependency contract, not a health source.PathManagerremains the owner of storage-root resolution and the two-root E2E guard; CLI still owns itsconfig.tomlpath.mainare unchanged.Validation
cargo +nightly test --locked -p bitfun-cli— 46 unit tests, 4 plugin-source integration tests, and 2 product-plan/storage-guard tests passedcargo +nightly clippy -p bitfun-cli --all-targets— passed; existing repository warnings remaincargo +nightly check --locked --workspace— passed after the samesrc/mobile-web/distpreparation used by CIcargo +nightly test --locked --workspace— all affected CLI/core/desktop suites passed; one existing timing-sensitiveterminal-coretest failed once, then its focused rerun and the complete 80-testterminal-coresuite passednode scripts/check-core-boundaries.mjspnpm run check:github-config— YAML parse and 7 contract tests passedcargo +nightly metadata --locked --no-deps --format-version 1cargo generate-lockfilefollowed bycargo test --locked -p bitfun-cli --no-runrustfmt --checkgit diff --check gcwing/main...HEADgcwing/mainatfeb8cb2a3Local stable Rust 1.94.1 is below the current locked dependency requirement, so local Rust validation used the installed nightly 1.96 toolchain. GitHub uses the latest stable toolchain.
Implementation was AI-assisted. Testing level: fully tested for the affected local paths; cross-platform compilation and the Ubuntu CLI test suite are enforced by CI.