---
name: gen-zero-bypasses-the-controller-ladder
description: "A gen=0 subscribe is EXEMPT from the broker's generation ladder — not lowest on it — and the exemption grants unconditional silent re-take."
metadata: 
  node_type: memory
  type: reference
  originSessionId: 97bd4780-202d-4522-9abc-8ac75f327f07
  modified: 2026-08-05T02:22:20.253Z
---

**Measured 2026-08-04 (hertz), source read at `862db9a` (ancestor of origin/main),
`broker.rs::resolve_subscribe_inner_gated`, `same_identity` arm.**

The generation ladder special-cases 0 **twice, deliberately**:

```rust
if gen != 0 && incumbent_gen == gen && incumbent_conn == Some(sub.id())
    && incumbent_from == from_seq { return (Controller, "idempotent"); }
if gen == 0 || incumbent_gen == 0 || gen == incumbent_gen {
    self.become_controller(sub, by, from_seq, gen);
    return (Controller, "controller");
}
if gen < incumbent_gen { return (BusyControlled{..}, "busy"); }
```

The ladder's own doc: *"0 on either side → local / N-1 legacy re-take, preserved."*

**The intuition to kill:** a permanently-0 generation looks like a seat that is *oldest on the
ordering axis*, therefore weak — refusable, supersedable. **Wrong, and wrong in the seizing
direction.** `gen != 0` guards the idempotent leaf so a gen=0 request can never be classified
`idempotent`; `gen == 0` short-circuits to `become_controller` **before** the `gen < incumbent_gen`
rung, so it can never be refused `busy` by generation. A gen=0 attach is not ordered against
incumbents **at all** — it is exempt, and exemption means unconditional silent re-take.

**Who arrives at 0:** `Brain::attach(session_id, from_seq)` takes no gen; it calls `subscribe`,
which hardcodes `0` into `subscribe_with`'s `gen: u64` slot with `by=None`. So the shell channel's
Control attach (`shellchan::deliver_stdin_pending_in`) is permanently a gen=0, `None`-identity
Control attach.

**Not a defect — sanctioned.** brain.rs's CAUTION above `fn subscribe` states it: a `None`-identity
Control attach silently re-takes a FREE or SAME-LOCAL (`None==None`) slot via `become_controller`,
fires NO `Displaced`, and orphans the prior local controller — *"correct for `attach` (a serve loop
that WILL drive the session)"*, and precisely why a brain-respawn must NOT re-attach as Control.

**What stays live anyway:** the exemption still orphans a same-local incumbent — prior seat dropped,
writer exits `channel-closed`, viewport freezes while broker output keeps flowing, no `Displaced`.
Same family as the v0.39.4 field bug 4 and the signature releases#123 turns on. It is correct **only
under the premise that attach really drives the session it seizes** — untested, and the load-bearing
premise if anyone reopens it. Does NOT fire in the #123 rig: those A_i conns are raw readers that
never re-subscribe (measured separately).

**Reading it in a log:** `gen=0` is the **ladder-bypass token**, not just a value — it predicts the
broker took the short-circuit straight to `become_controller`. An instrument that prints `gen=none`
there erases exactly that inference (and is false besides: the 0 is on the wire).

Kin: [[stable-anchor-is-not-a-recycling-defense]] (a longevity/ordering intuition that does not
survive the field it claims), [[single-source-discriminant-marker]],
[[resume-attach-intent-token-untrusted-v0540]].
