Skip to content

fix(spec): open the major-19 retired-key and retired-def regions in the migration registry template - #37557

Draft
objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-sylqxb-i37549
Draft

objectstack-fleet[bot] wants to merge 3 commits into
mainfrom
claude/project-thread-sylqxb-i37549

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #37549

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:发版流程里,版本号升到 19 之后,迁移登记表的生成不会再拒收第 19 版的下线条目,"版本发布"那个 PR 的核心测试可以变绿。
  • 为什么做:给发第一个 19 预发布版(next 渠道)清掉阻断。版本 PR 的必过检查一直是红的,现在没法合并。
  • 出错会怎样:只给模板加了两个空区段和一条测试,不改任何已发布行为;出问题直接撤回这个 PR 即可。
  • 要你做什么:无。

What changes

  • packages/spec/src/migrations/registry.ts.template: opens an empty retired-key:19 region in RETIRED_KEYS_BY_MAJOR and an empty retired-def:19 region in RETIRED_DEFS_BY_MAJOR, each placed and shaped like its major-18 sibling. semantic:19 and step19 already existed, so the migration-step side needed nothing.
  • retired-def:19 goes beyond the card's wording, as an in-place fix of the same defect class. build-schemas.ts prescribes new retired-def entry files under the same CURRENT_MAJOR (renderNewEntryFiles, used for both kinds). So the first whole-def removal on the 19 tree would have hit the same generator refusal. Same file, same gate family, same mechanical fix.
  • scripts/build-migration-registry.ts needs no change. Its lines ~422–441 are --self-test fixtures, not a region list: the generator discovers regions from the template's markers.
  • Pin (packages/spec/scripts/build-migration-registry-entry.test.ts, new describe): every kind in KINDS has an open and close marker in the template for each of two majors, the spec package's major (what build-schemas.ts registers new entries under) and PROTOCOL_MAJOR. On main today these are 18 and 19, so the pin reds on main before the fix and names the missing region and the major.
    • Why PROTOCOL_MAJOR and not "spec major + 1": the protocol major moves first, on main (it reads 19 while the package is still 18.6.0). It is the leading signal for the next major.
    • "spec major + 1" would also red the Version PR tree itself (19 + 1 = 20), unless a major-20 region were opened now.
  • Changeset .changeset/37549-retired-key-19-region.md (patch; the template renders into the shipped registry.ts).

Tests

Pin reds on the pre-fix template (origin/main 1af67b2 template restored, then put back)
× opens and closes `retired-key:19`
× opens and closes `retired-def:19`
AssertionError: src/migrations/registry.ts.template has no `os-generated retired-key:19` region, but major 19 is current (spec package 18.6.0, PROTOCOL_VERSION major 19); an entry registered there is refused by gen:migration-registry. ...
Tests  2 failed | 8 passed (10)
os-verify-lock: VERDICT command-exit 1
Version tree: spec temporarily at 19.0.0-next.0 (not committed)

pnpm gen:migration-registry && pnpm exec vitest run --maxWorkers=2 scripts/build-migration-registry-entry.test.ts scripts/build-schemas-check-mode.retired-keys.test.ts (both projects), with packages/spec/package.json version set to 19.0.0-next.0. The run includes "the printed route registers: write exactly the files check (b) names, run the generator, and (b) is silent", the case that fails on #35129.

Test Files  2 passed (2)
     Tests  20 passed (20)
os-verify-lock: VERDICT command-exit 0

The version was restored to 18.6.0 afterwards; git status was clean apart from the intended diff.

18.6.0 tree: same two files
Test Files  2 passed (2)
     Tests  23 passed (23)
os-verify-lock: VERDICT command-exit 0
Spec package, local project, at 2fd0411: `pnpm --filter @objectstack/spec test` and `pnpm typecheck`
Test Files  899 passed (899)
     Tests  28505 passed | 1 todo (28506)
os-verify-lock: VERDICT command-exit 0
typecheck (tsc + check:scripts-typecheck + check:test-typecheck): VERDICT command-exit 0

test:repo (the vitest repo project) belongs to CI's Test Core. Only its one touched-path file, build-schemas-check-mode.retired-keys.test.ts, was run locally (above).

Acceptance notes

Verification

Two-minute check: pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2 scripts/build-migration-registry-entry.test.ts, expected to show Tests 10 passed (10). Then set the spec version to 19.0.0-next.0 and run scripts/build-schemas-check-mode.retired-keys.test.ts, which should also be green.

Read first: (1) the two new template regions; (2) the pin's choice of majors (spec package major and PROTOCOL_MAJOR).

Local gate subset at 2fd0411: derived by node scripts/pm/dispatch-gates.mjs --commands. Verdicts are in the dev report on the card. check:doc-formula-expressions is NOT MEASURED locally (PREREQUISITE NOT MET: @objectstack/formula and @objectstack/lint are not built in this worktree); CI runs it. The full farm belongs to CI.


Generated by Claude Code

…he registry template

Claude-Session: https://claude.ai/code/session_01L6bhgV6i8jfWwSXjpWJrjA
Co-authored-by: Claude <noreply@anthropic.com>
…majors; changeset

Claude-Session: https://claude.ai/code/session_01L6bhgV6i8jfWwSXjpWJrjA
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/spec/src/migrations/registry.ts.template), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/src/migrations/registry.ts.template) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c385d3bd1642861a1cd681d71b78655ec1f75d7a → packageMentionDocs.

…ill claim on the spec major

Claude-Session: https://claude.ai/code/session_01L6bhgV6i8jfWwSXjpWJrjA
Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants