chore: S2 KEEP leftover scan for CLI shell zero-ref - #731
Merged
Conversation
Import-graph proof that src/commands, src/command-contract, src/command-runtime.ts, src/cli.ts, src/index.ts, src/generated, and src/release-artifacts still have production importers (or are the process entry) and still add differential behavior. Delete none. Hang KEEP comments on existing product paths so classify stays on the macOS matrix. Do not restore src/lifecycle or fold config/capabilities/commands/schema.
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
Post-S1 S2 leftover scan of CLI shell areas:
src/commands,src/command-contract,src/command-runtime.ts,src/cli.ts,src/index.ts,src/generated,src/release-artifacts. Import-graph proof that every scanned module still has a production importer (or is the process entry) and still adds differential behavior. Delete none. Keep every still-imported module and every bridge that still adds differential behavior.Intake: mechanical leftover scan / no observable behavior — no new OpenSpec change. Folding
config/capabilities/commands/schema, expanding a commands barrel or public SDK, or restoringsrc/lifecycle/would be architecture-boundary work and would need OpenSpec; this PR documents that those folds are not safe.DELETE vs KEEP
src/lifecycle/src/core/lifecycle/index.tssrc/self/application.ts/src/services/self-upgrade.ts/src/services/lifecycle-updates.ts/src/services/lifecycle-execution.tssrc/commands/index.tssrc/cli.tstsdown+package.jsonbindist/cli.mjs+bun run src/cli.ts). Import-graph zero-ref is expected: the file is executed, not imported. Shortcut dispatch + Commander program.src/index.tssrc/command-runtime.tssrc/command-contract/index.tssrc/command-contract/registry.tscommands/schema.src/command-contract/handlers.tssrc/command-contract/commander.tssrc/cli.ts.src/command-contract/presentation.tsJSON.stringifyis the frozen envelope; must not addengine/route.src/command-contract/schemas.tsquantex schema. Envelope must not describeengine/route.src/commands/capabilities.tspackage-manager/capabilitiesor config/commands/schema.src/commands/commands.tssrc/commands/schema.tssrc/commands/config.tssrc/config.src/commands/exec.tsExecCommandOptions/ExecInstallPolicy). Compatibility re-exports them. Type-only home, not a leftover to fold intorun.ts.src/commands/run.tsexec/ shortcut launch facade over Core execution. Owns argv,--installpolicy, exit codes, process I/O.src/commands/shortcut.tsquantex <agent>argv parser. Frozen: structured output is rejected for shortcut execution.src/commands/install.tssrc/commands/ensure.tssrc/commands/uninstall.tssrc/commands/update.tsupdate/--all/--managedover Core update executor.src/commands/upgrade.tsupgrade()wrapper.src/commands/doctor.tssrc/commands/list.ts/info.ts/inspect.ts/resolve.tssrc/commands/core-installation-cli.tssrc/commands/cli-read-projection.tssrc/commands/installation-routing.tsengine/routeinto--json.src/commands/installation-failure-diagnostics.tsdetailsprojection. Shared by install session and update.src/commands/unmanaged-install-compatibility.tssrc/generated/build-meta.tssrc/release-artifacts/index.tspackages/core/src/{index,internal}.tscreateQuantex.DELETE: none (0 leftover zero-reference modules and 0 pure pass-through leftover wrappers after #730).
src/cli.tsis import-graph zero-ref because it is the process entry, not because it is unused.Same-file helpers that look unused from outside stay: they are live internals, not leftover bridges. Named re-exports on the published compatibility facade stay: they are the v1 root export surface locked by
test/compatibility/v1-baseline.test.ts. Convenience barrels with live importers (src/command-contract/index.ts,src/index.ts) stay: inlining them would churn published and internal import paths without removing leftover behavior.Freeze confirmation
--json/ aliases / exit codes / state v2 / receipt untouched--jsondoes not exposeengine/routecreateQuantexrelease-core.yml/ protect-main untouchedrelease-one-line-delivery,release-pr-skip-human-heuristics,windows-ci-advisory-merge-gate)restore-managed-update-and-resume-releasesuntouchedconfig/capabilities/commands/schemasrc/lifecycle/Linked Artifacts
docs/adr/0014-core-internal-lifecycle-barrel-deletion.md(L4 already deleted the barrel; this PR does not restore it)Validation
bun run memory:checkbun run lintbun run format:checkbun run typecheckbun run test— 178 files / 2168 passed / 5 skippedbun run openspec:validate— 25 passed / 0 failedinstall/ensure opencode --dry-run --json→ok=true,warnings[0].code=DRY_RUN,data.changed=false, exit0, noengine/route;upgrade --json --check→MANUAL_ACTION_REQUIREDon source install, noengine/route["createQuantex"]run_test_matrix=true/product-impacting2e230b1(draft kept)Release Intent
Release Summary
Docs Updated
Scope Check
src/lifecycle/.Closure Check
Notes
src/cli.ts, which is the process entry.src/cli.ts,src/index.ts,src/command-runtime.ts,src/command-contract,src/commands, andsrc/release-artifactspaths so classify stays on the full ubuntu/windows/macos test matrix (protect-main unchanged). Generatedsrc/generated/build-meta.tsis graph-scanned but not comment-hung.