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), and hotpatch-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), evidence and at.
  • 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 --json cuts each verdict to a fixed key list, so a key nobody listed does not print either. down removes the evidence with the state.
  • Repeat runs append to probes in the state file; status --json shows 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.sh passes locally (36 new checks): a seeded signal writes seen: true with an evidence path that exists, an unseen one writes seen: false and exits 1, an unreachable VM or GitLab writes unknown, a secret printed by a check stays out of the verdict and status --json, a key planted in a verdict is cut, a wrong base is unknown, and a changed definition changes its hash.
  • Live on a GCE omnibus rig (c2d-standard-4, SIM_OWNER set): probe gitlab-ready exited 0 with seen: true, and probe control-absent-path exited 1 with seen: false and its verdict written; status --json | jq .probes showed both. The rig was deleted and the instance list for its name is empty.

Merge request reports

Loading
Loading