Skip to content

os doctor --scan-deprecations prescribes a codemod command that does not exist #10680

Description

@baozhoutao

Found by QA run #10663 driving cli.doctor-deprecation-scan at framework 79ebb37. Also recorded in PR #10147 FOLLOW-UPS §7b; this card is its extraction with live confirmation.

Symptom

After reporting deprecated patterns, os doctor --scan-deprecations prints:

ℹ Found N deprecated pattern(s). Run `objectstack codemod v2-to-v3` to auto-fix.

(doctor.ts:2149). But no codemod command is registered: os codemod v2-to-v3 → exit 2 "command codemod:v2-to-v3 not found"; os codemod --help → exit 2 "Command codemod not found." The docs already admit it: content/docs/protocol/backward-compatibility.mdx:134 — "An automated codemod command is referenced in the migration guides but is not yet available." The real, registered metadata codemod is os migrate meta.

Suggested fix

Point the hint at a command os actually registers (os migrate meta), scope/remove it, or gate it behind the command's existence.

Passing clauses

The scanner itself works correctly: file:line attribution for all 8 DEPRECATED_PATTERNS (incl. the retired referenceFilterslookupFilters pair), --verbose→ replacement lines, warns-not-gates (exit 0 both with hits and clean), .test.ts / node_modules / .json decoys all skipped for their documented reasons, and absent-src/ honesty. The item is accurate on every checked particular (exit is oclif's 2, not 1, for the missing command — still nonzero).

QA-source: #10663 · cli.doctor-deprecation-scan · clause 6 (expected-fail probe)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions