Skip to main content

Module fleet_diff

Module fleet_diff 

Source
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§

FleetDiff
The whole-fleet desired-vs-live diff with a capacity-collapse explanation.
WorkerDiffRow
One worker’s row in the fleet diff.
WorkerObservation
One worker’s observed state across the desired/live dimensions. Plain data so the classification is pure and unit-testable.

Enums§

WorkerDiffState
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.