feat(daemon): status.daemon control request and bg status health snapshot
Adds DaemonHealthSnapshot (src/daemon/health.rs), built from atomics and try_lock'ed maps: per-family pending sequencer entries by kind, the oldest entry's age, the front entry's kind and whether an older open trace root fences it, open/finishing/written mutating trace roots, in-flight side-effect passes, side-effect errors, causal-fence release counters, the existing ingest-loss counters (now also the source of the stats.ingest response), and a sequencer_stalled flag for work older than the fence's hard cap. A contended map is reported as snapshot_partial rather than waited on, and fence state is observed through the same classification the drain uses without applying any release, so a status probe never changes what the drain will do. The snapshot is served by the new status.daemon control request and printed by git-ai bg status under an additive "daemon" key (with a restart hint under "daemon_error" when an older daemon does not know the request), so a fenced or stalled family can be inspected locally and in tests without waiting for the heartbeat. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
S
Sasha Varlamov committed
04d87b7cd117a8ecfcb89a386eb17adb14ee8f24
Parent: d119b61