Skip to content

fix(spec,test): unblock the 19 Version PR: open the major-19 registry regions, parse prerelease versions in the MCP save test, key the objectui pin claim on the spec major - #37557

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-sylqxb-i37549
Nov 26, 2026

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #37549

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:发版流程里,版本号升到 19 之后,有三处会红,这里一起修掉:迁移登记表的生成不会再拒收第 19 版的下线条目;MCP 保存草稿的一条测试不再把预发布版本号(19.0.0-next.0)读坏;界面仓的版本说法检查不再写死 18。"版本发布"那个 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.
  • Item 2 (seat-amended scope, card spec: the registry template has no <os-generated retired-key:19> region, so Test Core fails on the 19.0.0-next.0 version tree and the first 19 pre-release cannot merge #37549): packages/runtime/src/domains/mcp-authoring.test.ts. The [#34774] describe parsed SERVER with split('.'), so on the Version PR tree (19.0.0-next.0) the patch field was 0-next and the built version was 19.0.NaN, which the door refuses as not SemVer. It now parses with SEMVER_2_0_0_VERSION_PATTERN from @objectstack/spec/kernel, the grammar the door itself judges with, and drops the prerelease from the versions it builds. A new case declares the server's own version verbatim and ${major}.${minor}.0-next.0, and asserts both save byte-identically to no declaration. Test-only; @objectstack/runtime ships dist alone, so no runtime changeset is owed.
  • Item 3 (seat-amended scope): ui/scripts/__tests__/doc-version-claims.test.ts. The skills/objectui/SKILL.md KNOWN_CLAIMS row was the literal @objectstack/spec 18.x. It is now keyed on SPEC_MAJOR, read from packages/spec/package.json under workspaceRoot(). The literal in the skill can't go, because the root check-skill-compatibility-version.mjs requires the pin and rewrites it with the version step. So skills/** is not touched, and the PR stays off Tier H.
  • 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
Items 2 and 3 on the Version tree (spec at 19.0.0-next.0 and the objectui skill pin at 19.x, both temporary, restored after)
runtime mcp-authoring.test.ts      Tests 57 passed (57)
ui doc-version-claims.test.ts      Tests 29 passed (29)

Ablation on the same tree with the origin/main 1af67b2 versions of the two tests: runtime 1 failed | 55 passed (the SemVer form (e.g. 18.6.0) case), ui 2 failed (skills/objectui/SKILL.md :: @objectstack/spec 18.x), matching #35129's CI failures. On the 18.6.0 tree: runtime 57/57, ui 29/29. ui scripts/ suite at the final head: 172 passed | 2 skipped files, 5130 passed tests.

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

Body amended by the seat (repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA) to cover the three items the card's scope grew to; the dev report on #37549 (7194227076) carries the full evidence.

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>
@github-actions github-actions Bot added size/m and removed size/s labels Nov 26, 2026
@objectstack-fleet objectstack-fleet Bot changed the title fix(spec): open the major-19 retired-key and retired-def regions in the migration registry template fix(spec,test): unblock the 19 Version PR: open the major-19 registry regions, parse prerelease versions in the MCP save test, key the objectui pin claim on the spec major Nov 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0e5473f595dea76b78f2fd7704cb4cedccefb427
Local-runs: none
Scope: packages/spec/src/migrations/registry.ts.template + packages/spec/scripts/build-migration-registry-entry.test.ts

Inputs, read 2026-11-26T14:16Z: card #37549 (body and its 5 comments), PR #37557 (body, 5 files, net diff against main from merge-base 1af67b26cd), and the 73 check-runs on the head: 61 success, 12 skipped, none failed, none pending. main is 11 commits past the merge-base and touches none of the files read below. The other three files of the diff (packages/runtime/src/domains/mcp-authoring.test.ts, ui/scripts/__tests__/doc-version-claims.test.ts, the changeset) are the lane seat's ACCEPT at TIER_DEFAULT; they were read for ①②③ and are not judged in ④.

① Derived judgments

  • Authorable accept set: unchanged. Right. No Zod schema, error code, authorable-surface/ baseline or json-schema.manifest/ line is in the diff. The two template hunks add comment lines and two empty array literals.
  • Published surface of @objectstack/spec/migrations: declared types unchanged, values gain one own key each. Right, with the precise wording. RETIRED_KEYS_BY_MAJOR and RETIRED_DEFS_BY_MAJOR keep their declared type (a readonly record of number to readonly string array), and api-surface/migrations.json and export-origins/migrations.json are not in the diff. The generated value of each table gains 19: [], so Object.keys() on either now lists 19. The PR body's "no exported value or key changes shape" is true of the type and loose about the key set. No reader depends on the key set: at this head every reader of the two tables outside test files is in packages/spec/scripts/build-schemas.ts (:841, :848, :1039, :2690), each folding entries into a map or a flat list, where an empty array contributes nothing; the root scripts/measure-partial-retirement-annotation.mjs parses the table body as text and likewise finds no entry in an empty region. No src module of any package, ui/ included, reads either table; the test readers index [17] or [18], flatten, or loop the entries.
  • Build-time accept set of gen:migration-registry: widened on purpose. Right. renderRegistry (build-migration-registry.ts) refuses an entry whose kind:major has no marked region. 19.*.ts files under entries/retired-keys/ and entries/retired-defs/ were refused on every tree and are now concatenated. This matches semantic:19, open since the protocol move. An entry registered under 19 while the package is still 18.x cannot age out early: the deletion gate (build-schemas.ts:2973) computes 18 - 19, which is below the one-major age.
  • New red: the pin. Any tree on which a kind in KINDS lacks an open or close marker for the spec package major or for PROTOCOL_MAJOR now fails build-migration-registry-entry.test.ts, in the spec local project that Test Core runs. Right; judged in ④.
  • Runtime: no product change. Right. clientSpecVersionVerdict (mcp-authoring.ts:203) already validates with SEMVER_2_0_0_VERSION_PATTERN and compares only the first two dot fields of each side, which sit before any prerelease hyphen. The test now parses the way the door validates; the new case pins that a prerelease client saves against the same major and minor.
  • UI: the KNOWN_CLAIMS row follows the spec package major. Right. That is the value scripts/check-skill-compatibility-version.mjs --fix writes into the skill's pin in the version step, so the row and the literal move together.

② Semver level

  • .changeset/37549-retired-key-19-region.md grades @objectstack/spec patch with Metadata-protocol: none. That matches what the diff publishes: the template renders into the registry module the ./migrations entry ships, and the only shipped difference is two empty keyed arrays. Nothing an author writes against is added, narrowed or changed in meaning, so the level axis gives patch.
  • The Clause-②: no line on the PR body and on the changeset holds: no accept-set narrowing, no new required member, no removed export.
  • No changeset is owed for @objectstack/runtime: its manifest publishes dist, README.md and CHANGELOG.md, and the one runtime file in the diff is a test. ui/scripts/__tests__/ is unpublished. Both Check Changeset runs concluded success.

③ Boundary flags

④ Design judgment

No must-fix, no should-fix.

registry.ts.template. The contract is the generator's refusal plus the gate's prescription. build-schemas.ts:769 reads CURRENT_MAJOR from the spec package version with Number.parseInt, which gives 19 for 19.0.0-next.0. renderNewEntryFiles (:828) names every new entry file under that major for BOTH kinds: retired-key at :1223, retired-def at :883 and :2800. The generator then requires a kind:major region for each. The new markers at template lines 3907 to 3908 and 4046 to 4047 are spelled exactly as the generator's open pattern and closeMarker read them (four spaces, the same comment form as the major-18 siblings), and each sits inside its own table before the closing brace that the check-mode fixtures anchor on. The failing case on #35129 writes the file names check (b) prints into a sandbox copy and runs the sandbox's generator; with retired-key:19 present the refusal it hit has no path left.

  • retired-def:19 in place: justified. Same root cause through the same function, same file, no behaviour. It stayed latent only because the def-side check-mode tests seed the table by substitution and never run the generator on a 19.* def file; the first whole-def removal on the 19 tree would have met the identical refusal. The pin, uniform over KINDS, also could not go green without it.
  • The two new template comments state what the code does: PROTOCOL_VERSION reads 19, check:authorable-surface is build-schemas.ts --check, and the manifest deletion gate prescribes under the package major.
  • Limit of the evidence. Every check-run on this head ran with the package at 18.6.0, so none exercised the 19 tree. The 19-tree result rests on the static reading above and on the dev's uncommitted local run in the report; the real witness is chore: version packages (next) #35129 once it is refreshed onto a main that carries this.

build-migration-registry-entry.test.ts (the pin). Tried against four trees:

  • main before the fix (package 18, protocol 19): requires 18 and 19 for three kinds; retired-key:19 and retired-def:19 are absent at the merge-base, so two cases red. Agrees with the dev's ablation.
  • This head: all six regions present, green (Test Core success).
  • The Version tree (package 19, protocol 19): the set collapses to 19 alone, green. "Package major plus one" would demand 20 there and red the release tree, and a semantic:20 region cannot be opened ahead of time without a step20 in MIGRATIONS_BY_MAJOR, which is behaviour. The dev's choice of PROTOCOL_MAJOR is the right second major.
  • The next major: PROTOCOL_VERSION moves to 20 in an ordinary PR while the package is 19.x (the ruled route, admitted by check-changeset-no-major.mjs in pre mode with a pending major). The pin reds that PR until all three major-20 regions exist. That is the card's "fails on main when PROTOCOL_VERSION's major has no region".

The import of ./build-migration-registry runs nothing (the invokedDirectly guard, pinned by the first describe of the same file). The package-major read is the same expression as build-schemas.ts:769. The "reads two real majors" case stops a NaN major from passing vacuously.

  • N1 (nit) — the pin's lead on the next major exists only on the route where the protocol constant moves first. scripts/sync-protocol-version.mjs still moves the constant inside the version pass when it has not moved; on that route both majors change together and the missing region first reds on the Version tree, as it did here, though now with a message naming the region. The changeset's "caught on main rather than on the Version PR" is true of the ruled route only. Accepted deviation: no second major covers the sync route without opening a step early (see the release.yml note below for the route that would).
  • N2 (nit) — the pin spells the open and close marker lines itself, a second copy of the shape renderRegistry reads. Today the two agree and a drift could only red falsely. Driving renderRegistry over the template with one synthetic entry per kind and major would make the generator the judge. Accepted deviation.

Out of the diff, read and not reviewed:

  • .github/workflows/release.yml:825 — the post-version validation renders the post-version tree on a schedule and runs a fixed gate list; from the spec package it runs protocol-version.test.ts alone. All three of this card's failures are red only on that tree and none of their files is in the list, the new pin included. Adding the pin (one file, no build) there would cover the sync route N1 names. A follow-up card for the lane, not a change to this head.
  • mcp-authoring.ts:206 — the non-SemVer refusal text carries the literal example 18.6.0; on the 19 line it names the previous major.
  • build-schemas.ts:769 — on main today the gate prescribes 18.* entry names while PROTOCOL_VERSION reads 19 and the 19 regions are open. Which major a retirement merged in this window belongs to is decided there; this PR does not change it.
  • doc-version-claims.test.ts (remainder) — workspaceRoot() returns the objectui root in the standalone layout, where packages/spec/package.json does not exist, so the new module-scope read would throw there. The row it serves already presumes the monorepo (the skill lives in the root skills/).

Implemented-by: claude/project-thread-sylqxb-i37549
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 0e5473f · card #37549 (p0, release-blocker for Version PR #35129) · 2026-11-26T14:19Z

L1 checklist

  • Shape and relation: l1-face.mjs --pr 37557 flagged one item, the changeset row for @objectstack/runtime, and it is answered here. The one runtime file is a test, and the package publishes dist, README.md and CHANGELOG.md only, so no runtime entry is owed. At 0e5473f there are 61 success, 12 expected skips, 0 failed and 0 pending, and mergeable_state is clean. 113 changed lines, not governed.
  • Fixes #37549 is right. The card's scope grew to three items (amend on the card), and all three ride here:
    • ① the major-19 retired-key region in the migration registry template, with retired-def:19 added in place because renderNewEntryFiles prescribes both kinds under the package major;
    • ② the [#34774] MCP save test parses SERVER with the SemVer 2.0.0 grammar instead of split('.'), plus a new case for a prerelease and the server's own version;
    • ③ the objectui pin row in doc-version-claims.test.ts is keyed on SPEC_MAJOR read from the spec manifest.
  • Scope: 5 files, all on the card: the template, its pin in build-migration-registry-entry.test.ts, the two test files, and a @objectstack/spec patch changeset. skills/** is untouched, because the root skill-compatibility check requires the literal pin, so the PR stays off Tier H.
  • PR body: the dev's open question (the body covered item 1 only) was answered by the seat's body rewrite at 14:08Z. The title and the body now cover all three items.
  • Evidence: the dev ran items ① to ③ on a temporary 19.0.0-next.0 version tree (not committed) and got runtime 57/57, ui 29/29 and spec 20/20. Ablated with the main versions of the tests, runtime goes red 1 and ui red 2, matching chore: version packages (next) #35129's failures. The pin is red on the pre-fix template. Every check-run here ran at 18.6.0, so the real witness for the 19 tree is chore: version packages (next) #35129 once refreshed onto a main carrying this.
  • Sentence-by-sentence read of the changeset: its three sentences match the template hunks and the pin. "Caught on main" holds on the ruled route (PROTOCOL_VERSION moves first); that limit is L2's N1.
  • L2: the Contract review record 7194561170 at CONTRACT_REVIEW_TIER on this head is a PASS with no must-fix and no should-fix. N1 (the sync-script route still reds first on the Version tree) and N2 (the pin spells the marker lines itself) are accepted deviations. L2's out-of-diff notes go to one review follow-ups of PR #37557 card.
  • Overlap: feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371 now edits the same template (its step19 block), more than 150 lines from these hunks, so either merge order is textually clean.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 14:19
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
@objectstack-fleet objectstack-fleet Bot mentioned this pull request Nov 26, 2026
3 tasks
Merged via the queue into main with commit 083e040 Nov 26, 2026
74 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-sylqxb-i37549 branch November 26, 2026 15:13
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… resolves, not a fixed workspace path (objectstack-ai#38089)

<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoQcXadSnPCNF2ff1apTGQy2)_

Part of objectstack-ai#37587
repo:objectstack#3 · os-tesla · session_01L9qibxRSo4RBpRknKqBLmy

Clause-②: no
Metadata-protocol: none

## 维护者速读
- 用户无感:只改界面仓的一份检查测试。它以前在模块加载时按固定的 monorepo 路径读 spec 版本,在独立的 objectui
检出里文件一加载就抛错;现在改成按包解析去读,monorepo 下读到的还是同一个文件。
- 为什么做:卡 objectstack-ai#37587 的第 3 项(PR objectstack-ai#37557 审核留下的三条之一)。第 1 项(release.yml)是 Tier
H,按席位裁定另开 PR;第 2 项已由 objectstack-ai#37821 修好。
- 出错会怎样:只影响这一份测试;不发布任何字节,出问题直接撤回。
- 要你做什么:无。

## What changes
- `ui/scripts/__tests__/doc-version-claims.test.ts`:
- `SPEC_MANIFEST` is now
`createRequire(import.meta.url).resolve('@objectstack/spec/package.json')`:
the spec package this tree's own dependency (`ui/package.json`,
`"@objectstack/spec": "workspace:^"`) resolves to. `SPEC_MAJOR` reads
its version from there instead of `path.join(workspaceRoot(),
'packages/spec/package.json')`.
- Under the monorepo the two are the same file (measured below), so the
skill row's claim still tracks the manifest the version step rewrites.
In a standalone objectui checkout, which has no `packages/spec`, the
module no longer throws on load; it reads the installed package,
matching how `skill-bundle-root.mjs` already degrades in that layout.
- New top-level `describe` "doc version claims - the source of the spec
major" in the same file: under the monorepo the resolved manifest's
realpath equals `workspaceRoot()/packages/spec/package.json`; in the
standalone layout it lies under `node_modules`. A second case checks the
version read starts with `${SPEC_MAJOR}.`.
- No changeset: the file is a test under `ui/scripts/`, and nothing it
touches publishes.

## Tests
<details><summary>Readings at 5508f9f (base origin/main
815e882)</summary>

- Premise at 815e882: l.1056–1059 read `path.join(workspaceRoot(),
'packages/spec/package.json')` at module scope. `workspaceRoot()` is the
objectui root when that root holds `pnpm-workspace.yaml` (the standalone
layout), and that root has no `packages/spec`.
- Resolution in this checkout: `createRequire(<test
file>).resolve('@objectstack/spec/package.json')` gives
`<root>/packages/spec/package.json`, the same realpath as the workspace
path, version `19.0.0-next.1`.
- `pnpm --dir ui exec vitest run
scripts/__tests__/doc-version-claims.test.ts`: `Tests 31 passed (31)`
(29 before, plus the two new cases).
- Ablation on the committed fix: `SPEC_MANIFEST` pointed at a
byte-identical copy of the spec manifest in a temp directory. `× under
the monorepo, resolves the workspace spec package the version step
rewrites`, `Tests 1 failed | 30 passed (31)`. Restored with `git
checkout HEAD -- <file>`; `git status --porcelain` empty.
- Not measured: a run inside a real standalone objectui checkout. That
layout is no longer built here; the standalone arm of the pin is checked
by reading only.
</details>

<details><summary>Gates at 5508f9f, then the merge 1ea0196</summary>

- `dispatch-gates --ran` on
`ui/scripts/__tests__/doc-version-claims.test.ts`: 21 derived, 21 run,
every one `exit 0`, 0 NOT-MEASURED (a derived zero: each line records
its exit code), 0 unrun. That includes `pnpm --dir ui exec vitest run
scripts/`: `Test Files 172 passed | 2 skipped (174)`, `Tests 5144 passed
| 2 skipped (5146)`, 4 m 27 s.
- `pnpm --dir ui type-check:scripts` (`tsc -p tsconfig.scripts.json`,
the program that compiles `scripts/__tests__`): exit 0. `eslint` on the
file: exit 0.
- Merged `origin/main` f72f335 (4 commits, none under `ui/scripts/`,
`ui/package.json` or `packages/spec/package.json`); after `pnpm install
--frozen-lockfile` the file reads `Tests 31 passed (31)` again.
</details>

## Acceptance notes
- The remaining item of objectstack-ai#37587 (`.github/workflows/release.yml`
post-version validation runs the region pin) is Tier H by path and
follows in its own PR on this branch once this one lands, as the seat
ruled on the card.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibxRSo4RBpRknKqBLmy)_

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ate's region pin (objectstack-ai#38119)

<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoQcXadSnPCNF2ff1apTGQy2)_

Fixes objectstack-ai#37587
repo:objectstack#3 · os-tesla · session_01L9qibxRSo4RBpRknKqBLmy

Clause-②: no
Metadata-protocol: none

## 维护者速读
- 用户无感:发版流程里"版本 PR 打开前的校验"多跑一个只要 2
秒的测试。它检查迁移登记模板有没有给当前大版本开好区段;下一次跨大版本时,如果漏开了区段,同一次运行里就会直接报出来,不会等到版本 PR
上再红。
- 为什么做:卡 objectstack-ai#37587 的最后一项。19 预发布那次,版本 PR 就是被这类缺口挡住的(objectstack-ai#37549)。卡上另外两项:ui 测试已由
objectstack-ai#38089 合入,mcp-authoring 文案已由 objectstack-ai#37821 修好。
- 出错会怎样:只在 release.yml 的校验步骤里加了一行检查和一段注释,不碰发布、打 tag 或部署那几步;这个 job
只在定时和手动触发时跑。如果这条检查误报,版本 PR 只是暂时不刷新,撤回这一行就恢复。
- 要你做什么:这个文件按路径属于 Tier H,需要你(GOVERNED_APPROVERS)批准后,由 3 号座位落地。

## What changes
- `.github/workflows/release.yml`, job "Version PR maintenance", step
"Validate the post-version tree":
- One new content gate after the `protocol-version.test.ts` line:
`run_gate pnpm --filter @objectstack/spec --fail-if-no-match exec vitest
run --project local scripts/build-migration-registry-entry.test.ts`.
That file holds the registry template's region pin (from objectstack-ai#37557). It
checks that every migration kind has an `os-generated` region for the
spec package's major and for `PROTOCOL_MAJOR`, the majors a new entry
registers under.
- The header's "WHAT IS CHECKED" list gains the entry. It says why the
gate runs here: the version pass moves the spec major, so on a boundary
train this is the first tree where the new major is the package's own.
It also says what the gate adds next to the existing refusal of a moved
`protocol-version.ts`: the same run names a missing region, rather than
the run after the refusal is resolved. And it says why the other three
files that reddened the 19 Version PR are not added (readings below).
- No other step, job, permission or trigger changes. Nothing publishes;
no changeset.

## Tests
<details><summary>Readings at dc29936 (5746ba60 measured on origin/main
6e06729, then cherry-picked onto 447757d, the merge of
objectstack-ai#38089)</summary>

- Premise at 815e882 and 6e06729: the step ran one spec test file,
`src/kernel/protocol-version.test.ts` (l.825).
- The new gate's command on this tree (spec `19.0.0-next.1`,
`PROTOCOL_VERSION` 19), after install and with no build, which is this
job's state: `Tests 7 passed (7)`, 2.2 s.
- Ablation: with the `retired-key:19` region deleted from
`registry.ts.template`, the same command exits 1: `× opens and closes
'retired-key:19'`, "src/migrations/registry.ts.template has no
`<os-generated retired-key:19>` region, but major 19 is current (spec
package 19.0.0-next.1, PROTOCOL_VERSION major 19)…", `Tests 1 failed | 6
passed (7)`. Restored with `git checkout HEAD -- <file>`; `git status
--porcelain` empty.
- Measured and left out:
- `scripts/build-schemas-check-mode.retired-keys.test.ts` (repo
project): `13 passed`, 132 s. Its failure on objectstack-ai#35129 is the missing
region itself, which the pin judges structurally.
- `packages/runtime/src/domains/mcp-authoring.test.ts`: does not start
without a build (`Failed to resolve entry for package
"@objectstack/objectql"`).
- `ui/scripts/__tests__/doc-version-claims.test.ts`: 2.0 s. Its
version-step input is the objectui skill's `compatibility:` pin, which
`check:skill-compatibility` already judges in this step.
- The workflow still parses as YAML (`yaml.safe_load`).
- At dc29936 the new gate's command reads `Tests  7 passed (7)` again.
</details>

<details><summary>Gates</summary>

- `dispatch-gates --ran` on `.github/workflows/release.yml`: 40 derived,
40 run, every one `exit 0`, 0 NOT-MEASURED (a derived zero), 0 unrun.
</details>

<details><summary>Affected step, before and after (advisory)</summary>

- Before: "Validate the post-version tree" on the last four scheduled
runs and one dispatch took 33 s, 27 s, 33 s, 27 s and 33 s (median 33
s).
- After: one more file at 2.2 s measured locally, so about +2 to 3 s.
Nothing else in the job moves.
</details>

## Acceptance notes
- Tier H by path (`check-governed-merges.mjs`, the `release.yml` row of
the workflows split). It lands only after an authorized approval, then
by the owning seat.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibxRSo4RBpRknKqBLmy)_

Co-authored-by: Claude <noreply@anthropic.com>
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