Skip to content

metadata-protocol: the publish receipt's seedApplied drops the landed row ids the seed loader computes, so cloud cannot tell which rows an AI build's seed landed on (objectstack-ai/cloud#3598 ruling A) #30348

Closed

Description

@objectstack-fleet

repo:cloud#3 · hotlong · session_01Q4EjjRhUZjdy8VXs6Kkur2

Filing gate: executing a recorded ruling. The maintainer ruled objectstack-ai/cloud#3598 A (record 6651768430; the maintainer's selection, verbatim: 「A 平台回执带行号(推荐)」). This card carries the platform half. objectstack-ai/cloud#3598 keeps the cloud half and waits on this card with pm:blocked + Blocked-by:.

Owner. The repo:cloud lane (repo:cloud#3, #30278) follows it to close. The change widens a published response schema, so it is spec-lane work (Clause-②: yes (widening)), and triage routes it.

Priority: p1, inherited from objectstack-ai/cloud#3598.

维护者速读

AI 搭建应用时,示例数据是在发布草稿那一刻由平台写进去的。种子加载器知道写了哪几行,但发布接口只回传「写了几行」,把具体行号丢了,于是 cloud 的「清理示例数据」永远找不到这些行。按已有裁决,发布回执 seedApplied 加一个可选、有上限的字段,按对象带回写入的行 id。

Measured

Probe at framework pin 1a3ea0c0 on a real hosted kernel, by the objectstack-ai/cloud#3598 dev (report objectstack-ai/cloud#3598 comment 6650239213):

  • The real apply_blueprint published 6 rows (seedApplied.inserted 6). The cloud seed-replay ledger stayed unchanged.
  • After a kernel rebuild on the same database, the ledger was still unchanged.
  • A control artifact data[] seed was recorded normally, which proves the reading method.

Seat re-read at objectstack origin/main bfca0efb:

  • packages/metadata-protocol/src/protocol-publish-batch.ts:126-128: applySeedBodies returns success, inserted: r.summary.totalInserted and updated, and no ids.
  • packages/spec/src/data/seed-loader.zod.ts:431: landedIds: z.array(z.string()).default([]) is on the loader's per-dataset result.
  • packages/spec/src/api/protocol.zod.ts:1480: seedApplied: z.object({…}) is the receipt schema, with no ids field.
  • packages/spec/src/contracts/seed-settlement.ts:110: seededRecordIds covers boot-time sources only.

The ruled design (option A of objectstack-ai/cloud#3598 comment 6650272370)

  1. applySeedBodies keeps the loader's landedIds per object and returns them on the receipt.
  2. seedApplied gains an optional per-object landed-ids field. Do it in both seedApplied schemas the dev named (protocol.zod.ts, both publish shapes), size-capped the way the cloud ledger caps seeded_record_ids. State the cap and what the receipt says when it truncates, rather than silently dropping ids.
  3. publishPackageDrafts and publishMetaItem both carry it.
  4. Additive and optional: existing callers keep working, and an absent field means "not reported".
  5. Accepted cost: row ids appear on the public POST /packages/:id/publish-drafts response, bounded by the cap.

Acceptance

  • A test publishes a seed draft and asserts the receipt lists exactly the ids the loader landed, per object.
  • An over-cap test asserts the declared truncation shape.
  • The protocol docblock names the field.
  • Clause-②: yes (widening), with the spec-lane contract review on record.

Dedupe (issues, open and closed, 2026-11-05), none carrying this:

Activity

  1. added
    bugSomething isn't working
    repo:cloudCard routed whole to the cloud PM: needs cloud code, a producer or a fact (cloud owns it to closure)
    on Nov 5, 2026
  2. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p1 · domain:spec · repo:cloud kept · 2026-11-05T07:58Z

    ⛔ Not a claim.

    • Read fresh. Executes cloud#3598 ruling A (「A 平台回执带行号」): the publish receipt's seedApplied carries the landed row ids that the seed loader computes, so cloud can tell which rows a publish wrote. It widens a published response schema, a protocol addition, so p1. domain:spec. repo:cloud#3 follows the card to close, as it says.

    Generated by Claude Code

  3. added
    domain:specDomain lane — seat card indexed by label:pm:seat
    enhancementNew feature or request
    pm:queueReady for the PM dispatch loop
    priority:p1High: required for production / M2
    on Nov 5, 2026
  4. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Claim: PM loop round 18 (p1)
    Session: session_01WGufzfgvGexKn9vLHsy89K
    Account: os-support-ai
    Branch: the card thread's own claude/project-thread-* branch, named in the dev's hand-back and restated in a later claim (a measured platform exception to claude/issue-30348-…)
    Worktree: objectstack-issue-30348
    Domain: domain:spec
    Seat: domain:spec#3
    File surface: packages/spec/src/api/protocol.zod.ts (every seedApplied schema and the protocol docblock), packages/metadata-protocol/src/protocol-publish-batch.ts (applySeedBodies) and the publish paths that return seedApplied, their tests, and the spec ledgers a response key moves. ⛔ Not the cloud half (cloud#3598) and not seed-settlement.ts.
    Container & model: M, mode:thread, model: TIER_DEFAULT, effort: high
    Clause-②: yes (widening: an optional, capped per-object landed-ids field on the published seedApplied receipt)
    Metadata-protocol: none (a response field, no authorable key; the dev confirms with check-changeset-no-major)
    Responsibility: the publish receipt's seedApplied reports only counts and drops the landed row ids the seed loader computes | cloud cannot tell which rows an AI build's seed landed on, so its "clear sample data" never finds them | every cloud workspace built by apply_blueprint; measured on a hosted kernel at 1a3ea0c0 (cloud#3598 report 6650239213)
    Thread-read: 6652847485
    Premise: holds. At origin/main, applySeedBodies (protocol-publish-batch.ts :126-128) returns success, inserted and updated only, while the loader's per-dataset result carries landedIds (seed-loader.zod.ts :431); seedApplied (protocol.zod.ts :1480) has no ids field.
    Human floor: the maintainer's ruling A on objectstack-ai/cloud#3598 (record 6651768430, 「A 平台回执带行号(推荐)」), design in cloud#3598 comment 6650272370.
    Serial constraints cleared: no open PR touches protocol.zod.ts or protocol-publish-batch.ts.

  5. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 5, 2026
  6. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Claim: PM loop round 18 (p1), restated with the branch
    Session: session_01WGufzfgvGexKn9vLHsy89K
    Account: os-support-ai
    Branch: claude/project-thread-5eqwnz (the card thread's harness-pinned branch, off main at 870ebce3; dev session session_01WGufzi6PCniByMTFP6RQ6P)
    Worktree: objectstack-issue-30348
    Domain: domain:spec
    Seat: domain:spec#3
    File surface: packages/spec/src/api/protocol.zod.ts (every seedApplied schema and the protocol docblock), packages/metadata-protocol/src/protocol-publish-batch.ts (applySeedBodies) and the publish paths that return seedApplied, their tests, and the spec ledgers a response key moves. ⛔ Not the cloud half (cloud#3598) and not seed-settlement.ts.
    Container & model: M, mode:thread, model: TIER_DEFAULT, effort: high
    Clause-②: yes (widening: an optional, capped per-object landed-ids field on the published seedApplied receipt)
    Metadata-protocol: none (a response field, no authorable key; the dev confirms with check-changeset-no-major)
    Responsibility: the publish receipt's seedApplied reports only counts and drops the landed row ids the seed loader computes | cloud cannot tell which rows an AI build's seed landed on, so its "clear sample data" never finds them | every cloud workspace built by apply_blueprint; measured on a hosted kernel at 1a3ea0c0 (cloud#3598 report 6650239213)
    Thread-read: 6653727324
    Premise: holds. At origin/main, applySeedBodies (protocol-publish-batch.ts :126-128) returns success, inserted and updated only, while the loader's per-dataset result carries landedIds (seed-loader.zod.ts :431); seedApplied (protocol.zod.ts :1480) has no ids field.
    Human floor: the maintainer's ruling A on objectstack-ai/cloud#3598 (record 6651768430, 「A 平台回执带行号(推荐)」), design in cloud#3598 comment 6650272370.
    Serial constraints cleared: no open PR touches protocol.zod.ts or protocol-publish-batch.ts.

  7. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Claim: PM loop round 18 (p1), restated with the widened file surface
    Session: session_01WGufzfgvGexKn9vLHsy89K
    Account: os-support-ai
    Branch: claude/project-thread-5eqwnz (the card thread's harness-pinned branch, off main at 870ebce3; dev session session_01WGufzi6PCniByMTFP6RQ6P)
    Worktree: objectstack-issue-30348
    Domain: domain:spec
    Seat: domain:spec#3
    File surface: packages/spec/src/api/protocol.zod.ts (every seedApplied schema and the protocol docblock), packages/metadata-protocol/src/protocol-publish-batch.ts (applySeedBodies) and the publish paths that return seedApplied, SeedLoadResultSchema (packages/spec/src/data/seed-loader.zod.ts, a new insertedIds) and the loader's insert-outcome recording (packages/metadata-protocol/src/seed-loader.ts), so the receipt can split rows this publish created from rows it only matched, their tests, and the spec ledgers both keys move. ⛔ Not the cloud half (cloud#3598) and not seed-settlement.ts.
    Container & model: M, mode:thread, model: TIER_DEFAULT, effort: high
    Clause-②: yes (widening: an optional, capped per-object landed field on the published seedApplied receipt, split into inserted and matched, and insertedIds on the seed loader's result)
    Metadata-protocol: added (SeedLoadResultSchema is on the authorable surface; the dev confirms with check-changeset-no-major)
    Responsibility: the publish receipt's seedApplied reports only counts and drops the landed row ids the seed loader computes | cloud cannot tell which rows an AI build's seed landed on, so its "clear sample data" never finds them | every cloud workspace built by apply_blueprint; measured on a hosted kernel at 1a3ea0c0 (cloud#3598 report 6650239213)
    Thread-read: 6653760009
    Premise: holds. At origin/main, applySeedBodies (protocol-publish-batch.ts :126-128) returns success, inserted and updated only, while the loader's per-dataset result carries landedIds (seed-loader.zod.ts :431); seedApplied (protocol.zod.ts :1480) has no ids field.
    Human floor: the maintainer's ruling A on objectstack-ai/cloud#3598 (record 6651768430, 「A 平台回执带行号(推荐)」), design in cloud#3598 comment 6650272370.
    Serial constraints cleared: no open PR touches protocol.zod.ts, protocol-publish-batch.ts, seed-loader.zod.ts or seed-loader.ts.
    Why widened: under ignore (the #30081 default) the loader counts a pre-existing row matched by natural key as landed. A single id list would let cloud's "clear sample data" delete a customer's own row, so the receipt reports inserted and matched separately (seat ruling on the dev's measurement).

  8. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzi6PCniByMTFP6RQ6P
    os-dev-report
    Stamp: 2026-11-05T10:51Z

    {
      "issue": 30348,
      "status": "done",
      "branch": "claude/project-thread-5eqwnz",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30427",
      "head": "c438aed4e",
      "session": "session_01WGufzi6PCniByMTFP6RQ6P",
      "premise_still_valid": true,
      "summary": "seedApplied gains optional `landed` on both publish responses through one shared SeedAppliedLandedSchema: per object, `inserted` (rows this publish created) and `matched` (pre-existing rows a seed key matched), each {ids, total, truncated} capped at SEED_APPLIED_LANDED_IDS_CAP = 200. The loader publishes SeedLoadResult.insertedIds (marked at the two insert sites) so the receipt can tell created rows from customer rows matched under `ignore`; applySeedBodies and the runtime fallback apply both fold through the exported seedAppliedLanded. Cap source: cloud unreadable from this session; 200 mirrors EXPLAIN_BATCH_MAX_RECORD_IDS and BULK_BATCH_SIZE, chosen with the seat. A thrown load reports no ids (landed absent).",
      "tests": "at c438aed4e: spec test 813/813 files, 25580 passed; spec, metadata-protocol, runtime typecheck exit 0 (after full turbo build 119/119). at 11b7c671: metadata-protocol 313 passed 4 skipped files, 22398 tests; objectql 551/551 files, 10975 tests; runtime 542/542 files, 8644 passed 19 skipped. New pins re-run at c438aed4e: objectql landed/counts/conformance 26 passed, seed-loader-landed-ids 14 passed. Ablation 1 (src): batched insert mark deleted, blob 4140f681fe20 to d5fc404362b8, seed-loader-landed-ids 3 failed of 14, restored to HEAD blob. Ablation 2 (dist): matched filter neutralised, blob 76e34e96d4fe to e694847b8e36, metadata-protocol rebuilt, preflight marker present in 2 built files, publish-seed-receipt-landed-ids 6 failed of 8; restored, rebuilt, --absent preflight green, 8 passed. A first attempt at ablation 2 was a no-op (tool refused, restored) and is discarded.",
      "gates": "dispatch-gates --commands at c438aed4e: 107 derived, 107 run, every exit 0; --ran reconciliation: 107 run, 0 NOT-MEASURED, exit 0. check-changeset-no-major with the PR body as event: exit 0 on Metadata-protocol added; control with none exits 1 (authorable baselines moved). First pass at 11b7c671 had check:liveness and check:generated red from main (query/searchFields citation, fixed by #30368, merged in). CI check-runs: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "2 — issue_read get and get_comments on #30348 (read-only); plus 1 non-GitHub add_repo read request for objectstack-ai/cloud, refused",
      "api_writes": "2 — relay pr_create (#30427, draft, no assignees, body read back byte-identical), this os-dev-report comment via post-stamped.mjs; git push x2 not REST",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · a load that throws reports counts but no ids, so landed is absent; cloud must read absent landed beside success false as rows may have landed, ids unknown · noted in PR Acceptance notes, not filed",
        "carrier: cloud · inserted is per publish: a row an earlier publish inserted is matched on a re-publish, so the ledger must accumulate inserted ids across publishes, and must never clear matched rows · stated in TSDoc and PR body",
        "class: a · reach: check:liveness at origin/main 870ebce3 · query/searchFields citation unanchored after #30341 · already fixed by #30368 (seat), not filed"
      ]
    }
    
  9. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Accepted: PR #30427, head 8dea3777. The ACCEPT is 6657420368; the contract review is 6656296448 (PASS), both on the PR. It lands through the merge queue. The thrown-load follow-up is #30429.

  10. added
    pm:blockingDerived cache from the Blocked-by reverse index: open card with open dependents — never hand-set
    on Nov 5, 2026
  11. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzfgvGexKn9vLHsy89K

    Landed: PR #30427 merged at a7b8876f. Both publish receipts' seedApplied now carry an optional landed: per object, inserted (rows this publish created) and matched (pre-existing rows a seed record's key matched), each { ids, total, truncated } capped at SEED_APPLIED_LANDED_IDS_CAP (200). SeedLoadResult carries insertedIds beside landedIds. Both publish doors and the runtime fallback fold the loader's ids through one projection, seedAppliedLanded. Only inserted names rows the seed created; cloud's "clear sample data" reads that list and accumulates it across publishes. The card closed by Fixes, and the seat removes pm:dispatched.

    Carried:

    Posted 2026-11-05T12:48Z.

  12. added a commit that references this issue on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:specDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:blockingDerived cache from the Blocked-by reverse index: open card with open dependents — never hand-setpriority:p1High: required for production / M2repo:cloudCard routed whole to the cloud PM: needs cloud code, a producer or a fact (cloud owns it to closure)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions