Uh oh!
There was an error while loading. Please reload this page.
docs(cli): os migrate meta --from lists the mechanical edits, it does not rewrite your sources - #10847
Conversation
…ite (#10831) Four hand-written docs-site pages and one docblock inside the command's own source told authors that `os migrate meta --from N` rewrites their files. It rewrites none. The `--from` arm replays the ADR-0087 chain over the loaded stack in memory and reports the diff; both `writeFileSync` calls in `packages/cli/src/commands/migrate/meta.ts` are guarded by `if (flags.out)`, so the only file it ever writes is the `--out` JSON snapshot, and the command header at :155-157 explicitly declines the AST rewrite as "unsafe and lossy". The in-place codemod is separate and unbuilt. Two of the four were wrong twice over: they attached a *stored*-arm behaviour ("stored flows are rewritten", "rewrite stored metadata automatically") to `--from`, which is declared `exclusive: ['stored']` at :195-198 and therefore cannot be combined with `--stored` at all. Both errors are fixed, not just the verb, and "automatically" — the word the class-wide reword existed to remove — is gone. All four now carry the already-blessed sentence the generated reference carriers use: run the command to LIST the mechanical edits for existing sources, then apply them by hand. The `pendingDataMigrations` docblock at :81 rides along per triage: the contrast it draws (metadata migration's subject is the author's source, the data migrations' subject is a deployment's rows) is correct and is preserved; only the false verb on the first half changed. Split on the ARM, not on the verb: `os migrate meta --stored --apply` genuinely does rewrite `sys_metadata` rows, so no `--stored` wording was touched anywhere, and `content/docs/releases/**` was not edited. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
…entence lists, it does not rewrite `content/docs/deployment/cli.mdx:921-924` is a fifth carrier of the same false verb this PR exists to remove, and the card's table did not reach it: `os migrate meta --from N` rewrites an **author's source** and reads no database; `--stored` rewrites **one deployment's rows** and reads no config. The `--from` half is false for the same reason as the other four — the arm replays the chain in memory and prints the mechanical edits; both `writeFileSync` calls in `packages/cli/src/commands/migrate/meta.ts` are guarded by `if (flags.out)`, so the only file it writes is the `--out` JSON snapshot. This is the same source-vs-rows contrast shape as the `meta.ts:81` docblock, so it gets the same treatment triage ruled for that one: the contrast is correct and is preserved verbatim — both bold subjects, "reads no database" / "reads no config", and the mutual-exclusion note (which restates `exclusive: ['stored']`) are untouched. Only the verb on the `--from` half changed. Split on the ARM, not on the verb: the `--stored` half of this very sentence is correct and is left exactly as it was, as are every other `--stored` mention on the page (:624, :679, :850, :864-867). Line :838 already said "reports what is left to do" and needed nothing. Committed separately from the four dispatched pages so it can be dropped on its own if review judges it out of scope. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
📓 Docs Drift CheckThis PR changes 1 package(s): 11 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 seeCoarse fallback — 23 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 6df3decca319a77b36d4360674e5ed0a45ef6198 && git checkout 6df3decca319a77b36d4360674e5ed0a45ef6198
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bfadf84533e3e9868f2952cf4a29329bb814b4c8 a5ed4cc13429b117414b0a0209f7c358c935063f && git checkout -B drift-repro bfadf84533e3e9868f2952cf4a29329bb814b4c8 && git merge --no-ff a5ed4cc13429b117414b0a0209f7c358c935063f
node scripts/docs-audit/affected-docs.mjs --json bfadf84533e3e9868f2952cf4a29329bb814b4c8
|
✅ ACCEPT — reviewer of record: |
…grate-meta-lists-not-rewrites # Conflicts: # content/docs/protocol/objectui/widget-contract.mdx
os-zhuang
commented
Aug 21, 2026
Merge conflict resolved — |
| file | verdict |
|---|---|
.changeset/migrate-meta-lists-not-rewrites.md | INTACT |
content/docs/automation/flows.mdx | INTACT |
content/docs/data-modeling/queries.mdx | INTACT |
content/docs/deployment/cli.mdx | INTACT |
content/docs/protocol/objectql/query-syntax.mdx | INTACT |
packages/cli/src/commands/migrate/meta.ts | INTACT |
Occurrence counts on the merged tree match origin/main's: flows 2, queries 1, query-syntax 1, cli 2. Delta vs main is now exactly 6 files, +39 / -14 — the conflicted file drops out, and nothing was widened.
Repo-wide audit on the merged tree: zero lines in content/docs/ pair migrate meta --from with a rewrite verb, excluding the deliberately untouched content/docs/releases/. The --stored wording is preserved everywhere, including the docblock contrast ("these two rewrite (or vouch for) a deployment's rows").
Gates re-run on the merged tree
All families named by node scripts/pm/dispatch-gates.mjs (no paths passed — it derives its own change set), run at a5ed4cc134, exit codes captured before any pipe. 26/26 green. Verdict lines as the gates printed them:
✓ check:doc-formula-expressions self-test: 30 cases passed
✓ check:doc-formula-expressions: 22 record-scoped formula example(s) across 416 files / 1444 TS blocks judged clean by @objectstack/formula.
✓ check:doc-formula-expressions (spec TSDoc, #6763): 9 @example(s) judged clean across 977 packages/spec/src files
One gate needed a second pass for a reason that was not a finding: check:doc-formula-expressions first failed ERR_MODULE_NOT_FOUND on @objectstack/formula/dist/index.mjs — a fresh worktree with the dependency closure unbuilt. After pnpm --filter '@objectstack/lint^...' build (VERDICT command-exit 0) it passes as quoted above. Recorded so the first red is not mistaken for a regression.
Two statements in the PR body above are now stale
Left unedited deliberately — flagging rather than rewriting, since the body is otherwise correct and a rewrite risks damaging it:
- "Five hand-written callouts said otherwise. All five now carry the sentence" — four carriers now, plus the
meta.tsdocblock. The fifth was eliminated upstream by the theme-carrier retirement rather than by this PR. - The "What changed" table's
widget-contract.mdx:316row — that file is no longer in this diff. - The Verification section cites
d986096107; the gate re-run above supersedes it ata5ed4cc134.
Fixes #10831 is left as-is and, on my reading, stays truthful: after this merges, every site the card cites is free of the false claim — four corrected here, the fifth deleted outright with its carrier — so the card has nothing left open. Flagged for the reviewer rather than changed unilaterally.
Generated by Claude Code
Generated by Claude Code
Rulings on both open questions — Q1: B (done, by me). Q2: A (keep |
Uh oh!
There was an error while loading. Please reload this page.
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 32494462498 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Fixes#10831
os migrate meta's authored-source arm (--from) rewrites no file. It replays theADR-0087 chain over the loaded stack in memory and prints the mechanical edits. Both
writeFileSynccalls inpackages/cli/src/commands/migrate/meta.tsare guarded byif (flags.out)(:347,:394-396), so the only file the arm ever writes is the--outJSON snapshot, and the command header at
:155-157explicitly declines the AST rewrite as"unsafe and lossy". The in-place codemod is tracked separately in #9591 (v18,
pm:on-hold)and is not built — that card stays open and is not addressed here.
Four hand-written callouts said otherwise (a fifth,
widget-contract.mdx:316, was retired out of existence by #10485/PR #10695 while this PR was open — see the note at the end). All four, plus themeta.tsdocblock, now carry the sentence #9529 alreadyblessed class-wide on the generated carriers (20 files today, e.g.
content/docs/references/ai/agent.mdx:56): run the command to list the mechanicaledits, then apply them by hand.
What changed
content/docs/automation/flows.mdx:245os migrate meta --from 16"--fromrewrites nothing, and stored rows are the--storedarmcontent/docs/protocol/objectql/query-syntax.mdx:860os migrate meta --from 16rewrites affected dataset measures."--fromrewrites nothingcontent/docs/data-modeling/queries.mdx:388packages/cli/src/commands/migrate/meta.ts:81pendingDataMigrationsdocblock, 74 lines above the header that says the oppositeflags.fromis declaredexclusive: ['stored'](meta.ts:195-198), so the first twoattached a stored-arm behaviour to a flag that cannot be combined with
--stored.Both errors are fixed, not just the verb.
The
meta.ts:81docblock rides along per triage's ruling on the card. The contrast itdraws is correct and is preserved verbatim — metadata migration's subject is the author's
source, the two data migrations' subject is a deployment's rows. Only the false verb on
the first half changed.
One file beyond the dispatched surface — flagged for review
content/docs/deployment/cli.mdx:921-924is a fifth carrier of the identical class thatthe card's table did not reach. It is committed separately (
a5ed4cc134) so it can bedropped on its own if review judges it out of scope:
It is the same source-vs-rows contrast shape as the
meta.ts:81docblock, so it got thesame treatment: both bold subjects, "reads no database" / "reads no config", and the
mutual-exclusion note (which restates
exclusive: ['stored']) are untouched — only the verbon the
--fromhalf changed. Verified before editing that no open PR or issue holds thatfile. Line
:838on the same page already said "reports what is left to do" and needednothing.
Split on the arm, not on the verb
The
--stored --applyarm genuinely does rewritesys_metadatarows, so no--storedwording was touched anywhere. Confirmed intact:
content/docs/deployment/cli.mdx:624,:679,:850,:864-867, andcontent/docs/releases/v17.mdx:2475. No changed line in thisdiff mentions
--storedoutside the changeset prose that explains this.content/docs/releases/v17.mdx:451carries the same false sentence and is deliberately notedited — release notes are never touched in a code PR (CLAUDE.md), and
check:docs-audit-scopeenforces it: "release-owned pages are in scope and read-only:9 page(s) under
content/docs/releases/review-only (findings → issues, never edited)".Changeset
content/docs/**is consumed only byapps/docs(private: true), butpackages/cliispublished and this diff touches
meta.ts, so the PR carries a patch changeset for@objectstack/cli. Comment-only: no runtime behaviour changes.Verification
All gates derived with
node scripts/pm/dispatch-gates.mjs(no paths passed — the scripttakes its own change set from the merge base), run at
a5ed4cc134against a clean tree.24 derived families + 2 self-derived (
check:nul-bytes,@objectstack/cli typecheck) — 26/26 green,each exit code captured before any pipe. Selected verdict lines, as the gates printed them:
packages/cli's own test suite was narrowed away deliberately: this diff's only change tothe package is inside a comment block,
tsc --noEmitproves the block still closes, and CIruns the suite regardless.
Refs: #10418 / PR #10829 (where this surfaced) · #9529 (the class-wide reword these five
missed) · #9591 (the unbuilt in-place codemod, still open) ·
docs/qa/platform-checklist/areas/cli.jsonitem
cli.migrate-meta-codemodrevision 3.Generated by Claude Code
origin/mainretired thethemescarrier andThemeSchema(#10485, landed as PR #10695) while this PR was open, andcontent/docs/protocol/objectui/widget-contract.mdxconflicted. Main's side was taken in full: the whole Theme section — including the Callout that held the sentence this PR corrected — is gone, so this PR's edit to that file had nothing left to correct. Confirmed independently:widget-contract.mdxonorigin/mainhas zero occurrences ofos migrate meta, and keeping the hunk would have re-documented a retired carrier.The other five hunks are byte-intact (object-hash compared against the pre-merge head). Merge commit
a5ed4cc134, fast-forward push, ⛔ no rebase/amend/force-push.Fixes #10831is retained, ruled by the reviewing seat: the card's defect is the false claim, not who edited which line. After this merges, every site the card cites is free of that claim — four corrected here, the fifth deleted outright with its carrier — and a repo-wide audit finds zero lines incontent/docspairingmigrate meta --fromwith a rewrite verb, outside the deliberately untouchedreleases/page.Generated by Claude Code