delivery-operator (opus; no Edit, Write, NotebookEdit or Agent) is the verify-stage lead. After a human approves and merges, it reads the delivery doc at the merge commit's first parent, proves its kubeconfig cannot write (four auth can-i probes), loads the routed tool skills and runs delivery-verify. It posts the operator report as its own comment, then the final Handoff (Next command none on pass). delivery-verify: - stops first if the change was already reverted; - waits for Flux through flux-diagnose's Applied check (15-minute cap) and reads post-merge CI per workflow through delivery-ci-checks (45-minute cap), accepting a later cumulative run as cover; - checks the PR's post-merge assertions with Read-tier commands only; - ties a failure to the change only when that is established, and otherwise stops. A tied failure opens a revert PR (Ready for Human, built in a temporary worktree); it never reverts on its own. For Flux the guarantee is bounded: the merge commit applied and the inventory HelmReleases are Ready. The assertions prove a values or chart change took effect. The delivery doc format gains a seventh parsed section, Post-merge checks (glob -> push-event status names, or none when Flux pulls the change), so delivery-repo-doc goes to 0.2.0. delivery-ci-checks takes a caller check list and wait cap; delivery-handoff carries the verify stops. delivery 0.6.0. Refs: #194 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
4.1 KiB
Reading post-merge CI
The wait cap is 45 minutes for this whole step, shared. Note the start time (date +%s); every
later wait gets what is left, in whole minutes.
Invoke delivery-ci-checks on the merge commit with the check list and the cap.
malformed: <reason> → stop with <reason>. Otherwise work from its table, one row per check.
Cancelled runs
A cancelled run says nothing about the change, so it is never a failure. For each failure
row, read the merge commit's statuses with mcp__gitea__commit_read get_status and take that
check's raw status and description. The row is cancelled when the status is error or
warning, or the description mentions "cancel" in any case. How Gitea Actions reports a
cancelled job on a commit status is not certain: delivery-ci-checks maps error and warning
to failure, and a cancelled job may also read failure with a "Has been cancelled"
description, so both are treated as cancelled.
Later commits
Section 7 lists only cumulative checks: a green run on a later default-branch commit re-applies
everything since its last success, this change included (delivery-repo-doc's
references/format.md §7). So a later commit can settle a row the merge commit could not.
Settle checks per workflow: a status name's prefix before / (Provision / apply (push)
→ Provision). A workflow whose rows are all success or skipped passes as it stands. In any
other workflow a skipped row is not run: a failed or cancelled job before it may have
skipped it, so it says nothing about the change. Its not-run rows go through this section
together with its other rows not success.
For each such workflow, run references/already-reverted.md again (a revert → stop), then list
the default branch's first-parent commits after the merge commit, oldest first:
git log --first-parent --reverse --format=%H <merge commit>..origin/<default branch> # ADR-0023: parsed
Bare git, per ADR-0023: rtk filters git log and this output is parsed. That check's fetch
found no revert, so none of these is at or after one. Read each SHA's statuses with
mcp__gitea__commit_read get_status:
- The first commit carrying every one of the workflow's checks, each
successorskipped, covers the workflow: each of its rows becomespass, "covered by<SHA>", and that SHA is a covering commit. One row green beside a failed one covers nothing: the failure may have skipped this change's job. - None covers, and the newest commit carrying one of the workflow's checks reads
pendingon it: a later run is under way. Invokedelivery-ci-checkson that SHA with the workflow's checks and the minutes left; none left → it readspending, unread. Every rowsuccessorskipped→ covered by that SHA, oncereferences/already-reverted.mdagain finds no revert. Stillpending, at the cap or unread → the workflow's not-run andpendingrows arepending; and when each of its other rows notsuccessis cancelled or afailurereferences/attribution.md§CI check calls always untied (a refusal, a runner error), every row of the workflow ispending. The later run may yet cover it, so that ends in the relaunch stop, not in an unattributable one. Anything else leaves the rows as the merge commit had them.
A later run's failure never replaces the merge commit's row: it may be a later commit's.
Verdict
Over the rows as they now stand, first match wins:
| Rows | Result |
|---|---|
any failure |
each failed check fail, with its cause and job link, each cancelled one fail untied — run cancelled, each not-run one fail untied — never ran, and each pending one pending; go on |
| any cancelled | stop: "post-merge CI cancelled at <merge commit>: <names>; re-run it, then relaunch" |
| any not run | stop: "post-merge CI never ran <names> for <merge commit>" |
any missing |
stop: "post-merge CI check missing at <merge commit>: <names>" |
any pending |
stop: "post-merge CI still pending at <merge commit>" |
| else | each check pass |