# Issue #838 — Broker acceptance socket flake ## Objective Eliminate high-contention uncaught JSON parse failures in lease-broker and mutator-gate acceptance helpers without laundering malformed/empty replies into passing assertions. ## Constraints - Branch: `fix/838-broker-acceptance-flake` in `/home/hermes/agent-work/stack-838-flakefix`. - Red-first TDD with a forced empty/truncated reply path and deterministic rejection or documented retry. - Read newline-framed replies completely; reject malformed broker replies with byte length/content context. - Determine RIDER2 branch before finalizing: test-harness-only `(a)` or daemon write truncation `(b)`. - If product-side, prove the real Claude/Pi adapter read path fails closed; fix any allow-risk. - Coverage >=85% per changed executable through real tests. - Full suite and repository gates green; independent exact-head review required. - Push and open a PR containing `closes #838`; do not merge. ## Progress - 2026-07-17: Reclaimed from #824. Confirmed clean worktree on `fix/838-broker-acceptance-flake` at main base `abd2791f59b3f06f46dd08e55298ced72f6aa7c2`.