Skip to content

feat(spec)!: PROTOCOL_VERSION 17 → 18 in an ordinary PR — regenerated spec-changes.json and upgrade guide, ^18 handshakes, pre-mode lockstep exception (#22085 Q1 → B) - #22215

Merged
objectstack-fleet[bot] merged 42 commits into
mainfrom
claude/issue-22130-protocol-18
Oct 9, 2026

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #22130
Clause-②: yes (narrowing: the handshake refuses a manifest pinned to protocol 17 ('^17', '^17.x.y', '17.x'), while the exported PROTOCOL_VERSION moves to '18.0.0' and a '^18' manifest is admitted)

Executes #22085 Q1 → B (ruling record 6049734955, the maintainer's 「22082 22085 同意」): the protocol major moves in an ordinary pull request that runs the full CI, not in the version pass.

  • PROTOCOL_VERSION reads '18.0.0'.
  • The two generated documents are regenerated by their own tooling: spec-changes.json, and the 17 → 18 section of the protocol upgrade guide.
  • Every in-repo handshake that means "the current protocol" reads ^18.
  • The lockstep gets one narrow exception, routed by ruling record 6056808625 (letter E, maintainer 「同意」):
    • the local lockstep test recognises only the exception's shape;
    • scripts/check-changeset-no-major.mjs judges the evidence: Changesets pre mode AND a pending major for @objectstack/spec.

Status. os-zhuang approved this PR on c96d8e9446 (an authorized APPROVED review, Tier H); the owning seat lands it after the re-sync rounds below and a delta at-tier contract review. PR #22084 (pre mode plus the major marker) merged as a87d8be299 and is merged into this branch, so the pre-mode condition is live.

Size: 8,611 changed lines against the merge base e148ca9842 (+7,854 / −757, 52 files). 7,819 of them are the two generated documents. That is over the human-merge line (3,000 since #22490; AGENTS.md §7 class (c)), so this PR lands like a Tier H surface: an authorized approval and then the owning seat, or a human merge.

First measurements (answered before the edit, on ef1fcb26a2)

M1 — which packages/cli fixtures declare ^17 on purpose. Only packages/cli/src/utils/protocol-version-gap.test.ts:68.

  • That file's advisory judges a range against an explicit installed '17.2.0', never against PROTOCOL_VERSION. ^17 there is the "the range covers the install" control.
  • packages/cli/CHANGELOG.md is release-owned history.
  • The other 19 files (33 sites) are manifest fixtures standing for a valid current app, and none of them asserts on the range. They read ^18.

M2 — may #5082's 17 → 18 conversions (PR #22103) take effect before ADR-0131 C8? The bump does not change when any conversion applies, and no step-18 entry assumes C8. No fork.

  • applyConversions and the stored-row seam walk every conversion with no PROTOCOL_MAJOR filter.
  • The artifact door keys its conversion window on the declared floor against the installed spec package version.
  • os migrate meta already ends at 18: CHAIN_TERMINUS_MAJOR = Math.max(PROTOCOL_MAJOR, ...MIGRATION_MAJORS).
  • declared-index-unique-scope rewrites bare true to 'global', which is the same physical index. 'organization' is NULL-safe through COALESCE (ADR-0120 D3).
  • The step-18 entries that cite ADR-0131 cite D7 or D8 and describe the pre-C8 shape (rows with no organization are still answered). None assumes organization_id is NOT NULL.

What changes

Directory Files ^17 before ^17 after ^18 after
content/docs 3 3 0 3
examples/app-crm 1 1 0 1
examples/app-multi-package 2 2 0 2
examples/app-showcase 1 1 0 1
examples/app-todo 1 1 0 1
packages/cli 21 35 0 35
packages/lint 2 2 0 2
packages/mcp 1 2 0 2
packages/metadata 1 2 0 2
packages/qa 4 4 0 4
Total 37 53 0 53

Why the evidence lives in check-changeset-no-major.mjs (H3 falsified; ruling E)

H3 put the exception inside protocol-version.test.ts, reading .changeset/pre.json. Measured, that cannot stand:

The maintainer ruled E. R's repo-project test and its six declaration edits are reverted. Each of these files now equals main at b460153912, measured:

  • vitest.repo-tests.json
  • cross-package-test-inputs.mjs
  • check-cross-package-test-inputs.mjs
  • turbo.json
  • ci.yml
  • check-ci-filter-parity.mjs
  • protocol-version-pre-mode.test.ts

scripts/pm/dispatch-gates.mjs, release.yml, cut-rc.yml and sync-protocol-version.mjs are untouched.

The gate's verdict, measured three ways:

Tree Verdict Exit
This branch (protocol 18, @objectstack/spec@17.7.0, pre mode, the #22084 marker pending) ✓ Protocol lockstep: … the one exception, evidenced: pre mode (tag next) and a pending major for @objectstack/spec (.changeset/22080-v18-line-opens.md) 0
main 3513ac7781 with this gate copied in (an ordinary PR, no shape) ✓ Protocol lockstep: PROTOCOL_VERSION major 17, @objectstack/spec@17.7.0 — not one major ahead of a stable version, so there is no pre-mode exception to judge. 0
The same tree with the constant at 18 and the marker removed ⛔ … protocol lockstep refused … no pending changeset declares "@objectstack/spec": major. Either put the constant back in lockstep — PROTOCOL_VERSION = '17.0.0' … or open the next major line first … 1

Residuals, stated:

  • The Check Changeset step is skipped under the skip-changeset and allow-major labels.
  • Check Changeset is not one of the seven required contexts AGENTS.md §7 names.

Judgments: every handshake left at ^17, with its reason

Site Reason
packages/cli/src/utils/protocol-version-gap.test.ts:68 Paired with an explicit installed '17.2.0' (M1).
packages/cli/CHANGELOG.md:7788 Release-owned history.
content/docs/releases/v17/17-5.mdx, 17-6.mdx, 17-7.mdx Release-owned; each describes a 17.x release.
packages/create-objectstack/src/templates/blank/objectstack.config.ts:39 The version pass stamps it together with the template's @objectstack/* ranges (replay: engines.protocol → '^18' beside ^18.0.0). Moving it now would scaffold ^18 over ^17.0.0 dependencies. template-consistency.test.ts holds it equal to the scaffolder major.
packages/metadata/src/__fixtures__/forward-probe-17.4-built.artifact.json:11, hotcrm-17.1-built-bare-root-predicates.artifact.json:12, hotcrm-17.1-built-permissions.artifact.json:12 Frozen artifacts built by 17.x. Their floor is the subject, and the metadata plugin door runs no handshake.
packages/metadata/src/plugin-artifact-forward-conversion-retired-after.test.ts:194, plugin-artifact-forward-conversion.test.ts:221 The artifact's age is the subject.
packages/metadata-core/src/artifact-forward-conversion.test.ts:228, form-predicate-root-policy.test.ts:26,50 Age fixtures against an injected runtime version, or a repro shape. No handshake runs.
packages/runtime/src/app-plugin-artifact-forward-conversion.test.ts:81 The real incident's floor. Its readers run no handshake, and it is green at protocol 18.
packages/spec/src/kernel/manifest-unknown-keys.test.ts:53,278,282, manifest-permissions-string-list.test.ts:53 ManifestSchema shape samples; the schema never judges the major.
skills/objectstack-platform/SKILL.md:143, skills/objectstack-platform/evals/config-plugins-ops.json:7, skills/objectstack-upgrade/SKILL.md:91 Governed Tier H; the seat routes them.
.github/workflows/scaffold-e2e.yml:106 A comment.

Moved to >=17.1.0:

  • packages/runtime/src/standalone-stack-security-registrar.test.ts:49
  • standalone-stack-seeder-declaration-copy.test.ts:117

Both boot through the load seam, which refused ^17.1.0 at protocol 18. Their subject is the forward-conversion window, and that window opens on the floor. >=17.1.0 keeps the floor and admits 18.

Re-premised for protocol 18. This is not a handshake: it is a --from that meant the authoring major.

Site Before After
packages/cli/test/migrate-meta-default-range.test.ts (#17134) --from String(PROTOCOL_MAJOR), with the anti-vacuity line TERMINUS > PROTOCOL_MAJOR --from the rename step's toMajor − 1. The anti-vacuity line moved, word for word, to migrate-meta-default-range-window.test.ts, which holds the runtime major at that authoring major in-process.

Replay of the root version script (throwaway clone of bdee4d2da1)

A clone of the merged branch. pre.json and the major marker come from main, so no overlay was needed. release-rehearsal-clone.mjs --prepare answered FIT. Then pnpm install --frozen-lockfile and pnpm run version:

✓ PROTOCOL_VERSION already 18.0.0 — in lockstep with @objectstack/spec@18.0.0-next.0
✓ blank/objectstack.config.ts: engines.protocol → '^18'

release.yml's shape filter (SURFACES, stampedPaths(), syncedPaths(), the fixed pattern):

  • 361 moved paths, with UNEXPECTED empty.
  • protocol-version.ts not moved, so UNVALIDATED is empty.

Content gates on that tree:

Gate Result
vitest run --project local src/kernel/protocol-version.test.ts 3/3
check:spec-changes exit 0
check:upgrade-guide exit 0
check:template-manifests exit 0
pnpm --filter create-objectstack test 17 files, 254 tests
check-changeset-no-major.mjs exit 0; not one major ahead of a stable version (18 vs 18.0.0-next.0)

Control leg (round 1), the same overlay on ef1fcb26a2: ✓ PROTOCOL_VERSION 17.0.0 → 18.0.0, and protocol-version.ts is in the moved set. That is the UNVALIDATED refusal this PR removes.

Verification

Round 12, at 6ec484243e (report on #22130). The merge queue ejected 4ba5952ea1 in a group behind PR #22381, whose new fixture verify-host-root.test.ts:56 declared ^17 (triage 6081302430). main 8b713fad78 merged (3b97df5a7f, nothing of its own); the fixture moved to ^18 in its own commit (5159d64866), red before it and green after it. main e148ca9842 merged (462a24045b); #22447 had added two step-18 semantic entries, so both documents were regenerated in a separate commit (4d1a408a75: +28 and +6 lines), and the changeset's count tokens moved 327 → 329 in their own commit (6ec484243e). 138 derived gates run, 0 not measured. CI on 6ec484243e: 35 runs, 33 success, 2 expected skips.

Round 11, at 4ba5952ea1 (report 6080275052 on #22130). The merge queue ejected 5ef8ab6ac5 when PR #22315 landed first with a new step-18 semantic entry. main 3ca71b6e05 merged (a46840ee68, no path of its own per git diff-tree --cc); spec-changes.json (+14) and the upgrade guide (+4/−1) regenerated in a separate commit (b8a3e2a45c; 64 conversions, 327 semantic entries, aggregate 404 = the registry's 404); the changeset's two count tokens 326 → 327 in their own commit (4ba5952ea1). At-tier delta contract review PASS 6079895139. CI on 4ba5952ea1: 35 runs, 33 success, 2 expected skips.

Round 10, at 5ef8ab6ac5 (report 6077854211 on #22130; seat ACCEPT 6078284011). A pure regeneration: main bf492c8548 (#22412) merged (b50d5c3866), then spec-changes.json (+12/−12) and the upgrade guide (+6/−6) regenerated in a separate commit; every changed line is a rationale of the six step-18 entries #22412 reworded, and the counts stay 64 / 326. The at-tier PASS 6076766071 is carried by the Regen-provenance: line in PR comment 6077906555. CI on 5ef8ab6ac5: 35 runs, 33 success, 2 expected skips.

Patch round 1, at eb23db8a82 (report 6076558925 on #22130). main e02833c240 merged with os-regen-merge.sh (c80423bc16, committed before any generator ran); no step-18 entry arrived, check:spec-changes and check:upgrade-guide exited 0 on the merged tree, and both generators rewrite byte-identical (64 / 326). The specVersion prescription fix above. spec test 627 files / 18,757 passed and test:repo 54 files / 915; cli protocol-version-gap.test.ts 16 passed; the dogfood cold-boot file 4 passed. The 32 steps of Type Check · source gates exit 0, check:future-spec-major included; dispatch-gates: 138 derived, 138 run. CI on eb23db8a82: 35 runs, 33 success, 2 expected skips.

Round 9, at 4ff2827472 (report 6075705847; seat review 6075740377). The re-sync the handover named: main e75dceddd7 merged (e04231ab07), spec-changes.json and the upgrade guide regenerated after the merge commit (062e3545c8, 324 → 326 semantic entries), the changeset count updated, the two current-app fixtures main added moved to ^18, and PR #22416's one-file fix ported verbatim (02d07755d7; main now carries the identical blob, so it no longer shows in the diff). The merge-queue build of c96d8e9446 had failed check:spec-changes for exactly this staleness.

Round 8, at c96d8e9446. A merge of main b460153912 only, with os-regen-merge.sh (merge commit c96d8e9446). main touched no migration, conversion or kernel file and added no ^17 handshake since 41d0d4038c.

  • gen:spec-changes and gen:upgrade-guide both rewrote their files byte for byte: git diff HEAD is empty.
  • check:spec-changes, check:upgrade-guide, spec check:generated (15 artifacts), check:future-spec-major and check:adr-0087-registration --base origin/main exit 0. check-changeset-no-major --base origin/main --event exits 0 against this body.
  • The two Test Core timeouts on c78f55e352 are not this PR's. Both now exit 0:

Round 7, at c78f55e352. main 41d0d4038c was merged with os-regen-merge.sh (merge commit ecde207250, no regeneration in MERGE state). Then gen:spec-changes and gen:upgrade-guide were run (fed6cd402f), and the changeset now counts 324 semantic entries (c78f55e352).

  • Every step of lint.yml's Type Check · source gates job exits 0, run in order: 32 run steps. They include check:spec-changes, check:upgrade-guide, check:authorable-surface and check:future-spec-major (8 witnessed ledger entries; the new generated copies cite no @objectstack/spec major).
  • Spec check:generated (all 15 artifacts) exits 0.
  • check:adr-0087-registration --base origin/main, check:empty-changeset, check:changeset-gate-self-tests and check:nul-bytes exit 0. check-changeset-no-major --base origin/main --event exits 0 against this body.
  • dispatch-gates --commands derives the same 138 families; the merge adds none.
  • The full test task of every touched package, each exit 0:
    • @objectstack/spec: test 626 files, 18,740 tests passed, 1 todo; test:repo 54 files, 914 tests.
    • @objectstack/cli test (both projects): 366 files (269 unit + 97 integration), 4,877 tests passed, 2 skipped. typecheck exits 0.
    • @objectstack/runtime: test 340 files, 4,776 tests passed, 19 skipped; test:repo 3 files, 751 tests.
    • @objectstack/dogfood: 226 files passed, 1 skipped; 1,770 tests passed, 9 skipped.
    • @objectstack/lint 127 files, 5,843 tests. @objectstack/mcp 35 files, 390 tests. @objectstack/metadata 58 files, 870 tests.
    • example-crm 5 files, 45 tests. example-showcase 33 files, 408 tests. example-todo 7 files, 238 tests.

Round 6, at 99b16b2999. Test Core (1/6) was red on dd4ea171fb in @objectstack/cli's integration project: migrate-meta-default-range.test.ts, 4 tests. My earlier rounds ran --project unit only. Now:

  • pnpm --filter @objectstack/cli test (both projects) passes. 361 files (267 unit + 94 integration): 4,839 tests passed, 2 skipped, exit 0.
  • pnpm --filter @objectstack/cli typecheck exits 0. It includes check:test-typecheck over test/.
  • The full test task of every other touched package with more than one vitest project, each exit 0:
    • @objectstack/dogfood: 221 files passed, 1 skipped; 1,753 tests passed, 9 skipped.
    • @objectstack/runtime: test 336 files, 4,749 tests passed, 19 skipped; test:repo 3 files, 751 tests.
    • @objectstack/spec: test 625 files, 18,711 tests passed, 1 todo; test:repo 54 files, 914 tests.
    • lint, mcp, metadata, example-crm, example-showcase and example-todo have one project each. example-multi-package has no test script.
  • Two ablations, run from the committed state with scripts/ablation-replace.mjs. Each mutation was proven on disk, and each restore was proven by blob = HEAD and an empty git diff HEAD. Both subjects resolve to src/, so no build leg applies.
    • With the --to default reverted to PROTOCOL_MAJOR, exactly the window file's three default pins go red: expected 17 to be 18, expected [] to deeply equal [ …(5) ], and a missing Applied 5 mechanical change(s). The spawned file stays green under the same mutation, which measures that it cannot tell the defaults apart at protocol 18.
    • With the window mock neutralised (runtime major left at 18), the window guard and the anti-vacuity line go red: the registry carries a step past the runtime major: expected 18 to be greater than 18.

Round 5, at dd4ea171fb. Every step of lint.yml's Type Check · source gates job exits 0, run in the job's order: 32 run steps, from pnpm install --frozen-lockfile to check:llms-txt.

  • Before the two ledger entries, check:future-spec-major was red on three sites: docs/protocol-upgrade-guide.md:1039 and packages/spec/spec-changes.json:2340, :5880.
  • After them: self-test 29 cases, 10,167 files scanned, 8 witnessed ledger entries, every witness still matching.
  • readClause2Line reads the changeset as { value: yes, arm: narrowing }.
  • These exit 0 against this body: check-changeset-no-major --base origin/main --event, check:adr-0087-registration --base origin/main, check:empty-changeset and check:changeset-gate-self-tests.

All runs below happened after merging main (3513ac7781, then d1dbe70ebd), on a shared box, through the verify lock.

After the third merge (6729e107e8, which added one step-18 semantic entry), at 23e9e302d9, these all exit 0:

  • check:spec-changes, check:upgrade-guide and spec check:generated;
  • check-adr-0087-registration --base origin/main;
  • check-changeset-no-major --base origin/main --event, against this body;
  • the spec local tests under src/kernel src/migrations src/conversions (70 files, 1,853 tests);
  • package-union-readers.test.ts (7/7).

dispatch-gates --commands derives the same 137 families as at bdee4d2da1; the merge adds none.

Builds. The turbo closure of dogfood, cli, cloud-connection, the examples, create-objectstack and mcp: 65/65 tasks. Then lint/cli (59/59) and the seven dist-only packages (43/43). check:generated: all 15 artifacts up to date.

Tests

Package Scope Result
@objectstack/spec local, full 625 files, 18,661 tests
@objectstack/spec repo, full 53 files, 903 tests (in shards; build-schemas-check-mode.test.ts alone 88/88 in 909s)
@objectstack/spec after the second merge: src/kernel src/migrations src/conversions 71 files, 1,861 tests
@objectstack/spec typecheck exit 0
@objectstack/runtime local, full 335 files (3 shards: 112 + 112 + 111)
@objectstack/runtime repo 3 files, 751 tests
@objectstack/metadata-protocol full 221 files, 28,277 tests
@objectstack/metadata full 58
@objectstack/metadata-core full 18
@objectstack/cloud-connection full 41
@objectstack/lint full, after the second merge 127 files, 5,843 tests
create-objectstack full 17
@objectstack/cli --project unit 263 files (2 shards), 3,901 tests
@objectstack/cli touched .e2e files 2 files, 45 tests
@objectstack/dogfood touched files 6 files, 44 tests
example-crm full 5
example-todo full 7
example-showcase full 33
check-changeset-no-major.mjs --self-test — 378 assertions

Gates at bdee4d2da1:

Acceptance notes


Generated by Claude Code

claude added 8 commits October 8, 2026 03:33
…nd upgrade guide, ^18 handshakes, pre-mode lockstep exception

The protocol major moves in an ordinary pull request with full CI (ruling
record 6049734955, Q1 -> B). spec-changes.json and the 17 -> 18 section of
docs/protocol-upgrade-guide.md are regenerated by gen:spec-changes and
gen:upgrade-guide. Handshakes that mean the current protocol read ^18.

The lockstep's one exception (Changesets pre mode with a pending major for
@objectstack/spec) is judged in a new repo-project test that reads
.changeset/, declared on @objectstack/spec#test:repo; the local lockstep
recognises only the exception's shape and hands off to it.

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
…ADR-0087 disposition

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
… merging main; changeset names the 64th step-18 conversion

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
… floor, which the protocol 18 handshake admits

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
…spec's pre-mode lockstep check

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
… top-level directory turbo.json now declares

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
…* root (22 -> 23)

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

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/mcp, @objectstack/spec, touching 2 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/mcp/README.md, packages/spec/spec-changes.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/getting-started/quick-reference.mdx (via ManifestSchema (symbol, a top-level const object))
  • content/docs/plugins/development.mdx (via ManifestSchema (symbol, a top-level const object))
  • content/docs/protocol/kernel/plugin-spec.mdx (via ManifestSchema (symbol, a top-level const object))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via PROTOCOL_VERSION (symbol, a top-level const object))
  • content/docs/releases/v13.mdx (via PROTOCOL_VERSION (symbol, a top-level const object))
  • content/docs/releases/v14.mdx (via PROTOCOL_VERSION (symbol, a top-level const object))
  • content/docs/releases/v15.mdx (via ManifestSchema (symbol, a top-level const object))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/mcp/README.md, packages/spec/spec-changes.json) — 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 — 144 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 e148ca984258c7c0d162eefd04b1f0f77c3fa9fd → packageMentionDocs.

Which tree this was computed on

This run read content/docs from faf473962ac6defe325d4c5ad2487aa1725185fb — the merge of head 6ec484243e3808af9680bb5b05822d768fb24cc0 into base e148ca984258c7c0d162eefd04b1f0f77c3fa9fd, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin faf473962ac6defe325d4c5ad2487aa1725185fb && git checkout faf473962ac6defe325d4c5ad2487aa1725185fb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e148ca984258c7c0d162eefd04b1f0f77c3fa9fd 6ec484243e3808af9680bb5b05822d768fb24cc0 && git checkout -B drift-repro e148ca984258c7c0d162eefd04b1f0f77c3fa9fd && git merge --no-ff 6ec484243e3808af9680bb5b05822d768fb24cc0

node scripts/docs-audit/affected-docs.mjs --json e148ca984258c7c0d162eefd04b1f0f77c3fa9fd

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs e148ca984258c7c0d162eefd04b1f0f77c3fa9fd → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added ci/cd 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 Oct 8, 2026
claude added 4 commits October 8, 2026 10:19
… merging main (step 18: 64 conversions, 319 semantic entries)

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
…ation edits, per ruling 6056808625 (E)

Each reverted file now equals origin/main at 3513ac7.

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
…evidence; the local lockstep test hands the shape to it (ruling 6056808625, E)

When PROTOCOL_VERSION's major is one ahead of @objectstack/spec's stable
version, the gate requires Changesets pre mode AND a pending major for the
spec package, read from source text with no build, and otherwise refuses
naming the remedy. Its own self-test battery covers both directions. The
changeset is regraded major now that pre mode is on main.

Claude-Session: https://claude.ai/code/session_01LAi5BVvQNiYzepSAcsoFLK
Co-authored-by: Claude <noreply@anthropic.com>
claude added 3 commits October 9, 2026 14:56
… merging main at e148ca9 (step 18: 64 conversions, 329 semantic entries)

main added two step-18 semantic entries since 8b713fa, both from #22447
(7895671): manage-org-presentation-retired and
meta-doors-organization-scope-retired. At protocol 18 both generators
project every step-18 entry, so both documents gain them. The conversion
ids are unchanged; the 16 -> 18 aggregate is 406, equal to the registry.

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

Copy link
Copy Markdown
Contributor Author

Contract review

Read at 2026-10-09T16:26Z · PR #22215 (open, non-draft, auto-merge off, mergeable_state clean) at merge base e148ca9842 · card #22130 · delta review (round 12, the re-sync after the merge queue ejected 4ba5952ea1 at verify-host-root.test.ts, triage 6081302430) after the at-tier PASS 6079895139 at 4ba5952ea1 · isolated, read-only, at tier.

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6ec484243e3808af9680bb5b05822d768fb24cc0
Local-runs: none

Inputs: the card body and its 29 comments (the ruling 6056808625, the claim 6074102194, the round-11 ACCEPT 6080960782, the holder note 6081559243, the round-12 dev report 6084728061); the PR body as re-edited after that report (it now carries a Round 12 entry), its file list (52), its 18 comments and its one review; the five first-parent commits since 4ba5952ea1; the net diff git diff e148ca9842 6ec484243e (52 paths, +7,854 / −757, path for path and count for count equal to the files API) compared path by path, index and hunk headers stripped, with the round-11 net diff git diff 3ca71b6e05 4ba5952ea1; git diff-tree --cc of both merges; the two generated documents at the head parsed as JSON and as Markdown; the entries/semantic/18.*.ts tree and the two registries at 3ca71b6e05, e148ca9842, the head and today's main tip 2e10c9abe0; .changeset/pre.json, the #22084 marker, packages/spec/package.json and protocol-version.ts at the head; #22447's changeset at e148ca9842; HUMAN_MERGE_LINE_THRESHOLD and GOVERNED_SURFACES in scripts/pm/check-governed-merges.mjs and AGENTS.md §7 on main; the head's check-runs, read twice. Nothing was built, tested or re-run; every reading is git show / git diff / git diff-tree / git grep / git ls-tree / git merge-base / a JSON parse / a gh api GET.

① Derived judgments

What this delta is, read off the trees. Five first-parent commits. 3b97df5a7f merges main 8b713fad78 (14 first-parent commits past 3ca71b6e05, #22381 among them); 462a24045b merges main e148ca9842 (9 more, #22447 and #22490 among them). git diff-tree --cc of each merge prints only its own sha: neither introduced a line of its own. Between the merges 5159d64866 edits one file; after them 4d1a408a75 regenerates the two documents and 6ec484243e edits the changeset. Both merge targets are ancestors of today's main; the merge base is e148ca9842, equal to the PR's API base.

The hand-edited fixture, judged. packages/cli/test/verify-host-root.test.ts was ADDED by #22381 (97610a5339, +141, on main after the round-11 merge base). Its STACK.manifest is a current-app fixture: os verify is spawned on it, the boot runs the real load seam and the ADR-0087 D1 handshake, and nothing in the file asserts on the range text (^17 / ^18 occur at line 56 alone). So '^17' there is the same class as the 52 sites the PR already swept, and the queue's red — targets protocol ^17 (engines.protocol) but this runtime is protocol 18.0.0 — is the handshake doing what the Clause-② line declares. 5159d64866 is +1 / −1 on line 56, '^17' → '^18', and nothing else (word diff). Right. It is the ONLY added caret-17 protocol literal in main's delta 3ca71b6e05..e148ca9842 (one hit, that line), and main's one commit since the merge base (#22495, 2e10c9abe0) adds none and touches no packages/spec path. Per-file counts of caret / tilde / greater-or-equal 17 protocol literals over the tree (release pages excluded) are equal at 4ba5952ea1 and at this head; the intermediate merge 3b97df5a7f differs by exactly that one file. The path set grew 51 → 52 by exactly this file: comm -12 of main's delta paths with the PR's 52 is that one path, and nothing else main touched intersects the PR.

The regenerated documents equal the merged registries. What main added since 3ca71b6e05 under packages/spec/src/migrations is #22447 (7895671162): 18.manage-org-presentation-retired.ts, 18.meta-doors-organization-scope-retired.ts, and registry.ts +88 (the two entries, nothing else); its changeset at e148ca9842 carries adr-0087: registered manage-org-presentation-retired, meta-doors-organization-scope-retired. The conversions registry blob (aa4b618125) is identical at 3ca71b6e05, e148ca9842, the head and the tip; the migrations registry blob (ed7eda14f4) is identical at e148ca9842, the head and the tip. 4d1a408a75 is +34 / −0: spec-changes.json +28 in four hunks (each entry once in the 17 → 18 record, once in the aggregate), the guide +6 in two hunks (one three-line bullet per entry under Semantic). No conversionId was added. Parsed at the head: protocolVersion 18.0.0; the 17 → 18 record holds 64 converted (64 distinct, every toMajor 18) and 329 migrated (329 distinct migrationIds, every toMajor 18); the aggregate 16 → 18 holds 121 and 406, which are the per-major records summed (57 + 64, 77 + 329). The 329 ids equal, as a set, the 329 entries/semantic/18.*.ts stems at the head and at the main tip (set difference empty both ways). The guide's 17 → 18 section carries a 64-row mechanical table and 329 semantic bullets. The generators' own checks are the verdict: Type Check · source gates (check:spec-changes, check:upgrade-guide, check:future-spec-major among its steps) concludes success on this head. Right.

The hand-edited changeset, line by line. The word diff of .changeset/22130-protocol-18.md from 4ba5952ea1 is two tokens, 327 → 329: the adr-0087 marker's prose ("the step's 329 D3 semantic entries") and the bullet "64 mechanical conversions and 329 semantic entries". Both equal the regenerated record's migrated count and the guide's bullet count; 64 equals the converted count. The marker's already-registered list (the first match, ids up to the first close paren) is 64 ids, set-equal to the head's 64 step-18 conversionIds, unchanged since the merge base, and each id pre-dates the merge base because the conversions registry did not move. Clause-② (line 8) is byte-identical to its state at 4ba5952ea1 and at eb23db8a82. Right.

Nothing else the PR owns moved. Of the 52 paths, 48 have byte-identical +/− lines in the two net diffs (3ca71b6e05..4ba5952ea1 against e148ca9842..6ec484243e, headers stripped). The four that differ are exactly the four this delta names, compared as sorted multisets: the changeset 2 only-before / 2 only-after (the count tokens); the guide 0 / 6; spec-changes.json 0 / 28; verify-host-root.test.ts 0 / 2 (new to the set). So every judgment the at-tier records 6076766071 and 6079895139 made about the 48 — the accept and refuse sets at every door, the specVersion prescription from PROTOCOL_MAJOR, the lockstep exception's shape and the gate's third question, the #17134 re-premise and the window file, the two runtime fixtures at greater-or-equal 17.1.0 — stands by identity.

No accept set moves beyond what the PR already declared. The one new site is a fixture (a test input), not a door; the two documents project entries the registries already carried; the changeset edit is prose. No door, schema, export or refusal string changed in this delta. The public surface of the PR is the one 6076766071 judged. The lockstep evidence is live at the head: pre.json mode: pre, tag next; .changeset/22080-v18-line-opens.md pending with "@objectstack/spec": major; @objectstack/spec at 17.7.0; PROTOCOL_VERSION '18.0.0'.

Re-sync at my read: none owed. main is one commit past the merge base (#22495): 0 spec paths, 0 added caret-17 literals, 0 paths in common with the PR.

② Semver level

Unchanged in grade and re-verified where the delta could touch it: major for @objectstack/spec under pre mode, patch for @objectstack/mcp, the **BREAKING** banner, feat(spec)!:; no skip-changeset and no allow-major label (labels: documentation, ci/cd, size/xl, tests, tooling). The disposition is one not-required (already-registered …) marker whose 64 ids equal the generated set and whose count prose now says 329 = the record. Clause-②: yes (narrowing: …) — the PR body's line 2 (as re-edited after the dev report) and the changeset's line 8 are byte-identical (same SHA-1, 3300cfb220a1); the delta widens no accept set and narrows none beyond the declared arm (one more current-app fixture sits on the admitted side of the same door). Gate verdicts on this head: Check Changeset concludes success twice — the run on the push (113881328945) and the re-run the body edit fired (113913066996), neither skipped — and Type Check · source gates concludes success. The Clause-②: line is right.

③ Boundary flags

Dev flags (report 6084728061): open_questions empty; out_of_scope_findings empty; three deviations, each answered.

Check-runs on this head at my reads (42 runs across 35 names; seven names ran twice because the body edit after the dev report fired a second pull_request run on the same head). First read, newest per name: 30 success, 4 skipped, 1 in_progress (Check Changeset, its second run). Second read, six minutes later: 31 success, 4 skipped, 0 in progress, 0 red; across all 42 runs 38 success, 4 skipped. The seven required contexts conclude success: Lint & Repo Gates, TypeScript Type Check, Dogfood Regression Gate (and its three shards), Build Core, Temporal Conformance (live PG + MySQL), Governed Surface Queue Guard, Test Core (and its six shards, (2/6) included — the shard the queue failed on); also Check Changeset, the four Type Check · jobs, Build Docs, Dogfood Verify CLI, Spec property liveness, Flag docs affected by code changes, Check Documentation Links, the claim / single-writer / part-of guards, filter. Skipped: Console Pin Gate (no .objectui-sha move), Packed-tarball smoke (opt-in), and the second runs of Auto Label and Check PR Size (their first runs on this head, 113881487819 and 113881328312, conclude success; the re-run on the edit event skipped by its own condition). Red — none.

Implemented-by: claude/issue-22130-protocol-18
Reviewed-by: session_01VZqqwTj2wsihZEbfT6yyYN

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 4e9fe9f Oct 9, 2026
50 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-22130-protocol-18 branch October 9, 2026 17:05
os-elon-musk pushed a commit that referenced this pull request Oct 9, 2026
…e merged tree

Main's 4e9fe9f (PROTOCOL_VERSION 17 -> 18, #22215) began rendering the
18.* semantic entries into both artifacts. Six of them carry this branch's
re-measured objectui pin readings, so the merged tree's copies were stale.
Generators only: pnpm --filter @objectstack/spec gen:spec-changes and
gen:upgrade-guide. No source edit.

Claude-Session: https://claude.ai/code/session_01BmsuLyUeuG5CNpZFMH1jzS
Co-authored-by: Claude <noreply@anthropic.com>
github-merge-queue Bot pushed a commit that referenced this pull request Oct 10, 2026
…t scaffold with the workspace protocol (nightly tiers) (#22699)

Fixes #22622
Clause-②: no
Two nightly-tier CLI test files change and nothing else: no accepted
input, key, export or error code moves, and nothing publishes.

Two independent reds on the nightly tiers, both in `domain:cli`. **Both
are fixed inside the nightly tests**, following the seat's review
6099406666 on #22622. Nothing else changes:

- the family-roster check;
- the noise budget and every assertion in that file;
- the `create-objectstack` template, the version-time stamp
(`scripts/sync-template-versions.mjs`) and their tests, which are
byte-for-byte as `main` has them.

## (a) Both reds, reproduced before any fix

Base `9646991283`, `OS_TEST_TIERS=nightly`, `--project integration`,
through the verify lock: `Tests 2 failed | 51 passed (53)`.

- `json-stdout-purity.e2e.test.ts`, `is exactly the set listed here`:
`expected [ 'meta resync', …(17) ] to deeply equal [ 'meta resync',
…(15) ]`, with `+ "migrate organization-ownership"` and `+ "migrate
security-catalog-overlays"`. `migrate organization-ownership` came from
PR #22643, after the nightly that filed the card. The members were taken
from `discoverFamily()`'s output.
- `serve-boot-diagnostics-noise-budget.e2e.test.ts`, `highlights the
dead button once…`: `expected 0 to be greater than 0` at `:176`. The
boot printed `✗ package 'com.example.support-desk' targets protocol ^17
(engines.protocol) but this runtime is protocol 18.0.0. This is a
major-version break. Run: objectstack migrate meta --from 17`. That is a
refusal, so no *Boot diagnostics* block is printed at all.

After, on `3d63ed7db5`: `Test Files 2 passed (2)`, `Tests 59 passed
(59)`. That is 53, plus 3 cases for each of the two new members.

## Failure 1: the two new `--json` members are driven

`FAMILY` gains both members, each in its bare form. The CLI was first
run against the purity fixture to see each one's face:

- `migrate organization-ownership` shows its refusal face. Over a
database with none of the platform tables it prints
`{"error":"plan_refused","reason":"not-an-objectstack-database",…}` and
exits 1. The JSON is emitted after `stack.shutdown()`, and no plan file
is written.
- `migrate security-catalog-overlays` shows its read-only preview:
`listed: 0`, exit 0. There is no `sys_metadata` hydration and nothing is
deleted.

Both print all three boot diagnostics on stderr. The discovery and the
`toEqual` roster check are untouched.

## Failure 2: the noise-budget e2e aligns the pair it boots

### (b) What the version-time stamp writes

Measured read-only at `9646991283`:

- `changeset status --output` (`pre.json` is
`{"mode":"pre","tag":"next"}`) gives `@objectstack/spec major 17.7.0 ->
18.0.0-next.0` and `create-objectstack major 17.7.0 -> 18.0.0-next.0`
(the `fixed` group).
- `loadScaffolderVersion()` on `18.0.0-next.0` gives
`{"version":"18.0.0-next.0","major":"18","range":"^18.0.0"}`. So the
version pass stamps `engines: { protocol: '^18' }` into the released
template.

**Triage's "every project that v18's `create-objectstack` scaffolds
would boot with the protocol-gap warning" is false.** No released v18
scaffold carries the gap. PR #22215's changeset says the same ("the
template keeps `'^17'` until the version pass stamps it").

The red is `main`'s pre-mode window: packages at `17.7.0`,
`PROTOCOL_VERSION` at `18.0.0`. Only an in-repo pairing sees it: a
published-line scaffold booted on the workspace runtime with nothing
installed.

### Round 1 changed the product side, and CI falsified that

Round 1 (`bff640d98`) stamped the template's `engines.protocol` from
`PROTOCOL_VERSION`'s major. On that head, `Scaffold with repo dist`
(`scaffold-e2e.yml`, job 1) went red: "package 'com.example.e2e-app'
targets protocol ^18 (engines.protocol) but this runtime is protocol
17.0.0".

That gate guards the path a user takes. It scaffolds with the repo-built
scaffolder and installs `@objectstack/*` from the registry (`^17.0.0`,
so protocol 17). On that path a template's range must match the protocol
of the packages it installs, which is the package major. The sync script
and the `template-consistency` ratchet already enforce exactly that on
`main`.

Commit `60fa01c7a7` removes round 1's product-side change:

- `templates/blank/objectstack.config.ts`,
`template-consistency.test.ts`, `template-version-stamps.test.ts` and
`scripts/sync-template-versions.mjs` are back at their `main` blobs
(`6308f29e`, `d32c819c`, `48ba146e`, `f7704db8`, all equal at base and
`origin/main`);
- the `create-objectstack` changeset is deleted.

### This round: the setup aligns the pair it boots

This follows the seat's verification-strategy ruling in 6099406666.

After scaffolding, and before the fixture files are written,
`alignProtocolRange()` rewrites the scaffold's `engines.protocol` to
`'^' + PROTOCOL_MAJOR`. `PROTOCOL_MAJOR` is read from
`@objectstack/spec/kernel`, the workspace spec this file boots, the same
import other CLI e2e files use.

- **Only the major's digits are rewritten.** When the majors agree, the
scaffold is left byte-for-byte as written, and the helper does not write
the file at all.
- Measured on the template: at `'^17'` (the window) the hash moves
`684e38ed0d1a` → `5d6e6468255e`, and only the `engines` line differs.
- At `'^18'` (majors agree) the hash stays `5d6e6468255e` →
`5d6e6468255e`, byte-identical.
- **A missing stamp throws in `beforeAll`.** A template that stops
declaring the key fails this file loudly instead of skipping the
alignment.
- **Why a direct rewrite of the one key, and not `objectstack migrate
meta --from 17 --write`.** The `--write` command is the step the refusal
prescribes, and it was measured first. On a scaffold under
`packages/cli/node_modules/` it exited 0 with `not written
[outside-project]` and left the config unchanged. The codemod refuses
any file whose real path has a `node_modules` segment
(`authored-source-codemod.ts`, the `outside-project` refusal). This
project has to live under this package's `node_modules` so that its
imports resolve to workspace copies.
- **What stays the same:** the noise budget, all three assertions, and
the ticket object and actions. Once the version pass lands, the window
closes and the alignment becomes a no-op.

## Ablations

Both ran through `scripts/ablation-replace.mjs` in wrap mode on
committed trees, under the verify lock. Each restore was proven by blob
equal to HEAD and an empty `git diff HEAD`. Neither subject resolves
through `dist/`: the FAMILY and the setup live in the test files.

| Mutation | Anchor | Result |
|---|---|---|
| `alignProtocolRange(join(dir, 'objectstack.config.ts'));` deleted from
the setup | x1 → x0, blob `058fbecec7dc` → `bfedb0522aa5` | noise-budget
red with the original refusal: `✗ package 'com.example.support-desk'
targets protocol ^17 … this runtime is protocol 18.0.0 …`, `expected 0
to be greater than 0`, 1 failed and 2 passed. After the restore to blob
`058fbecec7dc`: 3 passed. |
| `'migrate security-catalog-overlays': [],` deleted from `FAMILY`
(round 1, same blob as now) | x1 → x0, blob `698034ba9bcb` →
`5dfe8780897a` | roster pin red: `expected [ 'meta resync', …(17) ] to
deeply equal [ 'meta resync', …(16) ]`, `+ "migrate
security-catalog-overlays"` |

## Tests (on `3d63ed7db5`)

- **Nightly tier** (`OS_TEST_TIERS=nightly`, `--project integration`,
verify lock): the two card files, 59 passed.
- **`create-objectstack`:** suite 17 files and 254 tests passed. `pnpm
check:template-version-sync` is green with 40 assertions, the same count
as on `main`. Both are unchanged, because this diff does not touch the
package or the script.
- **`@objectstack/cli`:**
  - unit layer: 279 files and 4126 tests passed;
- `typecheck` (`tsc --noEmit` plus `check:test-typecheck`) is OK, and
`tsconfig.test.json`'s `--listFiles` includes both edited files.
- **Changeset:** `node scripts/check-empty-changeset.mjs --base
origin/main` exits 0. It reports no empty-frontmatter changeset added
and no merge-base changeset modified or deleted.
- **Gates:** `dispatch-gates --commands` (no paths) derived 50 commands
from the 2-file change set. `--ran` reports `50 derived, 50 run, 0
NOT-MEASURED, 0 UNRUN`, a derived zero: every command recorded `exit 0`.
`check:type-check-debt` and `check:dual-build-cjs-loads` ran last, after
every locked suite.
- `dispatch-gates` noted that the tree is behind `origin/main`: 6
derived-from files changed there (`ci.yml`,
`check-shard-attestation.mjs` and the fleet-write relay scripts).
- No conflict exists, so per the round's direction there was no merge.
CI judges the merge ref.
- **Lint, proven narrowing:**
1. Population is read from ESLint's own config: both changed files
return results with no "File ignored".
2. File count is from `--format json`: 2 results, 0 errors, 0 warnings.
3. Invariance: `eslint.config.mjs` enables no type-aware linting, and
this diff touches neither the config nor a baseline it reads.

## Changeset

Nothing publishes: `@objectstack/cli` ships `dist`, `README.md` and
`CHANGELOG.md`, and this diff is two `test/` files. By the repo's rule
this PR takes the `skip-changeset` label. An empty-frontmatter changeset
would be the risky path that `check:empty-changeset` refuses. The seat
applies the label.

## Acceptance notes

- `objectstack migrate meta --write` on a project whose path has a
`node_modules` segment says `the literal is in …/objectstack.config.ts,
outside the project at …`, although the file is inside the project. The
real cause is the `node_modules` segment rule. Only a test layout
reaches it, so this is a wording polish, not a finding. No carrier.
- Version Packages PR #21988 was last refreshed on 2026-10-08T06:19Z,
before pre mode was entered (`a87d8be29`). This is release-lane state,
recorded as a reading, ⛔ not acted on.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Oct 16, 2026
…e runtime now implements

The re-run printed `Chain: protocol 16 -> 18 (this runtime implements protocol 18)`:
PROTOCOL_VERSION is 18 since #22215, so the --to default (meta.ts
CHAIN_TERMINUS_MAJOR, the higher of PROTOCOL_MAJOR and the registries'
highest step) is 18 on both counts, not ahead of a PROTOCOL_MAJOR 17. The
measured --from 17 / --from 18 expectations are unchanged; the revision 5
history row records the correction.

Claude-Session: https://claude.ai/code/session_016PVjjuVPte5XEJvaQx1E4t
Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…dshake reads '^19' (objectstack-ai#37314)

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Fixes objectstack-ai#37229
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up objectstack-ai#37298

## 维护者速读

- 协议版本从 18 升到 19:仓库里每个示例应用、连接器应用和文档示例都改为声明 19,新建项目模板在出预发布版时自动改成 19;只有装
19 预发布版的人会碰到。
- 属于「19.0.0 大版本」路线(你选的方案「A」第 2 项);它解开 19.0.0-next 的版本
PR:出版本的流水线不接受顺手改协议版本,所以由这一单先改好。
- 装了 19 预发布版、但应用仍声明 18 的人,启动时会被拒绝并提示改成
19(单一配置文件的应用有一条命令可自动改;多包组合的应用要逐个包手改);18.x 正式版用户不受影响;撤回即还原本单。
- 按你对冲突的裁决「A」,本单还改了一道检查:预发布模式下且 spec 已排定大版本时,下架提示写「19.0.0」不再被拦;五条下架提示因此写
19.0.0。
- 要你做的:「进入预发布模式」那一单已合并;本单是大版本变更,请你亲自把关合并。「Check
Changeset」是有意的红:本单改了别人已合并的两条变更说明(各改一处事实)。另一单 objectstack-ai#37298 改三个技能文件,在本单合入之后合并。

## What changes

On the shape of the v18 move (objectstack-ai#22215, commit `4e9fe9f`), minus
`skills/**`.

- **`packages/spec/src/kernel/protocol-version.ts`:** `PROTOCOL_VERSION
= '19.0.0'`. The docblock names protocol 19 as the pre-mode lockstep
exception (ruling records 6049734955 and 7153441862), and says the blank
template follows at the version pass and the published skills' examples
in a change of their own.
- **Handshakes:** 85 sites in 67 files move `engines.protocol` from
`'^18'` to `'^19'`. Each is a manifest that stands for "an app on the
current protocol", and none of them asserts on the range.

| Directory | Files | Sites |
|---|---|---|
| `examples/` (crm, showcase, todo, starter, multi-package ×2) | 6 | 6 |
| `packages/apps/connector-{docusign,github,stripe}` | 3 | 3 |
| `packages/cli` (tests) | 40 | 56 |
| `packages/qa` (7 dogfood tests, the sql-perf bench app, the scenarios
exporter test) | 9 | 9 |
| `packages/lint`, `packages/spec`, `packages/metadata` (tests) | 4 | 5
|
| `packages/mcp/README.md` | 1 | 2 |
| `content/docs` (cli, your-first-project, upgrading) | 3 | 3 |
| `docs/qa/scenarios/builds/travel_expense.json` | 1 | 1 |

`examples/app-starter` arrived from `main` (objectstack-ai#37399) declaring `'^18'`
and moves with the merge. Its boot test, which installs the starter
through `MarketplaceInstallLocalPlugin`, passes 5/5 at `'^19'`. At
`'^18'` it reads 3 failed | 2 passed, refused
`OS_PROTOCOL_INCOMPATIBLE`.

- **`docs/qa/platform-checklist/areas/cli.json`:** one prose fact, "the
stock showcase declares `'^18'`", now reads `'^19'`.
- **`docs/qa/scenarios/builds/travel_expense.provenance.json`:**
`sha256` is the build's hash as it now stands, and a second `amended`
entry names the one edit (`engines.protocol` `'^18'` → `'^19'`) and the
hash it replaced. `cardSha256` is unchanged.
- **The protocol 19 migration step (ADR-0087).**
`packages/spec/src/migrations/registry.ts.template` opens `step19`, with
no conversions yet. Its first semantic entry,
`entries/semantic/19.protocol-18-range-refused.ts`, is the refusal this
PR causes, with the prescription: `--write` rewrites the range of a root
`defineStack` manifest; for a manifest `composeStacks` composes, it
writes nothing and lists the range for a hand edit in each package
manifest. Its acceptance text claims only what the hop does: it edits or
refuses the range. A key retired in this release that the metadata still
carries is refused at parse by its own message, which names its own
remedy. The text no longer says that `validate` passes or that every
package installs. The upgrade guide now generates three hop sections
(17, 18, 19). See "Why a step-19 entry" below.
- **Removal prescriptions stamped after 18.6.0 name `@objectstack/spec
19.0.0`.** `retired-key-removal-version.pin.test.ts` derives the
removing release's major from `PROTOCOL_MAJOR`, so at 19 the retirements
not in the published 18.6.0 name 19.0.0, not 18.7.0, a release the v19
line never cuts: `object-grid` `singleClickEdit` (`component.zod.ts`),
the boolean `field.inlineEdit` (`field.zod.ts`), `listView.columnState`
and `view.columnState` (`view.zod.ts`), and `seed.mode` `'insert'` /
`'replace'` (`seed.zod.ts`). Their text pins, the regenerated
`content/docs/references/ui/{component,view}.mdx`,
`content/docs/data-modeling/seed-data.mdx` and the metadata-protocol
seed pin follow.
- **`scripts/check-future-spec-major.mjs` reads the pre-mode window
(ruling record 7176929521, option A).** On a stable `@objectstack/spec`
label, with `.changeset/pre.json` at `"mode": "pre"` and a pending
changeset declaring `"@objectstack/spec": major`, the next publish is
label + 1, so the gate judges citations against 19 here. That is why the
prescriptions above can name `@objectstack/spec 19.0.0`. The window is
read through `check-changeset-no-major.mjs`'s
`readProtocolLockstepInputs`, the reader the protocol lockstep already
uses; there is no second parser. That file's docblock now names its
three importers (`check-docs-image-tag.mjs`,
`check-future-spec-major.mjs`, `pm/l1-face.mjs`); the change is a
comment. Label + 2, pre mode without a pending spec major, a pending
spec major outside pre mode and a prerelease label each open nothing;
five new self-test rows pin those five cases (34 → 39 cases). An
unreadable `.changeset/` opens nothing either, by the code; no row pins
it. The stable-label condition is the same one `judgeProtocolLockstep`
applies: on a `19.0.0-next.N` label the label's own major is already the
carrier. Reverse verification: with the window condition ablated, the
gate reads 14 problems, the 14 sites.
- **Two fixtures pay a dynamic load at module top**
(`validate-flow-region-shape.test.ts`,
`plugin-artifact-packages-attribution.test.ts`).
`check:test-source-alias` judges every test file a diff edits, and both
edits here are the range literal. The gate prescribes exactly these
imports.
- **`.changeset/37229-protocol-19.md`:** `"@objectstack/spec": minor`
and `"@objectstack/mcp": patch` (its shipped `README.md` changes), the
two declaration lines, a BREAKING note with the FROM → TO and the
command, and `registered protocol-18-range-refused`.
- **DELIBERATE CORRECTION of two existing changesets.** `Check
Changeset` stays red on both by design: each note is on the merge base,
and each changes only the facts this PR makes false.
- `.changeset/37223-v19-line-opens.md` (carried N1 of objectstack-ai#37230's L1, and
N3 of this PR's L1), two sentences. "The first is `@object-ui/i18n`'s
retirement …" now reads "The first change graded `major` is
`@object-ui/i18n`'s retirement …", because this PR's protocol move is a
breaking change graded `minor`. "`PROTOCOL_VERSION` follows
`@objectstack/spec`'s major at version time." now reads
"`PROTOCOL_VERSION` moves to 19 ahead of the version pass, in its own
changeset."
- `.changeset/37042-skills-inline-edit-boolean.md`, one clause: "The
spec parse refuses `true` and `false` on a relationship field's
`inlineEdit` since 18.7.0" now reads "… since 19.0.0", the release the
retirement ships in.
- **Carried from objectstack-ai#37230's L1, N3 —
`ui/packages/i18n/scripts/released-keys-removed.mjs`** refuses an
argument it does not know (exit 2, naming it), and prints the tag's
commit: `^{commit}` peels the annotated tag. Measured: the tag
`@object-ui/i18n@18.6.0` is a tag object `0dbef86ce3`, and the script
now prints its commit `958ee03594`. The script is not in the package's
`files[]`, so it publishes nothing and needs no changeset.

## Judgments: every `'^18'` left in place, with its reason

| Site | Reason |
|---|---|
| `skills/**` (3 files) | Governed Tier H; the sibling PR objectstack-ai#37298. |
|
`packages/create-objectstack/src/templates/blank/objectstack.config.ts:38`
| The version pass stamps it with the template's `@objectstack/*`
versions, and `template-consistency.test.ts` holds it equal to the
scaffolder major (create-objectstack is 18.6.0). Measured: moved to
`'^19'` now, that test goes red; the version-pass rehearsal below stamps
it `'^19'`. Same judgment as objectstack-ai#22215. |
| `packages/cli/src/utils/protocol-version-gap.test.ts:82` | Paired with
an explicit installed `'17.2.0'`: "a newer major is silent". The subject
is the pairing, not the current protocol. |
| `packages/metadata-core/src/artifact-forward-conversion*.test.ts`,
`protocol-handshake.test.ts` | The subject is the artifact's floor
against an injected runtime label (the v18 prerelease major-step
window), or a range/major pair. No handshake against `PROTOCOL_VERSION`
runs. |
|
`packages/metadata/src/plugin-artifact-forward-conversion-{major-step,package-body}.test.ts`
| The same age subject at the metadata door, which runs no handshake. |
| `docs/qa/platform-checklist/areas/platform-core.json`, item
`platform-core.protocol-18-handshake-and-stored-replay` | Revised in
place to protocol 19 (revision 6, with its history entry). The id keeps
its protocol-18 slug because ids are immutable. Its `'^18'` now stands
for the refused case: `'^18'` → 422 `OS_PROTOCOL_INCOMPATIBLE` naming
`os migrate meta --from 18`, `'^19'` admitted, and the artifact step
edits the copy's range to `'>=18.0.0'`, as the option-B fixture does. |
| `content/docs/releases/**`, `docs/adr/**`, `**/CHANGELOG.md`,
`.github/workflows/release.yml` (comment), script comments |
Release-owned, governed or historical prose. |
| `ui/**` tests,
`packages/runtime/src/domains/packages-ensure-customization.test.ts`,
`scripts/docs-audit/affected-docs.mjs` | Not a protocol handshake
(`requiredRange` of a later refusal, a package-dependency range, a React
peer range). |

Moved to `'>=18.0.0'` (5 sites, commit `e05fdf6f`):
`packages/runtime/src/standalone-stack-option-b-forward-conversion.test.ts`.
It boots through the load seam, which refuses `'^18'` at protocol 19.
Measured: `ProtocolIncompatibleError: package 'com.test.ob.core' targets
protocol ^18 … Run: objectstack migrate meta --from 18`, 3 cases. Its
subject is the conversion window, which opens on the floor. `'>=18.0.0'`
keeps the floor (18.0.0, as `parseRangeFloor` reads `^18`) and admits
19. This is the same move as objectstack-ai#22215's two runtime fixtures (`>=17.1.0`).
The fixture's docblock now says why, so a later sweep to `'^19'` does
not close the window.

## Why a step-19 entry (the ADR-0087 disposition)

`Metadata-protocol:` is judged from content. A 19 runtime refuses an
authored value, `engines.protocol: '^18'`, that 18 admitted. That is
`narrowed`, and the `Clause-②` arm is `narrowing`, as in objectstack-ai#22215. On a
declared `narrowed`, `check:adr-0087-registration` refuses `not-required
(no-migration-prescription)` outright and asks for a registered entry.
Measured: "`not-required (no-migration-prescription)` is refused on a
changeset that declares `Metadata-protocol: narrowed` … fix: register an
entry under packages/spec/src/migrations/entries/semantic/". No entry at
the merge base covers the refusal, so this PR opens step 19 with one
entry, and the upgrade guide carries the prescription.

## Acceptance notes

- **Docs versus npm `latest`.** The three docs pages show `'^19'`, as in
objectstack-ai#22215. npm `latest` stays 18.6.0 until 19.0 GA, and an 18.x runtime
refuses `'^19'`. The changeset says to move the range together with the
`@objectstack/*` versions.
- **Size.** 92 files, +440 / −161 against `main` (GitHub at
`3811cd10f5a`), under the 3,000-line threshold.
- **Out of this PR, found by the version-pass rehearsal.** On the
post-version tree, `check:release-notes` is red: `@objectstack/spec`
ships 19.x and there is no curated `content/docs/releases/v19` page. It
is red on the control leg too (main + objectstack-ai#37230, without this PR), so
objectstack-ai#37230's `major` causes it, not this PR. Release pages are
release-owned, so this PR does not write one. Until one exists, the
version-PR lane still refuses the 19.0.0-next refresh, on that gate
alone.
- **objectstack-ai#37287 and step 19.** objectstack-ai#37287 registered its retirement,
`KnowledgeChunk.metadata`, under step 18; it reached this branch through
the merge of `main`, and its refusal says "removed in @objectstack/spec
18" (`packages/spec/src/ai/knowledge-document.zod.ts:61`). Once protocol
19 is on `main`, `os migrate meta --from 18` replays only step 19, so a
retirement that ships on the v19 line and is filed under step 18 is not
listed to an 18 → 19 upgrader. objectstack-ai#37287 is one member of the family
"step-18 entries registered on `main` after the 18.6.0 tag" (31 step-18
semantic entry files at this head that the 18.6.0 tag does not carry,
and 34 on `main` at `5d21d431ec`, after objectstack-ai#37382, objectstack-ai#37392 and objectstack-ai#37395). That
card is follow-up owed (seat).
- **The dev's open questions, as built (seat reading at L1):**
- The declaration is `yes (narrowing)` + `narrowed` with a step-19
entry, rather than `semantic`.
  - The blank template stays `'^18'`, and the version pass stamps it.
- The metadata and metadata-core floor-subject sites are kept. The
option-B runtime file moves to `'>=18.0.0'`.
- The gate conflict between `check-future-spec-major` and the
removal-version pin is resolved by ruling record 7176929521, option A
(above).

## Verification

Two-minute check: `node scripts/check-future-spec-major.mjs` prints `✓
check-future-spec-major: no @objectstack/spec citation names a major
above 19` and `pre-mode window: label major 18, pre mode next, pending
major for @objectstack/spec in .changeset/37223-v19-line-opens.md — the
next publish carries 19`, and exits 0. `node
scripts/check-changeset-no-major.mjs --base origin/main` prints `✓
Protocol lockstep: PROTOCOL_VERSION major 19, @objectstack/spec@18.6.0 —
the one exception, evidenced: pre mode (tag next) and a pending major
for @objectstack/spec (.changeset/37223-v19-line-opens.md).` and exits
0.

Read first:
1. `.changeset/37229-protocol-19.md` and
`packages/spec/src/migrations/entries/semantic/19.protocol-18-range-refused.ts`:
what an upgrading author is told.
2. `packages/spec/src/migrations/registry.ts.template`, the new
`step19`: the ledger's protocol 19 step opens here.
3. `scripts/check-future-spec-major.mjs`, `judgedMajor` and the five new
self-test rows: the one gate this PR changes.
4. The Judgments table: every `'^18'` left in place.

<details><summary>Readings at <code>3811cd10f5a</code> (the dev's,
through the verify lock, and the seat's L1)</summary>

- **CI at `3811cd10f5a`:** 70 check-runs, 60 success, 9 skipped, 1
failure. The failure is `Check Changeset`, by design: its two file
annotations name the two DELIBERATE CORRECTION notes, and its ADR-0087
and no-major steps are green. All eleven required contexts are success,
`Test Core` 10/10 included, and so is `Type Check · source gates`.
- **Tests:**
- dogfood full battery (os-dev-report 7183121949 on objectstack-ai#37229): Test Files
487 passed | 3 skipped (490), Tests 4129 passed | 68 skipped (4197),
VERDICT command-exit 0.
- whole spec suite: Test Files 896 passed (896), Tests 28442 passed | 1
todo (28443).
- `examples/app-starter` boot test: 5/5 (re-run by the seat). With the
range put back to `'^18'` through `ablation-replace`, it reads 3 failed
| 2 passed, refused `OS_PROTOCOL_INCOMPATIBLE`; the restore was proven
with `git diff HEAD` empty.
- `retired-key-removal-version.pin.test.ts` and
`protocol-version.test.ts`: 2 files, 68/68 (re-run by the seat).
- **Guards:**
- `check-future-spec-major` exits 0, and `--self-test` reads `39 cases
pass` (re-run by the seat). The gate file is byte-identical to
`9ed0f5e41f6`, where the seat ablated `stable`, the pending-major
condition, the pre-mode condition and `+ 1` in turn: one self-test row
went red each time, and with the window off the scan read the 14 sites.
Each ablation was restored with `git diff HEAD` empty.
  - `check-changeset-no-major --base origin/main` exits 0.
- `check:adr-0087-registration` exits 0 with `registered
protocol-18-range-refused`.
- `dispatch-gates --commands` derives 150 families on this diff. Two are
red: `check-empty-changeset` by design (the two DELIBERATE CORRECTION
notes), and `check:platform-checklist` on `areas/automation.json: ABSENT
SYMBOL … FlowItemMoreMenu.tsx#FlowItemMoreMenu`, which `main` itself
carries (reproduced on `origin/main` `ecbe854bda`; this diff touches
neither path). The other 148 exit 0.
- **Against current `main` (`5d21d431ec`, 9 commits past the merge
base):** `git merge-tree --write-tree` is clean, and the merged tree
carries the same `'^18'` lines as this head. `main` added no other
handshake at `'^18'`.

</details>

<details><summary>Earlier readings (the dev's, on 9da4c1d plus the
fixture fix, and at 8852bcb for the <code>--write</code>
reach)</summary>

Not re-run at `3811cd10f5a`. Of the code these read, this PR changed
only the step-19 entry's text and the `examples/app-starter` range after
them. The merges of `main` brought other changes in, and CI at the head
is green.

- **Handshake**, from the built `@objectstack/metadata-core` on protocol
19: `'^18'` → `incompatible OS_PROTOCOL_INCOMPATIBLE … Run: objectstack
migrate meta --from 18`; `'^19'` → `ok`.
- **Prescription**, with the built CLI. On a `'^18'` copy of
`examples/app-todo`, `os migrate meta --from 18` lists the step-19
entry, and `--write` rewrites `objectstack.config.ts:48` to `'^19'`. On
`examples/app-multi-package` with both package manifests at `'^18'`,
`--write` writes nothing and prints the range for a hand edit (`manifest
is composed by composeStacks(…)`).
- **Template control leg:** moving the blank template to `'^19'` now
turns `template-consistency.test.ts` red (`expected 19 to be 18`).
- **`release.yml` version-pass rehearsal.** The `version-pr` Render and
Validate blocks were extracted verbatim and run in a throwaway clone:
- Results: `PROTOCOL_VERSION already 19.0.0`; the template is stamped
`'^19'`; unvalidated surfaces 0; 14 of 15 content gates green;
`check:release-notes` red.
- Control (main + objectstack-ai#37230 without this PR): `protocol-version.ts` is
unvalidated, with the same release-notes red.
- **Tests:** cli 677 files, 8441 tests passed; runtime 647 files, 11978
passed | 25 skipped (the option-B file fails 3 cases at 9da4c1d and
passes 6/6 at e05fdf6); metadata, metadata-core, lint, mcp,
create-objectstack, scenarios and the example tests all green;
`validate` exits 0 for 4 examples and 3 connector apps.

</details>

## Provenance

Opened by seat repo:objectstack#4 on the maintainer's authorization in
the seat session (「objectstack-ai#37229 的两个 PR 开 PR 时被拦了:放行」). The dev session
(`session_01QSeKYnLptCbfzwtkTrDG3j`, zone a4-S) had three writes refused
by its permission check, and none was retried: its relay `pr_create`,
the hand-off of the payload to the seat, and the push of the runtime
fixture fix. The seat read the prepared body from that session's final
message. The fixture fix was then re-applied and pushed as `e05fdf6f`
(fast-forward, five sites in one test file) by a seat-dispatched dev, on
the maintainer's authorization 「objectstack-ai#37229 夹具修复推送放行」. Rework round 1 (seat
L1 7170046632) pushed `3fdf3490b9` to `43133e8ce5`. After ruling record
7176929521, `c871272e47` merged `origin/main` `db77cc493a`, `e5a7e35bff`
regenerated the two ui reference pages from the merged tree, and
`9ed0f5e41f` changed the gate. Rework round 2 (seat L1 7181615974, L2
7181629335): `d47c169db75` merged `origin/main` `da7c559990`, and
`3811cd10f5a` moved `examples/app-starter` to `'^19'`, narrowed the
step-19 entry's acceptance text, and corrected a comment in
`check-changeset-no-major.mjs`. Branch
`claude/issue-37229-protocol-version-19` @ `3811cd10f5a`.

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QSeKYpEsWWE9Y5YtSsDgqZ

---------

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

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

Projects

None yet

4 participants