Handbook
Forge Fleet admin — Overview & release identity (design)
Maintainer-facing: KPI layout, telemetry, and FLEET_GIT_SHA heuristics evolve with /admin/. Operators should treat this as rationale, not a support SLA.
Updated
Maintainer-facing: KPI layout, telemetry, and FLEET_GIT_SHA heuristics evolve with /admin/. Operators should treat this as rationale, not a support SLA.
This document captures what “broken” means for /admin/ → Overview, how release identity is supposed to work, and how we keep it from regressing (Playwright + install scripts + runtime fallbacks).
Two different failure classes
-
Release / drift visibility (software contract)
Whenmeta.version.git_shais missing, the admin header shows “No git SHA from server — cannot compare to GitHub.” Operators lose the Update Fleet / drift signal even though HTTP and jobs may be fine. This has happened repeatedly on rsync installs (install-user.sh/install-update.sh) because the runtime tree excludes.git/andFLEET_GIT_SHAwas not always set. -
Host saturation (capacity / environment)
High CPU %, load %, or temperature (e.g. 90°C+) on the Overview tiles reflect the machine under Fleet, not a bad Fleet HTTP handler. Mitigations are operational: fewer concurrent jobs, better cooling, CPU limits on heavy containers, scheduling, etc. Do not treat a hot CPU tile alone as “Fleet code is broken” unless the service is also failing health checks or returning errors. -
Overview KPI layout (horizontal tile row)
When#fleet-tilesis not a flex row, the CPU / thermal / RAM / load tiles render as a tall vertical stack on the left with empty space on the right — operators read this as “design broken.” Typical causes:GET /admin/ks/css/forge-fleet-admin.cssfailed (404, wrong reverse-proxy path, CSP), or a parent style forcedflex-direction: columnonto the row. Mitigation:admin.htmlships a minimal inline fallback on#fleet-tiles.fleet-tile-row.fleet-one-row(#fleet-overview-tile-row-fallback); kitchensinkforge-fleet-admin.cssuses!importanton#fleet-tiles.fleet-tile-rowfordisplay/flex-direction.
Invariants (do not regress)
| Invariant | Mechanism |
|---|---|
GET /v1/version exposes non-empty git_sha whenever the install can be tied to a git checkout |
FLEET_GIT_SHA or SOURCE_GIT_COMMIT env; else git rev-parse --short HEAD on FLEET_GIT_ROOT when that path is a git checkout; else the same on the package parent directory only if FLEET_GIT_ROOT is unset** (dev clone). If **FLEET_GIT_ROOT` is set but not a git repo, Fleet does not guess from another path. |
forge-fleet.env written on install refresh |
scripts/set-fleet-git-root-in-env.sh sets FLEET_GIT_ROOT and FLEET_GIT_SHA from the source checkout used for rsync (that checkout still has .git). |
| Admin UI exposes machine-readable SHA state | #fleet-git-remote-row has data-fleet-git-sha-state="present" or missing after each snapshot (admin.html). |
| CI / dev guard | Playwright e2e/admin-status-overview.spec.ts + unit tests tests/test_versioning_git_sha.py. |
| Overview tiles stay in one horizontal row | #fleet-tiles has display: flex, flex-direction: row (computed style); at least four direct .fleet-tile children after snapshot. |
Playwright scope
- In scope:
/v1/versiongit_sha, version line containsgit,data-fleet-git-sha-state, Overview tiles#fleet-cpu-value/#fleet-mem-val(sanity that snapshot +renderTilesran); computedflex-directionon#fleet-tilesisrow; ≥ 4 direct.fleet-tilechildren; first two tiles left positions increase left-to-right (not stacked). - Out of scope: asserting specific temperatures or load numbers (environment-dependent).
Operator checklist when Overview “looks bad”
- If KPIs are a vertical list: DevTools → Network → confirm
/admin/ks/css/forge-fleet-admin.cssis 200 (not HTML error page). Fix reverse-proxy path mapping for/admin/ks/**or redeploy sokitchensink/css/forge-fleet-admin.cssexists on the host. - Read
#fleet-version-lineand#fleet-git-remote-row— is SHA present and GitHub check reachable? - If thermals/load are extreme, inspect Docker jobs, systemd unit limits, and hardware; cross-check
GET /v1/telemetryfor sustained load. - After changing only
forge-fleet.env, restartforge-fleet.serviceso the process picks up newFLEET_GIT_*values (runtime SHA probe still helps whenFLEET_GIT_ROOTis set butFLEET_GIT_SHAwas omitted).
Related files
fleet_server/versioning.py— SHA resolution and cache.scripts/set-fleet-git-root-in-env.sh— env file merge on install.fleet_server/static/admin.html— Overview tiles +data-fleet-git-sha-state+#fleet-overview-tile-row-fallbackinline row styles.kitchensink/css/forge-fleet-admin.css(source repo forgesdlc-kitchensink) — full tile / chart styling;#fleet-tilesrow!importantguard.e2e/start-fleet-server.sh— Playwright local server (no bearer by default on loopback).