Skip to content

Commit 216524a

Browse files
fix(spec): three upgrade-guide entries that first ship in protocol 19 move from step 18 to step 19, so os migrate meta --from 18 shows them (#38239)
repo:objectstack#3 · os-tesla · session_01L9qibvcTXi4hWgjz8G8ium <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoT8rr3zveNwye1npfS2EynC)_ Fixes #38142 Clause-②: no Metadata-protocol: none ## 维护者速读 - 从 18 升级到 19 的作者,以前在升级提示里看不到三条变化(表单工具改名、表单类型、发布时拒收存不住的数据模型字段),现在这三条会列在 18 → 19 的升级提示里。 - 修正第 19 版升级说明,替用升级命令从 18.x 升上来的团队补上漏掉的提示。 - 只是把三条说明挪到正确的大版本下,内容一字不改,不碰任何数据或配置;出错也只是提示位置不对,可以直接撤回。 - 无 ## What changes - Three ADR-0087 semantic entries move from protocol major 18 to 19: `semantic/18.ID.ts` becomes `semantic/19.ID.ts` for `define-form-studio-helper-renamed-define-metadata-form`, `form-type-define-form-and-packageless-list-at-form-name` (both from #37366) and `publish-refuses-data-model-fields-that-save-and-do-not-work` (from #37513). The ids and the file contents are unchanged (pure renames, 100% similarity). - Why 19: `gen:migration-registry` files an entry by its filename's major, and `composeMigrationChain(fromMajor)` keeps only the steps above `fromMajor` (`packages/spec/src/migrations/chain.ts:42`). All three were added after `PROTOCOL_VERSION` moved to 19 (`204356a6e`, #37314). None is in `@objectstack/spec@18.6.0`, the last 18.x release; #37513 first shipped in `19.0.0-next.0`, #37366 in `19.0.0-next.2` (tag ancestry). Filed under 18, they were skipped by exactly the 18 → 19 upgrade they describe. - `form-type-…` still follows `define-form-…` in id order, so its "since the previous entry" sentence still reads right. - The id-keyed `adr-0087: registered` markers in `.changeset/pre/*` and the released CHANGELOGs stay valid and are not edited. - One `@objectstack/spec` patch changeset. The registry, `spec-changes.json` and the upgrade guide are generated and not committed, so nothing else changes in the diff. ## Tests No test file changes: the pins that read the chain (`semantic-relevance.test.ts`, `migrations.test.ts`) read the generated step lists, not counts or ids for these entries. The before/after readings below are probes against the generated registry, kept in the project, not in this PR. <details><summary>Readings (head fc06c4d, base origin/main 23fa361)</summary> Generated registry and `composeMigrationChain(18)`: | | step 18 semantic | step 19 semantic | chain `--from 18` lists the three | |:--|:--|:--|:--| | before (main) | 582, holds all three | 21, holds none | MISSING ×3 | | after (this branch) | 579 | 24, holds all three | LISTED ×3 | `applyMetaMigrations(stack, 18)` on a minimal stack: before, `todos=21`, all three NOT LISTED; after, `todos=24`, all three are `todos`. Local runs at fc06c4d: - `pnpm exec turbo run build --filter='./packages/**' --filter='@objectstack/dogfood^...'` under `os-verify-lock`: command-exit 0. - `pnpm --filter @objectstack/spec typecheck`: command-exit 0. - `pnpm --filter @objectstack/spec test`: `Test Files 911 passed (911)`, `Tests 28851 passed | 1 todo (28852)`. - Derived gates (`dispatch-gates.mjs --commands`): 83 run, each exit 0; `--ran` reconciles 83 derived, 83 run, 0 NOT MEASURED (a derived zero: every line records its exit code). - `overlap-check.mjs` before the first push: merges cleanly with origin/main, 0 open PR heads overlap. </details> ## Acceptance notes - **Should `check-adr-0087-registration` read the major?** Not built here (claim). The measured answer: in the window the per-entry files exist (`f293d454b`, 2026-08-10, to origin/main `23fa3619`), every entry added landed at or above the protocol major of its day, except these three. - Protocol 17 (to `4e9fe9ff6`, the 17 → 18 bump): 50 added under 17 and 717 under 18 (the next major, filed before the bump), 0 below 17. The one explicit backfill in the window (`5823d593db`, "backfill nine ADR-0087 ledger entries missing from the v17 stock") landed under 17, equal to the protocol major then. - Protocol 18 (to `204356a6e`, the 18 → 19 bump): 345 under 18, 0 below. The bump commit itself added one entry under 19. - Protocol 19 (since): 33 under 19, 3 under 18. Those 3 are this card's, renamed here. - So a rule "a newly added entry's major is equal to `PROTOCOL_MAJOR` or above it" would have fired on exactly these three in about 1,150 additions, and on no backfill. "Equal to `PROTOCOL_MAJOR`" would have been wrong: it refuses the 717 entries filed ahead of the 17 → 18 bump. The gate already reads the paths of the entries a diff adds, so the check would close a blind spot of an existing gate rather than add a new one. A later backfill below the current major would still need a named exemption. Whether to file the card is the seat's decision. - Reach, corrected by the contract review (comment 7237861973): that reading measures the protocol move, not the release. 34 more `semantic/18.*` entries were added between `spec@18.6.0` (`958ee0359`) and the move, ship in no 18.x release, and are skipped by `--from 18` the same way; each was filed while `PROTOCOL_MAJOR` read 18, so the at-or-above rule would not have refused them. They are outside this PR's claim; the carrier is the seat's. - Releases already out: `19.0.0-next.0` and `next.2` carry these entries under 18, so `os migrate meta --from 18` on those prereleases still skips them. The fix ships with the next prerelease. No released text is edited (AGENTS.md: CHANGELOGs are release-owned). ## Verification Read first (by risk): 1. The three renames: `git diff --stat -M origin/main...HEAD` shows `R100` for each. 2. The changeset. Two-minute check: in `packages/spec`, `pnpm gen:migration-registry` and then `grep -n "publish-refuses-data-model-fields-that-save-and-do-not-work" src/migrations/registry.ts`. On this branch the id sits inside the `semantic:19` region; on main it sits inside `semantic:18`. --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibvcTXi4hWgjz8G8ium)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent ba2d960 commit 216524a

4 files changed

Lines changed: 10 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): three upgrade-guide entries that first ship in protocol 19 are listed under 19, so `os migrate meta --from 18` shows them
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Three ADR-0087 semantic entries were filed under protocol major 18 after `PROTOCOL_VERSION` moved to 19: `define-form-studio-helper-renamed-define-metadata-form`, `form-type-define-form-and-packageless-list-at-form-name` and `publish-refuses-data-model-fields-that-save-and-do-not-work`. None of them shipped in an 18.x release; each first shipped in a 19.0.0 prerelease. The migration chain from 18 runs only the steps above 18, so an 18.x app upgraded with `os migrate meta --from 18` was never shown these three notes. They now sit in the protocol 19 step, with ids and text unchanged, and the 18 → 19 upgrade lists them. No schema, export or stored row changes. Nothing to migrate.

packages/spec/src/migrations/entries/semantic/18.define-form-studio-helper-renamed-define-metadata-form.ts renamed to packages/spec/src/migrations/entries/semantic/19.define-form-studio-helper-renamed-define-metadata-form.ts

File renamed without changes.

packages/spec/src/migrations/entries/semantic/18.form-type-define-form-and-packageless-list-at-form-name.ts renamed to packages/spec/src/migrations/entries/semantic/19.form-type-define-form-and-packageless-list-at-form-name.ts

File renamed without changes.

packages/spec/src/migrations/entries/semantic/18.publish-refuses-data-model-fields-that-save-and-do-not-work.ts renamed to packages/spec/src/migrations/entries/semantic/19.publish-refuses-data-model-fields-that-save-and-do-not-work.ts

File renamed without changes.

0 commit comments

Comments
 (0)