You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while implementing #13331 (the metadata.mutated cluster fan-out). Out of that card's ruled scope — recorded, not fixed there.
Measurement (worktree at e460193, tree identical to origin/main for these seams)
packages/metadata-protocol/src/protocol.ts has FIVE applyRegistryWriteThrough call sites (traced in protocol.object-registry-write-through-spelling.test.ts) but only THREE emitMetadataMutation sites:
saveMetaItem — write-through + emit
runPublishSideEffects — write-through + emit
deleteMetaItem — heal + emit
rollbackMetaItem — write-through, no emit
revertCommit — write-through (per item), no emit
So a rollback or a commit revert is "a live write like any other" for the LOCAL registry (both call sites say so in their own comments), but the post-persistence notification bus documented as "the ONE choke point every authoring surface funnels through" never hears it.
One edit at each recovery door: emit the mutation event (state active) after the write-through, with the same org scope the write-through received. That single seam repairs both halves at once — the local listener bus and the cluster fan-out inherit together, which is exactly the argument the choke-point docblock makes.
Found while implementing #13331 (the metadata.mutated cluster fan-out). Out of that card's ruled scope — recorded, not fixed there.
Measurement (worktree at e460193, tree identical to origin/main for these seams)
packages/metadata-protocol/src/protocol.tshas FIVEapplyRegistryWriteThroughcall sites (traced inprotocol.object-registry-write-through-spelling.test.ts) but only THREEemitMetadataMutationsites:saveMetaItem— write-through + emitrunPublishSideEffects— write-through + emitdeleteMetaItem— heal + emitrollbackMetaItem— write-through, no emitrevertCommit— write-through (per item), no emitSo a rollback or a commit revert is "a live write like any other" for the LOCAL registry (both call sites say so in their own comments), but the post-persistence notification bus documented as "the ONE choke point every authoring surface funnels through" never hears it.
Consequence, both halves
onMetadataMutation—ObjectQLPlugin's authored hook/action re-bind (Authored (Studio) hooks never execute their body — no bodyRunner on the metadata-service bind path #2588/Tracking: Studio-authored metadata that's declared but never wired at runtime (the 'silently does nothing' family) #2605), ADR-0094 projectors are separate — do not re-sync after a rollback/revert. Rolling back ahookrow leaves the OLD hook bound until restart, while the registry and the stored row already serve the restored body.metadata.mutatedpublisher ridesemitMetadataMutation, so recovery writes will not fan out to peer replicas either — a rollback converges the writer and leaves peers on the rolled-back-FROM body until an unrelated mutation or restart.Suggested shape
One edit at each recovery door: emit the mutation event (state
active) after the write-through, with the same org scope the write-through received. That single seam repairs both halves at once — the local listener bus and the cluster fan-out inherit together, which is exactly the argument the choke-point docblock makes.Blocked-by: #13331
Dedup: REST open-issues sweep (443 open issues, 5 pages, positive control
attachClusterPubSubhit 3) — no card names these two seams' missing emit.Generated by Claude Code