feat: the run state machine, and the verbs wired to it (A13) #3
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.50) × (1 − Review Confidence (0.42)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 624 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 79% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.385
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #3"
general
weight: 0.35
github-actions[bot]
Item A13 of the deploy-queue program (crunchtools/deployer#1). The module that
puts the other twelve in order, plus the three fixes building it turned up.
The order is the design
cannot be honoured then a rollback cannot be made to stick, and deploying at
all would be taking a risk this program has no way to undo.
_gatedoes no I/O: a body that does not parse, a service not in the registry, a
creator who is not a listed requestor, a repo that disagrees with the
registry, a revision that already broke this service, a service rolled back
too often — all decided on information already in hand. None of them is
recorded as an attempt, because nothing was learned about the image.
the run returns with the host untouched and the ticket still queued, which is
a much better outcome than a deploy nobody is told about. Past the restart
their failures are reported and never undo a good deploy.
its own maintenance window, because Nagios saying so is the only fix path
left.
A correction to the plan
The plan had a hold gate deploys for that service. It cannot: a held service
could then never clear its own hold, because clearing it requires verifying a
later ticket and no later ticket would be allowed through. Only a person could
ever clear one, and the service would sit outside auto-update indefinitely.
So a hold is not a gate. The next ticket carries the fix and letting it
through is the point; verifying it is how the hold clears. What a hold stops is
podman auto-updateputting the broken:latestback overnight. What stops thesame mistake twice is the attempt log — a revision that was rolled back is never
deployed to that service again, whatever the ticket says.
Three fixes found while building it
RT renders dates in RT's own timezone, and a container's clock is UTC.
Createdarrives asFri Nov 06 04:00:46 2026with no zone in the string atall; the zone is RT's
$Timezone, which on this deployment isAmerica/New_York(RT_Config.pm). That is a five-hour error in the one numberthe build deadline is measured from, and the deadline is thirty minutes — read
one way every ticket is stale the moment it is filed, read the other it never
goes stale at all, and neither failure mentions a timezone when you are looking
at it.
RT_TIMEZONEis now required and validated at load, and an unreadabledate is an error rather than a fall back to "now" (which would hand the ticket a
fresh deadline on every run).
A failed deploy needs the service's own output. "The health probe returned
503" does not tell a developer what broke. The podman surface gains one read —
GET the container's logs — which adds nothing to what this program can do to a
container; there is still no create, start, run or exec.
ALLOWED_OPERATIONSnames it, so the surface test sees the change rather than it being widened
quietly. The unit's journal would have said less, since a container that starts
cleanly and then answers wrongly is a perfectly healthy unit. With logs coming
from podman,
journalctland its libraries leave the runtime image entirely.unholdhas to clear the rollback count too. The three-in-24-hours refusalcomes from the gate rather than from the hold, so clearing only the hold would
leave a service refused for the rest of the day with nothing on the ticket to
say why.
Verbs and exit codes
holdsandunholdread nothing but the state directory, so they work on ahost where podman, systemd or RT is the thing that is broken.
rollbackhonours a
rollback = "manual"row by refusing and printing the two commands torun by hand — the registry is the thing that knows a service carries
migrations, and writing it down is pointless if it is then ignored.
0for a verb that did what it was asked, including a deploy that failedand was rolled back cleanly, and including a second run standing down because
one is already going.
1only for a service that needs a person.2for couldnot run. A rollback is a success of this program; failing the oneshot unit for
one would wake a model to be told what the ticket already says.
Tests
373, up from 302. The fakes model the host rather than the calls:
restartmoves the running container to whatever
:latestcurrently points at, and theprobe answers according to which image is running, so "the new image is broken"
is written as a broken image and the sequence has to be right for the test to
pass.
Acceptance against real units waits on B1 installing the unit, which waits on
the 0.1.0 release this PR unblocks.
🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jg2DfucoFv7VrzzwVR