Repository navigation
fix(metadata-protocol): the registry heal retires a removed non-holder row's bare-slot entry when the pair relation names no single base (ADR-0150 D5) - #33825
Conversation
…r row's bare-slot entry when the pair relation names no single base Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…chemaRegistry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
📓 Docs Drift Check3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 08ae2c1ecae5570b290094ca5cda7e8fd8c5b26c && git checkout 08ae2c1ecae5570b290094ca5cda7e8fd8c5b26c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1e65a389e12e7c07e2121378d1d0755226c2ad60 7fce4250247ba5678e817e8570bd662f93dd200d && git checkout -B drift-repro 1e65a389e12e7c07e2121378d1d0755226c2ad60 && git merge --no-ff 7fce4250247ba5678e817e8570bd662f93dd200d
node scripts/docs-audit/affected-docs.mjs --json 1e65a389e12e7c07e2121378d1d0755226c2ad60 |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ Request: review · PR #33825 · area S4 (E1) · Fixes #32620 · head 7fce425 Clause-② no · Metadata-protocol none · patch changeset. Ruling 6818436831. Report on #32620 (comment 6893828566). Reviewer: review-b. Please check the two named deviations: the real-SchemaRegistry pin sits in an objectql test file outside the claimed surface, and the direct-dependent suites were left to CI. |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6 Review claim · head 7fce425 · 2026-11-15T11:48Z review (review-b, areas S2+S4). Verdict follows on this PR. |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6 Review — PASSHead-sha: review (review-b, areas S2+S4) · 2026-11-15T11:50Z I read the full diff at this head against GitHub: 4 files, +182/−32. I also read card #32620, the epic ruling 6818436831, report 6893828566 and Ruling conditions (6818436831)
Deviations judged
Flipped pin
For the seat (not this PR)The report's out-of-scope finding, class a, is a candidate with unmeasured reach. For Check-runs at this head (read at review time)
Author. |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ 席位核对ACCEPT · area S4 (E1) · Head-sha:
Landing under the area authorising line: ready + auto-merge. |
Requested by Steedos · project thread
Fixes #32620
Clause-②: no
Metadata-protocol: none
维护者速读
packages/metadata-protocol/src/protocol-registry-hydration.ts中restoreArtifactRegistryView的 catch 分支(条件去掉boundPackageOf(packageId) !== undefined),再看packages/objectql/src/protocol-registry-heal-packageless-refusal.test.ts新增的 describe。pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/protocol-registry-heal-packageless-refusal.test.ts,预期 7 个用例全绿。What changes
Ruling: epic seat ruling 6818436831 (
epic:#31527#2), seat ruling A, "extend the retire", on the same footing as seat ruling 6812637203 Q2.A stored row bound to a non-holder (an installed package holding no item of the name, ADR-0146) on a name two packages hold, where the pair relation names zero or several bases: after its delete, the heal's baseline read is refused and the walk stops with an
errorline. Onmainthe removed row's bare-slot entry was then kept. It is now retired withremoveOverlayEntry, the verb the package-less case (Q2) already uses, which refuses a packaged artifact. No holder is picked and no baseline is registered. Declared move: entry kept → retired,Clause-②: no.restoreArtifactRegistryView's catch: the retire no longer requires a package-less row. A package-scoped refusal is the only refusalreadHealBaselinelets through for a bound row, and it reaches it only after the row's own package answered a settled miss, so the row is a non-holder's. A peer that does not know the binding (HEAL_BINDING_UNKNOWN) keeps the logged stop, as before.registryHealStoppedMessagegains one case,slot-retired. For the package-slotted types whose bound row lives in its own package slot (metadata-protocol: after a restart, two stored rows of one name that each name a different holder leave only the last one loaded, for every package-slotted type (tool, webhook, …) #33127), that slot is already retired above the catch, and the bare slot holds nothing to remove. The line said "the registry entry is left as it was and may serve the removed row". It now says the row's own package slot was retired.protocol.ts, the objectql registry, or any spec surface.Which types reproduced at
a557fa38(the premise, measured)The measurement booted a real
SchemaRegistrywith a realMetadataManagerholding two holders' items, hydrated one stored row bound to a non-holder, and then deleted it throughdeleteMetaItemnaming that package. It covered everyPACKAGE_SLOTTED_METADATA_TYPESmember plusdashboardandreport, in both registration orders, with and without composite holder slots in the registry.flow,permission, with holders served by the service and no composite slot in the registry. Before the delete, the bare slot heldrow:other. After it, the bare slot still heldrow:other, the read naming the non-holder servedrow:other, and each holder's read was refused with the non-holder as its only candidate. These are exactly the card's three bullets. These two types are the package-slotted types excluded fromtakesPackageOverlaySlot, so their bound row sits in the bare slot.api,agent,skill,action,email_template,picklist,mapping,dataset,webhook,tool,connector. fix(objectql,metadata-protocol)!: a stored row bound to a package lives in that package's own registry slot, so each address serves its own row in every order (ADR-0150 D3/D4) #33513 already retires the bound row's own package slot, and the bare slot is empty. For these types only the line changes.NOT_OVERRIDABLE).dashboardandreportnever reach this branch, because their store is not package-slotted and the bare read is not refused (no heal line).email_templateis clean. See Acceptance notes for whatdashboardandreportdo instead.Tests
packages/objectql/src/protocol-registry-heal-packageless-refusal.test.ts: a new top-level describe on a realSchemaRegistry, sharing the file's one engine double. It coversflowandpermission, each in both registration orders. Before the delete: the row is in the bare slot, and a holder's read is the 409 naming the non-holder. After it: the bare slot is empty, the non-holder's read serves nothing, each holder's read answers its own item, the bare read is the 409 naming both holders, the list shows the two holders only, and the line says the entry was retired. CONTROLaction: the holders serve exactly as before, and the line says the row's own package slot was retired.packages/metadata-protocol/src/protocol.registry-heal-package-read.test.ts: the recording-double pin "a row of a package that pairs no holder, on a name two packages hold" flips fromtier3: []totier3: ['action|digest'](the declared move). A sibling case covers the verb answeringfalse, where the line says no entry was retired.Ablation, once: the fix was committed first, then the bound-row exclusion was put back through
scripts/ablation-replace.mjs, with a marker that must reachdist/.@objectstack/metadata-protocolthroughdist/, so the mutated package was rebuilt andablation-dist-preflightpassed (exit 0) before the run. The mutated run had 5 failed, 2 passed (7): all four flow/permission cases failed withexpected 'row:other' to be undefined, and the CONTROL failed withexpected '[Protocol] the registry heal after th…' to contain 'retired from its own package's slot'. After the restore,git diff HEADwas empty, the blob hash matched HEAD, the package was rebuilt, and the dist marker was absent. The restored run was 7 passed.Acceptance notes
dashboardandreport(not package-slotted in the store), measured only in the no-composite shape. After a non-holder row's delete, tier 2's bare baseline read returns one holder's item, the one the service registered last, so the bare slot then serves that holder and the other holder's read is refused naming it. This branch is not this card's (no refusal, no heal line), and whether the no-composite shape is reachable for those types in a real boot was not measured. It is recorded for the seat, not filed.Verification
Readings at head
7fce425024(origin/main merged in), unless stated:@objectstack/metadata-protocol: the whole suite passed, 340 files / 22884 tests, 9 files and 43 tests skipped, read at6ba132b569. The merge then changedprotocol-save.tsandregistry-question.ts, so the heal file was re-run at the head: 17/17.typecheckexit 0.@objectstack/objectql:typecheckexit 0. The objectql closure was rebuilt after the merge, then the 29 test files that drive the delete heal (restoreArtifactRegistryView,deleteMetaItem, or a heal line) were run: 680/680 passed. The full objectql suite was NOT MEASURED locally, because the shared verify lock queue-timed out twice. That run is left to CI'sTest Core.dispatch-gates --commands, 67 families): 66 exited 0.check:dual-build-cjs-loadsexited 3 with PREREQUISITE NOT MET (no full-repodist/in this worktree), so it is NOT MEASURED and left to CI.--ranreconciliation: 67 derived, 67 run, 0 unrun.check-closing-keyword-parityandcheck-partof-closing-keywordexited 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ