Repository navigation
fix(cli): os doctor advises --verbose only when a warning has a fix for it to show - #35626
Conversation
… warnings Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
…or it to show Claude-Session: https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt Co-authored-by: Claude <noreply@anthropic.com>
…ctor-verbose-hint
📓 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 523d7cb4a5f55dca632e69e5a6ff0268030a9df5 && git checkout 523d7cb4a5f55dca632e69e5a6ff0268030a9df5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d2bc1ffdc36412da08a7ff40350302b991aeef6f d559e09a24d4784119d3ef080f1bfbc9bcc69203 && git checkout -B drift-repro d2bc1ffdc36412da08a7ff40350302b991aeef6f && git merge --no-ff d559e09a24d4784119d3ef080f1bfbc9bcc69203
node scripts/docs-audit/affected-docs.mjs --json d2bc1ffdc36412da08a7ff40350302b991aeef6f
|
|
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
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt Landing · 2026-11-19T18:56Z · area b1-B, after L1-a ACCEPT 7018954921 on head
State: ready + auto-merge now; #35454 closes on merge. |
Fixes #35454
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/cli/src/commands/doctor.ts: a newhasVerboseOnlyFixflag, tracked besidehasWarnings. The summary prints "Run with --verbose to see fix suggestions." only when--verboseis off AND that flag is set. Each warning path was read and classified:--verboseprints): an environmentHealthCheckResultwithstatus === 'warning'and afix; a dashboard-widget warning with a non-emptyhint; the config-load-failure finding when it carries afix; any--scan-deprecationshit (itsreplacementis printed only under--verbose).@deprecatedusages, circular dependencies, unused objects, orphan views..changeset/35454-doctor-verbose-hint-fixless.md: patch,@objectstack/cli.Tests
packages/cli/src/commands/doctor-deprecation-hint-commands.test.ts, in the existingdescribe('the warnings summary'), which uses the realDoctor.run(): a new case writespackages/spec/src/a.zod.tswith no test into the temp cwd and runs plainos doctor. It asserts that the "Missing test" warning fired, that the summary reached its warnings branch, and that the text after the verdict line does not name--verbose.--scan-deprecationswarning still gets the hint without--verboseand gets none with it.Acceptance notes
hintis the empty string (@objectstack/lintemitshint: ''on one path) do not count as fix-bearing here, since--verbosewould print only a bare arrow for them. That empty arrow line under--verboseis not changed here. Observation only, not reproduced at the public door.okalso print theirfixunder--verbose. They are not warnings, so they do not count toward the hint. The behaviour is unchanged.Verification
Readings are at HEAD
d559e09a(the fix commit1dc43d70merged with origin/mainf981dce3; the merge brought in no package source).Two-minute check:
pnpm --filter @objectstack/cli exec vitest run --project unit src/commands/doctor-deprecation-hint-commands.test.ts. Expected: 15 passed.Read first:
packages/cli/src/commands/doctor.ts, the summary'sif (!flags.verbose && hasVerboseOnlyFix)and the four places that set the flag. The risk is a fix-bearing path left unclassified.Red first, then green
86ec0951(the new pin on an unmodifieddoctor.ts): Tests 1 failed, 14 passed (15). The new case failed withexpected '\n Run with --verbose to see fix su…' not to contain '--verbose'.1dc43d70: Test Files 1 passed (1), Tests 15 passed (15).Ablation (scripts/ablation-replace.mjs, landed on disk and restored)
if (!flags.verbose && hasVerboseOnlyFix) {replaced withif (!flags.verbose) {. The anchor went from 1 to 0 and the blob from 975d2c65 to ab86dda8. Result: Tests 1 failed, 14 passed. Only "makes no such advice when the only warnings carry no fix to reveal" failed.git diff HEADis empty../doctor.js), so the ablation needed no dist rebuild.Package tests and typecheck
pnpm run typecheckinpackages/cli(tsc, thencheck:test-typecheck) followed bypnpm exec vitest run --project unit --maxWorkers=2, as one locked command: VERDICT command-exit 0. Test Files 431 passed (431), Tests 6163 passed (6163).integrationtier is left to CI: the diff touches no integration-tier file and no spawn entry.Gates (derived set, local)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackatd559e09aderived 69 families. Each one was run, with its exit code captured before any pipe.pnpm check:dual-build-cjs-loads(no dist for studio, client-react, connector-slack, ...) andpnpm check:i18n-coverage(the app-showcase config imports an unbuilt connector-slack dist). CI runs both.--ranreconciliation: "69 derived famil(ies) accounted for — 67 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".node scripts/pm/overlap-check.mjs: VERDICT clean exit 0.Generated by Claude Code