Expand description
Desired-state inventory and live-eligibility diff (bd-session-history-remediation-ocv9i.2.1).
Session history showed operators chasing a capacity collapse across three
disjoint surfaces — workers.toml (what’s configured), the daemon’s
in-memory pool (what joined), and status (what’s healthy) — with no single
view that says why there are zero usable workers for a command. This module
is that view: it diffs the desired fleet against the live state
across every dimension that can take a worker out of play (not in the pool,
unreachable, admin-disabled, temporarily bypassed, stale facts, or admissible
for everything except this command), and explains the collapse in one
FleetDiff.
derive_worker_diff is the pure per-worker classifier; build_fleet_diff
aggregates and counts, so the report stands alone without reading the config,
the daemon log, and status separately.
Structs§
- Fleet
Diff - The whole-fleet desired-vs-live diff with a capacity-collapse explanation.
- Worker
Diff Row - One worker’s row in the fleet diff.
- Worker
Observation - One worker’s observed state across the desired/live dimensions. Plain data so the classification is pure and unit-testable.
Enums§
- Worker
Diff State - The single diagnosis for one worker, explaining whether — and why not — it can run the selected command right now.
Functions§
- build_
fleet_ diff - Build the fleet diff from per-worker observations.
- derive_
worker_ diff - Classify one worker’s diff state. Pure and total.