Skip to content

(shepherd): Treat superseded cancelled check runs as non-failing #583

Description

@evanharmon1

Problem

ai/skills/universal/shepherd/assets/readiness-gate.sh evaluates every check run on the head and fails closed on any non-passing conclusion. That is right for failure, but a cancelled check run that was superseded by a later passing run of the same check on the same head — the shape a workflow concurrency group produces when two triggers (a push and a PR-body edit) arrive seconds apart — blocks promotion with checks-failing: guard even though gh pr checks --watch reports the check green. The operator has to notice the duplicate, gh run rerun the cancelled one, and re-gate: a round trip the gate could avoid.

Current violation (observed 2026-08-22)

evanharmon1/harmon-init#1023 head 91452af: two guard check runs — cancelled at 17:27:24 (cancelled by the concurrency group after a body edit) and success at 17:27:27 (the push). readiness-gate.sh check … --codex-disabled{"status":"fail","condition":"checks-failing","detail":"checks failing: guard"}. Re-running the cancelled run to success cleared it.

Acceptance criteria

  • [CI] For a given check name on the gated head, a cancelled run that has a later-started run of the same name concluding success on the same head is treated as superseded (neither failing nor pending); failure, and cancelled with no later passing run, still fail closed. Tests cover all three shapes.
  • [CI] Alternatively (if the gate deliberately stays strict), the shepherd SKILL §6 names the situation and the remedy (gh run rerun <id> of the cancelled run, then re-gate) so it does not cost a diagnosis.

Verify

grep -n "cancelled\|superseded" ai/skills/universal/shepherd/assets/readiness-gate.sh

No handling of the superseded shape means the gap is still open.

Provenance

Hit live while shepherding harmon-init#1023 on 2026-08-22.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-generatedCreated or authored by an AI agentarea:shepherdThe shepherd skill and its checker/readiness-gate assetsbugSomething isn't workingdomain:agent-workflowAI-delegated dev sessions: the universal skill suite (kickoff→wrap) and shared subagents

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions