Skip to content

Protocol merged skill list serves a primed copy of a stored row under its body's _packageId, not the row's package column #38573

Description

@objectstack-fleet

repo:cloud#3 · zhuangjianguo · session_01QsR2jTYpqvq3pnPQS7q5jX

Filing gate: ② out-of-scope finding of a card run (cloud#4973, PR objectstack-ai/cloud#5223), class b (framework contract not met at its seam). Source: fleet.
定级:area:ai · Bug · p2 · reach:托管环境上的问数应用技能归属 · evidence:measured (repro test, red).
Dedupe: objectstack open issues listPackageBindings 0 hits; getMetaItems merge _packageId 0 hits.

维护者速读

  • 是什么:托管内核上,协议的合并列表 getMetaItems('skill') 把一条库存技能行同时按「行的所属包列」和「正文里写的 _packageId」各出一份。所以绑定包 P、正文写 Q 的行会被当成 Q 的技能;没有绑定的旧行也会当成 Q 的。
  • 影响:应用技能可能挂到别的应用上(cloud#4973 的验收在协议路径上做不到)。cloud 侧不绕开,等这里修。
  • 要你做什么:无。

What (measured)

  • Seam: runtime protocol-meta-list-reads.ts, the metadataService.list merge, which slots items by item._packageId (the body stamp).
  • On a hosted kernel the primed MetadataManager is merged beneath the stored rows. Rows themselves are served with their column binding (withRowBinding, objectstack#28673), but each primed copy re-enters under its BODY package.
  • Contract: IMetadataService.listPackageBindings (objectstack#37039) and withRowBinding say a stored row's binding is its package column, never its body stamp.
  • Repro (cloud): /mnt/project-files/pm-orders/cloud/seat3/reports/card-4973-merged-list-repro.test.ts and .log — listPackageSkills(BODY_PKG) returns the row bound to another package (1 failed / 3).

Acceptance

  • A stored skill row with package column P and body _packageId Q is listed once, under P, by the protocol's merged list; a row with a null column is listed under no package.
  • Pin both in the protocol's tests.

Reader

repo:objectstack lane. Downstream: cloud#4973 closes on the pin bump that carries this fix (cloud PR #5223 landed the cloud half).

Activity

  1. added
    bug
    priority:p2
    area:ai
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in packages/metadata-protocol/src/protocol-meta-list-reads.ts (the metadataService.list merge) with pins in the protocol's tests · area:ai · domain:server · Bug · p2 · pm:queue · size S. Rationale: a stored row's package binding is its column (withRowBinding, listPackageBindings), and the merged list re-files a primed copy under its body stamp, so an app's skill can be listed under another app; reproduced (cloud seat 3's repro, red). Fix and acceptance are all in this repository; cloud only waits for the pin bump, so this is not a cloud card. Grade confirmed at p2 (wrong result, builders/hosted apps, measured).

  3. added
    domain:server
    pm:queue
    on Nov 29, 2026
  4. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T04:41Z · Claim · zone o2-A (area:ai); #38595 is closed and seat 3's open #38640 (#34452) does not touch protocol-meta-list-reads.ts.

    Claim: PM loop round 1
    Session: session_01JQwxbXyLoBzNYY1U8SNPFu
    Account: os-warren
    Branch: new, from origin/main at 5ac1ee0bc8; the card thread's branch is named by a claim amendment on its first report
    Worktree: objectstack-issue-38573
    Domain: domain:server
    Seat: repo:objectstack#2
    Area: o2-A (area:ai)
    File surface: packages/metadata-protocol/src/protocol-meta-list-reads.ts, its tests under packages/metadata-protocol/src/, one changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: yes — the merged list read decides which package a stored row is served under; a CONTRACT_REVIEW_TIER review before the queue
    Responsibility: to be read by the dev (the change that slotted list items by the body stamp)
    Thread-read: none
    Premise: holds at 5ac1ee0bc8 — the list merge in protocol-meta-list-reads.ts reads it._packageId (line 532) and filters by item?._packageId === packageId (line 764), the body stamp the card names; the repro file the card cites is under /mnt/project-files/pm-orders/cloud/seat3/reports/.
    Serial constraints cleared: #38640 is open on neighbouring files of packages/metadata-protocol/src/ but not this one; overlap-check.mjs runs before every push and the dev merges main if #38640 lands first.
    Pre-claim lane: packages/metadata-protocol/** ⇒ domain:server (file ownership only); area:ai, zone o2-A.
    Pre-claim deps: #38595 closed; #34452 not a dependency (different file).
    Prior rulings read: triage 7255169616.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    Dispatch order · #38573 (merged skill list serves a stored row under its body's _packageId) · zone o2-A (area:ai) · 2026-11-30T04:44Z

    Card #38573 is held by seat 2 (os-warren) by claim 7269001394. One card thread (mode:thread); the thread is the dev.

    • Branch: a new branch from origin/main; the thread names it to the seat on its first push, and the seat amends the claim.
    • Premise first, before any code: run the card's repro (/mnt/project-files/pm-orders/cloud/seat3/reports/card-4973-merged-list-repro.test.ts) against main, adapted into packages/metadata-protocol; confirm the merge in protocol-meta-list-reads.ts (~532, ~764) slots a stored row by item._packageId (the body stamp) instead of the row's package column. If main already serves the row's own package, stop and report.
    • Fix: the merged list slots and filters a stored row by its row's package; a body stamp never moves a row to another package. Pins on a skill and on one other type.
    • File surface: packages/metadata-protocol/src/protocol-meta-list-reads.ts, its tests under packages/metadata-protocol/src/, one changeset .changeset/38573-*.md. Seat 3's open PR fix(metadata-protocol)!: same-name reads that name no package answer the environment's doc first and read a disabled holder as absent #38640 changes neighbouring files of packages/metadata-protocol/src/ (not this one): run overlap-check.mjs before every push and merge main if it lands first.
    • Metadata-protocol: yes. A CONTRACT_REVIEW_TIER review is owed before the queue; the seat runs it.
    • Pins fail without the fix; Clause-②: and Metadata-protocol: lines in the PR body and changeset, measured from the diff.
    • Do not: write a ## 席位核对 record, request reviewers, mark ready, enqueue.
    • Writes: PR create only via relay pr_create (draft, Fixes #38573); comments, labels and PR body only via relay write tools; report both counts.
    • Container & model: M, mode:thread, model: default (dispatch-gates.mjs --tier: no path-derived mandate), effort: high.
    • Report: the os-dev JSON report on this card, signed repo:objectstack#2 · os-warren · <the thread's session>; then one message to the seat-1 takeover thread with PR, head and key points.
  7. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbYAjtLtucYL4W61z6Q
    os-dev-report

    {
      "issue": 38573,
      "status": "done",
      "branch": "claude/project-thread-jxaxyy",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38699",
      "session": "session_01JQwxbYAjtLtucYL4W61z6Q",
      "premise_still_valid": true,
      "summary": "Premise held at origin/main 5ac1ee0bc8: the runtime merge in getMetaItems read metadataService.list bodies and slotted each by its body _packageId, so a stored row bound to P with a body stamped Q was listed under P and Q, the Q-scoped list served it as Q's, and a legacy row (empty column) was listed as Q's (the 4 new pins red, 4 failed / 13 passed). Fix: when the service offers listPackageBindings, the merge reads it and restates each source:'row' item with its row's column through withRowBinding; registration items keep their body; a service without it is read through list as before. Pins on skill and agent plus a registration case and a no-listPackageBindings control, in the existing runtime-merge harness. Head 88569ee8.",
      "tests": "RED on 5ac1ee0bc8 with only the pins added: vitest src/protocol.meta-list-runtime-baseline-dedup.test.ts -> Tests 4 failed | 13 passed (received differs|com.example.crm, differs|com.example.policy, legacy|com.example.crm). GREEN at 36ab001a and 88569ee8: 17 passed (17), lock VERDICT command-exit 0. pnpm --filter @objectstack/metadata-protocol test at 36ab001a: Test Files 374 passed | 9 skipped; Tests 23698 passed | 45 skipped; VERDICT command-exit 0. typecheck: VERDICT command-exit 0. The red-on-base run is the reverse verification (fix absent, pins red).",
      "gates": "dispatch-gates --commands: 67 derived, --ran 67/67 at 36ab001a. 63 exit 0. check:test-source-alias exit 1 (harness reached the lazy @objectstack/lint load in a case) -> fixed at 88569ee8 (module-top import), re-run exit 0. NOT MEASURED, exit 3 prerequisite: check:dual-build-cjs-loads and check:lean-entry-closure (need every package's dist; no full build here); check-plugin-teardown-shape.mjs --self-test (needs unshallow clone; checker health only). CI check-runs: not yet read (report delivered at local verification end).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay: pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/38699/assignees os-warren); this os-dev-report comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/38573/comments)",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — each getMetaItems call with a service offering listPackageBindings runs one more loader walk for row columns (MetadataManager.listPackageBindings is uncached; DatabaseLoader reads through its row cache); not measured on a live kernel (PR Acceptance notes)",
        "carrier: none · noted, not filed — the by-name read (readItemFromMetadataService) was not examined for the same body-stamp question; this PR changes the list only (PR Acceptance notes)"
      ],
      "deviations": [
        "Claim's Metadata-protocol value was 'yes', which is not one of added|narrowed|semantic|none; measured from the diff as `none` (no key, value or meaning an author writes changes; the read now follows the binding contract #37039 already declares) and the PR body and changeset carry `Metadata-protocol: none` with a patch changeset. The seat's CONTRACT_REVIEW_TIER review stands as ordered.",
        "Branch is the platform-assigned card-thread branch claude/project-thread-jxaxyy (from origin/main 5ac1ee0bc8), not claude/issue-38573-*; the seat amends the claim.",
        "The card's repro path under /mnt/project-files/pm-orders/cloud/seat3/reports/ does not exist; the premise was reproduced from cloud's packages/service-ai/src/__tests__/skill-row-binding-4973.test.ts shape instead, as new pins in packages/metadata-protocol.",
        "Session context asked to request os-warren's review after the create; not done, per the dispatch order (no reviewer requests) and the seat's hand-off rule."
      ]
    }
  8. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T05:34Z · Claim amendment to 7269001394: names the branch and PR, and corrects the Metadata-protocol line.

    Claim: PM loop round 1 (amendment of 7269001394)
    Session: session_01JQwxbXyLoBzNYY1U8SNPFu
    Thread session: session_01JQwxbYAjtLtucYL4W61z6Q
    Account: os-warren
    Branch: claude/project-thread-jxaxyy (from origin/main at 5ac1ee0bc8), PR #38699
    Worktree: objectstack-issue-38573
    Domain: domain:server
    Seat: repo:objectstack#2
    Area: o2-A (area:ai)
    File surface: unchanged from 7269001394
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Thread-read: none

    Correction: the claim's Metadata-protocol: yes was not a valid kind. The line names a change to what a metadata author can write (added, narrowed, semantic or none). This PR changes only which package the runtime list merge serves a stored row under, so the kind is none, as the dev measured. The contract-review line in the claim falls away with it: the seat's own L1 at the default tier covers this PR.

    Premise note: the repro file the card cites under pm-orders/cloud/seat3/reports/ does not exist. The dev reproduced the card from the shape of cloud's skill-row-binding-4973 test, and 4 pins are red on 5ac1ee0bc8.

  9. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T08:54Z · Claim amendment to 7269803456: admits packages/metadata-protocol/src/listed-package-bindings.ts and its test. PR #38699 was ejected from the merge queue at 2026-11-30T07:36Z (anchor #38725: package-move-in.dogfood.test.ts A3, 404 for 200). The cause was measured as latency: the uncached listPackageBindings read held the flow re-sync inside the move's transaction. The fix keeps that read on the list memo's footing, in a sibling module. Everything else is unchanged.

  10. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

    2026-11-30T09:23Z · Landed — card closed by the merge; seat label cleared.

    PR #38699 merged at 2026-11-30T09:22Z as 5bb397de58, after the re-land at b9f066554a (ACCEPT 7273503695) fixed the move-in latency that ejected it at 2026-11-30T07:36Z.

  11. removed
    pm:dispatched
    on Nov 30, 2026
  12. added a commit that references this issue on Dec 1, 2026
    5bb397d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aibugdomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions