Repository navigation
fix(spec)!: composition refuses one job name enabled in two packages - #37392
Conversation
composeStacks now reads a composed artifact's jobs the way the boot's job binder does: enabled jobs only, by name, the residual by count beyond the package bodies' flattened copies. A job name enabled in two package bodies, or in a body and the residual, is refused (STACK_CROSS_REFERENCE_INVALID) naming every enabled job of it; the binder would schedule none of them. A disabled twin, a body's own copy and distinct names still compose. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
…cblocks Adds the ADR-0087 semantic entry and the changeset for composition refusing one job name enabled in two packages, and says in the binder's docblocks that composition now refuses that set, leaving the binder as the backstop for artifacts no composition built. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
…h JSON Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
Composition now refuses a job name enabled in two holders, so the runtime binder and the install-local door tests that built such a pair through composeStacks now hand-build the artifact (the backstop case: an artifact no composition built), with every refusal assertion kept. A pin holds the hand-built layout equal to a real composition where one still composes. The census CONTROL drops its jobs row, which the new spec test pins. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
📓 Docs Drift Check7 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 181 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f01129cb94621dacb6f2d82183587756bc2d7d38 && git checkout f01129cb94621dacb6f2d82183587756bc2d7d38
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ff6f9768d2969c4f2f42819f461424965238e30f 545757a91ddd9896072ab57ca537cbeb26ebaedf && git checkout -B drift-repro ff6f9768d2969c4f2f42819f461424965238e30f && git merge --no-ff 545757a91ddd9896072ab57ca537cbeb26ebaedf
node scripts/docs-audit/affected-docs.mjs --json ff6f9768d2969c4f2f42819f461424965238e30f |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkQeShvvgjVb5MsbLn Final green head · 2026-11-26T02:00Z |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf 席位核对ACCEPT — PR #37392 at Head-sha:
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf L1-a runs the isolated CONTRACT_REVIEW_TIER subagent on this head (published schema + narrowing faces), after its L1 ACCEPT 7180430632. |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf Contract reviewServed-tier: Faces: published schema ( ① Derived judgments
② Semver level
Clause-②: no (narrowing) — on the PR body and on the changeset, and correct: the diff takes an accepted input away and adds no capability. ③ Boundary flags
④ Design judgmentS1 (should-fix) — one job OBJECT reached through two holders composes, and the boot schedules neither. Read from code, not driven.
N1 (nit) — the changeset's "as before" is not exact. "Two residual jobs of one name stay the one-package finding … as before" holds only when no body carries the name. Beside a body job of that name the pair composed on Files, each against the code it cites:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf The brief handed to the isolated CONTRACT_REVIEW_TIER subagent whose record follows the claim 7180444373 (verify-review-tier PASS: 32 assistant turns, every one at CONTRACT_REVIEW_TIER). It got no L1 conclusions. Brief |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
…r binds it One job object reached through two inputs (a built stack shared by two compositions, or passed twice) was counted once, while the binder binds every copy and refuses the name. It is now counted per place, as hooks are, so the pair is refused across two bodies, a body and the residual, and inside one holder. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
…sidual pair now refused Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkQeShvvgjVb5MsbLn Flake judgment · 2026-11-26T03:05Z · head |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkQeShvvgjVb5MsbLn Final green head · 2026-11-26T03:24Z |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf Delta contract review of record 7180533824 (S1 fix round). L1-a runs the isolated CONTRACT_REVIEW_TIER subagent. |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf Contract reviewServed-tier: Delta round on record 7180533824 (head What moved between the heads: a merge of ① Derived judgments
② Semver level
Clause-②: no (narrowing) — on the PR body and on the changeset, and correct: the delta takes more accepted input away and adds no capability. ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. S1: closed N1: closed How S1 was judged closed, against the four sentences the earlier record named and its fix direction:
N1: the changeset's "as before" is now bounded ("as before when no package body carries the name") and a new bullet states the residual pair beside a body job of the name is refused now, a disabled job counted too; the entry's Files, each against the code it cites, on this head:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf The brief handed to the isolated CONTRACT_REVIEW_TIER subagent for the delta record on this head (claim 7181724841; verify-review-tier PASS). It got no L1 conclusions. Brief |
|
repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf 席位核对ACCEPT — PR #37392 at Head-sha:
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc 维护者速读
席位意见:ACCEPT(L1-a 7181797620),请审批人批准。 席位核对ACCEPT · repo:objectstack#2 · head
|
|
repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc Approval requested on head |
…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>
Requested by Irene · project thread
Fixes #36431
repo:objectstack#2 · huangyiirene · session_01J8VVAkQeShvvgjVb5MsbLn
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill teaches declaring one job name in two packages of a composition; the refusal names every enabled job of the name and prescribes the fix
维护者速读
What changes
packages/spec/src/stack.zod.ts). A new reading,composedJobDeclarations, lists every job a composed artifact declares and its holder, input by input. A package body's jobs belong to that body. The residual's jobs are the top-level jobs beyond the bodies' flattened copies, counted by number and never by content: a top-level job that is a body's job object is matched to it first, then by count. That is the same reading as the binder'sjobNameCollisions.collectComposedJobNameErrors: a job name ENABLED in two or more holders (two package bodies, or a body and the residual) is refused withSTACK_CROSS_REFERENCE_INVALID(422). The message names every enabled job of that name and marks a residual job(the top level, outside every package body). Example:Job 'crm_nightly' is declared enabled twice across the packages of one composed artifact: 'com.example.sales' (stack #0) jobs[0] and 'com.example.billing' (stack #1) jobs[0]. The runtime schedules an artifact's jobs by their bare name, whichever package declares them, and the job scheduler refuses a name two enabled jobs share, so none of them runs. Rename one of them, or disable one (enabled: false).jobsfromcomposedJobDeclarations. The old by-NAME claim (residualEntryPredicate) read a residual job that shares a body job's name as that body's copy, and that was the gap. The "Known gap" docblock is replaced.packages/runtime/src/app-artifact-handlers.ts, docblock text only): composition now refuses the same set the binder refuses, so the binder's refusal is for artifacts no composition built (hand-written, or built before this change).compose-stacks-job-name-across-packages-refused, and a changeset (minoron@objectstack/spec, BREAKING, FROM → TO).composeStacksnow hand-build the artifact, which is the backstop case. Every refusal assertion is kept. Files:packages/runtime/src/app-artifact-handlers.job-pull.test.ts(ahandBuilthelper, with a pin holding it equal to a real composition where one still composes) andpackages/cloud-connection/src/marketplace-install-local-jobs.test.ts. The census CONTROL instack-compose-duplicate-entry-census.test.tsdrops itsjobsrow, and the two-body CONTROL instack-residual-extension-jobs.test.tsnow gives each body its own job name (both pinned the old behaviour by design). The file surface was extended by claim addendum 7178059000.Read first (by risk):
packages/spec/src/stack.zod.ts:composedJobDeclarations(the nested-input branch: identity match, then count) andcollectComposedJobNameErrors(the two-holder condition).packages/runtime/src/app-artifact-handlers.job-pull.test.ts:handBuiltand its equality pin.packages/spec/src/stack-composed-job-name-across-holders.test.ts.Two-minute check:
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/stack-composed-job-name-across-holders.test.tsshould show 20 passed.Tests
All local readings below were taken at head
c3c7bfcb, unless a line says otherwise. The patch round for the contract review's S1/N1 (record 7180533824) moved the head to545757a9; readings retaken there are markedat 545757a9.New file
packages/spec/src/stack-composed-job-name-across-holders.test.ts(20 tests). Refused, each assertingcode+status+ the named origins:first/last;CONTROLs that compose:
details: test and ablation readings
pnpm --filter @objectstack/spec testat 545757a: Test Files 897 passed (897), Tests 28461 passed, 1 todo (at c3c7bfc: 896 / 28435)pnpm --filter @objectstack/runtime test: Test Files 649 passed (649), Tests 12028 passed, 25 skipped; cloud-connectionpnpm --filter @objectstack/cloud-connection test: Test Files 94 passed, Tests 1359 passed@objectstack/driver-tursobuilt first)scripts/ablation-replace.mjsand restored (blob equal to HEAD,git diff HEADempty):collectComposedJobNameErrorscall removed: 8 failed / 8 passed;Acceptance notes
jobNameCollisions) and the install door (collectJobNameCollisions) refuse: enabled only, by name, the residual by count beyond the copies. A pair inside ONE holder stays that holder's own door's finding. That door counts a disabled twin too, which is wider than the binder (existing behaviour, unchanged).resolveArtifactCollections(packages/runtime/src/artifact-collections.ts,claimedIdentitieskeys an itemname:X) skips a body's job whose name the artifact's top level already carries. For a hand-built artifact whose top level holds a residual job X but no flattened copy of the body's job X (for example a nestedpreserveartifact that dropped its copies, then composed underlastbeside a residual input), the binder binds only the residual's job, refuses nothing, and the body's job is silently never scheduled.composeStacksnow refuses that shape when both jobs are enabled, so only artifacts no composition built reach it. Dedupe words: resolveArtifactCollections job name claim, residual job shadows body job, binder silent drop.stack-residual-extension-registered-and-jobs-judgedstill records the old known gap in its reason text. The new entry supersedes it, and the old one is left as shipped.Verification
details: local gates
node scripts/pm/dispatch-gates.mjs --commandsat c3c7bfc: 97 derived commands, all run. 96 exit 0.pnpm check:dual-build-cjs-loadsexit 3 (PREREQUISITE NOT MET: it needs every package's dist, e.g. studio and client-react): NOT MEASURED locally, left to CI.check-plugin-teardown-shape --self-testexit 0 after fetching its pinned commit into the shallow clone.--ranreconciliation: 97 derived, 97 run, 0 NOT-MEASURED, 0 UNRUN (runner-declared).pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date (no public export changed).node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD✓;node scripts/pm/overlap-check.mjs: VERDICT clean.pnpm --filter @objectstack/dogfood testunder the lock: VERDICT command-exit 0; Test Files 487 passed, 3 skipped (490); Tests 4128 passed, 68 skipped (4196); no failures.🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAkQeShvvgjVb5MsbLn