Skip to content

shepherd: ticking deferred findings re-triggers edit-gated checks, so the gate can pass on a stale check read #436

Description

@evanharmon1

Invariant

The readiness gate's conditions must all hold for the same head at the
same moment. An action the gate requires must not invalidate a condition
the gate already checked.

Current violation (observed 2026-08-12)

Two gate conditions are in tension, and nothing in the procedure orders them:

  • "Every ## Deferred findings entry is ticked with its disposition" — satisfied
    by editing the PR body.
  • "Required CI checks have concluded successfully" — invalidated by editing the
    PR body, wherever a workflow is gated on pull_request types: [edited].

Editing the body fires pull_request edited, which re-runs any edit-gated
workflow. In evanharmon1/harmon-init that is release-content-guard.yml
(the guard check). So the very edit that satisfies the deferred-findings
condition puts the checks condition back to pending.

Observed on evanharmon1/harmon-init#808, in this order:

  1. checks verified green — 11/11 SUCCESS
  2. readiness-gate.sh checkfail: deferred-no-outcome
  3. PR body edited to record the dispositions
  4. readiness-gate.sh checkfail: checks-pending: guard

Step 4 is the gate working. The hazard is the ordering that avoids it by luck:
an agent that runs the gate, then ticks the body, then promotes on the
earlier pass would promote against a check read that its own edit invalidated.
Nothing in SKILL.md says which order to use, and the intuitive order — verify
everything, then tidy the body, then promote — is the unsafe one.

Promotion is a one-way door (it notifies CODEOWNERS and gh pr ready --undo
cannot unsend that), so this is worth ordering explicitly rather than leaving
to whichever sequence an agent happens to pick.

Distinct from #276, which is about promotions happening outside the gate's
control; this is a promotion that goes through the gate on a stale read.

Verify

grep -rn 'types:.*edited' .github/workflows/     # in the target repo
grep -n 'readiness gate' .claude/skills/shepherd/SKILL.md

Any edit-gated workflow plus a SKILL.md that does not order body edits before
the gate run means the hazard is live. Resolved when the procedure states the
ordering.

Acceptance criteria

  • SKILL.md states that PR-body edits must settle before the readiness gate is run
  • The reason is given — pull_request edited re-triggers edit-gated workflows — so the rule is not cargo-culted
  • Any body edit made after a gate pass requires a fresh gate run before gh pr ready
  • The guidance is consistent with the checks condition treating an unconcluded check as indeterminate, never a pass

Found while doing evanharmon1/harmon-init#808 — filed here because this repo
owns the shepherd skill and its readiness gate; harmon-init only vendors them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions