fix(spec): retirement prescriptions state what os migrate meta actually does - #9732
Conversation
…ally does (#9529) The house sentence promised "rewrite existing sources automatically". The command has never written an authored source file: it replays the conversion chain in memory, prints the attributed mechanical change list, and writes only the `--out` JSON snapshot. Withdraw the claim class-wide, per the maintainer ruling of 2026-08-18, in favour of: Run `os migrate meta --from N` to list the mechanical edits for existing sources; apply them by hand. Swept across every shipped site — the canonical sentence, the MIXED two-clause shape for partial-value conversions, the variant phrasings in tombstone and conversion-registry prose, and the hand-written upgrade docs. The class-wide pin moves in lockstep and now holds both directions: the new sentence required, the withdrawn claim red wherever it reappears. Behaviour unchanged; `packages/cli` untouched. The in-place codemod that would make the original claim true is #9591 (v18). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016D9wdJR14KKCxz1WgdAzcw
📓 Docs Drift CheckThis PR changes 2 package(s): 29 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 6 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 115 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 dbb89f5a30a082a9bd9b4a36e05f7afcbb1c2b56 && git checkout dbb89f5a30a082a9bd9b4a36e05f7afcbb1c2b56
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e196c6a9baa8684c14e5e72545c8009f98a9ed14 6e8b5299879c056a866dc9ef7746693d05789f7c && git checkout -B drift-repro e196c6a9baa8684c14e5e72545c8009f98a9ed14 && git merge --no-ff 6e8b5299879c056a866dc9ef7746693d05789f7c
node scripts/docs-audit/affected-docs.mjs --json e196c6a9baa8684c14e5e72545c8009f98a9ed14
|
Fixes #9529
Implements the maintainer's Option-2 ruling of 2026-08-18 (comment 5328152596, verbatim: 「其他接受你的建议」). Option 1 — the in-place AST codemod — is commissioned separately as #9591 for v18 and is not addressed here; nothing in this PR touches that card's scope or
packages/cli.The claim that was withdrawn
Every
retiredKey()prescription whose surface an ADR-0087 conversion covers closed with a maintainer-ruled sentence (2026-08-09, #6856):os migrate metahas never written an authored source file. It replays the conversion chain over the loaded stack in memory, prints the attributed mechanical change list (Applied N mechanical change(s), one line per site aspath: from → to (conversionId)), and writes exactly one file — the--outJSON snapshot, when you ask for it. Both write sites inpackages/cli/src/commands/migrate/meta.tsare that snapshot, and there is no--write/--fix/ in-place flag. So an author who followed the prescription got a replay, a printed diff and optionally a JSON document in a shape their per-artifact.tsmodules are not written in — then still hand-edited every file, with nothing in the message saying so.The new sentence
Partial-value conversions keep their two-clause MIXED shape, reworded the same way — e.g.
ui/dashboard.zod.ts: "… to list the mechanical edits for the1ycase; the other durations are reported for you to re-state."The wording keeps everything #6856 ruled and adds what #9529 ruled:
skills/objectstack-upgrade/SKILL.mdalready told operators under "The one fact that surprises every operator" — the messages now agree with the skill instead of contradicting it.What moved
packages/spec/src/shared/retired-key.ts: the house-sentence rule in the module docblock, with both rulings recorded and a pointer to feat(cli):os migrate meta --write— the AST codemod that rewrites authored sources for the mechanicalappliedset (v18) #9591's restoration path.packages/spec/src/shared/retired-key-migrate-sentence.test.ts, in lockstep, and strengthened in both directions. The shape check now requires the new sentence; a newfindWithdrawnClaims()scan makes the withdrawn claim a hard failure wherever it appears in prescription text — including in a prescription that spells the bare command with no--from N(three enum-value prescriptions inui/component.zod.tsdo), which the marker-anchored shape check alone would never have judged. Both directions have anti-vacuity fixtures.domain:cliseat's measurement warned would otherwise be left standing ("rewrites author sources", "rewrites authored sources", "rewrites it for you", "onlyos migrate metarewrites sources", "rewrites the consumer's source") in tombstone docblocks, the conversion registry and the migration ledger.content/docs/upgrading.mdx(which claimed "it rewrites your source" in four places, and now carries the same "does not rewrite your source files" callout as the skill), pluscontent/docs/ui/apps.mdx,content/docs/data-modeling/fields.mdx,content/docs/automation/flows.mdx,content/docs/protocol/objectui/actions.mdx.content/docs/references/**anddocs/protocol-upgrade-guide.md, viacheck:generated --fix(which proved exactly those two stale).Behaviour is unchanged in both packages — message text only, no accept/reject verdict moves,
packages/cliuntouched.Measured, on this branch's head
6e8b529.tsinpackages/spec/src+packages/lint/src)2b292ce)Across all shipped surfaces (every tracked file except
CHANGELOG.md,.changeset/,docs/adr/,docs/qa/), occurrences of the withdrawn claim in any phrasing: 215 in 61 files → 15 in 5 files, and each of the 15 survivors is deliberate — 11 are the pin's own RED fixtures, and the rest are the negation of the claim (content/docs/upgrading.mdx,skills/objectstack-upgrade/SKILL.md), anot.toMatchguard inpackages/lint/src/validate-expressions.test.ts, and the docblock inretired-key.tsquoting the withdrawn wording as history.Verification
packages/spec/src/data/field.zod.ts:1216) → the pin went RED on 3 of 9 tests, namingspec:data/field.zod.ts:1216; restored withgit checkout HEAD --and back to 9/9 green. No rebuild was involved or needed — the pin is a source scan that reads the files from disk and imports nothing fromdist/.pnpm --filter @objectstack/spec test— 413 files / 10974 tests passed;pnpm --filter @objectstack/lint test— 74 files / 2088 tests passed.pnpm --filter @objectstack/spec check:generated— all 13 generated artifacts up to date;typecheckgreen for both packages.node scripts/pm/dispatch-gates.mjs(30 gates, wider than the dispatch list) — all green, includingcheck:type-check-debt --re-measure,check:engine-double-contract,check:where-matcher,check:query-options-erasure,check:cross-package-test-inputs,check:merge-driver,check:docs-audit-scopeandnode scripts/check-nul-bytes.mjs.Deliberately not edited
.changeset/migrate-meta-reads-retired-key-sources.md(#9418's pending release note) quotes the withdrawn sentence, and its count, as the state that motivated that change. It is another card's release prose describing a past state, so it is left alone and filed as a finding instead.Generated by Claude Code