feat(just): add fleet-status recipe #72
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:electra
host:fleet
host:lyra
host:nova
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!72
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/fleet-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
just fleet-status— a developer-facing command that probes every host innixosConfigurationsover SSH and renders a tabular view of Nix metadata: current generation, running revision (+ specialisation), divergence vsorigin/main, and deployed timestamp. Offline hosts render as(unreachable). Beszel remains the source for liveness / CPU / RAM, so this recipe deliberately does not duplicate that data.Closes #66
Implementation
fleet-statusrecipe injustfiles/hosts.just, grouped alongsideinventory.git fetch origin mainat the top, then parallel SSH probes (one per host,&+wait, 5s connect timeout,-F /dev/nullmatchingjust deploy).nixos-version --json,readlink /nix/var/nix/profiles/system,[ -r ] /etc/nixos-specialisation, andstat -c %y /…/systemin a single ssh call. Failure at any point →(unreachable)cells.+Nahead oforigin/main,-Nbehind,(clean)when equal, appendsdirtywhen the revision carries a-dirtysuffix. Both ahead and behind →+A -B.|as the delimiter so empty specialisation fields don't shift columns (bashIFS=$'\t'collapses runs of whitespace).just inventorydocs.Live validation evidence
Recipe run against the actual fleet immediately before this MR was opened:
3665e21(matchesorigin/main) with theigpuspecialisation →(clean)and(igpu)rendered correctly.(unreachable)cells render as designed.4d2061a, 11 commits behindorigin/main→-11in the diff cell.nix flake checkpasses against the four host configurations.Out of scope (deferred per the issue's follow-up spec)
These can be added later without breaking the default output.
Required before merge:
git fetch origin mainupdatesFETCH_HEAD, but does not reliably refresh theorigin/mainref read immediately afterward. This can silently calculate divergence using stale data. Please fetch the remote-tracking ref (git fetch --prune origin) or explicitly mapmaintorefs/remotes/origin/main, then update the recipe’s validation evidence.Required refinement before merge: refresh
origin/mainbefore calculating divergence.Required before merge:
git fetch origin mainupdatesFETCH_HEAD, but does not reliably refresh theorigin/mainref read immediately afterward. This can silently calculate divergence using stale data. Please fetch the remote-tracking ref (git fetch --prune origin) or explicitly mapmaintorefs/remotes/origin/main, then update the recipe’s validation evidence.Addressed in commit
00d40d2(pushed tofeat/fleet-status).Change: switched the upstream refresh in
fleet-statusfromgit fetch origin maintogit fetch --prune origin(no refspec). The narrower form updatesFETCH_HEADbut can leaveorigin/mainstale in some refspec configurations; the broader form refreshes all remote-tracking branches in one operation, sogit rev-parse origin/mainafter the fetch is guaranteed to read fresh data.Updated live validation evidence:
Fleet state is unchanged (vega still at
4d2061a, 11 commits behindorigin/main; electra and lyra match3665e21).nix flake checkstill passes.