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 |
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