You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
objectExtensions: two entries for one object in the same package silently drop the earlier entry's fields #35228
When one package declares two objectExtensions entries for the same target object, the registry keeps only the last one. The fields of the earlier entry disappear, and nothing reports it: validate, lint and boot all pass.
Seen on 18.6.0 in an app package. The package extended crm_sales_order_line in two places, and the line lost cb_account. Reads and writes that named it then failed with INVALID_FIELD at runtime.
Where
packages/objectql/src/registry.ts, the extend branch of object registration (around line 6028 on 6455104):
// extend mode: remove existing extension from same packageconstidx=contributors.findIndex(c=>c.packageId===packageId&&c.ownership==='extend');if(idx!==-1)contributors.splice(idx,1);
Replacing on re-registration is deliberate, and correct for a hot reload of the same extension. But the same rule also applies to two distinct entries declared side by side in one stack, and there it silently drops authored fields.
Expected
One of the following:
refuse the stack at validate/lint time, e.g. object-extension-duplicate-target, naming both entries, so the author merges them; or
merge the two entries' fields when they come from one stack, keeping the replace-on-reload behaviour for a repeat registration.
Either way, a field an author declared should not vanish with no message.
First touch: p2 · domain:server · pm:queue. Not a queue jump. When one package declares two objectExtensions entries for the same object, the earlier entry's fields are silently dropped. It is an authoring trap that validate, lint and boot all pass, but it is not a regression named in a released version, and no stored data is lost. Fix shape: merge or refuse a second same-package entry at registration, and report it in validate/lint. Keep hot-reload replacement for a re-registration of the same entry.
Triage: area backfill under the rules of #35223 (daily reconciliation) — area:build · Bug. The grade set at first touch on 2026-11-18 is unchanged: the one re-grade pass is #35205's.
Card #35228 (p2 · area:build, filed by os-bob 2026-11-18): one package declared two objectExtensions entries for one target (crm_sales_order_line), and the registry kept only the last; the earlier entry's field cb_account was gone and reads/writes naming it answered INVALID_FIELD. The card offers two fixes: refuse at validate/lint, or merge the two entries when they come from one stack while keeping replace-on-reload. Area b1-C sent the card out as a product fork. This comment measures the premise on current main and lays out the options. It rules nothing.
Same file, applyControlledByParentExtensionGate docblock: "a package registers one extension per target: a later entry of the same package replaces an earlier one."
ADR-0146 D10: the extension is theobjectExtensions entry, one editor per item in Studio. ADR-0029 D3: one owner per object, extend for everyone else.
ComposeStacksOptionsSchema.objectConflict: two composed stacks declaring one object name are refused by default ('error'); 'merge' is an opt-in.
No ADR decision answers "two entries of one target inside one package" directly. Search below.
Protocol declaration
A narrows the accept set of composeStacks and of a packages[i] body (an authoring-contract narrowing, ! PR, L2 owed). B widens the accept set of defineStack (withdraws #22934's objectExtensions row) and changes registration semantics. C changes no contract.
Premises, measured on main e35cf035 (re-check commands)
Probe files (not committed): a spec probe and a registry probe, run with npx vitest run --project local <file> in packages/spec and packages/objectql (the registry probe needs pnpm --filter '@objectstack/objectql^...' build first).
The drop is real at the registrar.registerApp of a package with objectExtensions: [{ extend: 'crm_line', fields: { cb_account } }, { extend: 'crm_line', fields: { cb_other } }] serves crm_line with cb_other and withoutcb_account. Code: packages/objectql/src/registry-object-registration.ts:596-600 (// extend mode: remove existing extension from same package, the splice moved here from registry.ts by [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949); the loop that calls it once per entry is packages/objectql/src/engine-registration.ts:320-343. grep -n "extend mode: remove existing" packages/objectql/src/registry-object-registration.ts
The single-stack case is already refused; composition and package bodies are not.
composeStacks(…, { manifest: 'preserve' }) with two sub-stacks under one manifest id → ACCEPTED at composition, two bodies with one id and one entry each; boot refuses that shape as DUPLICATE_ARTIFACT_PACKAGE (read from code).
So the reporter's "validate, lint and boot all pass" is reproducible through composition (two sub-stacks of one package each extending one object), which is the natural way to write "extended in two places". The reporter's own source was not available; which of these doors it went through is inferred.
Hot reload depends on the replace. Register a package with extA (cb_account), then register it again with a renamed field (cb_account2): the served object has cb_account2 and not cb_account. A merge that accumulated across registrations would leave the renamed field behind. Any fix must keep "one registration of a package replaces that package's previous contribution to the target".
Side observation, not in scope (the seat files it as its own card). Re-registering the package with the entry removed (objectExtensions: []) leaves cb_account served: re-registration does not withdraw a target the package no longer extends. Measured on the bare registrar only; whether the os dev reload path uninstalls first was not driven.
Today's pull. HotCRM: 0 same-package duplicate targets. One app hit it on 18.6.0 and now declares one entry per object.
The problem in one sentence
An author who adds fields to one object from two places in one package loses the first place's fields with no message anywhere, and only finds out when a read or write naming them fails in production.
Options
Option
What it does
What the customer sees
Effort
A — one entry per target per package, refused wherever authoring reaches
Run the existing #22934 identity check (same wording) on composeStacks' composed output and on every packages[i] body. (Two bodies under one package id are already refused at boot by resolveArtifactPackageOrder, DUPLICATE_ARTIFACT_PACKAGE, packages/core/src/artifact-packages.ts:400-411; read from code, not driven.) Runtime arm, a condition for the maintainer: A1 (recommended) the registrar, meeting a body that still carries two entries (an artifact built before the fix), logs an error naming both entries and keeps today's outcome, as #22934 did not refuse already-built artifacts either; A2 the registrar refuses the body, which is loud but stops a working installed app on a platform upgrade. Replace-on-reload unchanged.
os validate / os build / composeStacks stop with "Object extension of 'X' is declared twice … merge them into a single entry", naming both places. Under A1 an already-installed artifact keeps booting as today, with an error line naming the lost entry, until it is rebuilt (for that artifact A1 is D until rebuild).
spec + objectql · 1 PR. Precedent: #23031 (+846/−88, 16 files) built the table this reuses; #32889 (+267/−11) is a same-shape "refuse the duplicate at the next door" extension.
B — merge at compose time only
composeStacks folds same-target entries from different input stacks into one entry (today objectExtensions: 'concat', stack.zod.ts:1642), with conflict rules for same-named fields, labels, priority, fieldPatches, validations and indexes (refused when two inputs disagree). One entry per package per target holds downstream, so no registrar change, no #22934 withdrawal, no hot-reload exposure. Does nothing for a hand-built packages[i] body (which would still need A's check).
Modules of one package can each extend one object; the composed stack carries one merged entry. A conflict between them is refused at composition. Installed artifacts unchanged.
spec · 1 PR. Nearest precedent: objectConflict: 'merge' and its refusal rules (#14848, #16075); sizes not measured.
C — merge one package's entries at registration
The registrar groups a registration's entries by target and folds them into one contribution before registering (fields by name; a field key, label, priority, validation or index name that two entries declare differently is refused naming both). Replace-on-reload kept per registration. Withdraw #22934's objectExtensions row (or a single stack would refuse what composition merges), flip its migration entry to a widening, re-model the controlled-by-parent build gate and the export path (one stored row per target) on merged entries.
Two places can extend one object; fields from both appear. A conflict between them is refused. An installed artifact carrying two entries gets its lost fields back on the next boot (empty columns for existing rows).
spec + objectql · 2 PRs. No direct precedent.
D — warn only
The registrar logs a warning naming both entries; nothing refused, nothing merged.
Same lost field as today; a line in the boot log.
objectql · 1 small PR. No precedent measured.
What each option means for the business
A: like a form that refuses to save two cards for the same customer, and tells you which two, instead of keeping one quietly. The author spends a minute merging.
B: like a mail-merge done before printing: the two drafts become one letter before it leaves the office, and a disagreement stops the print.
C: like a CRM that auto-merges duplicate contact records in the live system: convenient until two records disagree, and then every downstream copy needs the same rules.
D: like a smoke detector in a room nobody enters: the fire is recorded, the field is still gone.
Four axes, argued from the business standpoint
① Long-term soundness. In two years every place that holds an extension, the registry slot, the stored object_extension row, the Studio editor (ADR-0146: one editor per item) and the package export, holds one extension per package per object. The authoring surface should refuse what the rest of the platform cannot represent, which is how finding: one stack can author two entries under one name in 20+ named collections (objects, pages, flows, permissions, webhooks …), and os validate exits 0; only actions and the functions array (#22902) refuse it #22934 already treats 27 collections and how composeStacks already treats two same-name objects (refused by default, with objectConflict: 'merge' as a later opt-in). Reference platforms identify the field, not an extension entry (Salesforce CustomField, ServiceNow dictionary row); several source locations may contribute fields to one object and a same-field collision is refused. ObjectStack instead stores and edits one extension row per package per target (ADR-0146 D10), so A follows from this platform's own model, not from the reference platforms. A closes holes in an existing rule. B keeps that model downstream but adds a merge rule set at composition. C makes objectExtensions the one collection of finding: one stack can author two entries under one name in 20+ named collections (objects, pages, flows, permissions, webhooks …), and os validate exits 0; only actions and the functions array (#22902) refuse it #22934's table that merges at runtime, and the code path diverges from the stored path (a two-entry package cannot round-trip into stored rows without a merge at export). A is a narrowing that a later compose-time merge (B) can widen without a migration; the reverse is not true.
② Actual pull. One app hit it on 18.6.0 and worked around it; nobody is blocked today; HotCRM has zero such packages. The pull is "don't let the next author lose a field silently", which every option addresses in different strengths.
③ Guarding against AI mistakes. Agents write most stacks here. With A an agent that splits an extension across two modules gets a loud refusal at os validate, naming both places, before anything ships. With B or C the same agent gets a merge, plus a refusal only when the two halves disagree; the closed rule is replaced by merge rules an agent must learn. With D the mistake ships and the field is missing at runtime: a silent loss.
os-decision-facets
① Long-term soundness: A shrinks special cases (one identity rule across #22934's collections, the registry slot and the stored row); B keeps the model downstream but adds compose-time merge rules; C adds a runtime merge exception and a code-vs-stored divergence; D changes nothing.
② Actual pull: one app on 18.6.0, worked around; zero blocked today; HotCRM 0 instances.
③ AI-mistake guard: A loud refusal at validate/build naming both entries; B/C merge with conflict refusals (open rule set); D silent loss remains.
④ Non-sprawl: A no new key or rule; B permanent compose merge rules per extension key; C the same rules in more places; D a log line only.
Prior rulings read: objectextensions,duplicate,extension,compose → 18 hits; ADR-0146 D10, ADR-0029 D3 read (adjacent, neither answers same-package two entries); #22934 thread (bug fix, no ruling); thread: none; repo: objectstack-ai/objectstack
Recommendation and confidence gaps
Recommend A, with runtime arm A1. It keeps this platform's own rule, "one extension per package per object", true at every door, and turns the silent loss into a refusal that names both places. A1 over A2 because a platform upgrade should not stop an installed app that works today minus one field; the error line names the loss and the next build refuses. B is not chosen now because it adds a merge rule set for a pull of one worked-around case; it stays open as a later widening on top of A. C is not chosen because the stored and Studio sides would have to mirror its merge rules. D is not chosen because the field is still lost.
Self-check: only ① (this platform's one-row-per-target model) picks A; do ②③④ flip it: no.
Confidence gaps: the reporter's exact source path was not reproduced (composition and packages[i] bodies are the two measured holes); how many already-built artifacts in the wild carry two entries is unknown (hence A keeps installed artifacts booting with an error line rather than refusing them); the os dev reload path was not driven (premise 3 is measured on the registrar it calls); the CLI doors (os validate, os build, os lint) and the duplicate-package-id refusal were read from code, not driven.
If B: one spec PR (compose-time fold with conflict refusals), plus A's packages[i] body check for hand-built bodies; contract review on the merge rules; no L2 owed (widening).
If C: two PRs (spec: withdraw the row, flip the migration entry, re-model the controlled-by-parent gate; objectql: merge before register, conflict refusals, export path), contract review on the merge rules. No L2 owed (widening).
If D: one small objectql PR.
Whatever the pick: premise 4 (a removed entry stays served after re-registration) is filed as its own card.
Related
#22934 / PR #23031 (the single-stack refusal), #32411 family (#32563, #32889: duplicate names in one artifact refused at the next door), #29872 / #29903 (extension export path), #34134 (fieldPatches and label clash), ADR-0146 D10.
A1: the registrar, meeting a package body that still carries two entries for one target (an artifact built before the fix), logs an error naming both entries and keeps today's outcome. It does not refuse the body, so an installed app keeps starting.
Replace-on-reload is unchanged: one registration of a package still replaces that package's previous contribution to the target.
Not chosen: B (merge at compose time), C (merge at registration), D (warn only). B stays open as a later widening on top of A.
Execution: one os-dev in area b1-C, effort high, one PR titled with ! (an authoring narrowing, so an isolated contract-review L2 is owed and the dogfood battery runs once on the final head). It starts once this thread's open PR #35656 has merged, because the thread works one branch at a time.
Claim: PM loop round 1 · card thread of repo:objectstack#1 (this card's own thread) · 2026-11-19T22:18Z · dispatched to an os-dev subagent of this card thread · fold chain head (members #35228, #35608)
Area: b1-C
Session: session_01L6bhgVLY5efsfaT3UG2zwH
Account: os-sales
Branch: claude/project-thread-nbjebo (harness-assigned name, not claude/issue-35228-…; the PR body notes it for the Duplicate Fix Guard). The branch is the head of PR #35656 (card #35566, in the merge queue now); the dev works on a local branch and the branch is restarted from main once #35656 has merged, before the first push.
Worktree: objectstack-issue-35228
Domain: domain:server (#35228), domain:spec (#35608)
Seat: repo:objectstack#1 (card thread)
File surface: packages/spec/src/stack.zod.ts (run collectDuplicateEntryErrors' identity table on the output of composeStacks and on every packages[i] body, same messages, the body's path in the finding), packages/spec/src/migrations/entries/semantic/** (the narrowing's migration entry), packages/objectql/src/engine-registration.ts (the A1 error log in the objectExtensions loop), new test files named for the two cards under packages/spec/src/ and packages/objectql/src/, generated baselines a gate demands, one changeset. Stop on breach.
Container & model: M, mode:subagent (inside this card thread), model: default (opus) — dispatch-gates --tier: no path-derived mandate; the contract review is a separate isolated CONTRACT_REVIEW_TIER subagent, effort: high
Clause-②: no
Metadata-protocol: narrowed
Responsibility: platform code in objectstack-ai/objectstack (composeStacks concatenates collections without the same-package identity check that defineStack runs; the registrar keeps the last of two same-target entries) | defineStack refuses the single-stack case already (#22934, PR #23031) | app authors who compose one package from several sub-stacks; one app hit it on 18.6.0
Thread-read: 7023505627
Premise: holds — measured on e35cf035 (comment 7016526323, premises 1-3 and 5) and re-read at origin/maine91d9671: collectDuplicateEntryErrors is called from defineStack's cross-reference pass only; composeStacks strategy objectExtensions: 'concat'; the extend splice in registry-object-registration.ts unchanged.
Ruling: maintainer letter A, runtime arm A1 (record 7023505627, 「推荐 A,已安装的包只记错误日志、照常启动。」): refuse at composition and in every packages[i] body with the #22934 wording; the registrar logs an error naming both entries and keeps today's outcome; replace-on-reload unchanged.
Pre-claim lane: packages/spec/src/** (where a card names it) and the objectql registration door are path roots of area b1-C (area-lease.md).
Pre-claim deps: none named; no open PR touches packages/spec/src/stack.zod.ts, packages/objectql/src/engine-registration.ts or the #22934 migration entry (open-PR file listing read at claim time); overlap-check runs before each push.
Prior rulings read: objectextensions,duplicate,extension,compose → 18 hits; ADR-0146 D10, ADR-0029 D3 (adjacent); #22934 thread (bug fix, no ruling); this card's ruling 7023505627; thread: 1 ruling; repo: objectstack-ai/objectstack
Serial constraints cleared: PR #35656 (same thread, same branch, packages/metadata-protocol only) merges first; #35589 (next in this thread) touches protocol-save.ts, not these files; #35609 (registry re-registration) is unclaimed and is not asserted by this card's pins.
Fold (seat order, five gates): ① same defect, same fix — a same-package duplicate identity escapes #22934's check through composition or a package body; the fix runs that one table there. ② one area (b1-C), one worktree, one changeset, one queue slot. ③ both members graded or ruled: #35228 ruled A+A1 (7023505627); #35608 p2 by triage (7016642360). ④ each member checkable on its own: #35228 by a composed stack and a package body with two objectExtensions entries for one target refused, plus the A1 log at the registrar; #35608 by the 27-key composition census, each key refused. ⑤ excluded: #35609 (re-registration does not withdraw a dropped target: a registrar mechanism, not this check), #35566 and #35589 (stored-item save and publish doors), #35562 (p3, a currency pointer shape).
PR body: Fixes #35228 and Part of #35608 (a folded ! PR cannot carry two Fixes lines through label-write --land's dogfood gate); #35608 is closed by hand after the merge.
{
"issue": 35228,
"status": "done",
"branch": "claude/project-thread-nbjebo",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35699",
"session": "session_01L6bhgVLY5efsfaT3UG2zwH",
"premise_still_valid": true,
"summary": "Ruling A/A1 implemented with #35608 folded in. stack.zod.ts reads the same-package identity table (29 keys: the original 27 plus queues and assignmentRules) through one helper at four doors with one wording: a stack's top level (byte-identical), each packages[i] body of defineStack (stack.packages[i].manifest.KEY[j]), the one package a flat composeStacks makes (inputs' entries together, labelled by input; objects left to objectConflict; one entry object reached twice counts once), and every body a composition carries or assembles under preserve. Composition refusals join step 3b, so they are STACK_CROSS_REFERENCE_INVALID/422 and carry the inputs' conversion record. engine-registration.ts logs one error per (package, target) for a body with two or more objectExtensions entries for one target and keeps the outcome; registry-object-registration.ts untouched. Semantic migration entry and one changeset (spec + objectql minor, BREAKING, adr-0087 registered). #35656 had merged, so the work was rebased on main 03865ae9 and pushed to the harness branch; PR #35699 is a draft.",
"tests": "Base census on e91d9671 (composeStacks([A,B]) default strategy): 26 keys ACCEPTED with 2 entries, objects REFUSED STACK_COMPOSE_OBJECT_CONFLICT, apps REFUSED STACK_SINGLE_APP_VIOLATION; after the fix all 29 refused (28 STACK_CROSS_REFERENCE_INVALID, objects unchanged). Boot census not repeated (the original card measured it for these registrars). On head 58464e71: spec test exit 0 (863 files, 27620 passed, 1 todo); objectql test exit 0 (617 files, 13928 passed). On 85531416 (pre-rebase, identical blobs of both edited sources): spec typecheck exit 0, objectql typecheck exit 0, cli unit project exit 0 (431 files, 6159 tests). New pins: stack-object-extension-duplicate-target.test.ts (10), stack-compose-duplicate-entry-census.test.ts (table-driven, 29 keys: inputs alone, flat refusal, body refusal, preserve cross-package control), engine-same-target-object-extensions-log.test.ts (5, incl. reload pin), one case in stack-conversions-record.test.ts. Fixture triage: two flat-composition fixtures in stack-datasource-connector.test.ts now also meet the duplicate refusal (re-judged, reversed control now refused). Ablation via ablation-replace.mjs, anchor 1->0, restored by HEAD blob hash: flat door deleted 30 failed/95 passed; defineStack body door 29 failed/96; composed body door 2 failed/8; registrar log call 2 failed/3. Base control (stack.zod.ts from e91d9671): 5 new-door pins fail, single-stack byte-identical pin and the original duplicate-entry suite pass (5 failed/143 passed). No dist-consumed subject: all tests import source.",
"gates": "dispatch-gates --commands on 58464e71: 97 derived; 95 :: exit 0; node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3 (NOT MEASURED: shallow clone, needs unshallow); pnpm check:dual-build-cjs-loads :: exit 3 (NOT MEASURED: needs every workspace dist). --ran reconciliation: 97 accounted, 95 run, 2 NOT-MEASURED, exit 0. check-platform-checklist --changed-from origin/main: OK, 6 anchors, 0 lost. overlap-check: clean exit 0. check:dev-prereqs (local-only) exit 1 = NOT MEASURED, workspace only closure-built. test:repo declared to CI. PR check-runs at report time: Check Changeset, Lint (all lanes), Type Check (four lanes), Governed Surface Queue Guard, PR-body guards, Spec property liveness all in_progress; opt-in and queue-only jobs skipped. Not waited on.",
"dogfood_battery": "58464e71 · VERDICT command-exit 0 · Test Files 482 passed | 3 skipped (485) · Tests 4093 passed | 68 skipped (4161) · no failures",
"mcp_calls": "0",
"api_writes": "2 relay strokes: pr_create (POST /repos/objectstack-ai/objectstack/pulls, then POST /repos/objectstack-ai/objectstack/issues/35699/assignees) and this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35228/comments via post-stamped.mjs). git push to claude/project-thread-nbjebo (new branch; the old one was deleted on #35656's merge) is not a REST write.",
"open_questions": [
{
"question": "The claim and dispatch say `Clause-②: no` beside `Metadata-protocol: narrowed`, but check-changeset-no-major.mjs's self-test calls `narrowed` beside a line with no `(narrowing)` arm a CONTRADICTION. Which spelling stands?",
"options": [
"A: keep `Clause-②: no (narrowing)` as written in the PR body and the changeset; the seat amends the claim line",
"B: revert to `Clause-②: no` verbatim and accept a red Check Changeset"
],
"recommendation": "A, because the change is a declared authoring narrowing (bang title, BREAKING, dogfood owed), and the gate refuses B mechanically"
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: under manifest preserve a manifest-less input contributes no body, so its entries sit only in the flattened top level, which this check does not judge there; read from code, not driven",
"carrier: none · noted, not filed: the A1 error line is once per registration of a body, so a reload of the same unfixed body logs it again",
"carrier: none · noted, not filed: the docblock above the identity table in stack.zod.ts still says 27 collections while the table holds 29"
]
}
Claim correction (2026-11-20T00:08Z) to claim 7023784590: its Clause-②: no line lacks the narrowing arm. The fold refuses, at composition and in every package body, what those doors accepted before, and widens nothing, so the line is:
Clause-②: no (narrowing)
It pairs with Metadata-protocol: narrowed, which stands, as check-changeset-no-major.mjs's self-test reads the two together. PR #35699's body and changeset already carry this spelling.
{
"issue": 35228,
"status": "done",
"branch": "claude/project-thread-nbjebo",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35699",
"session": "session_01L6bhgVLY5efsfaT3UG2zwH",
"premise_still_valid": true,
"summary": "Resume round after the lost session. Verified that head c5b827e5 closes the contract review's S1, S2, S3, N1 and N3 with pins, so nothing was added and nothing was pushed: the PR head stays c5b827e5. S1+S2: collectComposedResidualDuplicateEntryErrors judges the residual (the boot's reading, isResidualTopLevelItem plus a claimed-by-identity rule for datasources and objectExtensions) as one package under every manifest strategy, including preserve; a nested multi-package input's flattened body copies are not read. S3: the door still counts one entry object reached twice once (except hooks, see open_questions), and logSameTargetObjectExtensions skips a target whose entries are all equal by value; registrar comment, migration acceptanceCriteria, docblock and changeset updated. N1 (29 collections) and N3 (objects stay with objectConflict; the app pair now answers STACK_CROSS_REFERENCE_INVALID) are in the prose; N2 stays an accepted deviation (the #22934 sentence is byte-identical). The two reds on 58464e71 (TypeScript Type Check, Test UI) were not test failures: lint.yml and ci.yml run with cancel-in-progress concurrency, the push of c5b827e5 cancelled the in-flight lanes (Type Check workspace, all 16 Test UI shards, Type Check UI, five Test Core shards, all completed cancelled within seconds after the new push), and the two aggregators then failed on the cancelled result. On c5b827e5 both concluded success, with every other required context.",
"pr_body_deltas": [
"What changes: the composition door judges the RESIDUAL package (the top-level entries no body of the composed artifact claims, by the boot's own residual reading) as one package under every manifest strategy including preserve; a flat composition with no packages carries all its entries as residual; a nested multi-package input's flattened copies of its bodies are never read as a second entry.",
"What changes: the registrar's error line for two or more objectExtensions entries for one target stays quiet when every entry for that target is equal by value (one sub-stack composed twice, as composed or as built JSON); equal entries beside one that differs still log, naming every entry.",
"What changes: one entry object reached through two inputs still counts once at the door, except in hooks, where a built artifact binds each copy, so a hook reached twice is refused (deviation from the dispatch wording, see the report's open question).",
"Acceptance notes: N2 is an accepted deviation; the refusal's remedy does not mention manifest preserve, because the #22934 sentence stays byte-identical at every door.",
"Tests: new pins in stack-object-extension-duplicate-target.test.ts (review S2: preserve with two manifest-less inputs declaring page home, and two extensions for one target, both refused naming both, plus the body-slot control; review S1: a preserve artifact with two packages each extending one target nested in a flat and in a preserve composition, accepted, and the nested artifact's own residual pair refused; review S3: a hook reached twice refused) and in engine-same-target-object-extensions-log.test.ts (the accepted twice-passed sub-stack composition, registered as composed and as built JSON, logs no error; equal entries beside a differing one log). stack-datasource-connector.test.ts: a preserve fixture now also meets the residual duplicate finding (second issue of the same envelope).",
"Verification: ablation of the four new arms, each red, each restored by blob hash (numbers in the report's tests field); CI on c5b827e5: 58 success, 11 skipped (opt-in and queue-only)."
],
"tests": "Head c5b827e5, worktree objectstack-issue-35228 (clean, BASE c5b827e5). Closure build --filter='@objectstack/dogfood^...' under the lock: VERDICT command-exit 0. Pins: spec stack-object-extension-duplicate-target, stack-compose-duplicate-entry-census, stack-conversions-record, stack-datasource-connector: Test Files 4 passed, Tests 203 passed; objectql engine-same-target-object-extensions-log: 1 file, 7 passed. Full: spec test exit 0 (Test Files 863 passed, Tests 27626 passed, 1 todo); objectql test exit 0 (Test Files 617 passed, Tests 13930 passed); spec typecheck exit 0; objectql typecheck exit 0 (both check:test-typecheck OK, debt held). Ablation via scripts/ablation-replace.mjs in wrap mode on the committed head, trap restore to HEAD, every leg proven on disk (anchor 1 to 0, blob changed) and restored (blob equals HEAD, git diff HEAD empty); subjects resolve from source (spec tests import ./stack.zod, objectql test imports ./engine), so no dist rebuild was owed. Leg A, residual filter deleted: 37 failed of 203 (the preserve census controls, the S1 nested-accepted pin, the S2 body-slot control, the connector preserve controls). Leg B, the old preserve skip restored: 4 failed (both S2 pins, two connector residual refusals). Leg C, hooks exception deleted: 1 failed (the hook reached twice pin). Leg D, equal-by-value quiet deleted: 1 failed of 7 (the S3 twice-passed composition pin). Final blobs: stack.zod.ts 0d32524b equals HEAD, engine-registration.ts bf1ca203 equals HEAD. Scratch probe (deleted, never committed): composeStacks with manifest preserve, two manifest inputs and one manifest-less input carrying objectExtensions, registered through the objectql manifest service: composed packages 2, top-level objectExtensions 1, the extension's field absent on the resolved target (see out_of_scope_findings).",
"gates": "dispatch-gates --commands on c5b827e5: the delta 58464e71..c5b827e5 (7 files) derives the same 97 as the whole PR. All 97 run: 96 exit 0 on the first pass; pnpm check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: 7 packages without dist), then after building those 7 under the lock it exited 0 (124 entry points across 72 packages load); the ran list records its re-run exit. node scripts/check-plugin-teardown-shape.mjs --self-test exit 0 (48 cases) after fetching its pinned control commit at depth 1; both families the first report left NOT MEASURED are now measured. --ran reconciliation: 97 derived, 97 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. check-platform-checklist --changed-from origin/main: OK, 6 anchors judged, 0 lost, exit 0. check-nul-bytes exit 0. overlap-check: clean, exit 0 (against origin/main c03a8a34, 0 PR heads). check:dev-prereqs (local-only) exit 1 = NOT MEASURED: 35 ui packages unbuilt in this worktree. test:repo declared to CI. PR check-runs on c5b827e5 at report time: 58 completed success (among them TypeScript Type Check, Type Check workspace, consumer gates, debt ledger, source gates, Test Core 1-10 of 10, Build Core, Test UI and its 16 shards, Type Check UI, Build and E2E UI, Live E2E UI, Lint and Repo Gates, Governed Surface Queue Guard, Check Changeset, Dogfood Regression Gate), 11 skipped (Lint UI, Build Docs, Temporal Conformance, the dogfood shard matrix, UI Published Artifacts, Dogfood Verify CLI, the two queue verdicts, the schedule gate, packed-tarball smoke, 18.x upgrade harness: opt-in or queue-only). Side effect: the control-commit fetch wrote FETCH_HEAD in the shared .git and added one shallow boundary.",
"dogfood_battery": "c5b827e5 · os-verify-lock VERDICT command-exit 0 (held 32m03s) · Test Files 482 passed | 3 skipped (485) · Tests 4093 passed | 68 skipped (4161) · no failures",
"mcp_calls": "0",
"api_writes": "1 relay stroke: this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35228/comments via post-stamped.mjs). No push this round (no new commit), no PR body edit.",
"open_questions": [
{
"question": "The dispatch says keep the door's rule that one entry object reached twice counts once; head c5b827e5 keeps it for every collection except hooks, where it counts the copies and refuses (a built artifact serialises the two references into two equal hook entries and binds both handlers, while a source boot folds them). Which stands?",
"options": [
"A: keep the hooks exception as committed; the composition door and the single-stack door then agree for hooks (both count by position), and the boot never binds one handler twice",
"B: drop the exception so hooks also count once; the twice-passed sub-stack composes, and a built artifact of it binds the handler twice"
],
"recommendation": "A, because under B an accepted composition changes behaviour between a source boot and a built boot (one bind versus two), which is the disagreement S3 asked to remove, and the change is one line with its own pin"
}
],
"security_findings": "none",
"out_of_scope_findings": [
"class: a · reach: named producer composeStacks with manifest preserve and a manifest-less input that carries objectExtensions, registered through the objectql manifest service door (scratch probe on c5b827e5: composed packages 2, top-level objectExtensions 1, the extended field absent on the resolved target object; not driven through os serve) · evidence: a residual (top-level, unclaimed) objectExtensions entry of a packages-carrying artifact is registered by no door: unclaimedTopLevel lists no object_extension because an extension has no name slot, and RESIDUAL_TYPES_WITH_OWN_PATH in packages/objectql/src/plugin.ts excludes it while no other path registers it; composeStacks and defineStack accept it. Consequence for this PR: the residual door's objectExtensions refusal (the byte-identical #22934 sentence) says only the last entry's fields register, while at that door none register · dedupe words: residual objectExtensions, unclaimedTopLevel object_extension, preserve manifest-less input, residual extension dropped, composeStacks preserve extension",
"carrier: none · noted, not filed: the residual predicate counts a top-level datasources or objectExtensions entry as claimed when any body carries one under the same identity; for objectExtensions that is an approximation, since the boot registers no residual extension at all (finding above); read from code, not driven",
"carrier: none · noted, not filed: the objectql S3 pin registers the composed objectExtensions through a hand-built extender body rather than the composed stack itself; the composed array is the one asserted"
]
}
Delta review of PR #35699, 58464e71..c5b827e5 (one commit, 7 files), following record 7026031587 on the PR. Inputs read: the delta diff, the scoped files and the code they cite in the tree at this head, the dev's report 7027513812 on this card, and the check-runs on this head as of 2026-11-20T01:33Z. Nothing was built or run. The test files and the changeset stay the lane seat's ACCEPT at TIER_DEFAULT.
Verdict in one line: the three graded findings of the first record are closed in code and pinned, the hooks exception is in scope and right, and the residual objectExtensions note is a separate card, not a blocker.
① Derived judgments
S1: closed. collectComposedResidualDuplicateEntryErrors (stack.zod.ts:3585) reads only what residualEntryPredicate (:3625) lets through: with bodies present, a top-level entry a body claims is not read. Pin: stack-object-extension-duplicate-target.test.ts:204 (a preserve artifact whose flattened copy holds two packages' extensions of one target, nested under last and under preserve, accepted, with an anti-vacuity assertion that the copy is there) and :226 (its own residual pair still refused).
S2: closed. The call at stack.zod.ts:9585 is no longer skipped under 'preserve' and is handed composed.packages, so entries no body claims are judged as one package under every strategy. Pins: :153 (two manifest-less inputs, page home), :172 (two manifest-less inputs extending one target), :190 (control: a body's slot is not a residual pair).
S3: closed. logSameTargetObjectExtensions skips a target whose entries are all equal by value (engine-registration.ts:114, equalByValue at :129), so a composition the door accepts logs nothing as composed or as built JSON; entries that differ still log. Pins: the two [review S3] cases in engine-same-target-object-extensions-log.test.ts. The registrar comment, the migration entry's acceptance criterion and the changeset now say the same thing.
N1: closed (stack.zod.ts:3267, 29 collections, 26 by name).
N3: closed. The entry's surface and acceptanceCriteria and the changeset now carry the objectConflict carve-out and the app pair's code change.
New accept-set change in the delta:
A hook entry reached through two inputs is now refused (stack.zod.ts:3601), where every other collection still counts one entry object once. Right: see ④, question 1.
A flat composition with a nested multi-package input no longer reads that input's flattened copies. Right: this is S1's fix; it widens nothing against main.
Public surface: still no new export. The registrar's error line now has one more quiet case (equal entries); nothing is refused or merged there.
② Semver level
Unchanged and still right: @objectstack/spec minor and @objectstack/objectql minor, BREAKING banner, Metadata-protocol: narrowed. The delta adds one more narrowing (the hook reached twice) and the changeset names it. Check Changeset concluded success on this head.
Clause-②: no (narrowing) — correct.
③ Boundary flags
open_questions (hooks exception, A or B). A stands: keep it. Reasons in ④.
out_of_scope 2 (the claimed-by-identity rule for datasources and objectExtensions is an approximation). Accepted. It is what keeps a body's flattened copy from being read as a second entry, which S1 needed. It rides the card above.
out_of_scope 3 (the objectql S3 pin registers the composed array through a hand-built body). Accepted: the array asserted is the composed one, and the built-JSON leg covers the serialised shape.
Two gate families the first report left NOT MEASURED. Now measured by the dev (exit 0), and their CI lanes concluded success on this head.
SQL push-down (Prime Directive 5). Not applicable: the delta adds no query, no id materialisation and no in-app join.
Check-runs on the head. 69 in total: 58 concluded success, 11 skipped (opt-in and queue-only lanes), none pending, none failed. Among the successes: Build Core, Test Core 1/10 to 10/10, Type Check · workspace, consumer gates, source gates and debt ledger, the lint lanes, Check Changeset, Governed Surface Queue Guard, Spec property liveness, Dogfood Regression Gate.
④ Design judgment
packages/spec/src/stack.zod.ts. The residual door now reads the artifact the way the boot does: no packages[], every entry is the one package; with bodies, the mirror of unclaimedTopLevel decides by slot, and the two table collections that rule does not walk by slot are claimed by identity. It is handed composed.packages after the concat pass and the preserve fold, so a carried body and an assembled body are both seen. The docblocks say what the code does.
Question 1, the hooks exception. Within scope, and right. The single-stack door counts every entry, twins included, and #35608 asks a composition of one package to refuse what defineStack refuses for it; counting one object once is the deviation from that rule, and it is safe only where the copies cannot behave differently from one entry. For hooks they can: collectBundleHooks (packages/runtime/src/app-plugin.ts:2992) folds by reference, so a source boot binds once, while a built artifact carries two equal entries and binds both, which is the table's own hooks consequence line. Refusing keeps the two boots in agreement, which is what S3 asked for. It is a narrowing of the diamond shape for hooks only, and the changeset and the migration entry both say so. The pin is adequate: an exact-message refusal at :244, the unchanged control at :292 for a non-hook entry reached twice, and the dev's ablation leg turns the pin red.
Question 2, the residual objectExtensions note. Not a blocker; a separate card. Read in the tree: objectExtensions is not in OWNER_STAMP_JUDGED_COLLECTIONS, so the residual rule files no extension, and the dev's report says no other path registers one. That behaviour is on main and this PR does not create or worsen it: before, two residual extensions composed and none registered; now the pair is refused. What is inaccurate is the sentence at that one door ("only the last of these entries' fields register"), and the remedy leads to a single residual entry that composes and still registers nothing. The fix belongs to the door that drops the entry, or to a refusal of a residual extension as such, and either is a decision of its own. Recorded here as N4.
packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts. Agrees with the code at this head: the residual wording, the hooks exception, the app pair's code and the equal-entries quiet case are each stated as implemented.
packages/objectql/src/engine-registration.ts. Still agrees with arm A1 sentence by sentence: an error line for entries that differ, nothing refused, nothing merged, replace-on-reload untouched. The comparison runs only for a target with two or more entries, so the common path pays nothing.
N4 (nit) — At the residual door the objectExtensions refusal says the last entry's fields register, while no residual extension registers at all. Follow-up card, as above.
N5 (nit) — jobs is the one table collection the residual mirror never treats as residual (TOP_LEVEL_COLLECTIONS_NEVER_RESIDUAL), because the boot reads jobs off the whole stack. So in an artifact that carries packages[], two manifest-less inputs declaring one job name are judged by no door. The contract text says "the boot's residual", so it is not contradicted, but the pair is unjudged. Read from code, not driven. Add it to the same follow-up card.
N6 (nit) — The composed output of a sub-stack passed twice still carries the entry twice, so that output, serialised and handed to defineStack as a packages[i] body, is refused by the body door. No boot or log disagrees any more; follow-up or accepted deviation.
Round: delta review of 58464e71..c5b827e5f3abfab7519e591419106419bbf19bf0, rendered from record-recognisers --brief-template --paths <the PR's 9 files> on this head. The first record is 7026031587; this round re-judges under this brief and supersedes 7027587340, which was briefed in free text.
You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is node scripts/pm/record-recognisers.mjs --template --paths packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts packages/spec/src/stack.zod.ts — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.
Inputs — these and nothing else:
· card #35228: its body and EVERY comment (rulings and earlier records included)
· PR #35699: its body, its file list, and the net diff against main at c5b827e5f3abfab7519e591419106419bbf19bf0
· the check-runs on c5b827e5f3abfab7519e591419106419bbf19bf0: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.
Scope — the paths reviewFace returns as hits on this PR's file list: packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts, packages/spec/src/stack.zod.ts;
plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
Widen it freely, ⛔ never below hits; the record's Scope: line names the implementing files apart from hits.
The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
ACCEPT at TIER_DEFAULT, exactly as a standalone PR of those files.
④ judges the hits files and those implementing files ONLY:
lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
code outside the diff is READ to judge them, never reviewed.
⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/921a7a0a-596b-5db1-b8dc-86173b3561d0/scratchpad/pr-35699/ alone; nothing there you did not write this round is read.
Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — for EVERY hits file: does the change hold against the code it cites and the
scenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
on main; a schema file against the ruling or ADR it implements and its first consumer; an ADR
against its first consumer and its execution plan. For EVERY implementing file in the diff: does the
code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade, S1 (should-fix) — …, and a clean round as No must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head and
refuses the record; the delta record names those it closes by id alone, S1: closed.
A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.
----- to here -----
Judged under brief 7027654308 on this card. This record supersedes 7027587340, which was written against a free-text brief; the first record is 7026031587 on the PR. It is a delta review of PR #35699, 58464e71..c5b827e5 (one commit, 7 files), and the head is unchanged since 7027587340.
Inputs read, and nothing else: this card's body and all ten earlier comments (ruling 7023505627, claim 7023784590 and its correction 7025900800, the two os-dev-reports 7025836839 and 7027513812, both earlier records), the PR's body as it stands now, its 9-file list and the net diff against main at this head, and the check-runs on this head as of 2026-11-20T01:38Z. The cited code was read in the tree at this head. Nothing was built or run. The five test files and the changeset stay the lane seat's ACCEPT at TIER_DEFAULT.
Verdict in one line: the three graded findings of the first record are closed in code and pinned, the hooks exception is in scope and right, and the residual objectExtensions note is a separate card, not a blocker.
① Derived judgments
S1: closed. collectComposedResidualDuplicateEntryErrors (stack.zod.ts:3585) reads only what residualEntryPredicate (:3625) lets through: with bodies present, a top-level entry a body claims is not read. Pin: stack-object-extension-duplicate-target.test.ts:204 (a preserve artifact whose flattened copy holds two packages' extensions of one target, nested under last and under preserve, accepted, with an anti-vacuity assertion that the copy is there) and :226 (its own residual pair still refused).
S2: closed. The call at stack.zod.ts:9585 is no longer skipped under 'preserve' and is handed composed.packages, so entries no body claims are judged as one package under every strategy. Pins: :153 (two manifest-less inputs, page home), :172 (two manifest-less inputs extending one target), :190 (control: a body's slot is not a residual pair).
S3: closed. logSameTargetObjectExtensions skips a target whose entries are all equal by value (engine-registration.ts:114, equalByValue at :129), so a composition the door accepts logs nothing as composed or as built JSON; entries that differ still log. Pins: the two [review S3] cases in engine-same-target-object-extensions-log.test.ts. The registrar comment, the migration entry's acceptance criterion and the changeset now say the same thing.
N1: closed (stack.zod.ts:3267, 29 collections, 26 by name).
N3: closed. The entry's surface and acceptanceCriteria and the changeset now carry the objectConflict carve-out and the app pair's code change.
New accept-set change in the delta:
A hook entry reached through two inputs is now refused (stack.zod.ts:3601), where every other collection still counts one entry object once. Right: see ④.
A flat composition with a nested multi-package input no longer reads that input's flattened copies. Right: this is S1's fix; it widens nothing against main.
Public surface: still no new export. The registrar's error line now has one more quiet case (equal entries); nothing is refused or merged there.
② Semver level
Unchanged and still right: @objectstack/spec minor and @objectstack/objectql minor, BREAKING banner, Metadata-protocol: narrowed. The delta adds one more narrowing (the hook reached twice) and the changeset names it. Check Changeset concluded success on this head.
Clause-②: no (narrowing) — correct.
③ Boundary flags
open_questions of the first report (which Clause-② spelling). Answered and done: no (narrowing) stands, and claim correction 7025900800 carries it.
open_questions of the second report (hooks exception, A or B). A stands: keep it. Reasons in ④.
out_of_scope 2 (the claimed-by-identity rule for datasources and objectExtensions is an approximation). Accepted. It is what keeps a body's flattened copy from being read as a second entry, which S1 needed. It rides the card above.
out_of_scope 3 (the objectql S3 pin registers the composed array through a hand-built body). Accepted: the array asserted is the composed one, and the built-JSON leg covers the serialised shape.
Two gate families the first report left NOT MEASURED. Now measured by the dev (exit 0), and their CI lanes concluded success on this head.
SQL push-down (Prime Directive 5). Not applicable: the delta adds no query, no id materialisation and no in-app join.
Check-runs on the head. 77 in total: 61 concluded success, 15 skipped (opt-in and queue-only lanes, and the label and size jobs on the PR-body edits), 1 cancelled, none pending, none failed. The cancelled one is a Check Changeset run that a second PR-body edit superseded; the run after it concluded success. Among the successes: Build Core, Test Core 1/10 to 10/10, Type Check · workspace, consumer gates, source gates and debt ledger, the lint lanes, Check Changeset, Governed Surface Queue Guard, Spec property liveness, Dogfood Regression Gate.
④ Design judgment
packages/spec/src/stack.zod.ts. The residual door now reads the artifact the way the boot does: no packages[], every entry is the one package; with bodies, the mirror of unclaimedTopLevel decides by slot, and the two table collections that rule does not walk by slot are claimed by identity. It is handed composed.packages after the concat pass and the preserve fold, so a carried body and an assembled body are both seen. The docblocks say what the code does.
The hooks exception (the second report's open question). Within scope, and right. The single-stack door counts every entry, twins included, and #35608 asks a composition of one package to refuse what defineStack refuses for it; counting one object once is the deviation from that rule, and it is safe only where the copies cannot behave differently from one entry. For hooks they can: collectBundleHooks (packages/runtime/src/app-plugin.ts:2992) folds by reference, so a source boot binds once, while a built artifact carries two equal entries and binds both, which is the table's own hooks consequence line. Refusing keeps the two boots in agreement, which is what S3 asked for. It is a narrowing of the diamond shape for hooks only, and the changeset and the migration entry both say so. The pin is adequate: an exact-message refusal at :244, the unchanged control at :292 for a non-hook entry reached twice, and the dev's ablation leg turns the pin red.
The residual objectExtensions note (the second report's first out-of-scope finding). Not a blocker; a separate card. Read in the tree: objectExtensions is not in OWNER_STAMP_JUDGED_COLLECTIONS, so the residual rule files no extension, and the dev's report says no other path registers one. That behaviour is on main and this PR does not create or worsen it: before, two residual extensions composed and none registered; now the pair is refused. What is inaccurate is the sentence at that one door ("only the last of these entries' fields register"), and the remedy leads to a single residual entry that composes and still registers nothing. The fix belongs to the door that drops the entry, or to a refusal of a residual extension as such, and either is a decision of its own. Recorded here as N4.
packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts. Agrees with the code at this head: the residual wording, the hooks exception, the app pair's code and the equal-entries quiet case are each stated as implemented.
packages/objectql/src/engine-registration.ts. Still agrees with arm A1 sentence by sentence: an error line for entries that differ, nothing refused, nothing merged, replace-on-reload untouched. The comparison runs only for a target with two or more entries, so the common path pays nothing.
N4 (nit) — At the residual door the objectExtensions refusal says the last entry's fields register, while no residual extension registers at all. Follow-up card, as above.
N5 (nit) — jobs is the one table collection the residual mirror never treats as residual (TOP_LEVEL_COLLECTIONS_NEVER_RESIDUAL), because the boot reads jobs off the whole stack. So in an artifact that carries packages[], two manifest-less inputs declaring one job name are judged by no door. The contract text says "the boot's residual", so it is not contradicted, but the pair is unjudged. Read from code, not driven. Add it to the same follow-up card.
N6 (nit) — The composed output of a sub-stack passed twice still carries the entry twice, so that output, serialised and handed to defineStack as a packages[i] body, is refused by the body door. No boot or log disagrees any more; follow-up or accepted deviation.
Activity
objectstack-fleet commentedon Nov 18, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
First touch: p2 ·
domain:server·pm:queue. Not a queue jump. When one package declares twoobjectExtensionsentries for the same object, the earlier entry's fields are silently dropped. It is an authoring trap that validate, lint and boot all pass, but it is not a regression named in a released version, and no stored data is lost. Fix shape: merge or refuse a second same-package entry at registration, and report it in validate/lint. Keep hot-reload replacement for a re-registration of the same entry.objectstack-fleet commentedon Nov 19, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: area backfill under the rules of #35223 (daily reconciliation) —
area:build· Bug. The grade set at first touch on 2026-11-18 is unchanged: the one re-grade pass is #35205's.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
维护者速读
Analysis (for the reviewer and the agents)
Background
Card #35228 (p2 ·
area:build, filed by os-bob 2026-11-18): one package declared twoobjectExtensionsentries for one target (crm_sales_order_line), and the registry kept only the last; the earlier entry's fieldcb_accountwas gone and reads/writes naming it answeredINVALID_FIELD. The card offers two fixes: refuse at validate/lint, or merge the two entries when they come from one stack while keeping replace-on-reload. Area b1-C sent the card out as a product fork. This comment measures the premise on current main and lays out the options. It rules nothing.Governing text
packages/spec/src/stack.zod.tsSAME_STACK_ENTRY_IDENTITY.objectExtensions(finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934, PR feat(spec)!: refuse a duplicate identity inside one stack's named collections, 27 keys (#22934) #23031, merged 2026-10-12): a single stack with two entries of oneextendis already REFUSED bydefineStack: "Object extension of 'X' is declared twice inobjectExtensions… The runtime applies one extension of a target object per package, so only the last of these entries' fields register and the others' are silently dropped. Merge them into a singleobjectExtensionsentry for 'X'." Migration entry18.stack-collection-duplicate-entry-refusedrecords it as an accept-set narrowing. finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 was a bug-fix card; no maintainer ruling on it (comments read:os-dev-report×2 and the seat ACCEPT).applyControlledByParentExtensionGatedocblock: "a package registers one extension per target: a later entry of the same package replaces an earlier one."packages/objectql/src/registry.tsregisterObjectExtensiondocblock: "Re-registering replaces the package's previous contribution to the object … so every sync that re-reads the stored row can call this again." A storedobject_extensionrow is identified by its target (protocol-stored-item-conversion.ts, metadata: a stored object_extension conversion notice reads data.name, which an extension body does not carry, so every extension warns as "<unnamed>" and one warning per conversion covers them all #29596): one row per (package, target).objectExtensionsentry, one editor per item in Studio. ADR-0029 D3: one owner per object,extendfor everyone else.ComposeStacksOptionsSchema.objectConflict: two composed stacks declaring one object name are refused by default ('error');'merge'is an opt-in.Protocol declaration
A narrows the accept set of
composeStacksand of apackages[i]body (an authoring-contract narrowing,!PR, L2 owed). B widens the accept set ofdefineStack(withdraws #22934'sobjectExtensionsrow) and changes registration semantics. C changes no contract.Premises, measured on main
e35cf035(re-check commands)Probe files (not committed): a spec probe and a registry probe, run with
npx vitest run --project local <file>inpackages/specandpackages/objectql(the registry probe needspnpm --filter '@objectstack/objectql^...' buildfirst).registerAppof a package withobjectExtensions: [{ extend: 'crm_line', fields: { cb_account } }, { extend: 'crm_line', fields: { cb_other } }]servescrm_linewithcb_otherand withoutcb_account. Code:packages/objectql/src/registry-object-registration.ts:596-600(// extend mode: remove existing extension from same package, the splice moved here fromregistry.tsby [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949); the loop that calls it once per entry ispackages/objectql/src/engine-registration.ts:320-343.grep -n "extend mode: remove existing" packages/objectql/src/registry-object-registration.tsdefineStack({ objects:[X], objectExtensions:[extA, extB] })→ REFUSED with the finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 message.composeStacks([defineStack({ manifest, objects:[X] }), defineStack({ objectExtensions:[extA] }), defineStack({ objectExtensions:[extB] })])→ ACCEPTED; the composed stack carries both entries in one package (2 entries).defineStack({ …, packages:[{ manifest:{ …, objectExtensions:[extA, extB] } }] })→ ACCEPTED.ObjectStackDefinitionSchema.parse(...)(whatos validateruns,packages/cli/src/commands/validate.ts:443) with two entries → ACCEPTED: the finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 check lives indefineStack's cross-reference pass (stack.zod.ts:5772), not in the schema.os build(packages/cli/src/commands/compile.ts:463) andos lint(packages/cli/src/utils/author-time-rules.ts:130) run the same schema-only parse; a single-defineStackconfig is still refused at config load. Migration entry18.stack-collection-duplicate-entry-refusedpromises in its acceptance criteria thatos validateandos buildcatch this; composition breaks that promise.composeStacks(…, { manifest: 'preserve' })with two sub-stacks under one manifest id → ACCEPTED at composition, two bodies with one id and one entry each; boot refuses that shape asDUPLICATE_ARTIFACT_PACKAGE(read from code).So the reporter's "validate, lint and boot all pass" is reproducible through composition (two sub-stacks of one package each extending one object), which is the natural way to write "extended in two places". The reporter's own source was not available; which of these doors it went through is inferred.
extA(cb_account), then register it again with a renamed field (cb_account2): the served object hascb_account2and notcb_account. A merge that accumulated across registrations would leave the renamed field behind. Any fix must keep "one registration of a package replaces that package's previous contribution to the target".objectExtensions: []) leavescb_accountserved: re-registration does not withdraw a target the package no longer extends. Measured on the bare registrar only; whether theos devreload path uninstalls first was not driven.namein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 collections.composeStacksof two sub-stacks that each declare pagehome→ ACCEPTED with 2 pages (objects are caught byobjectConflict: 'error'). Not this card's subject; see execution.The problem in one sentence
An author who adds fields to one object from two places in one package loses the first place's fields with no message anywhere, and only finds out when a read or write naming them fails in production.
Options
composeStacks' composed output and on everypackages[i]body. (Two bodies under one package id are already refused at boot byresolveArtifactPackageOrder,DUPLICATE_ARTIFACT_PACKAGE,packages/core/src/artifact-packages.ts:400-411; read from code, not driven.) Runtime arm, a condition for the maintainer: A1 (recommended) the registrar, meeting a body that still carries two entries (an artifact built before the fix), logs an error naming both entries and keeps today's outcome, as #22934 did not refuse already-built artifacts either; A2 the registrar refuses the body, which is loud but stops a working installed app on a platform upgrade. Replace-on-reload unchanged.os validate/os build/composeStacksstop with "Object extension of 'X' is declared twice … merge them into a single entry", naming both places. Under A1 an already-installed artifact keeps booting as today, with an error line naming the lost entry, until it is rebuilt (for that artifact A1 is D until rebuild).composeStacksfolds same-target entries from different input stacks into one entry (todayobjectExtensions: 'concat',stack.zod.ts:1642), with conflict rules for same-named fields, labels,priority,fieldPatches,validationsandindexes(refused when two inputs disagree). One entry per package per target holds downstream, so no registrar change, no #22934 withdrawal, no hot-reload exposure. Does nothing for a hand-builtpackages[i]body (which would still need A's check).objectConflict: 'merge'and its refusal rules (#14848, #16075); sizes not measured.objectExtensionsrow (or a single stack would refuse what composition merges), flip its migration entry to a widening, re-model the controlled-by-parent build gate and the export path (one stored row per target) on merged entries.What each option means for the business
Four axes, argued from the business standpoint
object_extensionrow, the Studio editor (ADR-0146: one editor per item) and the package export, holds one extension per package per object. The authoring surface should refuse what the rest of the platform cannot represent, which is how finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 already treats 27 collections and howcomposeStacksalready treats two same-name objects (refused by default, withobjectConflict: 'merge'as a later opt-in). Reference platforms identify the field, not an extension entry (Salesforce CustomField, ServiceNow dictionary row); several source locations may contribute fields to one object and a same-field collision is refused. ObjectStack instead stores and edits one extension row per package per target (ADR-0146 D10), so A follows from this platform's own model, not from the reference platforms. A closes holes in an existing rule. B keeps that model downstream but adds a merge rule set at composition. C makesobjectExtensionsthe one collection of finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934's table that merges at runtime, and the code path diverges from the stored path (a two-entry package cannot round-trip into stored rows without a merge at export). A is a narrowing that a later compose-time merge (B) can widen without a migration; the reverse is not true.os validate, naming both places, before anything ships. With B or C the same agent gets a merge, plus a refusal only when the two halves disagree; the closed rule is replaced by merge rules an agent must learn. With D the mistake ships and the field is missing at runtime: a silent loss.namein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934's identity and wording). B and C declare merge rules for every key an extension carries (fields,fieldPatches, labels,priority,validations,indexes) that must be maintained as the extension schema grows (C also in the registrar, the stored-row export and the build gates). D adds a log line that never stops the loss.Recommendation and confidence gaps
Recommend A, with runtime arm A1. It keeps this platform's own rule, "one extension per package per object", true at every door, and turns the silent loss into a refusal that names both places. A1 over A2 because a platform upgrade should not stop an installed app that works today minus one field; the error line names the loss and the next build refuses. B is not chosen now because it adds a merge rule set for a pull of one worked-around case; it stays open as a later widening on top of A. C is not chosen because the stored and Studio sides would have to mirror its merge rules. D is not chosen because the field is still lost.
Self-check: only ① (this platform's one-row-per-target model) picks A; do ②③④ flip it: no.
Confidence gaps: the reporter's exact source path was not reproduced (composition and
packages[i]bodies are the two measured holes); how many already-built artifacts in the wild carry two entries is unknown (hence A keeps installed artifacts booting with an error line rather than refusing them); theos devreload path was not driven (premise 3 is measured on the registrar it calls); the CLI doors (os validate,os build,os lint) and the duplicate-package-id refusal were read from code, not driven.After the ruling: execution
os-devin area b1-C, effort high, one PR titled with!. Scope:packages/spec/src/stack.zod.ts(run theobjectExtensionsidentity check on the composed output and on everypackages[i]body, same message, the body's path in the finding), the migration entry's surface text, the registrar's error line inpackages/objectql/src/engine-registration.ts, tests for the three measured doors plus a reload pin (premise 3). L2 owed (narrowing). The same composition gap for the other finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 collections (premise 5) is filed as its own card by the seat, or folded ifexecution-duties.md's fold gates pass; it is execution of finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934's existing rule, not a new fork.packages[i]body check for hand-built bodies; contract review on the merge rules; no L2 owed (widening).Related
#22934 / PR #23031 (the single-stack refusal), #32411 family (#32563, #32889: duplicate names in one artifact refused at the next door), #29872 / #29903 (extension export path), #34134 (fieldPatches and label clash), ADR-0146 D10.
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Ruling: card thread · letter A, runtime arm A1 · maintainer 「推荐 A,已安装的包只记错误日志、照常启动。」 · recorded 2026-11-19T22:04Z
The maintainer answered in the project thread at 2026-11-19T22:04Z, on the options in comment 7016526323.
A, with A1. One
objectExtensionsentry per target per package, refused wherever authoring reaches:namein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 identity check (same wording: "Object extension of 'X' is declared twice … Merge them into a singleobjectExtensionsentry for 'X'.") also runs on the output ofcomposeStacksand on everypackages[i]body, sodefineStack,composeStacks,os validateandos buildrefuse two entries for one target in one package, naming both.Not chosen: B (merge at compose time), C (merge at registration), D (warn only). B stays open as a later widening on top of A.
Execution: one
os-devin area b1-C, effort high, one PR titled with!(an authoring narrowing, so an isolated contract-review L2 is owed and the dogfood battery runs once on the final head). It starts once this thread's open PR #35656 has merged, because the thread works one branch at a time.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Claim: PM loop round 1 · card thread of repo:objectstack#1 (this card's own thread) · 2026-11-19T22:18Z · dispatched to an os-dev subagent of this card thread · fold chain head (members #35228, #35608)
Area: b1-C
Session:
session_01L6bhgVLY5efsfaT3UG2zwHAccount:
os-salesBranch:
claude/project-thread-nbjebo(harness-assigned name, notclaude/issue-35228-…; the PR body notes it for the Duplicate Fix Guard). The branch is the head of PR #35656 (card #35566, in the merge queue now); the dev works on a local branch and the branch is restarted frommainonce #35656 has merged, before the first push.Worktree:
objectstack-issue-35228Domain:
domain:server(#35228),domain:spec(#35608)Seat:
repo:objectstack#1(card thread)File surface:
packages/spec/src/stack.zod.ts(runcollectDuplicateEntryErrors' identity table on the output ofcomposeStacksand on everypackages[i]body, same messages, the body's path in the finding),packages/spec/src/migrations/entries/semantic/**(the narrowing's migration entry),packages/objectql/src/engine-registration.ts(the A1 error log in theobjectExtensionsloop), new test files named for the two cards underpackages/spec/src/andpackages/objectql/src/, generated baselines a gate demands, one changeset. Stop on breach.Container & model: M,
mode:subagent(inside this card thread),model: default (opus) — dispatch-gates --tier: no path-derived mandate; the contract review is a separate isolated CONTRACT_REVIEW_TIER subagent,effort: highClause-②: no
Metadata-protocol: narrowed
Responsibility: platform code in objectstack-ai/objectstack (
composeStacksconcatenates collections without the same-package identity check thatdefineStackruns; the registrar keeps the last of two same-target entries) |defineStackrefuses the single-stack case already (#22934, PR #23031) | app authors who compose one package from several sub-stacks; one app hit it on 18.6.0Thread-read: 7023505627
Premise: holds — measured on
e35cf035(comment 7016526323, premises 1-3 and 5) and re-read atorigin/maine91d9671:collectDuplicateEntryErrorsis called fromdefineStack's cross-reference pass only;composeStacksstrategyobjectExtensions: 'concat'; the extend splice inregistry-object-registration.tsunchanged.Ruling: maintainer letter A, runtime arm A1 (record 7023505627, 「推荐 A,已安装的包只记错误日志、照常启动。」): refuse at composition and in every
packages[i]body with the #22934 wording; the registrar logs an error naming both entries and keeps today's outcome; replace-on-reload unchanged.Pre-claim lane:
packages/spec/src/**(where a card names it) and the objectql registration door are path roots of area b1-C (area-lease.md).Pre-claim deps: none named; no open PR touches
packages/spec/src/stack.zod.ts,packages/objectql/src/engine-registration.tsor the #22934 migration entry (open-PR file listing read at claim time); overlap-check runs before each push.Prior rulings read: objectextensions,duplicate,extension,compose → 18 hits; ADR-0146 D10, ADR-0029 D3 (adjacent); #22934 thread (bug fix, no ruling); this card's ruling 7023505627; thread: 1 ruling; repo: objectstack-ai/objectstack
Serial constraints cleared: PR #35656 (same thread, same branch,
packages/metadata-protocolonly) merges first; #35589 (next in this thread) touchesprotocol-save.ts, not these files; #35609 (registry re-registration) is unclaimed and is not asserted by this card's pins.Fold (seat order, five gates): ① same defect, same fix — a same-package duplicate identity escapes #22934's check through composition or a package body; the fix runs that one table there. ② one area (b1-C), one worktree, one changeset, one queue slot. ③ both members graded or ruled: #35228 ruled A+A1 (7023505627); #35608 p2 by triage (7016642360). ④ each member checkable on its own: #35228 by a composed stack and a package body with two
objectExtensionsentries for one target refused, plus the A1 log at the registrar; #35608 by the 27-key composition census, each key refused. ⑤ excluded: #35609 (re-registration does not withdraw a dropped target: a registrar mechanism, not this check), #35566 and #35589 (stored-item save and publish doors), #35562 (p3, a currency pointer shape).PR body:
Fixes #35228andPart of #35608(a folded!PR cannot carry twoFixeslines throughlabel-write --land's dogfood gate); #35608 is closed by hand after the merge.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
os-dev-report
{ "issue": 35228, "status": "done", "branch": "claude/project-thread-nbjebo", "pr": "https://github.com/objectstack-ai/objectstack/pull/35699", "session": "session_01L6bhgVLY5efsfaT3UG2zwH", "premise_still_valid": true, "summary": "Ruling A/A1 implemented with #35608 folded in. stack.zod.ts reads the same-package identity table (29 keys: the original 27 plus queues and assignmentRules) through one helper at four doors with one wording: a stack's top level (byte-identical), each packages[i] body of defineStack (stack.packages[i].manifest.KEY[j]), the one package a flat composeStacks makes (inputs' entries together, labelled by input; objects left to objectConflict; one entry object reached twice counts once), and every body a composition carries or assembles under preserve. Composition refusals join step 3b, so they are STACK_CROSS_REFERENCE_INVALID/422 and carry the inputs' conversion record. engine-registration.ts logs one error per (package, target) for a body with two or more objectExtensions entries for one target and keeps the outcome; registry-object-registration.ts untouched. Semantic migration entry and one changeset (spec + objectql minor, BREAKING, adr-0087 registered). #35656 had merged, so the work was rebased on main 03865ae9 and pushed to the harness branch; PR #35699 is a draft.", "tests": "Base census on e91d9671 (composeStacks([A,B]) default strategy): 26 keys ACCEPTED with 2 entries, objects REFUSED STACK_COMPOSE_OBJECT_CONFLICT, apps REFUSED STACK_SINGLE_APP_VIOLATION; after the fix all 29 refused (28 STACK_CROSS_REFERENCE_INVALID, objects unchanged). Boot census not repeated (the original card measured it for these registrars). On head 58464e71: spec test exit 0 (863 files, 27620 passed, 1 todo); objectql test exit 0 (617 files, 13928 passed). On 85531416 (pre-rebase, identical blobs of both edited sources): spec typecheck exit 0, objectql typecheck exit 0, cli unit project exit 0 (431 files, 6159 tests). New pins: stack-object-extension-duplicate-target.test.ts (10), stack-compose-duplicate-entry-census.test.ts (table-driven, 29 keys: inputs alone, flat refusal, body refusal, preserve cross-package control), engine-same-target-object-extensions-log.test.ts (5, incl. reload pin), one case in stack-conversions-record.test.ts. Fixture triage: two flat-composition fixtures in stack-datasource-connector.test.ts now also meet the duplicate refusal (re-judged, reversed control now refused). Ablation via ablation-replace.mjs, anchor 1->0, restored by HEAD blob hash: flat door deleted 30 failed/95 passed; defineStack body door 29 failed/96; composed body door 2 failed/8; registrar log call 2 failed/3. Base control (stack.zod.ts from e91d9671): 5 new-door pins fail, single-stack byte-identical pin and the original duplicate-entry suite pass (5 failed/143 passed). No dist-consumed subject: all tests import source.", "gates": "dispatch-gates --commands on 58464e71: 97 derived; 95 :: exit 0; node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 3 (NOT MEASURED: shallow clone, needs unshallow); pnpm check:dual-build-cjs-loads :: exit 3 (NOT MEASURED: needs every workspace dist). --ran reconciliation: 97 accounted, 95 run, 2 NOT-MEASURED, exit 0. check-platform-checklist --changed-from origin/main: OK, 6 anchors, 0 lost. overlap-check: clean exit 0. check:dev-prereqs (local-only) exit 1 = NOT MEASURED, workspace only closure-built. test:repo declared to CI. PR check-runs at report time: Check Changeset, Lint (all lanes), Type Check (four lanes), Governed Surface Queue Guard, PR-body guards, Spec property liveness all in_progress; opt-in and queue-only jobs skipped. Not waited on.", "dogfood_battery": "58464e71 · VERDICT command-exit 0 · Test Files 482 passed | 3 skipped (485) · Tests 4093 passed | 68 skipped (4161) · no failures", "mcp_calls": "0", "api_writes": "2 relay strokes: pr_create (POST /repos/objectstack-ai/objectstack/pulls, then POST /repos/objectstack-ai/objectstack/issues/35699/assignees) and this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35228/comments via post-stamped.mjs). git push to claude/project-thread-nbjebo (new branch; the old one was deleted on #35656's merge) is not a REST write.", "open_questions": [ { "question": "The claim and dispatch say `Clause-②: no` beside `Metadata-protocol: narrowed`, but check-changeset-no-major.mjs's self-test calls `narrowed` beside a line with no `(narrowing)` arm a CONTRADICTION. Which spelling stands?", "options": [ "A: keep `Clause-②: no (narrowing)` as written in the PR body and the changeset; the seat amends the claim line", "B: revert to `Clause-②: no` verbatim and accept a red Check Changeset" ], "recommendation": "A, because the change is a declared authoring narrowing (bang title, BREAKING, dogfood owed), and the gate refuses B mechanically" } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: under manifest preserve a manifest-less input contributes no body, so its entries sit only in the flattened top level, which this check does not judge there; read from code, not driven", "carrier: none · noted, not filed: the A1 error line is once per registration of a body, so a reload of the same unfixed body logs it again", "carrier: none · noted, not filed: the docblock above the identity table in stack.zod.ts still says 27 collections while the table holds 29" ] }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Claim correction (2026-11-20T00:08Z) to claim 7023784590: its
Clause-②: noline lacks the narrowing arm. The fold refuses, at composition and in every package body, what those doors accepted before, and widens nothing, so the line is:Clause-②: no (narrowing)
It pairs with
Metadata-protocol: narrowed, which stands, ascheck-changeset-no-major.mjs's self-test reads the two together. PR #35699's body and changeset already carry this spelling.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
os-dev-report
{ "issue": 35228, "status": "done", "branch": "claude/project-thread-nbjebo", "pr": "https://github.com/objectstack-ai/objectstack/pull/35699", "session": "session_01L6bhgVLY5efsfaT3UG2zwH", "premise_still_valid": true, "summary": "Resume round after the lost session. Verified that head c5b827e5 closes the contract review's S1, S2, S3, N1 and N3 with pins, so nothing was added and nothing was pushed: the PR head stays c5b827e5. S1+S2: collectComposedResidualDuplicateEntryErrors judges the residual (the boot's reading, isResidualTopLevelItem plus a claimed-by-identity rule for datasources and objectExtensions) as one package under every manifest strategy, including preserve; a nested multi-package input's flattened body copies are not read. S3: the door still counts one entry object reached twice once (except hooks, see open_questions), and logSameTargetObjectExtensions skips a target whose entries are all equal by value; registrar comment, migration acceptanceCriteria, docblock and changeset updated. N1 (29 collections) and N3 (objects stay with objectConflict; the app pair now answers STACK_CROSS_REFERENCE_INVALID) are in the prose; N2 stays an accepted deviation (the #22934 sentence is byte-identical). The two reds on 58464e71 (TypeScript Type Check, Test UI) were not test failures: lint.yml and ci.yml run with cancel-in-progress concurrency, the push of c5b827e5 cancelled the in-flight lanes (Type Check workspace, all 16 Test UI shards, Type Check UI, five Test Core shards, all completed cancelled within seconds after the new push), and the two aggregators then failed on the cancelled result. On c5b827e5 both concluded success, with every other required context.", "pr_body_deltas": [ "What changes: the composition door judges the RESIDUAL package (the top-level entries no body of the composed artifact claims, by the boot's own residual reading) as one package under every manifest strategy including preserve; a flat composition with no packages carries all its entries as residual; a nested multi-package input's flattened copies of its bodies are never read as a second entry.", "What changes: the registrar's error line for two or more objectExtensions entries for one target stays quiet when every entry for that target is equal by value (one sub-stack composed twice, as composed or as built JSON); equal entries beside one that differs still log, naming every entry.", "What changes: one entry object reached through two inputs still counts once at the door, except in hooks, where a built artifact binds each copy, so a hook reached twice is refused (deviation from the dispatch wording, see the report's open question).", "Acceptance notes: N2 is an accepted deviation; the refusal's remedy does not mention manifest preserve, because the #22934 sentence stays byte-identical at every door.", "Tests: new pins in stack-object-extension-duplicate-target.test.ts (review S2: preserve with two manifest-less inputs declaring page home, and two extensions for one target, both refused naming both, plus the body-slot control; review S1: a preserve artifact with two packages each extending one target nested in a flat and in a preserve composition, accepted, and the nested artifact's own residual pair refused; review S3: a hook reached twice refused) and in engine-same-target-object-extensions-log.test.ts (the accepted twice-passed sub-stack composition, registered as composed and as built JSON, logs no error; equal entries beside a differing one log). stack-datasource-connector.test.ts: a preserve fixture now also meets the residual duplicate finding (second issue of the same envelope).", "Verification: ablation of the four new arms, each red, each restored by blob hash (numbers in the report's tests field); CI on c5b827e5: 58 success, 11 skipped (opt-in and queue-only)." ], "tests": "Head c5b827e5, worktree objectstack-issue-35228 (clean, BASE c5b827e5). Closure build --filter='@objectstack/dogfood^...' under the lock: VERDICT command-exit 0. Pins: spec stack-object-extension-duplicate-target, stack-compose-duplicate-entry-census, stack-conversions-record, stack-datasource-connector: Test Files 4 passed, Tests 203 passed; objectql engine-same-target-object-extensions-log: 1 file, 7 passed. Full: spec test exit 0 (Test Files 863 passed, Tests 27626 passed, 1 todo); objectql test exit 0 (Test Files 617 passed, Tests 13930 passed); spec typecheck exit 0; objectql typecheck exit 0 (both check:test-typecheck OK, debt held). Ablation via scripts/ablation-replace.mjs in wrap mode on the committed head, trap restore to HEAD, every leg proven on disk (anchor 1 to 0, blob changed) and restored (blob equals HEAD, git diff HEAD empty); subjects resolve from source (spec tests import ./stack.zod, objectql test imports ./engine), so no dist rebuild was owed. Leg A, residual filter deleted: 37 failed of 203 (the preserve census controls, the S1 nested-accepted pin, the S2 body-slot control, the connector preserve controls). Leg B, the old preserve skip restored: 4 failed (both S2 pins, two connector residual refusals). Leg C, hooks exception deleted: 1 failed (the hook reached twice pin). Leg D, equal-by-value quiet deleted: 1 failed of 7 (the S3 twice-passed composition pin). Final blobs: stack.zod.ts 0d32524b equals HEAD, engine-registration.ts bf1ca203 equals HEAD. Scratch probe (deleted, never committed): composeStacks with manifest preserve, two manifest inputs and one manifest-less input carrying objectExtensions, registered through the objectql manifest service: composed packages 2, top-level objectExtensions 1, the extension's field absent on the resolved target (see out_of_scope_findings).", "gates": "dispatch-gates --commands on c5b827e5: the delta 58464e71..c5b827e5 (7 files) derives the same 97 as the whole PR. All 97 run: 96 exit 0 on the first pass; pnpm check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: 7 packages without dist), then after building those 7 under the lock it exited 0 (124 entry points across 72 packages load); the ran list records its re-run exit. node scripts/check-plugin-teardown-shape.mjs --self-test exit 0 (48 cases) after fetching its pinned control commit at depth 1; both families the first report left NOT MEASURED are now measured. --ran reconciliation: 97 derived, 97 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. check-platform-checklist --changed-from origin/main: OK, 6 anchors judged, 0 lost, exit 0. check-nul-bytes exit 0. overlap-check: clean, exit 0 (against origin/main c03a8a34, 0 PR heads). check:dev-prereqs (local-only) exit 1 = NOT MEASURED: 35 ui packages unbuilt in this worktree. test:repo declared to CI. PR check-runs on c5b827e5 at report time: 58 completed success (among them TypeScript Type Check, Type Check workspace, consumer gates, debt ledger, source gates, Test Core 1-10 of 10, Build Core, Test UI and its 16 shards, Type Check UI, Build and E2E UI, Live E2E UI, Lint and Repo Gates, Governed Surface Queue Guard, Check Changeset, Dogfood Regression Gate), 11 skipped (Lint UI, Build Docs, Temporal Conformance, the dogfood shard matrix, UI Published Artifacts, Dogfood Verify CLI, the two queue verdicts, the schedule gate, packed-tarball smoke, 18.x upgrade harness: opt-in or queue-only). Side effect: the control-commit fetch wrote FETCH_HEAD in the shared .git and added one shallow boundary.", "dogfood_battery": "c5b827e5 · os-verify-lock VERDICT command-exit 0 (held 32m03s) · Test Files 482 passed | 3 skipped (485) · Tests 4093 passed | 68 skipped (4161) · no failures", "mcp_calls": "0", "api_writes": "1 relay stroke: this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35228/comments via post-stamped.mjs). No push this round (no new commit), no PR body edit.", "open_questions": [ { "question": "The dispatch says keep the door's rule that one entry object reached twice counts once; head c5b827e5 keeps it for every collection except hooks, where it counts the copies and refuses (a built artifact serialises the two references into two equal hook entries and binds both handlers, while a source boot folds them). Which stands?", "options": [ "A: keep the hooks exception as committed; the composition door and the single-stack door then agree for hooks (both count by position), and the boot never binds one handler twice", "B: drop the exception so hooks also count once; the twice-passed sub-stack composes, and a built artifact of it binds the handler twice" ], "recommendation": "A, because under B an accepted composition changes behaviour between a source boot and a built boot (one bind versus two), which is the disagreement S3 asked to remove, and the change is one line with its own pin" } ], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: named producer composeStacks with manifest preserve and a manifest-less input that carries objectExtensions, registered through the objectql manifest service door (scratch probe on c5b827e5: composed packages 2, top-level objectExtensions 1, the extended field absent on the resolved target object; not driven through os serve) · evidence: a residual (top-level, unclaimed) objectExtensions entry of a packages-carrying artifact is registered by no door: unclaimedTopLevel lists no object_extension because an extension has no name slot, and RESIDUAL_TYPES_WITH_OWN_PATH in packages/objectql/src/plugin.ts excludes it while no other path registers it; composeStacks and defineStack accept it. Consequence for this PR: the residual door's objectExtensions refusal (the byte-identical #22934 sentence) says only the last entry's fields register, while at that door none register · dedupe words: residual objectExtensions, unclaimedTopLevel object_extension, preserve manifest-less input, residual extension dropped, composeStacks preserve extension", "carrier: none · noted, not filed: the residual predicate counts a top-level datasources or objectExtensions entry as claimed when any body carries one under the same identity; for objectExtensions that is an approximation, since the boot registers no residual extension at all (finding above); read from code, not driven", "carrier: none · noted, not filed: the objectql S3 pin registers the composed objectExtensions through a hand-built extender body rather than the composed stack itself; the composed array is the one asserted" ] }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Contract review
Served-tier:
CONTRACT_REVIEW_TIERHead-sha:
c5b827e5f3abfab7519e591419106419bbf19bf0Local-runs: none
Scope: packages/spec/src/stack.zod.ts, packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts + packages/objectql/src/engine-registration.ts
Security-touching: yes
Delta review of PR #35699,
58464e71..c5b827e5(one commit, 7 files), following record 7026031587 on the PR. Inputs read: the delta diff, the scoped files and the code they cite in the tree at this head, the dev's report 7027513812 on this card, and the check-runs on this head as of 2026-11-20T01:33Z. Nothing was built or run. The test files and the changeset stay the lane seat's ACCEPT atTIER_DEFAULT.Verdict in one line: the three graded findings of the first record are closed in code and pinned, the hooks exception is in scope and right, and the residual
objectExtensionsnote is a separate card, not a blocker.① Derived judgments
collectComposedResidualDuplicateEntryErrors(stack.zod.ts:3585) reads only whatresidualEntryPredicate(:3625) lets through: with bodies present, a top-level entry a body claims is not read. Pin:stack-object-extension-duplicate-target.test.ts:204(a preserve artifact whose flattened copy holds two packages' extensions of one target, nested underlastand underpreserve, accepted, with an anti-vacuity assertion that the copy is there) and:226(its own residual pair still refused).stack.zod.ts:9585is no longer skipped under'preserve'and is handedcomposed.packages, so entries no body claims are judged as one package under every strategy. Pins::153(two manifest-less inputs, pagehome),:172(two manifest-less inputs extending one target),:190(control: a body's slot is not a residual pair).logSameTargetObjectExtensionsskips a target whose entries are all equal by value (engine-registration.ts:114,equalByValueat:129), so a composition the door accepts logs nothing as composed or as built JSON; entries that differ still log. Pins: the two[review S3]cases inengine-same-target-object-extensions-log.test.ts. The registrar comment, the migration entry's acceptance criterion and the changeset now say the same thing.stack.zod.ts:3267, 29 collections, 26 by name).namein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 sentence stays byte-identical at every door, which the ruling asked for.surfaceandacceptanceCriteriaand the changeset now carry theobjectConflictcarve-out and the app pair's code change.New accept-set change in the delta:
stack.zod.ts:3601), where every other collection still counts one entry object once. Right: see ④, question 1.'preserve', a residual pair is newly refused. Right: this is S2's fix and composeStacks: two sub-stacks of one package that each declare one name in a #22934 collection (e.g.pages) compose with both entries, so the duplicate refusal never runs #35608's measure item 3.main.Public surface: still no new export. The registrar's error line now has one more quiet case (equal entries); nothing is refused or merged there.
② Semver level
Unchanged and still right:
@objectstack/specminor and@objectstack/objectqlminor, BREAKING banner,Metadata-protocol: narrowed. The delta adds one more narrowing (the hook reached twice) and the changeset names it.Check Changesetconcluded success on this head.Clause-②: no (narrowing) — correct.
③ Boundary flags
objectExtensionsentry is registered by no door). A separate card, not a blocker for this PR. Reasons in ④, question 2. The card is owed before composeStacks: two sub-stacks of one package that each declare one name in a #22934 collection (e.g.pages) compose with both entries, so the duplicate refusal never runs #35608 is closed by hand, because that card's subject is this door.datasourcesandobjectExtensionsis an approximation). Accepted. It is what keeps a body's flattened copy from being read as a second entry, which S1 needed. It rides the card above.④ Design judgment
packages/spec/src/stack.zod.ts. The residual door now reads the artifact the way the boot does: nopackages[], every entry is the one package; with bodies, the mirror ofunclaimedTopLeveldecides by slot, and the two table collections that rule does not walk by slot are claimed by identity. It is handedcomposed.packagesafter the concat pass and the preserve fold, so a carried body and an assembled body are both seen. The docblocks say what the code does.Question 1, the hooks exception. Within scope, and right. The single-stack door counts every entry, twins included, and #35608 asks a composition of one package to refuse what
defineStackrefuses for it; counting one object once is the deviation from that rule, and it is safe only where the copies cannot behave differently from one entry. For hooks they can:collectBundleHooks(packages/runtime/src/app-plugin.ts:2992) folds by reference, so a source boot binds once, while a built artifact carries two equal entries and binds both, which is the table's ownhooksconsequence line. Refusing keeps the two boots in agreement, which is what S3 asked for. It is a narrowing of the diamond shape for hooks only, and the changeset and the migration entry both say so. The pin is adequate: an exact-message refusal at:244, the unchanged control at:292for a non-hook entry reached twice, and the dev's ablation leg turns the pin red.Question 2, the residual
objectExtensionsnote. Not a blocker; a separate card. Read in the tree:objectExtensionsis not inOWNER_STAMP_JUDGED_COLLECTIONS, so the residual rule files no extension, and the dev's report says no other path registers one. That behaviour is onmainand this PR does not create or worsen it: before, two residual extensions composed and none registered; now the pair is refused. What is inaccurate is the sentence at that one door ("only the last of these entries' fields register"), and the remedy leads to a single residual entry that composes and still registers nothing. The fix belongs to the door that drops the entry, or to a refusal of a residual extension as such, and either is a decision of its own. Recorded here as N4.packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts. Agrees with the code at this head: the residual wording, the hooks exception, the app pair's code and the equal-entries quiet case are each stated as implemented.packages/objectql/src/engine-registration.ts. Still agrees with arm A1 sentence by sentence: an error line for entries that differ, nothing refused, nothing merged, replace-on-reload untouched. The comparison runs only for a target with two or more entries, so the common path pays nothing.N4 (nit) — At the residual door the
objectExtensionsrefusal says the last entry's fields register, while no residual extension registers at all. Follow-up card, as above.N5 (nit) —
jobsis the one table collection the residual mirror never treats as residual (TOP_LEVEL_COLLECTIONS_NEVER_RESIDUAL), because the boot reads jobs off the whole stack. So in an artifact that carriespackages[], two manifest-less inputs declaring one job name are judged by no door. The contract text says "the boot's residual", so it is not contradicted, but the pair is unjudged. Read from code, not driven. Add it to the same follow-up card.N6 (nit) — The composed output of a sub-stack passed twice still carries the entry twice, so that output, serialised and handed to
defineStackas apackages[i]body, is refused by the body door. No boot or log disagrees any more; follow-up or accepted deviation.No must-fix, no should-fix.
Implemented-by:
claude/project-thread-nbjeboReviewed-by:
session_01L6bhgVLY5efsfaT3UG2zwHVERDICT: PASS
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Contract review brief — PR #35699 @
c5b827e5f3abfab7519e591419106419bbf19bf0(card #35228)Round: delta review of
58464e71..c5b827e5f3abfab7519e591419106419bbf19bf0, rendered fromrecord-recognisers --brief-template --paths <the PR's 9 files>on this head. The first record is 7026031587; this round re-judges under this brief and supersedes 7027587340, which was briefed in free text.You review at
CONTRACT_REVIEW_TIER. Render ONE## Contract reviewrecord on this head — its shape isnode scripts/pm/record-recognisers.mjs --template --paths packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts packages/spec/src/stack.zod.ts— with a PASS or FAIL verdict, and post it as ONE commenton the PR or its card.
Inputs — these and nothing else:
· card #35228: its body and EVERY comment (rulings and earlier records included)
· PR #35699: its body, its file list, and the net diff against
mainatc5b827e5f3abfab7519e591419106419bbf19bf0· the check-runs on
c5b827e5f3abfab7519e591419106419bbf19bf0: their conclusions ARE the gate verdicts⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.
Scope — the paths
reviewFacereturns ashitson this PR's file list: packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts, packages/spec/src/stack.zod.ts;plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
Widen it freely, ⛔ never below
hits; the record'sScope:line names the implementing files apart fromhits.The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
ACCEPT at
TIER_DEFAULT, exactly as a standalone PR of those files.④ judges the
hitsfiles and those implementing files ONLY:lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
code outside the diff is READ to judge them, never reviewed.
⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's
Local-runs:line saysprobe — REASON; otherwisenone.Scratch space is
/tmp/claude-0/-home-user/921a7a0a-596b-5db1-b8dc-86173b3561d0/scratchpad/pr-35699/alone; nothing there you did not write this round is read.Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or
skip-changeset) matches what the diff publishes, and theClause-②:line.③ Boundary flags — every dev flag and every
open_questionsentry answered, or escalated.On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — for EVERY
hitsfile: does the change hold against the code it cites and thescenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
on
main; a schema file against the ruling or ADR it implements and its first consumer; an ADRagainst its first consumer and its execution plan. For EVERY implementing file in the diff: does the
code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade,
S1 (should-fix) — …, and a clean round asNo must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head andrefuses the record; the delta record names those it closes by id alone,
S1: closed.A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign
Implemented-by:with the dev's branch andReviewed-by:with your session id — the value is the FIRSTthing after each colon.
----- to here -----
Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH
Contract review
Served-tier:
CONTRACT_REVIEW_TIERHead-sha:
c5b827e5f3abfab7519e591419106419bbf19bf0Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts, packages/spec/src/stack.zod.ts + packages/objectql/src/engine-registration.ts
Judged under brief 7027654308 on this card. This record supersedes 7027587340, which was written against a free-text brief; the first record is 7026031587 on the PR. It is a delta review of PR #35699,
58464e71..c5b827e5(one commit, 7 files), and the head is unchanged since 7027587340.Inputs read, and nothing else: this card's body and all ten earlier comments (ruling 7023505627, claim 7023784590 and its correction 7025900800, the two os-dev-reports 7025836839 and 7027513812, both earlier records), the PR's body as it stands now, its 9-file list and the net diff against
mainat this head, and the check-runs on this head as of 2026-11-20T01:38Z. The cited code was read in the tree at this head. Nothing was built or run. The five test files and the changeset stay the lane seat's ACCEPT atTIER_DEFAULT.Verdict in one line: the three graded findings of the first record are closed in code and pinned, the hooks exception is in scope and right, and the residual
objectExtensionsnote is a separate card, not a blocker.① Derived judgments
collectComposedResidualDuplicateEntryErrors(stack.zod.ts:3585) reads only whatresidualEntryPredicate(:3625) lets through: with bodies present, a top-level entry a body claims is not read. Pin:stack-object-extension-duplicate-target.test.ts:204(a preserve artifact whose flattened copy holds two packages' extensions of one target, nested underlastand underpreserve, accepted, with an anti-vacuity assertion that the copy is there) and:226(its own residual pair still refused).stack.zod.ts:9585is no longer skipped under'preserve'and is handedcomposed.packages, so entries no body claims are judged as one package under every strategy. Pins::153(two manifest-less inputs, pagehome),:172(two manifest-less inputs extending one target),:190(control: a body's slot is not a residual pair).logSameTargetObjectExtensionsskips a target whose entries are all equal by value (engine-registration.ts:114,equalByValueat:129), so a composition the door accepts logs nothing as composed or as built JSON; entries that differ still log. Pins: the two[review S3]cases inengine-same-target-object-extensions-log.test.ts. The registrar comment, the migration entry's acceptance criterion and the changeset now say the same thing.stack.zod.ts:3267, 29 collections, 26 by name).namein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 sentence stays byte-identical at every door, which the ruling asked for.surfaceandacceptanceCriteriaand the changeset now carry theobjectConflictcarve-out and the app pair's code change.New accept-set change in the delta:
stack.zod.ts:3601), where every other collection still counts one entry object once. Right: see ④.'preserve', a residual pair is newly refused. Right: this is S2's fix and composeStacks: two sub-stacks of one package that each declare one name in a #22934 collection (e.g.pages) compose with both entries, so the duplicate refusal never runs #35608's measure item 3.main.Public surface: still no new export. The registrar's error line now has one more quiet case (equal entries); nothing is refused or merged there.
② Semver level
Unchanged and still right:
@objectstack/specminor and@objectstack/objectqlminor, BREAKING banner,Metadata-protocol: narrowed. The delta adds one more narrowing (the hook reached twice) and the changeset names it.Check Changesetconcluded success on this head.Clause-②: no (narrowing) — correct.
③ Boundary flags
Clause-②spelling). Answered and done:no (narrowing)stands, and claim correction 7025900800 carries it.objectExtensionsentry is registered by no door). A separate card, not a blocker for this PR. Reasons in ④. The card is owed before composeStacks: two sub-stacks of one package that each declare one name in a #22934 collection (e.g.pages) compose with both entries, so the duplicate refusal never runs #35608 is closed by hand, because that card's subject is this door.datasourcesandobjectExtensionsis an approximation). Accepted. It is what keeps a body's flattened copy from being read as a second entry, which S1 needed. It rides the card above.Check Changesetrun that a second PR-body edit superseded; the run after it concluded success. Among the successes: Build Core, Test Core 1/10 to 10/10, Type Check · workspace, consumer gates, source gates and debt ledger, the lint lanes, Check Changeset, Governed Surface Queue Guard, Spec property liveness, Dogfood Regression Gate.④ Design judgment
packages/spec/src/stack.zod.ts. The residual door now reads the artifact the way the boot does: nopackages[], every entry is the one package; with bodies, the mirror ofunclaimedTopLeveldecides by slot, and the two table collections that rule does not walk by slot are claimed by identity. It is handedcomposed.packagesafter the concat pass and the preserve fold, so a carried body and an assembled body are both seen. The docblocks say what the code does.The hooks exception (the second report's open question). Within scope, and right. The single-stack door counts every entry, twins included, and #35608 asks a composition of one package to refuse what
defineStackrefuses for it; counting one object once is the deviation from that rule, and it is safe only where the copies cannot behave differently from one entry. For hooks they can:collectBundleHooks(packages/runtime/src/app-plugin.ts:2992) folds by reference, so a source boot binds once, while a built artifact carries two equal entries and binds both, which is the table's ownhooksconsequence line. Refusing keeps the two boots in agreement, which is what S3 asked for. It is a narrowing of the diamond shape for hooks only, and the changeset and the migration entry both say so. The pin is adequate: an exact-message refusal at:244, the unchanged control at:292for a non-hook entry reached twice, and the dev's ablation leg turns the pin red.The residual
objectExtensionsnote (the second report's first out-of-scope finding). Not a blocker; a separate card. Read in the tree:objectExtensionsis not inOWNER_STAMP_JUDGED_COLLECTIONS, so the residual rule files no extension, and the dev's report says no other path registers one. That behaviour is onmainand this PR does not create or worsen it: before, two residual extensions composed and none registered; now the pair is refused. What is inaccurate is the sentence at that one door ("only the last of these entries' fields register"), and the remedy leads to a single residual entry that composes and still registers nothing. The fix belongs to the door that drops the entry, or to a refusal of a residual extension as such, and either is a decision of its own. Recorded here as N4.packages/spec/src/migrations/entries/semantic/18.stack-package-duplicate-entry-refused-at-every-door.ts. Agrees with the code at this head: the residual wording, the hooks exception, the app pair's code and the equal-entries quiet case are each stated as implemented.packages/objectql/src/engine-registration.ts. Still agrees with arm A1 sentence by sentence: an error line for entries that differ, nothing refused, nothing merged, replace-on-reload untouched. The comparison runs only for a target with two or more entries, so the common path pays nothing.N4 (nit) — At the residual door the
objectExtensionsrefusal says the last entry's fields register, while no residual extension registers at all. Follow-up card, as above.N5 (nit) —
jobsis the one table collection the residual mirror never treats as residual (TOP_LEVEL_COLLECTIONS_NEVER_RESIDUAL), because the boot reads jobs off the whole stack. So in an artifact that carriespackages[], two manifest-less inputs declaring one job name are judged by no door. The contract text says "the boot's residual", so it is not contradicted, but the pair is unjudged. Read from code, not driven. Add it to the same follow-up card.N6 (nit) — The composed output of a sub-stack passed twice still carries the entry twice, so that output, serialised and handed to
defineStackas apackages[i]body, is refused by the body door. No boot or log disagrees any more; follow-up or accepted deviation.No must-fix, no should-fix.
Implemented-by:
claude/project-thread-nbjeboReviewed-by:
session_01L6bhgVLY5efsfaT3UG2zwHVERDICT: PASS
fix(objectql): a package registered again stops serving an object ext…
fix(objectql)!: register a preserve composition’s residual objectExte…