Skip to content

metadata list: GET /meta/doc lists the environment's own doc under the first registered holder's envelope, while the bare read serves it as the environment's (#38659) #38977

Todo

Description

@objectstack-fleet

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ

Filing gate: ② an isolated L2's out-of-scope finding (L2 record 7317221531 on draft PR #38947, card #38659), filed on the seat's word (mailbox #38766) · Source: L2 record 7317221531, ③ "New, by reading, not measured" (a).
Grading: area:package · domain:server · Bug · p2 (same family and grade as #38659 and #38952) · reach: any environment that saves its own doc under a name one or more enabled packages also ship, read through the list door · evidence: by reading at 7b68db99, not measured.
Dedupe: list-reads envelopePackageId doc, meta/doc list holder envelope → #38659 (the by-name bare read; its surface leaves the list door out), #38952 (boot hydration beside one holder stamps the row itself; a different door, upstream of this one), #22024 (per-item artifact scoping on the list, the rule this card asks to extend).

What happens

  • Arrangement: an enabled package ships doc shared_doc; the environment also has its own package-less shared_doc (the entry in the registry's bare slot).
  • GET /api/v1/meta/doc builds its envelope per listed item at packages/metadata-protocol/src/protocol-meta-list-reads.ts:1141: host.lookupArtifactItem(request.type, itemName, envelopePackageId(packageId, it), …). For the entry, envelopePackageId is undefined (no requested package, no _packageId on the entry), and the package-less lookup falls back to the first registered holder's artifact.
  • registry.listItems('doc') returns every registry value of the type, the bare-slot entry included, so the list can show the environment's entry with that holder's _packageId, _packageVersion and _provenance: 'package'.
  • After fix(metadata-protocol): the bare doc read of the environment's own entry carries the environment's envelope #38947 the by-name read GET /api/v1/meta/doc/shared_doc lends the entry no artifact (servesEnvironmentOwnItem, ruling 6942962369), as the layered read already did (protocol-meta-layered-reads.ts:470). The list and the by-name read would then disagree on who owns the same item.

Done when

Open question for the maintainer (not decided here)

The L2 on #38947 left one question to a ruling (ADR-0146 D8), which bears on what "the environment's entry" means on every door, this one included:

The list fix above does not depend on the answer: under either option the list should match the by-name read's envelope.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:server
    on Dec 1, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CY1DVmttnuNH77G3ht

    Claim: PM loop round 1 · 2026-12-03T14:35Z
    Session: session_01Utp6CY1DVmttnuNH77G3ht
    Account: os-bill
    Branch: claude/issue-38977-doc-list-env-envelope
    Worktree: objectstack-issue-38977
    Domain: domain:server
    Seat: repo:objectstack@os-bill
    Area: package-1203
    File surface: packages/metadata-protocol/src/protocol-meta-list-reads.ts (the per-item envelope of GET /meta/doc, :1197–1200); a pin (beside it or in the shared runtime harness AGENTS.md names) and a patch changeset are implicit. Stop on any other breach and explain in the report.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: protocol-meta-list-reads.ts in objectstack (the list grafts the first registered holder's artifact envelope onto the environment's own bare-slot entry because envelopePackageId is undefined for it); no platform path covers it; any environment whose own doc shares a name with two or more enabled holders, or a stamp-less registration, read through the list door.
    Thread-read: none
    Scope (re-scoped on ruling B for #38952, record 7380913307): only the cells that still serve the environment's entry on the by-name read — (a) two or more enabled holders beside the environment's own entry (as ruled 2026-11-26), (b) a stamp-less code registration with no stored row. The one-holder stored-row cell is OUT: per ruling B that row is the holder's unserved leftover and is not registered (#38952 rewritten), so the list answers the holder's item there and this card does not pin it either way.
    Premise: by reading at origin/main: envelopePackageId(packageId, it) (
    :1197) is undefined for the bare-slot entry and host.lookupArtifactItem(type, name, undefined, …) falls back to the first registered holder; the card is "by reading, not measured" — the dev measures each in-scope cell red on main first and closes with the reading if none reproduces.
    Pre-claim lane: domain:server (packages/metadata-protocol); this seat keeps it.
    Pre-claim deps: #38952 ruled B (7380913307); its rebuild changes the hydration path, not this list file. #38947 merged.
    Prior rulings read: ruling 6942962369 as narrowed by record 7380913307 (B); check-prior-rulings.mjs --card 38977 --paths packages/metadata-protocol/src/protocol-meta-list-reads.ts → 0 thread rulings, 6 hit lines in the file owed a read by the dev.
    Serial constraints cleared: check-handover.mjs --inflight --card=38977 → OVERLAP with #38174 (claim 7378145399, this seat's card thread, packages/metadata-protocol/src/ wide). Notify: serial — the dev runs overlap-check.mjs before each push and queues only on a real textual conflict. #38952's rebuild may touch the same runtime harness test file; same rule.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CY1DVmttnuNH77G3ht
    os-dev-report

    {
      "issue": 38977,
      "status": "done",
      "branch": "claude/issue-38977-doc-list-env-envelope",
      "pr": null,
      "session": "session_01Utp6CY1DVmttnuNH77G3ht",
      "premise_still_valid": false,
      "summary": "Measured on a booted kernel at objectstack c99c8a50 (origin/main), the in-scope cells do NOT reproduce the card's failure: GET /meta/doc never lists the environment's own entry under a holder's envelope, because the list never lists that entry at all. registry.listItems('doc') does return the bare-slot entry (package-less, beside each holder's composite), but readFlattenedMetaItems drops it at protocol-meta-list-reads.ts:339 (isStoredEntryOfDeclinedName -> declinesStoredRow: doc is a sealed managed type, the entry is not a code-artifact body), before the envelope loop at ~:1197 is reached; so envelopePackageId / lookupArtifactItem never run for it and no graft happens. No code changed, no PR. The real disagreement in scope is an omission, not an envelope: the by-name bare read serves the entry (servesEnvironmentOwnItem, no envelope) while the list shows only the holders' docs, each under its own envelope; filed below as an out-of-scope finding because closing it changes the list's membership through the sealed-type decline predicate (protocol-lock-state.ts, outside this card's file surface) and is a direction call. Readings per cell: two holders alpha-first and beta-first, both entry forms (stamp-less registration; package-less stored row laid as the hydrator lays it before the artifacts): in-process getMetaItems and the runtime dispatcher GET /meta/doc both list exactly [beta doc under com.qa.beta, alpha doc under com.qa.alpha] (order follows registration), by-name getMetaItem answers the entry with _packageId null. One holder, stamp-less registration, both orders: both doors list [alpha doc under com.qa.alpha]; by-name answers the bare entry. Out-of-scope cell, not pinned, reported for #38952's rebuild only: one holder + stored row, both orders: in-process list [alpha doc, com.qa.alpha, package] and by-name alpha doc, BUT the dispatcher list serves the row's body 'environment doc' under _packageId com.qa.alpha, _provenance package, i.e. the card's graft symptom reproduces there, on the dispatcher door only.",
      "tests": "Rig: the shared harness packages/runtime/src/domains/meta-bare-read-own-envelope-38659.test.ts (bootArtifactKernel, ENTRY_FORMS, clearEntry) with a temporary probe describe appended, run in packages/runtime: `pnpm exec vitest run --maxWorkers=2 src/domains/meta-bare-read-own-envelope-38659.test.ts -t probe` -> 'Tests 4 passed | 28 skipped (32)', EXIT=0, at c99c8a50 after `pnpm --filter '@objectstack/runtime^...' --filter @objectstack/runtime build` (os-verify-lock VERDICT command-exit 0). Probe lines, e.g. two holders alpha-first stamp-less: registry.listItems('doc') = [[alpha doc,com.qa.alpha],[beta doc,com.qa.beta],[bare entry,null]]; protocol.isStoredEntryOfDeclinedName('doc', {name: shared_doc}) = true; getMetaItems = [[shared_doc,beta doc,com.qa.beta,1.0.0,package],[shared_doc,alpha doc,com.qa.alpha,1.0.0,package]]; getMetaItem = [bare entry,null,null]; dispatcher GET /meta/doc 200 same two holder items. One holder stored-row (out of scope): dispatcher 200 [[shared_doc,environment doc,com.qa.alpha,package]]. Probe reverted; no test committed (no behaviour changed, so no ablation owed).",
      "gates": "No diff, so no derived gate family is owed and dispatch-gates --commands was not run; no CI check-runs (no PR). Local: the build above (exit 0 via os-verify-lock VERDICT line) and the probe run (EXIT=0 captured before any pipe).",
      "mcp_calls": "0",
      "api_writes": "2 — git push of the empty probe branch claude/issue-38977-doc-list-env-envelope at c99c8a50 (= origin/main, no commits; dev-worktree.sh --probe; left for the seat to delete), and POST repos/objectstack-ai/objectstack/issues/38977/comments (this os-dev-report, via post-stamped.mjs). Reads: gh api GET issues/38977 and comments 7381717066, 7380913307, 7380518965.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: b · reach: GET /api/v1/meta/doc (runtime dispatcher, 200) and protocol.getMetaItems measured at c99c8a50: with two enabled holders of doc shared_doc beside the environment's own package-less entry (either form, either order), or one holder beside a stamp-less registration, the list omits the environment's entry while GET /api/v1/meta/doc/shared_doc serves it as the environment's (no _packageId). Contract text: ruling 6942962369 'the environment's own item always answers first ... and reads and writes give the same answer'. Seam: spec: doc sealed-type decline (declinesStoredRow / isUnservedSealedOverlay) -> runtime: readFlattenedMetaItems filter at packages/metadata-protocol/src/protocol-meta-list-reads.ts:339 (isStoredEntryOfDeclinedName, protocol-lock-state.ts:210) vs the by-name exemption refuseAmbiguousBareDocRead (protocol-meta-item-reads.ts:359). Whether the list should list the entry (and with which identity beside two same-name holder items) is a direction call, so it likely needs a ruling before a card. · dedupe words: `meta/doc list omits environment entry`, `isStoredEntryOfDeclinedName doc list bare entry`, `list by-name disagree doc holder`",
        "carrier: #38952 (rebuild) · noted, not filed: one holder + package-less stored row laid before the artifacts, at c99c8a50: the dispatcher's GET /meta/doc lists the row's body ('environment doc') under the holder's envelope (_packageId com.qa.alpha, _provenance package) while in-process getMetaItems lists the holder's own doc and the by-name read answers the holder's doc; under ruling B the rebuild should leave this door answering the holder's doc too"
      ]
    }
  5. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CY1DVmttnuNH77G3ht

    Release: 2026-12-03T14:47Z · claim 7381717066 (zone package-1203) released, premise not holding — no PR, no code. The dev's measurement is comment 7382014322 (booted kernel at c99c8a50).

    • The re-scoped cells (two enabled holders; one holder beside a stamp-less registration) do NOT show the card's graft: GET /meta/doc never lists the environment's entry at all. readFlattenedMetaItems drops it at protocol-meta-list-reads.ts:339 (isStoredEntryOfDeclinedName → declinesStoredRow, doc is a sealed managed type) before the envelope loop is reached.
    • What remains is an omission, not an envelope: the by-name bare read serves the entry (servesEnvironmentOwnItem, no envelope) while the list shows only the holders' docs. Whether the list should list it (and with which identity beside two same-name holder items) changes list membership through the sealed-type decline predicate (protocol-lock-state.ts:210) — a direction call against ruling 6942962369's "reads and writes give the same answer", so pm:retriage asks triage/the seat to re-scope, rule or close this card.
    • Carried to metadata-protocol: boot hydration with one enabled holder stamps a package-less stored row as the package's, so the bare read serves the package doc instead of the environment's own item #38952's rebuild (not this card): one holder + a package-less stored row laid before the artifacts — the runtime dispatcher's GET /meta/doc lists the row's body under the holder's envelope while in-process getMetaItems and the by-name read answer the holder's doc; under ruling B that door should answer the holder's doc too.
    • Leftover: the empty probe branch claude/issue-38977-doc-list-env-envelope (= origin/main, no commits) is left for a hand with delete rights.
      Resume-from: none
  6. added
    pm:queue
    pm:retriage
    and removed
    pm:dispatched
    on Dec 3, 2026
  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: retriage 2026-12-04T09:29Z · premise false as filed, held for a direction call. Rationale: the dev's measurement on a booted kernel (7382014322, at c99c8a5) shows no graft. GET /meta/doc never lists the environment's own entry under a holder's envelope; it omits the entry outright, at isStoredEntryOfDeclinedName (protocol-meta-list-reads.ts:339; doc is a sealed managed type). What remains is an omission, and fixing it moves list membership through the sealed-type decline predicate (protocol-lock-state.ts:210). That is a direction question against ruling 6942962369 ("reads and writes give the same answer"), not a routable bug, so this seat does not rule it. The dispatcher half carried to #38952 stays there.
    Route: pm:retriage and pm:queue off, pm:on-hold on; the question goes to the maintainer through the triage report. If the answer is "the list keeps omitting it", this card closes as not planned; if it is "list it", the card is re-scoped to the omission and returns to pm:queue.
    Restart-when: the maintainer answers whether GET /meta/doc lists the environment's own doc beside same-name holder docs.

  8. added
    pm:on-hold
    and removed
    pm:queue
    pm:retriage
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagebugdomain:serverpm:on-holdpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions