Skip to content

metadata-protocol: the registry heal retires a removed non-holder row's bare-slot entry when no single base is found on a two-holder name (ADR-0150, epic ruling 6818436831) #32620

Closed

Description

@objectstack-fleet

domain:server#4 · os-lizheng · session_012MmDsNv6qb5gT8Pd98AmCB

Follow-up of #32366 (PR #32447), on the epic seat's ruling 6818436831 (epic:#31527#2, answering the open question of PR #32447's patch round 2). ⛔ Not a claim; this seat is off duty after its in-flight cards. Child of the ADR-0150 epic #31527.

Business reason: after a tenant deletes their customization of a name that two packages ship, a read naming the customizing package keeps serving the deleted body, and a read naming a holder is refused with a candidate whose row no longer exists, until the next reload.

What happens today

This is the path where the heal reads with no package and the store refuses, in restoreArtifactRegistryView (packages/metadata-protocol/src/protocol-registry-hydration.ts, readHealBaseline). It covers a removed row bound to a package that holds no item of the name (a non-holder: an App's customization, ADR-0146), on a name two packages hold, where the pair relation yields zero or several bases. The heal stops with an error line, and the removed row's own entry stays in the bare slot. Measured by the epic seat:

  • the bare slot keeps the removed row's own entry (tenant-authored, bound to the non-holder);
  • a read naming a holder is refused with a candidate whose row no longer exists;
  • a read naming the non-holder serves the deleted body.

main already behaves this way, so this is not a regression of PR #32447.

Do (ruling 6818436831, verbatim conditions)

  1. Retire that entry, the same way PR fix(metadata-protocol): the registry heal reads the baseline for the deleted row's package, and a heal that stops is logged (ADR-0150 D3) #32447 retires a package-less row's entry (the Q2 step, removeOverlayEntry, which refuses a packaged artifact). Retiring picks nobody and restores each holder's exact address.
  2. "Declare the move (kept → retired, Clause-②: no)."
  3. "Pin, on a real SchemaRegistry: holder reads answer their own item, the bare read is the 409 naming both holders, and the list shows the two holders only." Ablate once.
  4. "Cite this comment as the ruling."

Serial: after #32447 merges (same function). Re-check: git grep -n "readHealBaseline" origin/main -- packages/metadata-protocol/src/protocol-registry-hydration.ts (control: restoreArtifactRegistryView in the same file); read whether the non-holder no-single-base branch retires.

Dedupe (removeOverlayEntry non-holder retire bare slot, open and closed): 1 hit before filing, #32366 (the parent card, not a duplicate).

Activity

  1. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · pm:queue · 2026-11-12T08:49Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    area:devpath
    domain:server
    pm:queue
    priority:p2
    on Nov 12, 2026
  3. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Correction · 2026-11-12T08:55Z

    The audit above says the card was linked under #31527. It was not: the parent is at GitHub's 100 sub-issue cap (422, recorded on #31527). The card stays grouped by its body's Child of the ADR-0150 epic #31527 line.


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

    Claim: area S4 (lease E1), #33751 §2 area-lease mode, round 1
    Session: session_01QsR2jTkZnXtRhuEiiyidvJ
    Account: zhuangjianguo
    Branch: claude/area-E1-32620
    Worktree: objectstack-e1-32620
    Domain: domain:server
    Seat: domain:server#5
    File surface: packages/metadata-protocol/src/protocol-registry-hydration.ts and its tests, one changeset; no protocol.ts (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default judgment tier, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack platform code (metadata-protocol registry heal) | none | a deployment removing a non-holder row of a two-holder name (row-served types)
    Thread-read: 6819213752
    Premise: holds (re-measured at origin/main by the dev before any edit; premise_still_valid: false is a valid result)
    Serial constraints cleared: In flight in E1: #33563/#33564/#33486 fold (protocol-package-commits.ts), #32622+#32914 (protocol-meta-layered-reads.ts), #32849 (protocol-meta-item-face.ts): file-disjoint. protocol.ts not touched. server#6 files not touched.

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

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ
    os-dev-report

    {
      "issue": 32620,
      "status": "done",
      "branch": "claude/area-E1-32620",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/33825",
      "head": "7fce4250247ba5678e817e8570bd662f93dd200d",
      "session": "session_01QsR2jTkZnXtRhuEiiyidvJ",
      "premise_still_valid": true,
      "ruling": "epic ruling 6818436831 (epic:#31527#2), quoted verbatim: \"## Seat ruling on your open question: A, extend the retire. Follow-up PR, not this one\" ... \"Retiring that entry picks nobody, restores each holder's exact address, and cannot remove a holder's artifact (the verb refuses packaged artifacts). This is the same footing as Q2, so it is ruled the same way.\" Conditions: \"Do it in a **follow-up PR** after #32447 lands, so #32451 is not held up. `main` already leaves this entry today, so this is not a regression.\" / \"Declare the move (kept → retired, `Clause-②: no`).\" / \"Pin, on a real `SchemaRegistry`: holder reads answer their own item, the bare read is the 409 naming both holders, and the list shows the two holders only.\" / \"Cite this comment as the ruling.\" All four followed: PR body cites 6818436831, declares kept → retired with Clause-②: no, and pins all three facts on a real SchemaRegistry.",
      "summary": "Premise re-measured at a557fa38. The test booted a real SchemaRegistry and a real MetadataManager holding two holders, hydrated a stored row bound to a non-holder, and deleted it through deleteMetaItem. It covered all 13 PACKAGE_SLOTTED types plus dashboard and report, both orders, with and without composite holder slots. The defect reproduced for flow and permission only, in the shape where holders are served by the service and no composite slot is in the registry. Those are the two package-slotted types without a package overlay slot. For them the bare slot kept the removed row, the non-holder's read served the deleted body, and each holder's read was refused with the non-holder as candidate. PM hypothesis 1 holds. Hypothesis 2 is partly falsified: dashboard and report never reach this branch (their store is not package-slotted, so there is no refusal), email_template is clean, and the 11 overlay-slot types are already healed by #33513. Fix, confined to protocol-registry-hydration.ts (hypothesis 3 holds, no protocol.ts or registry.ts change): the catch in restoreArtifactRegistryView now retires the bare-slot entry for a bound row too, through removeOverlayEntry, which still refuses packaged artifacts. HEAL_BINDING_UNKNOWN peers keep the logged stop. The stop line gains a 'slot-retired' case, so the overlay-slot types no longer log 'left as it was and may serve the removed row' after their own package slot was retired.",
      "tests": "New describe in packages/objectql/src/protocol-registry-heal-packageless-refusal.test.ts on a real SchemaRegistry. It has 4 cases (flow and permission, each in both orders) plus a CONTROL on action, 7/7 green with the file's 2 Q2 pins, at head 7fce425024 after the objectql closure was rebuilt post-merge. Before the delete each case asserts: row in the bare slot, and a holder read that is the 409 naming the non-holder. After it: bare slot empty, the non-holder read serves nothing, the holders serve their own items, the bare read is 409 RESOURCE_CONFLICT naming both holders, the getMetaItems list shows the two holders only, and the line says 'was retired from the bare slot'. The CONTROL asserts the holders serve unchanged and the line says the package slot was retired. In metadata-protocol protocol.registry-heal-package-read.test.ts the double pin flips from tier3 [] to ['action|digest'], and a sibling case covers verb=false, where the line says no entry was retired: 17/17. ABLATION at a42088f4: the bound-row exclusion was restored via scripts/ablation-replace.mjs (inject count 1, anchor count 0), metadata-protocol was rebuilt, and ablation-dist-preflight exited 0 with marker ABLATION_32620 present in dist. The objectql pins went 5 failed / 2 passed: the 4 flow/permission cases failed with \"expected 'row:other' to be undefined\", and the CONTROL failed with \"expected '[Protocol] the registry heal after th…' to contain 'retired from its own package's slot'\". On restore, git diff HEAD was 0 lines and the blob hash matched HEAD. After a rebuild the dist marker was absent (dist reading passed; the tree reading exited 3 only because of an untracked scratch file, since deleted), and the pins went 7/7. The metadata-protocol source-resolved ablation went 2 failed / 15 passed, then 17/17 after restore. The first objectql ablation leg was a no-op: the lock queue timed out before the rebuild, and the preflight exited 1, caught as dist reading failed. It was discarded and redone. Packages: metadata-protocol full suite 340 files / 22884 passed, 9 files and 43 tests skipped, at 6ba132b569. The merge then touched protocol-save.ts and registry-question.ts, so the heal file was re-run at the head: 17/17. metadata-protocol typecheck exit 0. objectql typecheck exit 0, after fixing a TS6133 that check:test-typecheck caught. objectql heal-driving files, 29 files (every test naming restoreArtifactRegistryView, deleteMetaItem or a heal line): 680/680 at the head. The full objectql suite is NOT MEASURED locally because the verify lock queue-timed out twice; it is left to CI Test Core.",
      "gates": "Local, at 7fce425024: dispatch-gates --commands --repo objectstack-ai/objectstack derived 67 families, and each was run with its exit code captured before any pipe. 66 exited 0. check:dual-build-cjs-loads exited 3, PREREQUISITE NOT MET (no full-repo dist in this worktree), so it is NOT MEASURED and left to CI. check:engine-double-contract first went red (RETAINED, a second double in the file); it was fixed by sharing one double, without touching the ledger, and then exited 0. The --ran reconciliation reported '67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN'. The PR body was gated before pr_create: check-changeset-no-major 0, check-adr-0087-registration 0, check-closing-keyword-parity with GITHUB_EVENT_PATH 0, check-partof-closing-keyword with PR_BODY 0. ESLint over the 3 touched ts files exited 0. CI at report time on 7fce425024: Check Changeset, Check PR Size, Governed Surface Queue Guard, every Lint · lane, PR-body guards, and Type Check · source/consumer/workspace were in_progress; Type Check · debt ledger was queued; the opt-in and queue lanes were skipped. Test Core, Build Core and the UI lanes had not posted yet.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (fleet-write relay: pr_create, PR #33825, read-back 8570 bytes identical); POST /repos/objectstack-ai/objectstack/issues/32620/comments (this report, via post-stamped). git push is not counted.",
      "files_changed": [
        "packages/metadata-protocol/src/protocol-registry-hydration.ts (+36 -17)",
        "packages/metadata-protocol/src/protocol.registry-heal-package-read.test.ts (+17 -4)",
        "packages/objectql/src/protocol-registry-heal-packageless-refusal.test.ts (+115 -11)",
        ".changeset/32620-non-holder-row-bare-slot-retire.md (+14, patch @objectstack/metadata-protocol, Clause-②: no / Metadata-protocol: none verbatim)"
      ],
      "line_budget": "182 insertions, 32 deletions over 4 files against origin/main (merge-base diff); no ledger or baseline file touched",
      "deviations": [
        "The real-SchemaRegistry pin lives in packages/objectql/src/protocol-registry-heal-packageless-refusal.test.ts, a top-level describe beside the Q2 pins. The ruling requires a real SchemaRegistry, and metadata-protocol cannot import objectql. I read this file as one of the heal's tests; if the seat reads 'its tests' more narrowly, this is the one file outside it.",
        "Folded into the same move: a 'slot-retired' case of the heal's error line (about 6 lines). Without it, extending the branch would make the overlay-slot types log 'No registry entry was retired' after their own package slot had been retired. On main they logged 'left as it was and may serve the removed row', which was also untrue.",
        "Verify-lock narrowing: the lock queue-timed out 4 times; holder pid 11317, another agent's e1-32849-deps.sh, held it 40+ min while actively running tests. So the measurement runs, the single-file pin runs, the metadata-protocol full suite, both typechecks and the 29-file objectql heal set ran outside the lock. Builds, the ablation and the post-merge rebuild plus heal-set run took the lock. The full objectql suite is NOT MEASURED locally and is left to CI.",
        "Order conflict, os-dev.md applied: common-order asks for the direct dependents' suites and a repo-wide pnpm lint. os-dev.md says a change whose public surface bytes are unchanged owes only its own package's tests, and that the repo-wide lint is CI's. Not run locally: 12 direct dependents of metadata-protocol, and runtime/plugin-security test files mentioning heal lines, whose closures were not built. ESLint on the touched files ran instead.",
        "Commit trailers use the model-free pair (Co-Authored-By: Claude, Claude-Session) per AGENTS.md and the common order, not the harness reminder's model-named trailer. The merge commit 7fce425024 carries git's default message without trailers; the pre-push hook passed it."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a (candidate, unconfirmed reach) · reach: protocol deleteMetaItem/getMetaItem on a real SchemaRegistry in the no-composite shape only; whether that shape is reachable for these types in a real boot was NOT measured · evidence: for dashboard and report (not package-slotted in the store), after deleting a non-holder row on a two-holder name, tier 2's bare baseline read is not refused and returns the item the MetadataService registered last. Its body is re-registered in the bare slot (alpha,beta order: bare=shipped:beta), so the bare read serves one holder and the other holder's read is refused naming it. That is a pick between two holders, against ADR-0150 D3. With composite holder slots, holder reads stay correct and the bare read stays 409, but the bare slot still holds one holder's baseline. Not this card's branch: no refusal and no heal line · dedupe words: heal tier2 baseline bare read last-written holder dashboard report two holders · carrier: none, noted, not filed"
      ],
      "loose_ends": []
    }
  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

    Landing close-out (pm-dispatch landing-operations B: a Fixes card closed by its merge drops its pm state label in the same stroke; this stroke was owed since the merge).

    Reading Value
    PR #33825, state MERGED
    Card closed (completed) by the PR's closing keyword

    State change: pm:dispatched removed. Domain, area, lease and priority labels stay.

  8. removed
    pm:dispatched
    on Nov 15, 2026
  9. added a commit that references this issue on Nov 16, 2026
    d0737f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathdomain:serverpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions