Files
pad/cmd
xarmian ec70f13608 refactor: act on codex round 8's scope review (BUG-2727)
The "should this be here at all" angle, which my own record says I do not
reliably ask of my own work. Six findings; one was a real inconsistency,
the rest were claims that needed stating rather than code that needed
removing.

REMOVED: the presence observer's interface, adapter type and constructor,
in favour of a plain callback. One method, one production consumer — and
the same diff already uses bare callbacks for RedisHealth and the stream
gauge, so this was inconsistent with itself. internal/watchevents keeps
an interface because it reports five distinct conditions; one does not
earn one.

TRIMMED: .env.example's per-variable prose down to the upgrade-relevant
facts plus a pointer at docs/deployment.md, which is canonical. The same
policy was restated in seven artifacts and that is a drift surface.

KEPT, with the reason written where a reader will ask:

- The receive-loop-exit counter is expected to stay at zero, and that is
  what it is for — a should-never-fire alarm on a state undetectable from
  outside the process (an instance that publishes fine, answers health
  checks and receives nothing). BUG-2727 filed the silent return as the
  defect, and a log line nobody greps is not the same artifact as a
  counter somebody alerts on.
- The prober's synchronous first probe duplicates cmd_server's dial-time
  ping. Deliberate: reusing that result would couple this type to its
  caller's startup sequence for one round trip that runs once per
  process. The consequence is now stated too — because the dial-time ping
  is FATAL, the prober's "unreachable at startup" branch cannot fire in
  the shipped binary.
- The keyspace wiring guard parses source and will break on a rename. The
  alternative on offer needs three packages' constructors collapsed into
  one API. A guard that costs a one-line update after a deliberate rename
  beats an invariant with no enforcement, which is what the package
  comment alone amounts to.

RAISED WITH THE LEAD, not decided here: events.EventBus.Publish's global
limit parameter is now dead in production, since the handler passes 0 and
the process-wide gate owns that bound. Removing it is the clean seam and
it is an interface change in a shared package, which is a structural call.

Claude-Session: https://claude.ai/code/session_01JVDBKbgn3Xt7ndW1YoYd8X
2026-08-22 03:16:07 +00:00
..