docs(qa): rewrite the cli.migrate-meta-codemod P1 to what os migrate meta actually does - #10412
Merged
os-zhuang merged 1 commit intoAug 20, 2026
Merged
Conversation
… meta ships (#9733) The item was `active` P1 asserting an in-place source codemod. The command declares from/to/step/out/stored/database-url/apply/yes/force/type/json — no --write/--fix — and the authored-source arm's only file write is the --out JSON snapshot; meta.ts's header calls the AST rewrite "unsafe and lossy". Its grep step also targeted a sentence #9529 withdrew, so it could not run. Rewritten clause-for-clause to what is real today (printed mechanical-edit list, sources provably untouched, schema-valid --out snapshot, idempotent replay, floor refusal, semantic advisories, --json exit honesty) and kept active/P1 rather than retired — the defect was in the item, not in coverage. The v18 rewrite half stays on #9591; the restart is mechanical here, as a --help flag-surface check that fires when --write appears. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
os-zhuang
marked this pull request as ready for review
August 20, 2026 18:26
os-zhuang
enabled auto-merge
August 20, 2026 18:26
This was referenced Aug 20, 2026
This was referenced Aug 20, 2026
os-zhuang
deleted the
claude/issue-9733-qa-checklist-migrate-meta-codemod
branch
August 20, 2026 18:58
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.
Fixes #9733
docs/qa/platform-checklist/areas/cli.jsoncarriedcli.migrate-meta-codemodas anactive P1 asserting that
os migrate metarewrites authored sources. It does not,and the item's own grep step targeted a sentence that #9529 withdrew — so the item could
not be run at all, and a runner taking it at face value would have filed a P1 failure
against a capability that was never built.
Disposition: rewrite to today's contract, keep it active and P1
This follows the triage ruling on the issue (2026-08-18, Option B). Weighed against the
alternatives:
os migrate meta --write— the AST codemod that rewrites authored sources for the mechanicalappliedset (v18) #9591 — cheapest, and wrong. Six of the item's assertions holdtoday (printed edit list, untouched sources, schema-valid snapshot, idempotent replay,
floor refusal, semantic advisories,
--jsonexit honesty). The item could not passbecause of a wording defect in the item, not because coverage was missing; retiring
it would have taken real P1 coverage to zero to fix a sentence.
os migrate meta --write— the AST codemod that rewrites authored sources for the mechanicalappliedset (v18) #9591, whichalready carries the capability with its own
Restart-when:line.restart condition inside the item so feat(cli):
os migrate meta --write— the AST codemod that rewrites authored sources for the mechanicalappliedset (v18) #9591's landing is detected rather than hopedfor.
What happens when #9591 lands in v18
The restart is mechanical, not a note someone has to remember. The item's last step and
last acceptance clause read the
--helpflag surface and pin today's exact flag list;a
--write(or equivalent) appearing there is defined in the clause as the signal torestore the removed assertions and bump the revision — explicitly not a failure. A
knownGapsentry states the same in the other direction, so a runner does not record themissing rewrite as
blocked(dependency)or file it as a defect. #9591 stays the home ofthe capability; this item stays the thing that notices it arrived.
The capability claim, verified here rather than inherited
packages/cli/src/commands/migrate/meta.tsdeclares exactly:A probe for in-place rewrite flag names (
write|fix|in-place|inPlace|rewrite|codemod)against that declaration block returns zero hits, exit 1. The same probe shape run as
a positive control over
out|apply|stored|fromreturns four hits at lines 195/208/212/222,so the zero is a real absence and not a broken probe.
Both
writeFileSynccalls on the authored-source arm are--out-guarded(
if (flags.out) writeFileSync(resolve(flags.out), JSON.stringify(result.stack, null, 2))),and the command's own header states the position:
#9591 (open,
pm:on-hold,target:v18) proposes--writeas the flag that does not exist yet.Residue sweep, re-derived on this branch
Sweeping for the withdrawn sentence
to rewrite existing sources automaticallyfinds sixfiles: this checklist item (the only live assertion), the deliberate pin fixture
packages/spec/src/shared/retired-key-migrate-sentence.test.ts, and fourCHANGELOG.mdhistories. Only the checklist item is touched here.
Sweeping for the replacement house sentence finds 50 files — 30
.tsplus 20.mdxdocs pages. The 30.tsfigure matches the pre-dispatch measurement; the 20.mdxare additional surface that sweep did not cover, and are consistent with it ratherthan in conflict.
After this change
cli.jsonstill matches a grep for the withdrawn sentence, deliberately:the revision-3
historyentry quotes it verbatim to record what was removed, in the samepast-tense register as the CHANGELOGs. That is outside the class pin's reach — its corpora
are
packages/spec/srcandpackages/lint/srconly — so it cannot turn that pin red.Verification
pnpm check:platform-checklistis not a CI gate..github/workflows/lint.ymlrecords the maintainer decision that it runs on a manual cadence, and
scripts/pm/dispatch-gates.mjsindependently places 0 of 117 check families on thispath. So the local run below is the only run this change gets, which is why it carries a
reverse verification rather than resting on CI.
Run at
9725a1267, exit codes captured before any pipe:204 items, 204 active — unchanged, confirming the P1 was rewritten and not quietly dropped.
Reverse verification (predicted direction: red). Stripping the
oraclekey from thenew restart clause, confirmed on disk by re-parsing the file and printing the clause's
remaining keys (
['clause', 'verify', 'evidence'],oracle present: False):It names
acceptance[7]— the clause this PR adds — so the green above is reading the newcontent, not skipping it. The restore leg was then run and re-confirmed on disk (
oracle: logpresent again, working tree clean against HEAD) with the validator back to
EXIT=0. No buildor
dist/is involved: the validator imports only node builtins plus a sibling.mjs, so itwas run outside the shared verify lock, declared.
Clause ②: not triggered. The path limb is
packages/spec/src/**and this touches none ofit; on content, a QA ledger document changes no contract accept/reject behaviour and widens no
public surface.
Changeset: none owed — the diff is one file under
docs/qa/**and reaches no publishedpackages/*, so the PR carriesskip-changeset.Scope
One file, one item. Two adjacent findings were filed unassigned rather than fixed here; they
are named in the report on #9733. Neither #9591 nor #9529 is addressed by this PR — #9591
remains open as the v18 capability.
Generated by Claude Code