Re-propagation fired on every receipt, so a duplicate diff spawned a fresh
round of sends with only sender-exclusion as a guard — no termination
condition in a dense holder cluster, which is exactly what hot open-slot
posts (registry, greeting-enabled bios) produce.
Now: every storage apply reports whether it actually changed state, and
apply_diff_ops returns only the ops that did. Nothing changed means no
header rebuild and no outbound push at all; a mixed diff re-propagates a
freshly built payload of only its novel ops rather than echoing what
arrived. Gating is on state change, not message identity — a hash seen-set
would break once coalescing lands, since no two pushes stay identical.
Tombstones count as changes even when their target is absent, so a delete
arriving before its comment still propagates.
Found while implementing: AddCommentSlots appended unconditionally, so a
re-delivered op grew the header forever AND looked novel forever —
unbounded amplification on precisely the clusters this gate targets. Now
idempotent on slot bytes.
Review found a remotely-triggerable blocker in the first cut: absent-target
tombstone placeholders were written with no expiry, and DeleteComment is
authorized per-op rather than per-cardinality, so one keypair could mint
unlimited valid deletes against any post a victim holds — permanent rows,
relayed onward, and served in the rebuilt header. The registry post is
universally held, making it network-wide unbounded growth. Fixed three
ways: a 64-per-post placeholder cap, a bounded expiry so the existing
sweep reclaims them, and exclusion from everything published (headers and
the uniques announce).
Also: RemoveReaction deliberately does NOT mirror the placeholder — it
carries no timestamp and is unsigned, so a guessed-timestamp placeholder
loses to a late AddReaction and the row key would be a free unbounded
write vector. Rationale documented on the arm; signed RemoveReaction
carrying the reaction timestamp is the named follow-up.
set_greetings_max/get_greetings_max exposed as Tauri commands and wired
next to the Accept-greetings consent control, clamped at the single read
point every writer funnels through.
267 core tests (was 250); a3 12/12; c_topology 33/33.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGiPD2cF75mnvneSCjdDC5