Files
buzz/docs
Logan Johnson 49d49bf0b8 fix(nip-ar): keep sync IDs, scope and retirement exact
Four gaps from review, each a way for a sync's copy to differ from the
current-state query without a resync:

- A live REQ that reused a sync's subscription ID left the sync in the
  divert map, so the new subscription silently lost its events. The live
  claim now stops that sync.
- A refused sync REQ (bad filter, scope, auth) sent CLOSED but left an
  older subscription with the same ID running. Every refusal now retires
  the old holder under the lifecycle lock before CLOSED.
- Live heads were checked only against d/type, so a #status=open sync got
  a new #status=done artifact. The sync now tracks the d of each artifact
  in the client's copy, sends a head that matches every predicate, sends a
  non-matching head (or deletion) only for an artifact the client holds,
  and drops it from the copy. The head read now returns its deletion flag.
- An admin direct or report-resolution delete soft-deleted a 45010 head
  with no live signal. Admin deletes now refuse artifact revisions, like
  kind 5 does; op=delete and kind 9005 remain, and syncs observe both.

NIP-AR rules 3 and 6 state the "before" set and the retirement rule.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
2026-10-26 15:56:22 -04:00
..
2026-07-21 17:16:23 +00:00