Files
fleet/scripts/ci
CatoandClaude Opus 5 d849b430d2 feat(fleet): ask whether what is on main is actually live (#80)
Nothing was asking. uptime-sweep.sh probes /api/health and treats 5xx as DOWN —
that proves a process is UP, not that it is running the code we merged.
CLAUDE.md already says a health check is not a feature check; this is the
missing half.

WHY IT MATTERS HERE SPECIFICALLY

A push made with GITHUB_TOKEN triggers no workflows, so an auto-merged PR fires
no Deploy. Measured on bitbaum/loki: SIX of the last fifteen commits on main had
no Deploy run of their own. They shipped anyway, because the auto-merge sweep
reconciles every ten minutes.

So that reconciler is the single thing standing between "merged" and "live" for
most commits in this fleet — and it had no alarm on it. If it stops, CI stays
green, PRs keep merging, /api/health keeps answering 200, and the box quietly
serves last week's code.

WHAT IT FOUND ON ITS FIRST RUN

  ✗ reparaturbonus-zh — main tip is 212m old and no deploy has run since it

A client site, merged and not live for three and a half hours. Its Deploy at
d1431ca is completed/FAILURE, six Auto-merge sweeps have run since without
recovering it, and the commit carries TWO CI runs — one success, one cancelled
— which is the documented shape where the shared Deploy reads the cancelled
duplicate as a failed gate.

Two more repos report UNKNOWN rather than clean: aoz-housing and sbb-fundbuero
have a deploy.yml but no successful Deploy run on record.

WHAT IT ASKS

Per repo with a deploy workflow: is main's tip covered by a successful Deploy?
A run for that exact SHA counts, and so does any successful run that STARTED
after the tip was committed — because most commits here ride a later
reconciler dispatch rather than firing their own. Requiring an exact-SHA run
would have reported nearly the whole fleet stale while everything was live,
which is how a check earns being muted.

Anything uncovered is only a finding once it is older than the reconciler's
window (45m: the sweep's 10 minutes plus room for a build). Inside that it is
PENDING, not a problem.

WHAT IT DELIBERATELY DOES NOT DO

It does not judge whether the deployed code works. And it does not read the
app's own /api/health `commit` field: exactly one of thirteen live apps
publishes one, so a check built on that would cover a single app while looking
fleet-wide.

12 self-test assertions, no network — including both grace boundaries, the
vacuous-pass guard, and that a failed, cancelled or still-running deploy never
counts as shipped.


Claude-Session: https://claude.ai/code/session_01NLZ6vs1jsWw2kKbpWTZHf2

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 02:35:10 -07:00
..