Files
Holocron/plugins/delivery/.apm/skills/delivery-verify/references/already-reverted.md
T
Defame1297andClaude Opus 5.5 5081206c45 feat(delivery): add the verify stage: delivery-operator and delivery-verify
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
2026-11-24 20:35:04 +00:00

1.7 KiB

Checking for a revert

A merged revert undoes this change, so a pass read after it describes a state that no longer holds, and a later commit that carries the revert shows nothing about this change. Run this check in Step 1, before any waiting, and again where references/apply-wait.md and references/post-merge-ci.md say so: a revert can land during a wait. <n> is the PR's number, <base> its base branch.

  1. Revert PRs. mcp__gitea__list_pull_requests, state all, every page. Keep those whose head branch is revert/pr-<n>. A merged one is a revert; keep its URL. Remember any open one: a pass names it so the human closes it (references/report.md).

  2. Revert commits. rtk git fetch origin, then list the commits on the default branch after the merge commit whose message reverts it, oldest first:

    git log --reverse --format=%H -F --grep='Reverts merge commit <merge commit>' --grep='This reverts commit <merge commit>' <merge commit>..origin/<base>  # ADR-0023: parsed
    

    Bare git, per ADR-0023: rtk filters git log and this output is parsed. Full 40-character SHA in both patterns. Not --first-parent: a revert PR merged with a merge commit puts the revert on the second parent. The first SHA listed is the revert commit.

A merged revert PR or a revert commit → stop with "already reverted by ": the PR's URL, else the revert commit's (<forge origin>/<owner>/<repo>/commit/<SHA>).

At or after a revert

A commit <c> is at or after the revert when rtk git merge-base --is-ancestor <revert commit> <c> exits 0. Such a commit never covers a check and never counts as superseding the merge commit: it carries the undo, not the change.