State the IPC server shares across connections. Carries the
launcher’s identity (for patching into Registered events the
reducer emits with sentinel values) plus the canonical State.
Per-connection counter for log-correlation IDs (NOT the wire
client_id — that comes from the reducer). Allocated even for
pre-Register failures so log lines can be correlated.
Phase E.1b — synthetic Goodbye dispatch for ungraceful disconnects
(EOF / read error before the client sent an explicit Goodbye).
Without this, the reducer’s process record stays Running and a
reconnect from the same live PID hits AlreadyRegistered.
(codex P1 #610.)
Enforce the “first message must be Register” invariant. Returns
Some(Event::Error) if the command violates the contract; the
caller sends it and closes the connection.
Phase B.9.1 — milliseconds since the launcher’s IPC server
started (first call seeds the epoch). Used as the monotonic
clock for WRR observability timestamps in reducer::Ctx::now_ms.
Distinct from chrono::Utc::now() because the WRR arm wants
elapsed time, not wall clock — and we don’t want clock-skew
jitter (NTP adjustment, DST) showing up as drift.
Patch launcher_pid + launcher_version into Event::Registered.
The reducer leaves these as sentinels (it can’t read env without
breaking determinism) — the server fills them in here, just
before serializing to the wire.