Repository navigation
fix(cli): os doctor --verbose no longer ends by telling you to run with --verbose - #35377
Conversation
The warnings summary told an operator who had passed --verbose to pass it. Gate the hint on the flag being off; pin both arms on the real command. Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 40 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 834496aa6d897e4e5b2ecd564dc349c3027dbb75 && git checkout 834496aa6d897e4e5b2ecd564dc349c3027dbb75
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9fea31685408b8ae1c678f696cdada1d3dfb6d51 84c3ccfadd105a1a323f60a91b50b14af4bf659b && git checkout -B drift-repro 9fea31685408b8ae1c678f696cdada1d3dfb6d51 && git merge --no-ff 84c3ccfadd105a1a323f60a91b50b14af4bf659b
node scripts/docs-audit/affected-docs.mjs --json 9fea31685408b8ae1c678f696cdada1d3dfb6d51
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Final green head for L1:
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
…ctor-verbose-hint
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Landing · 2026-11-19T10:44Z · area b1-B, after L1-a ACCEPT 7005940659 (head
State: ready + auto-merge now; #34866 closes on merge. Follow-up of this PR's out-of-scope finding: #35454. |
Fixes #34866
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Clause-②: no
Metadata-protocol: none
维护者速读
os doctor以警告结束时,只有在没加--verbose的情况下才提示“Run with --verbose to see fix suggestions.”;加了--verbose的运行不再叫用户再加一次这个参数。os doctor --verbose的结尾让人去传一个已经传过的参数,提示本身是错的。packages/cli/src/commands/doctor.ts(总结里hasWarnings分支的if (!flags.verbose));packages/cli/src/commands/doctor-deprecation-hint-commands.test.ts(新增的the warnings summary两个用例)。pnpm --filter @objectstack/cli exec vitest run --project unit src/commands/doctor-deprecation-hint-commands.test.ts,预期 14 passed。What changes
packages/cli/src/commands/doctor.ts: in the summary'shasWarningsbranch, the line "Run with --verbose to see fix suggestions." is printed only whenflags.verboseis false. Under--verboseevery fix that doctor's warning paths have is already printed above the summary (renderHealthCheckResultprintsfixwhen verbose, the dashboard-widgethintand the deprecation-scanreplacementare verbose-gated), so the line pointed at nothing new..changeset/34866-doctor-verbose-hint.md: patch,@objectstack/cli.Tests
packages/cli/src/commands/doctor-deprecation-hint-commands.test.ts: a newdescribe('the warnings summary')inside the existing real-Doctor.run()harness (same warning-bearing tree as the deprecation-scan cases). Both arms first assert the run reached the warnings branch of the summary, then judge the text after that verdict line by the flag it names: without--verboseit names--verbose; with--verboseit does not, and the per-finding replacement is on screen.Acceptance notes
*.test.tsbeside a*.zod.ts,@deprecatedusages, circular dependencies, unused objects and orphan views print a bareprintWarning. When only those warn, the non-verbose hint still promises fix suggestions that--verbosedoes not print. Measured through the built binary (node packages/cli/bin/run.js doctor, temp cwd with onepackages/spec/src/a.zod.tsand no test): the non-verbose run ends with the hint; the--verboserun adds detail only to the ok environment rows and nothing to the warning. Not changed here (the dispatch scopes this PR to the verbose arm); reported to the seat.Verification
All readings are against HEAD
081a5101.Package tests and typecheck
pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2 src/commands/doctor-deprecation-hint-commands.test.ts: Test Files 1 passed (1), Tests 14 passed (14).pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2(whole unit tier): Test Files 427 passed, 2 failed (429); Tests 6113 passed, 29 skipped. The 2 failures weretest/published-subpath-console.pin.test.tsandtest/published-subpath-hook-body.pin.test.ts, both refusing becausepackages/cli/distwas not built yet. After building the CLI they were re-run: Test Files 2 passed (2), Tests 29 passed (29).integrationtier is left to CI: the diff touches no integration-tier file and no spawn entry.pnpm --filter @objectstack/cli run typecheck: exit 0 (tsc, thencheck:test-typecheckOK). The test file is in thetsc --noEmitprogram (--listFilesOnlycount 1).os doctorin a temp cwd with a warning. Without the flag it ends with the hint. With--verboseit ends at "Environment is functional but has some warnings." with no hint.Red first: ablation (scripts/ablation-replace.mjs, landed on disk and restored)
if (!flags.verbose) {replaced withif (true) {: anchor 1 to 0, blob 5b130dc6 to 3d34462d. Result: 1 failed, 13 passed. Only the case "drops that advice under --verbose" failed.git diff HEADis empty../doctor.js), so no dist rebuild was involved.Gates (derived set, local)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 69 families. Each was run one by one, with the exit code captured before any pipe.check:i18n,check:i18n-coverageandcheck:i18n-walk-parityfirst exited 3 (no CLI build). They exited 0 on re-run after the build.node scripts/check-plugin-teardown-shape.mjs --self-testneeds history that a shallow clone lacks; it is checker-health only.pnpm check:dual-build-cjs-loadsneeds repo-wide dist. CI's Lint & Repo Gates runs both.--ranreconciliation: "69 derived famil(ies) accounted for, 67 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".pnpm check:nul-bytes: exit 0.node scripts/pm/overlap-check.mjs: VERDICT clean (merges cleanly onto origin/main).Generated by Claude Code