Fleet health — one weekly verdict for the AI repos#
linux/scripts/fleet-health.py measures AccelerANTgine, OxidANT, OrchestrANT and
OmniAccelerANT, merges their tree metrics with GitHub state, grades the result against an
earlier record and stores it. .github/workflows/fleet-health.yml runs it every Monday.
The measuring tools#
Tool |
What it measures |
Owning page |
|---|---|---|
|
One checkout’s tree metrics (Ruff, ty, duplication, size, complexity, allow rows, suppressions) and its lane artifacts |
|
|
Lockfile advisories with osv-scanner; artifact |
|
|
A benchmark result against earlier default-branch results; artifact |
|
|
The latency commands a repo declares in |
|
|
All of the above for the four repos, plus GitHub state |
this page |
Running it#
python3 linux/scripts/fleet-health.py --clone --compare previous-run
python3 linux/scripts/fleet-health.py --repos OrchestrANT --local-root ~/work --compare logs/reports/fleet-health/2026-11-02.json
--repostakes a comma list; the default is the four repos above.--cloneclones each develop tip with its direct submodules into a scratch directory (the same checkout the repo’s owncode-quality-report.ymljob makes) and measures that.--local-root DIRmeasuresDIR/<repo>as it is. It records the SHA and refuses a checkout that is missing, dirty (git status --porcelain, nested submodule edits ignored) or behindorigin/developafter a fetch. Local commits ahead oforigin/developare measured; their artifact metrics are not collected, since no lane ran on them.--comparetakes a record path, orprevious-run: the newest unexpiredfleet-health-jsonartifact of a successful develop run offleet-health.ymlother than the current one. Without--compare, or on a first run, nothing is graded.
Tokens: GH_TOKEN, GITHUB_TOKEN or the gh login reads runs, artifacts, issues and the hub
compare. The alert endpoints use FLEET_HEALTH_TOKEN when it is set. Without any token, or on a
401, 403 or 404 answer, a metric is not collected. The GitHub client is develop_red.py’s: a GET
that answers 5xx is retried four times (75 s), and one still failing is a failed measurement.
Metrics#
Per repo, under repos.<repo>.metrics:
Metric |
Class |
Source |
|---|---|---|
Every metric of the repo’s |
as recorded ( |
the checkout’s |
Artifact metrics ( |
|
the |
|
external |
the last 20 completed develop runs of each active workflow from push, dispatch or schedule, conclusion success or failure |
|
external |
the share of those runs with a second attempt; a rerun |
|
external |
the lanes whose newest develop run is older than the newest version of the family image tag they pull (one |
|
external |
for each |
|
external |
develop commits after the head of the newest green run among them ( |
|
external |
open Dependabot alerts (a 100th alert makes it not collected: cursor pages are not followed) |
|
advisory |
the GHSA ids of the HIGH and CRITICAL ones |
|
external |
open code-scanning alerts by security severity, |
|
external |
open code-scanning alerts whose path is missing from the checkout |
|
external |
age of the newest code-scanning analysis |
|
external |
open secret-scanning alerts; GitHub gives them no severity |
|
external |
open hub issues labelled |
|
external |
hub develop commits the |
|
external |
the newest develop |
|
advisory |
the HIGH and CRITICAL advisory ids in it |
|
external |
the newest develop artifact of each |
|
external |
that artifact’s age in days; |
|
external |
the newest completed develop run of |
Under repos.fleet.metrics, the shared-facts check is a code metric: shared_facts.models_lock_deim
compares the DEIM rows of each repo’s tracked models.lock, and
shared_facts.llm_lock_smollm2 the SmolLM2 rows of each llm.lock, across OxidANT,
AccelerANTgine and OrchestrANT. The value is the number of distinct row sets minus one, so 0
means they agree. When a repo is not in the run, or a file is absent, the metric is not
collected and the reason names what exists.
shared_facts.contract_inference_v1 and shared_facts.contract_text_generation_v1 do the same for
ModelANT’s two contracts, as each of the three repos sees them: a tracked lock row naming the file,
else a tracked copy, else the blob at the third_party/ModelANT gitlink. The value is the number of
distinct SHA-256 digests minus one, and detail names each repo’s digest and source.
Grades and verdict#
Grade |
Meaning |
|---|---|
|
a collected |
|
an |
|
collected now, but the baseline has no collected value: a first run or a new metric |
|
no value; printed as |
|
the measurement broke; printed as |
The run prints fleet-health: verdict=<ok|regressed|incomplete> regressed=<n> improved=<n> metrics=<n>
(metrics counts collected ones), a compare: line and one
REGRESSED <repo>/<metric> <before> -> <now> line per regression.
Exit |
Verdict |
When |
|---|---|---|
0 |
ok |
no code metric regressed and no HIGH or CRITICAL advisory id is new |
1 |
regressed |
a code metric regressed, or a HIGH or CRITICAL advisory id appeared |
2 |
incomplete |
a checkout was missing, dirty or stale, a quality-report run broke, a 5xx or timeout outlived the retry, or the compare file is malformed |
Exit 2 wins over 1, and the regressions still print.
Storage#
Each run writes logs/reports/fleet-health/<date>.json and <date>.md (ignored by Git; a
second run on the same day overwrites them). The JSON holds schema_version 1, kind
fleet-health, date, mode, hub_sha, baseline, verdict, problems, the regressed,
improved, not_collected and failed rows, and per repo its sha, checkout, quality-report
command and every metric with value, unit, better, class, status, grade and
before. The workflow uploads the JSON as artifact fleet-health-json for 90 days; that
artifact is what previous-run reads next week.
The workflow#
fleet-health.yml runs on cron 0 9 * * 1, after consumer-inventory’s Monday 07:00 UTC run,
and on workflow_dispatch. It runs --clone --compare previous-run, writes the Markdown to the
step summary and uploads the record. It fails only on exit 2 (or a crash), which
develop_red.py then reports like any red develop run. On exit 1 it opens or updates exactly
one hub issue labelled fleet-health, never develop-red, naming each regressed metric; the
next run that exits 0 closes it. An exit-2 run leaves the issue alone. The optional secret
FLEET_HEALTH_TOKEN is a read-only token for the alert endpoints; without it those metrics are
not collected and the run still succeeds.
Baselines#
The first fleet-health.yml dispatch after the tool landed is the goal’s baseline; its run id
and record are named in the goal’s final report. Later runs compare with the previous
successful run, so a regression is reported once, in the week it appeared; compare with an
older record by passing its JSON with --compare.
A scanner change re-baselines. Each repo is measured with its pinned hub. A scanner fix therefore moves a
metric in the first weekly run after the repo’s hub gitlink reaches it. That run’s grade measures the scanner,
not the code, and the next run compares with it. The workflow cannot name a baseline. To grade against a chosen
record, download that run’s JSON artifact and pass it to the local --compare run. The C++ initialiser fix in
lang_units.py was such a change. It moved one AccelerANTgine count from 11 to 4 and left the other repos unchanged.
perf-host#
bash scripts/linux/quality-report.sh --perf-host # compare
bash scripts/linux/quality-report.sh --perf-host --update-baseline # rewrite the baseline
Run it as a named unit: systemd-run --user --wait --collect --unit=perf-<repo> -p RuntimeMaxSec=7200 --setenv=PATH="$PATH" --setenv=HOME="$HOME" bash scripts/linux/quality-report.sh --perf-host.
Both modes refuse a dirty checkout (tracked or untracked), a 1-minute load above 2, and an
existing ${TMPDIR:-/tmp}/kata-cross-chain.pid. A refusal starts no container and exits 2.
Declare it in quality-report.toml:
[perf]
setup = "bash scripts/linux/perf-host.sh setup" # once, untimed; a failure makes the run incomplete
cpus = 8 # optional; the first N CPUs the container may use
[[perf.command]]
name = "detector_cpu"
run = "bash scripts/linux/perf-host.sh detector cpu"
metrics = [{ key = "p50_ms", unit = "ms", better = "lower" }]
The image comes from ci-image-ref.sh. It runs as container root, which rootless nerdctl maps to
the host user, so setup’s outputs stay editable; keep them in ignored paths or the next run is
refused as dirty. Each command runs 20 times with QUALITY_PERF_RUN set to the run index. The
last stdout line of a run is one JSON object holding every declared key as a positive number, or
{"not_collected": "<reason>"}, which marks the command’s metrics not collected, as for a
provider the image cannot load. A nonzero exit, other output or a run over 600 s makes the run
incomplete.
ORT’s default thread count ignores the affinity mask. On 8 pinned CPUs that made SmolLM2-135M more
than 3x slower, and its first-token times varied by more than 10 %, the smallest regression below. Setup
therefore copies the model with genai-model-threads.py --threads text (text thread
rule): half the ORT pool, 1 to 4, which is 3 on
those 8 CPUs and 1 on a Pi 5 (CON218). A detector session’s tail shows the same effect when its threads fill the set.
Grading. A metric is perf.<command>.<key>, and its figure is the median of the 20 runs. The
spread is the median absolute deviation over the median. With the baseline’s spread, a metric
regresses when it is worse than the baseline’s median by more than max(10 %, 3 x spread). Every
graded metric prints ratio <metric> <now / baseline> <held|improved|regressed> (...). A metric
the baseline lacks is not collected. Exit 0 is ok, 1 regressed and 2 incomplete: a refusal, a
failed setup or command, or no readable baseline for this CPU.
Baseline. perf/baseline-<cpu-slug>.json, named after lscpu’s model name, stores the model,
SHA, time, CPUs and the 20 raw samples per metric. --update-baseline writes it only when no
collected metric’s spread is above 5 %; commit it in a reviewed commit. Each run’s samples, the
plan and the container log are under ignored logs/code-quality/perf/.
Blind spots: a low load average does not prove a quiet host, the image can move between a
baseline and a run, and nothing checks that a command times the code it names. Its suite
(test-quality-report-perf.sh) uses a fixture engine, never the image.
Owner routine#
On Monday, read the run’s step summary or the open
fleet-healthissue.For each
REGRESSEDline, find the commit withquality-report.shon the commits that touched the metric’s files, then fix it or record it in that repo’sBACKLOG.md.Read the
movedrows for trends: a falling success rate or a growing pin lag needs no commit to appear.A red run is a measurement failure: read its
failed:lines, fix the cause and dispatch again.Monthly, run
--perf-hoston a quiet host. Refresh a baseline only with--update-baselinein a reviewed commit.
What it does not do#
It does not attribute a change to a commit, rerun a lane, or follow Dependabot’s cursor pages.
Report-class and external metrics are never graded. Artifact metrics exist only for SHAs whose
code-quality-report.yml run finished. linux/scripts/tests/test-fleet-health.sh replays
recorded GitHub answers and local Git fixtures; it covers neither live GitHub nor --clone.