Skip to content

objectExtensions: two entries for one object in the same package silently drop the earlier entry's fields #35228

Closed

Description

@os-bob

What happens

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 package
const idx = 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.

Repro

  1. In one package, declare objectExtensions: [{ extend: 'X', fields: { a: ... } }, { extend: 'X', fields: { b: ... } }].
  2. Boot.
  3. GET /meta/object/X has b but not a, and a write naming a returns INVALID_FIELD.

The app now declares one entry per object, so it is not blocked. Reported so the next author gets an error instead of a missing field.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    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.

  2. added
    domain:server
    pm:queue
    priority:p2
    on Nov 18, 2026
  3. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    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.

  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH

    维护者速读

    • 问题:同一个包里分两个模块给同一个对象加字段,拼成一个包后只有后一段生效,前一段的字段悄悄消失、读写时报字段不存在;已有一个应用踩到并自行绕开。
    • 选项:A 拼包、校验和构建时直接报错并点名两处,让作者合成一段,已安装的包照常启动,约一个 PR;B 拼包时自动把两段合成一段,写法冲突才报错,约一个 PR;C 平台运行时自动合并,约两个 PR;D 只在启动日志里提示,字段照样丢。
    • 推荐 A:平台各处都按"一个包对一个对象只有一段扩展"来存和编辑,后台的编辑器也是这样,直接报错比再加一套合并规则简单可靠。
    • 不定会怎样:下一个把扩展分写在两个模块里的作者,字段还会无声无息地少掉,要等上线后读写报错才发现。

    Analysis (for the reviewer and the agents)

    Background

    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.

    Governing text

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

    1. 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 without cb_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
    2. The single-stack case is already refused; composition and package bodies are not.
    3. 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".
    4. 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.
    5. The same composition gap exists for other 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 collections. composeStacks of two sub-stacks that each declare page home → ACCEPTED with 2 pages (objects are caught by objectConflict: 'error'). Not this card's subject; see execution.
    6. 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

    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.

    After the ruling: execution

    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.

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    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 objectExtensions entry per target per package, refused wherever authoring reaches:

    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.

  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    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_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/main e91d9671: 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.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  8. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    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"
      ]
    }
  9. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH

    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.

  10. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    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"
      ]
    }
  11. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH

    Contract review

    Served-tier: CONTRACT_REVIEW_TIER
    Head-sha: c5b827e5f3abfab7519e591419106419bbf19bf0
    Local-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 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).
    • N2: not changed, accepted deviation. The 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 sentence stays byte-identical at every door, which the ruling asked for.
    • 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:

    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 1 (a residual objectExtensions entry 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.
    • 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.

    No must-fix, no should-fix.

    Implemented-by: claude/project-thread-nbjebo
    Reviewed-by: session_01L6bhgVLY5efsfaT3UG2zwH

    VERDICT: PASS

  12. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH

    Contract review brief — PR #35699 @ c5b827e5f3abfab7519e591419106419bbf19bf0 (card #35228)

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


    Generated by Claude Code

  13. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#1 · os-sales · session_01L6bhgVLY5efsfaT3UG2zwH

    Contract review

    Served-tier: CONTRACT_REVIEW_TIER
    Head-sha: c5b827e5f3abfab7519e591419106419bbf19bf0
    Local-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 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).
    • N2: not changed, accepted deviation. The 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 sentence stays byte-identical at every door, which the ruling asked for.
    • 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:

    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 1 (a residual objectExtensions entry 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.
    • 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.

    No must-fix, no should-fix.

    Implemented-by: claude/project-thread-nbjebo
    Reviewed-by: session_01L6bhgVLY5efsfaT3UG2zwH

    VERDICT: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddomain:serverpm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions