Loading
Add probe recipe that records named check verdicts
What
just lab probe CHECK runs a named check on a rig and appends a structured verdict to the rig's state. status --json shows the latest verdict of each check under probes and moves to schema_version 2.
Closes #23 (closed)
How it works
- Checks live in
gce/probes.json, never in text from the caller. The starter set is the checks that already existed ad hoc:gitlab-ready(readiness endpoint),gitlab-sign-in(sign-in page),control-absent-path(a path that must fail), andhotpatch-per-service(the hot-patch per-service proof, omnibus only). - A verdict holds
check,proof_id,definition_hash(sha256 of that check's canonical definition),seen(true, false, or null),result(pass,fail,unknown),evidenceandat. - The VM command ends by printing its own exit code as
probe-exit=N. 0 is seen, 1 is absent, and anything else, or no such line, is unknown, so a run that never reached the VM reads unknown, not absent. The probe exits 0, 1 or 2 to match and writes its verdict first. - Evidence is a path to the run's output under
~/.gitlab-simulation/evidence/<instance>/, never inline.status --jsoncuts each verdict to a fixed key list, so a key nobody listed does not print either.downremoves the evidence with the state. - Repeat runs append to
probesin the state file;status --jsonshows the latest of each check. - HTTP check paths and statuses, and script arguments, are validated before they reach the VM.
Word budget
The recipe-count test moves from 62 to 63. The operations doc gains the probe paragraph and loses the status key list (which STATUS_JSON_KEYS already holds) and four derivable sentences, so the word ceiling holds at 40486 of 40489.
Proof
engine-selftest.shpasses locally (36 new checks): a seeded signal writesseen: truewith an evidence path that exists, an unseen one writesseen: falseand exits 1, an unreachable VM or GitLab writesunknown, a secret printed by a check stays out of the verdict andstatus --json, a key planted in a verdict is cut, a wrong base isunknown, and a changed definition changes its hash.- Live on a GCE omnibus rig (c2d-standard-4,
SIM_OWNERset):probe gitlab-readyexited 0 withseen: true, andprobe control-absent-pathexited 1 withseen: falseand its verdict written;status --json | jq .probesshowed both. The rig was deleted and the instance list for its name is empty.