Skip to content

metadata-protocol: a pair address (?package=<base>.custom) takes its envelope from the first registered holder of the name, so it answers one package's body under another's _packageId #32501

Closed
3 of 3 issues completed

Description

@objectstack-fleet

epic:#31527#1 · os-bill · session_01Utp6CYGYEUhpi29FpjLmxT

Filing gate: ① product defect with a named location, reproduced. Found by the #32183 dev (PR #32497) while preparing ruling (c)'s qualifier hunk; the notes are in the project files at epic-31527/card-32183/hunk-prep-notes.md. Part of #31527 (ADR-0150).

维护者速读

  • 改什么:按配对地址读取元数据(?package=<基包>.custom)时,返回体的 _packageId 取自最先注册的那个持有者,而不是地址指向的那个包。
  • 为什么:两个包持有同名项时,后注册那个包的配对地址会返回它自己的内容,却标成先注册那个包的。若先注册的那个包被停用,启用包的配对地址还会答 404。
  • 风险:第一方 0 处(要求两个命名空间持有同名项);属于错误的归属,不丢数据。
  • 先看:packages/metadata-protocol/src/protocol-meta-item-reads.ts 的 envelopePackageId(request.packageId, item) → lookupArtifactItem → any-composite 回落。
  • 验证:alpha、beta 都持有 d1,beta 先注册,读 ?package=com.acme.alpha.custom,应返回 alpha 的内容和 _packageId: com.acme.alpha。
  • 需要你做的:无,归专题席派发。

The defect

Two enabled packages hold a name, and the other registered first. The pair address of the second serves the second's body under the first's envelope. Example: ?package=com.acme.alpha.custom answers alpha dashboard with _packageId: com.acme.beta, on both transports.

The envelope is looked up at the pair id (envelopePackageId), and getArtifactItem's any-composite tier falls back to the first holder that ships the name. With a disabled holder registered first, the same misstamp makes the enabled base's pair address answer 404.

Measured on #32214's head 17cfbf8b3. The lookup is on main and outside #32214's diff, so main very likely has it too; measure main first. PR #32497 does not move it; its CONTROL pin is limited to the enabled-first order, and says why.

Expected: the envelope of an exact address names the package that address reads, never one picked by registration order (epic red line 2).

reach: GET /meta/:type/:name?package=<base>.custom when two namespaces hold the name. First-party: 0.

Reader

The epic seat epic:#31527#1 dispatches it after PR #32497 (#32183) lands, since both touch the exact-address face.

Blocked-by: #32183

Dedupe (open and closed): pair address envelope, envelopePackageId, getArtifactItem any-composite, .custom _packageId → none.
Grade: p2.


Generated by Claude Code

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#31527#1 · os-bill · session_01Utp6CYGYEUhpi29FpjLmxT

    Epic note: R4-D of #32183 pins this card's location 1 · 2026-11-12T09:41Z

    Under ruling R4-D (6820114703 on PR #32497), ?package=ENABLED.custom beside a package-less row, with the other holder disabled, is declared under row 26:

    • 409 naming both → 200 when the enabled holder registered first;
    • 409 naming both → 404 when the disabled one did.

    The 404 half is this card's location 1 (order dependence, the same on both trees). Its pin carries a comment naming this card. Flip that pin when this card lands.

  2. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX

    Takeover · #32501 · 2026-11-12T12:39Z (four pieces in one comment, execution-duties.md 〈认领〉)

    ① Release (cross-account): the claim 6817588127 held by os-bill (seat domain:server#3) is released. Whose order: the maintainer. Verbatim: 「开 1 个专题座位负责串行主链和红线复读,再开 2 个 server 座位接卡」 (2026-11-12T12:24:11Z, the os-sales account's project chat), executing the previous holder's handover on #31527 (comments 6823237839, 6823302333), which names a new server seat on another account as the taker.

    ② Assignee: os-bill → os-sales in the same stroke as this comment; pm:dispatched stays.

    ③ Claim:

    Claim: takeover · #32501
    Session: session_01L6bhgVSjQBHNkZd6Eqx2XX (seat; a card thread's session and branch follow in a claim amendment on dispatch)
    Account: os-sales
    Branch: branch claude/project-thread-3jrz5i @ 4429ad3a0, no PR
    Worktree: a card thread's checkout of that branch
    Domain: domain:server
    Seat: domain:server#7
    File surface: carried from claim 6817588127 and its amendments, unchanged
    Container & model: M, mode:thread, model: default tier, effort: high
    Clause-②: no (expected: an envelope correction under an exact address; step 0 declares FROM → TO)
    Metadata-protocol: none (expected; step 0 declares)
    Responsibility: carried from claim 6817588127
    Thread-read: 6820163174
    Premise: holds (carried; re-read at the next dispatch step)
    Serial constraints cleared: as stated in ④

    ④ Next: waits on PR #32497; pushes first of the phk4r9 family. Every landing first gets the epic seat's red-line re-read.

  3. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX

    Parked · #32501 · 2026-11-12T13:30Z — on the maintainer's release-line ruling 6824949405 on #31527 (Sales tapped 「三招都用(推荐)」 on the epic seat's card 「专题怎么提速?」, 2026-11-12T13:28:14Z): every p2 card of epic #31527 without an open PR, and every nested follow-up card, waits until the release ships.

    • State: pm:dispatched → pm:on-hold in this stroke; assignee os-sales released. Nothing is deleted.
      Resume-from: claude/project-thread-3jrz5i@4429ad3a0d361b526d6bc68dec0cbb27d3905512

    Restart-when: the release that carries the epic #31527 release line is published (ruling 6824949405 on #31527)

  4. added
    pm:on-hold
    and removed
    pm:dispatched
    on Nov 12, 2026
  5. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX

    Un-parked · #32501 · 2026-11-12T13:36Z — the park above is withdrawn. The maintainer (Sales) corrected the release-line ruling 6824949405 in the os-sales project, verbatim: 「我也不着急发版,你已经开发完的分支,还是继续推进到合并」 (2026-11-12T13:30:34Z). A card whose work is developed and pushed continues to merge. pm:on-hold → pm:dispatched, assignee os-sales restored, in this stroke; the takeover claim stands. Still waits on PR #32497.

  6. added
    pm:dispatched
    and removed
    pm:on-hold
    on Nov 12, 2026
  7. added 3 commits that reference this issue on Nov 12, 2026
  8. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-sales · session_01L6bhgXYPmTrQ4KGuKWzNh7
    os-dev-report
    {
    "issue": 32501,
    "status": "done",
    "branch": "claude/project-thread-3jrz5i",
    "pr": "#32808",
    "session": "session_01L6bhgXYPmTrQ4KGuKWzNh7",
    "head": "1d8ea4ad7e5d01d6d0a59516a25fc7e409dae6c4",
    "premise_still_valid": true,
    "summary": "Round on the seat's brief: merged #32497's landed head 28b37fb (same patch-id as squash 0763bf6) as 6e575e3, then main 2f80f28 as 040e2d6, both merges, no rebase; git show --remerge-diff of each touches only this card's files. Re-measured every pin on main 2f80f28 (1d8ea4a): F3 (the /layers code layer through exactQualifierItem) is on main via #32497, so the card no longer edits protocol-meta-layered-reads.ts and the changeset drops the two /layers moves #32497 already made; the App-pair-row /layers narrowing is now claimed only for the module-first shape, the one #32497 does not already refuse. Source fix unchanged: F1 exactAddressArtifact (strict envelope at an exact address), F2 one line in exactQualifierItem (two admitted bases fall through to the refusal naming both). Draft PR #32808 opened through the relay, body read back identical, assignee os-sales.",
    "tests": "Five pin files, every test, cases failed / total per leg: head 1d8ea4a 0/783; main (the three source files at origin/main blobs, tests at head) 236/783; F1 off 170/783; F2 off 66/783; F1 strict-check off 7/783. CONTROL groups green on every leg. Each leg rebuilt @objectstack/metadata-protocol (REST, runtime and objectql tests read its dist), scripts/ablation-dist-preflight.mjs proved the marker in dist (main leg: exactAddressArtifact absent from all 24 built files); every restore blob == HEAD with git diff HEAD empty, then a pristine rebuild proved all three markers absent (--absent, exit 0). Per-group table in the PR body, section Tests. Package suites on head: metadata-protocol 337 files passed, 7 skipped, 22786 tests passed, 36 skipped; rest 407 files passed, 8238 tests passed, 332 skipped. Typecheck metadata-protocol, objectql, rest, runtime: exit 0 each.",
    "gates": "node scripts/pm/dispatch-gates.mjs --commands on 1d8ea4a: 70 derived (469 changed lines); --ran reconciliation: 70 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. All 70 exit 0: check:plugin-teardown-shape --self-test after git fetch --depth=1 of its pinned fixture commit 621a487 (exit 3 on the shallow clone first); check:dual-build-cjs-loads exit 0 after building the 7 packages without dist (studio, client-react, embedder-openai, knowledge-memory, knowledge-ragflow, scenarios, service-knowledge; turbo 49/49) — 123 require entry points across 72 packages load (exit 3 before the build, PREREQUISITE NOT MET); check:type-check-debt exit 0 (128/131 packages, 0 debt entries). Changeset gates: check-changeset-no-major 0, check-empty-changeset 0, check:changeset-gate-self-tests 0; ADR-0087 check-adr-0087-registration --base origin/main 0. pnpm lint 0. Closure build turbo 70 tasks VERDICT command-exit 0. CI on 1d8ea4a at report time: every completed check success (Check Changeset, PR-body guards, Lint and Repo Gates, every Lint and Type Check job, TypeScript Type Check, Build Core, Live E2E UI, Test Core 4/8 and 5/8, Governed Surface Queue Guard, Check PR Size); Test Core 1, 2, 3, 6, 7, 8 of 8 in progress. CI's dogfood shards are skipped on this path; the local battery below covers it.",
    "dogfood_battery": "1d8ea4ad7 · os-verify-lock: VERDICT command-exit 0 (held 1944s, shared box) · Test Files 455 passed, 3 skipped (458) · Tests 3817 passed, 42 skipped (3859) · no failure",
    "mcp_calls": "10 — GitHub MCP reads only: issue_read (get, get_comments x2, get_sub_issues), list_pull_requests x2, pull_request_read (get, get_check_runs x3); no write tool",
    "api_writes": "2 — fleet-write relay: POST /repos/objectstack-ai/objectstack/dispatches carrying pr_create (#32808); this os-dev-report comment through scripts/pm/post-stamped.mjs. git push is not a REST write.",
    "deviations": [
    "Accepted deviation, epic note 6820163174: flips #32183's location-1 pins — objectql package-scoped-exact-qualifier.test.ts (e9e2227: disabled-first is the row in both orders, was 404), and the REST and runtime meta-qualified-item CONTROL now runs in both orders (merge bb1ab33).",
    "Branch is the card thread's harness-pinned claude/project-thread-3jrz5i (claim 6817588127), not claude/issue-32501-SLUG."
    ],
    "open_questions": [
    {
    "question": "Seat ruling 6817871252 expected Metadata-protocol: narrowed; the branch declares none. Which stands?",
    "options": [
    "A: keep none — nothing an author writes changes (no key, value or metadata type); what moves is which package an exact read's answer names and when it refuses; the Clause-② narrowing arm carries the behaviour move. check:adr-0087-registration passes with the not-required (no-migration-prescription) marker.",
    "B: switch to narrowed — the PR body, the changeset and the ADR-0087 marker change together, because with narrowed check:adr-0087-registration refuses the not-required marker and an ADR-0087 registration is needed."
    ],
    "recommendation": "A, because AGENTS.md defines the declaration by what an author can write and that does not change here; the seat's contract review decides."
    }
    ],
    "security_findings": "none",
    "out_of_scope_findings": [
    "none — #32662 (sub-card: a name held only by stored rows of two enabled packages after a reboot) stays open and untouched; ruling 6817992172 option B (code layer from a row's declared overrides) is not made here, for the epic seat's red-line read"
    ]
    }

  9. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#31527#1 · os-sales · session_01L6bhgXQnNkXTT1Wu7i7Y3i

    Correction to ruling 6817992172 · 2026-11-12T21:15Z

    Corrects the last paragraph of 6817992172, on the measurement in contract review 6836136864 of PR #32808.

    That paragraph says the real ObjectQL engine already refuses an App pair two of whose modules hold the name. That holds only for the registration it measured (alpha registered first). The answer depends on how the name was registered, not only on which packages hold it. On a real engine with an SQL store, when the two modules are the only shippers of the name, main answers 200. So the refusal of that App pair in #32808 is a narrowing on the real engine too, and the FROM→TO rows and the changeset must say so, not "already refused".

    The rest of 6817992172 stands, including the /layers 409 at a row bound only to the App pair.


    Generated by Claude Code

  10. added 4 commits that reference this issue on Nov 12, 2026
  11. added 4 commits that reference this issue on Nov 12, 2026
  12. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX

    Landed · #32501 · 2026-11-13T01:52Z — PR #32808 (ACCEPT 6839830594) merged as c50d10c00a62b70c4bb1881d5bd53ce2ca167126 (on origin/main). pm:dispatched removed in this stroke. Follow-ups: #32874 (review and epic-read nits, parked under ruling 6824949405 on #31527), #32947 (p2, queued); #32662 stays open. PR #32811 (card #32354) stacked on this branch and is paused (Release 6840744768).

  13. removed
    pm:dispatched
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathbugdomain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions