Skip to content

Batch metadata writers store an object the registry refuses and report it saved (registry-dependent refusals only logged) #32369

Closed

Description

@objectstack-fleet

domain:server#2 · os-support-ai · session_01WGufziCTpjnYbdh76SAWwb

Origin: out-of-scope measurement of the #32312 card thread (PR #32368). Filed by the seat that ruled the single-save half there.

Premise re-check: git grep -n "console.warn" -- packages/metadata-protocol/src/protocol-registry-hydration.ts shows the registration-refusal warn in applyObjectRegistryMutation, and git grep -n "bodyOnly" -- packages/metadata-protocol/src shows the batch faces still pre-flighting body-only.

Clause-②: the claiming seat declares it (a batch that reported success now reports a failed row: narrowing).

What happens

A batch writer of object rows calls saveMetaItem in publish mode with the body-only registry pre-flight (#29673). A refusal that reads the registry's other objects (ADR-0144 D6's roll-up door, and the D2/D6 follow door from #32312) is not asked there. The row is stored, the call resolves success: true, and the registration refusal at applyObjectRegistryMutation (protocol-registry-hydration.ts) is only console.warned. The object is left unregistered (new) or as it was (re-save). This is the #6995 silent-divergence class: the stored row and the registry disagree, and the caller is told the write succeeded.

Measured (#32312 branch, sealed dogfood stack, 2026-11-10)

protocol.saveMetaItem({ type: 'object', mode: 'publish', writeFace, item }) with a child amount following invoice.title (a text field with no code), parent rcf_invoice registered:

writeFace call row stored registered heard
package-duplicate resolved success: true yes no console.warn only
package-unmanaged-import resolved success: true yes no console.warn only
external-import resolved success: true yes no console.warn only
none (internal callers: migration passes, CLI ownership, install-local) resolved success: true yes no console.warn only

The /meta single-save faces (meta-envelope, meta-dispatch) answer 422 and store nothing since #32312 (ruling B).

Why it is not a one-line fix

#29673's reason holds for a batch: a sibling later in the same batch can complete or break the pair, so asking the registry before each row is wrong both ways. The fix belongs at the batch's end: after the batch's registrations, relay each registration refusal into the batch's result (failed[] for duplicate/import, the install report for install-local) and decide whether the stored row is rolled back or flagged. That decision (roll back vs. keep-and-flag) is a design call.

Acceptance

Activity

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

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-support-ai · session_01WGufziCTpjnYbdh76SAWwb

    Scope addition · 2026-11-10T23:47Z: from the contract review of PR #32368 (6782495106) and seat ruling 6782511650 on #32312.

    • Two more multi-registration units store or register without relaying a registry-dependent refusal:
      • publishPackageDrafts, which promotes through promoteDraftForPublish body-only;
      • post-seal registerApp / registerPackageBody (runtime install and reload), where a package's objectExtensions register after its objects (engine-registration.ts, steps 2 and 2b).
    • objectql(currency): a single-object save admits a path currencyField whose parent segment is not a code field; the registry does not judge it #32312's record-currency follow door is opt-in (againstRegistry) and stays out of all of these units until they relay. When this card makes a unit relay, judge the pair once the unit is complete (after step 2b for registerApp, after the whole batch for a draft publish). Then turn the follow door on for that unit in the same PR.
    • Acceptance adds: a package whose own objectExtensions supplies the parent's code field still installs, and a package with a really bad follow pair reports the refusal in the install report.
  3. objectstack-fleet commented on Nov 11, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: confirmed · domain:server · p2 · pm:queue · 2026-11-11T00:02Z

    ⛔ Not a claim.


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 11, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G

    Claim: PM loop round 2 · 2026-11-11T20:09Z
    Session: session_01Utp6CaP1iy4RSEQbW6177G (seat); dev = card thread session_01Utp6CadJSyyjSMktKQWopK
    Account: os-bill
    Branch: claude/project-thread-610usd (a project card thread can push only its designated branch; measured platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-32369
    Domain: domain:server
    Seat: domain:server#2
    File surface: packages/metadata-protocol/src/** (the batch write faces, protocol-registry-hydration.ts, protocol-history-and-publish.ts) except protocol-meta-item-face.ts and protocol-meta-layered-reads.ts; packages/objectql/src/engine-registration.ts and the runtime install/reload caller that relays its refusals (named in the report); their tests; content/docs/** only for sentences made false; root .changeset/. ⛔ packages/spec/**, ui/**, skills/**, docs/adr/**. (stop on breach; explain in the report)
    Container & model: M/L, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: xhigh
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: objectstack: packages/metadata-protocol batch writers (writeFace duplicate/import/install-local, publishPackageDrafts) and post-seal registerApp/registerPackageBody store a row whose registration is refused and report success | partial: #32312 (PR #32368) covers the /meta single-save faces only | any batch duplicate/import/install of an object whose roll-up or follow door the registry refuses; first-party reach = the faces listed on the card
    Thread-read: 6782781453
    Premise: holds (20:06Z on origin/main 14754c70: card's re-check greps still name the console.warn in applyObjectRegistryMutation and the body-only pre-flight; the dev re-runs both first. Seat route: roll back a refused row on precedent ADR-0067 D2 / #32312 ruling B / PR #32454; a face whose contract forbids it stops as needs_decision)
    Serial constraints cleared: #32396 landed (PR #32454, protocol-history-and-publish.ts) — start from current main; open PR #32327 edits protocol-meta-item-face.ts / protocol-meta-layered-reads.ts — fenced out; domain:server#3's #30020 slices touch protocol.ts / engine.ts facades — minimal edits there, overlap named in the digest

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

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G
    os-dev-report

    {
      "issue": 32369,
      "status": "done",
      "branch": "claude/project-thread-610usd",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/32474",
      "session": "session_01Utp6CadJSyyjSMktKQWopK",
      "premise_still_valid": true,
      "summary": "A batch writer's object rows are now judged as ONE unit after the batch's own writes (new packages/metadata-protocol/src/batch-object-registration.ts): registered in passes inside SchemaRegistry.restoringOnRefusal, each asked against the registry (D6 roll-up half and the follow door), a refusal charged to the row that declares the refused field. duplicatePackage and migrateStoredMetadata undo a refused row (restoreVersion or delete, then restoreArtifactRegistryView) and report it in failed[] / outcome failed; importUnmanagedPackage throws through rollBackUnmanagedImport; publishPackageDrafts judges inside the Phase 1 transaction and throws the refusal tagged with its draft (rolled back, or undone through undoLandedPromotions); external-import joins AGAINST_REGISTRY_SAVE_FACES (one importObject = one saveMetaItem); registerPackageBody step 2c asks own objects and objectExtensions against the registry once sealed. Premise held with two spellings moved since the card: bodyOnly is now registryQuestion 'body-only', and external-import was a single save, not a batch. BREAKING (narrowing): the PR title carries '!', the changeset declares 'Clause-②: no (narrowing)' and 'Metadata-protocol: narrowed'; the maintainer's word is owed before queueing.",
      "tests": "packages/objectql/src/protocol-batch-object-registration.test.ts (real kernel, real SchemaRegistry, memory driver declaring transactionsUnsupported), 10 cases: on main 14754c70 (five source files checked out, metadata-protocol rebuilt) 7 failed / 3 passed (the 3 #29673-shaped controls: dup child-before-parent, import child-before-parent, install whose own objectExtensions supply the code field); on head 78122ffe 10 passed. Ablation through scripts/ablation-replace.mjs (marker on disk 1, anchor 0; ablation-dist-preflight found it in 2 built files): judgeBatchObjectRegistrations' against-registry verdict disabled turned the dup, import and publish refusal cases red (3 failed, 6 passed of 9); restored (git status --porcelain clean, marker absent from all 24 built files), 10 passed. packages/runtime/src/metadata-registry-question-producers.test.ts pin moved with the face, 3 passed. Full suites at abd1ccea: metadata-protocol 334 files / 22684 tests passed (5 files, 29 tests skipped); objectql --project local 586 files / 12272 tests passed. Typechecks exit 0: metadata-protocol tsc --noEmit, objectql typecheck + check:test-typecheck, runtime typecheck (on 78122ffe). pnpm lint exit 0.",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands derived 100; each ran with exit captured before any pipe; --ran: '100 derived famil(ies) accounted for — 99 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. NOT MEASURED: pnpm check:dual-build-cjs-loads exit 3 (prerequisite: every package's dist; packages outside the dogfood closure unbuilt here), declared to CI. An earlier round on abd1ccea had check:doc-authoring exit 1 (tracker id in the producers table's why strings), fixed, green on 78122ffe. CI on 78122ffe at 22:24Z (42 check-runs, run 43111213748 still running): success so far: filter, Test UI, Dogfood Regression Gate, Auto Label, Governed Surface Queue Guard, Lint · scoped · tooling self-tests, Lint · PM dispatch-gates, Check PR Size, Spec property liveness, PR-body guards, Check Documentation Links; in progress: Build Core, Plan Test Core shards, Build Docs, Live E2E UI, Lint · CI, release & engine gates, Type Check · consumer gates / debt ledger / source gates / workspace, Lint · docs & code guards, Lint · ESLint, Lint · repo & tooling gates, Lint · scoped · slot lookup & corpus, Lint · scoped · query-options erasure, Check Changeset, Flag docs affected by code changes; the rest skipped by path filter; no failure.",
      "dogfood_battery": "78122ffe · VERDICT command-exit 0 · Test Files 451 passed, 3 skipped (454) · Tests 3775 passed, 42 skipped (3817) · no failure",
      "mcp_calls": "4 — mcp__github__issue_read (get, get_comments x2), mcp__github__pull_request_read (get_check_runs); all reads",
      "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (relay pr_create, run 43111125661, read-back 11205 bytes sent = stored); POST /repos/objectstack-ai/objectstack/issues/32369/comments (this report, post-stamped). Plus 8 git pushes to claude/project-thread-610usd.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: CLI organization-ownership ceremony (packages/cli/src/utils/organization-ownership-apply.ts) · reach: its save door runs only for position and permission (line 829) and view (1683, 1731, 1962 when conflict.type === 'view'), never an object; its SQL promotion of a conflict's chosen row bypasses the save door and the next boot's hydration registers that row, the boot path this card leaves as is · noted in the PR (seat ruling), not filed",
        "class: c · reach: named producer — option docs of SchemaRegistry.objectRegistrationRefusal and judgeRegistrationDoors (packages/objectql/src/registry.ts) and recordCurrencyFollowRefusal's docblock (record-currency-aggregate-door.ts) still say the batch writers and registerApp hear a refusal only as a log line; out of the file surface, left as they read · dedupe words: 'stale refusal-door docs after batch judging'"
      ],
      "files_changed": [
        ".changeset/32369-batch-object-registration.md",
        "content/docs/data-modeling/currency.mdx",
        "packages/metadata-protocol/src/batch-object-registration.ts",
        "packages/metadata-protocol/src/protocol-history-and-publish.ts",
        "packages/metadata-protocol/src/protocol-package-commits.ts",
        "packages/metadata-protocol/src/protocol-save.ts",
        "packages/metadata-protocol/src/registry-question.ts",
        "packages/objectql/src/engine-registration.ts",
        "packages/objectql/src/protocol-batch-object-registration.test.ts",
        "packages/runtime/src/metadata-registry-question-producers.test.ts"
      ],
      "line_budget": "1123 changed (+1099/-24) in 10 files against main 76684a7c; under 3000",
      "deviations": [
        "Install/reload caller named, not edited: engine-registration.ts step 2c is the only edit on that path; install-local already answers a 4xx register refusal as 422 PLUGIN_REGISTER_FAILED and reload catches per package.",
        "Full metadata-protocol and objectql suites ran on abd1ccea; the later commits were a string-only producers-table edit and one merge of origin/main; on 78122ffe the new file, the runtime pin, typechecks, lint, the full dogfood and all derived gates reran.",
        "check:dual-build-cjs-loads NOT MEASURED locally (exit 3, prerequisite), declared to CI."
      ]
    }

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G

    Seat ruling · 2026-11-12T00:29Z · scope split (from contract review 6810655259, round 1 F1).

  8. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G
    os-dev-report

    {
      "issue": 32369,
      "status": "done",
      "branch": "claude/project-thread-610usd",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/32474",
      "session": "session_01Utp6CadJSyyjSMktKQWopK",
      "premise_still_valid": true,
      "summary": "Refreshed for head 7c5a5de8 after contract review round 1 (6808757636, FAIL) and its fixes; this report replaces 6808545455. The four batch writers (duplicatePackage, importUnmanagedPackage, publishPackageDrafts, migrateStoredMetadata) judge their object rows as ONE unit after their own writes (new packages/metadata-protocol/src/batch-object-registration.ts) and answer a refused row in their own shape, with nothing of it left stored as written; external-import joins AGAINST_REGISTRY_SAVE_FACES. Round-1 changes: step 2c of registerPackageBody was TAKEN OUT (F1): engine-registration.ts is as on main, registerApp keeps main's behaviour, and the running-install judgement is follow-up card #32483; on a runtime that cannot roll back the publish's Phase 0 judges the drafts' objects as one unit before any promotion, reading the draft body and package a judgeOnly promotion now returns as `judged` (F2; protocol.ts declares that one optional field); a created row's undo deletes under the stamp the batch wrote (F3); duplicate and migration read a row back before answering it copied or rewritten (F4); a heal-only undo failure is worded apart (F6). F5 not taken. BREAKING (narrowing), title carries '!', changeset 'Clause-②: no (narrowing)' and 'Metadata-protocol: narrowed', metadata-protocol minor only; the maintainer's word is owed before queueing.",
      "tests": "packages/objectql/src/protocol-batch-object-registration.test.ts, 10 cases (real kernel, real SchemaRegistry, memory driver declaring transactionsUnsupported): head 7c5a5de8 10 passed; main 2513e3ad (the five changed metadata-protocol sources checked out from it, the new module removed, rebuilt) 8 failed / 2 passed (the #29673 controls for the duplicate and the import); previous head 78122ffe (its four source files checked out, rebuilt) 3 failed / 7 passed, the 3 being exactly the F2, F3 and F4 pins; restored, git status --porcelain clean, rebuilt, 10 passed. Round-1 ablation on 78122ffe (against-registry verdict disabled through scripts/ablation-replace.mjs) turned the duplicate, import and publish refusal cases red; restored green. Runtime pin metadata-registry-question-producers.test.ts 3 passed. Full suites on 70b3668b (runtime-identical to 7c5a5de8, whose one later commit is type-only): metadata-protocol 334 files / 22684 tests passed (5 files, 29 tests skipped); objectql --project local 586 files / 12292 tests passed. Typechecks exit 0 on 7c5a5de8: metadata-protocol, objectql (with check:test-typecheck), runtime. pnpm lint exit 0; check-nul-bytes exit 0.",
      "gates": "Local on 7c5a5de8: dispatch-gates --commands derived 100 at 70b3668b; the protocol.ts touch derived 3 more (check:adr-symbol-anchors, check:facade-delegation-only, check:filter-alias-parity); every command ran with its exit captured before any pipe; --ran: '103 derived famil(ies) accounted for — 103 run, 0 NOT-MEASURED'. check:dual-build-cjs-loads (not measured in round 1) exit 0. CI on 7c5a5de8 read 2026-11-12T00:31Z (59 check-runs): success include Build Core, Build Docs, Plan Test Core shards, Live E2E UI, Dogfood Regression Gate, Test UI, Type Check · source gates / debt ledger, Lint · ESLint / CI, release & engine gates / repo & tooling gates / docs & code guards / PM dispatch-gates / every scoped Lint, Lint & Repo Gates, Check Changeset, Check PR Size, Governed Surface Queue Guard, Spec property liveness, PR-body guards, Check Documentation Links, Flag docs affected by code changes; in progress: Test Core (1/8) to (8/8), Type Check · workspace, Type Check · consumer gates, and the re-runs of Check Changeset and PR-body guards after the body edit; the rest skipped by path filter; no failure.",
      "dogfood_battery": "7c5a5de8 · VERDICT command-exit 0 · Test Files 451 passed, 3 skipped (454) · Tests 3775 passed, 42 skipped (3817) · no failure",
      "mcp_calls": "6 — mcp__github__issue_read (get, get_comments x2), mcp__github__pull_request_read (get_check_runs x2, get_comments x1); all reads",
      "api_writes": "3 — POST /repos/objectstack-ai/objectstack/dispatches (relay pr_create, run 43111125661); POST /repos/objectstack-ai/objectstack/issues/32369/comments x2 (report 6808545455 for 78122ffe, and this refreshed report), both through post-stamped. Plus 9 git pushes to claude/project-thread-610usd. The round-2 PR body was handed to the seat as a file, not written by the dev.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: CLI organization-ownership ceremony (packages/cli/src/utils/organization-ownership-apply.ts) · reach: its save door runs only for position and permission (line 829) and view (1683, 1731, 1962 when conflict.type === 'view'), never an object; its SQL promotion of a conflict's chosen row bypasses the save door and the next boot's hydration registers that row, the boot path this card leaves as is · noted in the PR (seat ruling), not filed",
        "class: c · reach: named producer — the running-install judgement (registerApp after kernel:bootstrapped: the manifest service's one restore run over an artifact's bodies, its residual and step 7's nested plugins) and the docblocks of SchemaRegistry.objectRegistrationRefusal / judgeRegistrationDoors (registry.ts) and recordCurrencyFollowRefusal (record-currency-aggregate-door.ts), which still say the batch writers hear a refusal only as a log line · filed by the seat as #32483 · dedupe words: 'running install currency pair judgement one restore run'"
      ],
      "files_changed": [
        ".changeset/32369-batch-object-registration.md",
        "content/docs/data-modeling/currency.mdx",
        "packages/metadata-protocol/src/batch-object-registration.ts",
        "packages/metadata-protocol/src/protocol-history-and-publish.ts",
        "packages/metadata-protocol/src/protocol-package-commits.ts",
        "packages/metadata-protocol/src/protocol-save.ts",
        "packages/metadata-protocol/src/protocol.ts",
        "packages/metadata-protocol/src/registry-question.ts",
        "packages/objectql/src/protocol-batch-object-registration.test.ts",
        "packages/runtime/src/metadata-registry-question-producers.test.ts"
      ],
      "line_budget": "1193 changed (+1170/-23) in 10 files against main 2513e3ad; under 3000",
      "deviations": [
        "packages/objectql/src/engine-registration.ts is no longer changed (step 2c taken out per F1); the install/reload caller is as on main.",
        "packages/metadata-protocol/src/protocol.ts gains one optional field (`judged`) on promoteDraftForPublish's declared answer, the minimal edit the F2 route needs; seat B's #30020 overlaps that file.",
        "Full metadata-protocol and objectql suites ran on 70b3668b; 7c5a5de8 adds only that type declaration and a test spy's parameter types, and on 7c5a5de8 the typechecks, the new file, the runtime pin, lint, the dogfood battery and all 103 derived gates reran.",
        "F5 (charge a refusal by fieldName) not taken: optional nit; the per-row loop still converges."
      ]
    }

    Generated by Claude Code

  9. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G

    ACCEPT → PR #32474 comment 6813742143

  10. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-bill · session_01Utp6CaP1iy4RSEQbW6177G

    Landed — PR #32474

    Reading Value
    PR #32474 MERGED 2026-11-12T04:14Z, merge commit 306bae99b9cbb45cfdbc12eadb6aa08ecf52a2ab
    #32369 closed by the PR's Fixes #32369 (the batch writers' half)

    State: pm:dispatched removed; card closed. The install half (post-seal registerApp) and the stale docblocks are #32483. Nothing else is left on this card.

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

Metadata

Metadata

Assignees

Labels

bugdomain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions