Skip to content

metadata-protocol: the item door judges a package member by member, so the package's own member order decides admission #32901

Closed

Description

@objectstack-fleet

domain:server#1 · os-sales · session_01L6bhgVaKJ9TPfXPRhdqx3e

Older defect found by the epic red-line read 6838271054 on PR #32815 (#32408), present on main; not caused by that PR. p2 by epic ruling 6838245909.

维护者速读

  • 改什么:条目门逐个成员判定,于是包自己的成员顺序决定结果。一条未声明的 L 行、App 内的 W 先发 L 再发 en-US:条目门拒、包门放行;en-US 在前则两道门都放行。main 上声明行也一样。
  • 为什么:同一个包因成员顺序不同而被不同地接纳,两道门答案不一致(68 组成对构建里唯一的门对门差异)。
  • 风险:只改条目门的判定顺序;需实测第一方计数。
  • 先看:packages/metadata-protocol 条目门逐成员判定的位置。
  • 验证:两种成员顺序下条目门与包门答案一致;钉住两种顺序,消融一次。
  • 需要你做的:无,p2,席位落地。

Do

  1. Measure on main after metadata: overlaySlotBinding's other readers (bundleMembersHeldBy, getEnvironmentScopedItem) bind a pair row without reading overrides.package (ADR-0150 D4) #32408 merges: W of the App ships L then en-US, and en-US then L, beside an undeclared row of L (and a declared one); read both doors.
  2. Judge the package's whole holding once at the item door, as the package door does; pin both member orders.

Clause-②: the dev measures. Metadata-protocol: the dev measures.

Activity

  1. added
    priority:p2
    pm:queue
    domain:server
    on Nov 12, 2026
  2. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first-touch audit (pre-labeled card) · p2 confirmed · 2026-11-13T08:12Z

    ⛔ Not a claim; the claim (if any) is unchanged.


    Generated by Claude Code

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 14, 2026
  4. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn

    Measured on main e540baf (area E1, pilot #33059) · 2026-11-14T15:05Z. Held until the E1 registry-set PR (#33127 lead) lands: the fix is in the same file.

    Shape: X is a module of App A and ships welcome en-US. W (another namespace, depends on X) ships de-DE (L) and en-US.

    door member order answer
    item door L, then en-US 422 BareNameConflict naming X
    item door en-US, then L admitted
    package door either order admitted

    The same four answers hold with an undeclared pair row of L, with a row declared for X, and with no row at all, so the pair row is not needed for the split.

    Where: packages/objectql/src/registry.ts, SchemaRegistry#registerItem (the bare-name item-seam gate's incoming holding reads only registered members plus the arriving one) and SchemaRegistry#bareNameHoldersOtherThan (once the first member is admitted, later members skip judgement).

    Planned fix (after the registry set lands): the item door's incoming holding also counts the installed manifest's declared members, so both doors agree whenever the manifest declares them. A package whose manifest declares no members (members registered one at a time) stays order-dependent at the item door; that residual is stated and pinned as a CONTROL.

  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cx3SeLyrkP7imq6G71

    Release: 2026-11-15T05:10Z · area E1 drain (pilot #33059, DRAIN since 2026-11-15T04:00Z: no new p2 work). Back to pm:queue, unassigned.

    Measured on main at 2026-11-14T15:05Z (comment above) and held behind the E1 registry-set PR, which has since landed (#33513). Not started; the measurement above is the starting point, re-measure on current main first.

    Resume-from: none (no branch holds unlanded work for this card; start from main)

  6. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 15, 2026
  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRmmALkM1ftZxdVatQ
    os-dev-report

    Measured on main b76df9a (after #33513 and #33621) at 2026-11-15T10:53Z. Not claimed: the card's prescribed fix has nothing to read in the one shape that splits, so this is a decision, not code. No branch pushed, no PR.

    {
      "issue": 32901,
      "status": "needs_decision",
      "branch": "none (claude/area-E1-32901 created locally from b76df9a69, never pushed; nothing committed)",
      "pr": null,
      "session": "session_01QsR2jRmmALkM1ftZxdVatQ",
      "premise_still_valid": true,
      "summary": "The split still reproduces on main b76df9a69, but only in one shape. Shape: alpha ships welcome en-US; beta, in another namespace, depends on alpha. (1) beta's manifest DECLARES both locales: the manifest service admits beta in both member orders, de-DE,en-US and en-US,de-DE. installPackage records beta's bare-name claim, so bareNameHoldersOtherThan returns empty for beta at the item door (packages.includes(incoming)), and the holding is never read. The two doors already agree here. (2) beta is installed declaring nothing and registers the members directly through SchemaRegistry#registerItem: de-DE then en-US gives 422 BareNameConflictError on de-DE (beta alone is a bundle addition to alpha), then en-US is admitted. en-US then de-DE admits both, because once en-US is held the de-DE registration is not judged. The planned fix in comment 6879377769 (count the installed manifest's declared members in the item door's incoming holding) was measured as a throwaway mutation: no effect. In shape (1) the holding is never read, and in shape (2) the declared set is empty, so the four answers did not change. An order-independent item door for shape (2) cannot be had by reading more state: at the first member, the package's later members are not known yet. Both intermediate verdicts are right under the bundle-addition rule (ADR-0150 D9): {de-DE} alone is an addition, {en-US, de-DE} is the dependent's own template. Making the item door order-independent means choosing a contract: see open_questions.",
      "tests": "Throwaway repro (not committed; kept at the scratchpad path in the area return), using registry-bare-name-one-holder-flow-family.test.ts's real kernel and manifest-service harness on b76df9a69: `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/zz-repro-32901.test.ts` exit 0, Tests 4 passed (4). Printed: `INSTALL de-DE,en-US admitted` · `INSTALL en-US,de-DE admitted` · `ITEM-UNDECLARED de-DE:BareNameConflictError 422 | en-US:admitted` · `ITEM-UNDECLARED en-US:admitted | de-DE:admitted`. Planned-fix mutation (union of getPackage(id).manifest's declaredBundleMembers into incomingHolding, with a print): the same four lines, the print showed an empty declared set and never fired on the INSTALL arms. Restored with git checkout HEAD; restored blob hash 2276f7dafc658227d59acb3cf9bbdee27ebf7f46 equals HEAD:packages/objectql/src/registry.ts; git diff HEAD empty.",
      "gates": "none run: no diff. Closure build `pnpm --filter '@objectstack/objectql^...' build` under os-verify-lock, VERDICT command-exit 0.",
      "dogfood_battery": "n/a: no PR",
      "mcp_calls": "0",
      "api_writes": "1: this comment (POST /repos/objectstack-ai/objectstack/issues/32901/comments via post-stamped)",
      "line_budget": "n/a: no diff",
      "files_changed": [],
      "deviations": ["No Claim: was posted (E1 claim step 2): the measured premise leaves no code to write until the contract choice below is made, so a claim would only be a lease to unwind."],
      "open_questions": [
        {
          "question": "At the item door, a package registers members of a bundled name one at a time, without declaring them in its manifest. Should admission be independent of member order? If so, which contract?",
          "options": [
            "A. Keep the incremental judgement, which is the cheapest. Each arrival is judged on the package's holding as it stands. Document it in the registerItem docblock: declare a dependent's members of another package's bundle in the manifest, so the package door judges them as one set. Pin both shapes: declared admits in both orders (the claim exempts the item door), and undeclared splits by order (a CONTROL that names the residual). Axes: business need: no real producer of shape (2) after the seal has been found; the manifest-service install path measured here declares the members and holds the claim. Long-term: no new surface, and the rule stays one predicate. AI-error: the remedy is already the authoring path AI uses, the manifest. Startup focus: nothing added. Effort: test and docblock only, under 1 h. Clause-②: no change; Metadata-protocol: none.",
            "B. Add a batch item door: a registry entry point that takes all of a package's members of one bundled name and judges the set once, and producers move to it. Axes: business need: zero pull, with no producer named. Long-term: a second registration API beside registerItem. AI-error: neutral. Startup focus: a speculative capability, against the default. Effort: about 1 day plus producer migration. Clause-②: yes (widening).",
            "C. Make the item door refuse in every order: a package that holds no claim on a bundled name another package holds may not register any member of it directly, so both orders are refused and the remedy is to declare it. Axes: business need: no measured pull. Long-term: order-independent and strict. AI-error: a loud refusal that names the manifest remedy. Startup focus: a narrowing of a path nobody uses. Effort: about half a day plus pins. Clause-②: no (narrowing), owes one contract-review-tier review. It also departs from the #28802 control at the item door: an undeclared {en-US, de-DE} would be refused there while the declared set is admitted at the package door."
          ],
          "recommendation": "A. Long-term reading first: the doors already agree whenever the package declares its members (measured through the manifest service). The only split is a direct, undeclared, post-seal registration sequence that no real producer has been found to emit. Close the card with the pins and the docblock sentence (a test-only PR, Fixes the card), or as not planned if the seat prefers no PR."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · noted, not filed: once a package holds a bundled name through registered members alone, its later members skip the item door's judgement (the reload exemption). So an unregister of the shared member could leave a held {de-DE} addition that was never judged. Read from the code only, with no public-door repro, so it stays an observation."]
    }
  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRmmALkM1ftZxdVatQ

    Claim: PM loop round 2 (area S2, lease E1, #33751 §2)
    Session: session_01QsR2jRmmALkM1ftZxdVatQ
    Account: zhuangjianguo
    Branch: claude/area-E1-32901
    Worktree: /home/claude/wt/area-E1-32901
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/objectql/src/registry.ts (comment only, no code change) · packages/objectql/src/registry-bare-name-one-holder-flow-family.test.ts (one top-level describe)
    Container & model: S, mode:subagent, model: TIER_DEFAULT (dispatch-gates.mjs --tier --files on the surface: "no path-derived mandate: the surface hits none of the 4 declared glob(s)"), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack: packages/objectql/src/registry.ts, the item seam in SchemaRegistry#registerItem and bareNameHoldersOtherThan | the package door already judges a declared bundle as one set, and its install claim exempts the item door, so both doors agree in either member order (measured in 6893261716) | only a package registering undeclared bundle members one by one after the seal; no real producer found today
    Thread-read: 6893261716
    Premise: corrected 6893261716 (the split occurs only for undeclared members registered one by one; seat routing ruling: option A, which documents the per-arrival judgement and pins both shapes)
    Serial constraints cleared: #33282 (S4, open issue, registry.ts package-less action slot, a different function; ordinary concurrency, whoever lands second resolves) · #33513 and #33621 merged (registry.ts) · no in-flight claim on the test file

  9. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  10. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jRmmALkM1ftZxdVatQ
    os-dev-report

    Build report for claim 6893295585 (option A, after reading report 6893261716), written at 2026-11-15T11:35Z.

    {
      "issue": 32901,
      "status": "done",
      "branch": "claude/area-E1-32901",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/33822",
      "session": "session_01QsR2jRmmALkM1ftZxdVatQ",
      "premise_still_valid": true,
      "summary": "Option A as ruled; no runtime change. registry.ts: a comment at registerItem's bare-name item seam (ADR-0150 D9). It says a bundled arrival is judged on the holding as it stands and members still to come are never read. A dependent declares its members of another package's bundle in its manifest: the package door then judges the set, and its claim exempts later arrivals, so either order is admitted. Undeclared one-by-one members are judged per arrival, which is order-dependent. One new top-level describe in registry-bare-name-one-holder-flow-family.test.ts pins today's four answers: declared de-DE,en-US and en-US,de-DE both install with beta holding both members; undeclared de-DE first is refused 422 naming alpha, then en-US is admitted; undeclared en-US first admits both.",
      "tests": "New describe: Tests 4 passed | 86 skipped (90). objectql suite (os-verify-lock VERDICT command-exit 0): Test Files 596 passed (596), Tests 13140 passed (13140). typecheck (tsc --noEmit && check:test-typecheck) exit 0. eslint --no-inline-config on the 2 files exit 0. Touched file on merged head 41a849667: Tests 90 passed (90). Ablation via ablation-replace.mjs on committed f9c26abab: recordBareNameClaims call replaced with a no-op (anchor 1 to 0, blob 6f4fbf994cd0 to d778688a7717). Result: 'x declared in the manifest, de-DE then en-US: installs, and beta holds both members ... AssertionError: expected BareNameConflictError ... to be undefined', Tests 1 failed | 3 passed. Restored: blob == HEAD 6f4fbf994cd0, git diff HEAD empty.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack on f9c26abab: 62 commands from 2 paths, each run with the exit captured before any pipe: 61 exit 0; pnpm check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: whole-workspace build), NOT MEASURED, left to CI. --ran with recorded exits: '62 derived famil(ies) accounted for, 61 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. PR-body gates: check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword all exit 0. CI on 41a849667 at report time: Check Changeset success, Governed Surface Queue Guard success, Lint/Type Check lanes in_progress.",
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "5: comment 6893261716 (reading report); label-write stroke (claim comment 6893295585 + labels add pm:dispatched / remove pm:queue + assign); git push x3 (not REST); pr_create #33822 with label skip-changeset; this comment",
      "line_budget": "+72 / -0 over 2 files (12 comment lines in registry.ts, 60 test lines)",
      "files_changed": ["packages/objectql/src/registry.ts", "packages/objectql/src/registry-bare-name-one-holder-flow-family.test.ts"],
      "deviations": [
        "Common rule 6 asks for dependents' tests and `pnpm lint`. os-dev.md wins on conflict, and the public surface is byte-unchanged (comment only, measured absent from dist), so only objectql's own suite was owed. The repo-wide `pnpm lint` is CI's; eslint ran on the 2 changed files instead.",
        "skip-changeset rather than a patch changeset: the comment reaches no file in objectql's files[] (dist, README.md, CHANGELOG.md). After a fresh build, the new sentences matched 0 files; the positive control bareNameHoldersOtherThan matched 6 files."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · noted in the PR's Acceptance notes, not filed: once a package holds a bundled name through registered members alone, its later members skip the item seam's judgement (the reload exemption). Unregistering the shared en-US could leave a de-DE that was never judged as an addition. Code reading only, no public-door repro."]
    }
  11. added a commit that references this issue on Nov 16, 2026
    a520f55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverpm:dispatchedpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions