Skip to content

fix(source-control): make pull-request ready refuse the flip when the verify gate failed on the head #8528

Closed

Description

@kyle-sexton

Problem

/source-control:pull-request ready runs the verify gate as its own step: plugins/source-control/skills/pull-request/reference/ready-for-review.md (step 2.5.3) says to run scripts/check-affected.sh --tests and that "exit 1 stops the flip", and makes "the verify gate is clean on git rev-parse HEAD" a completion criterion. That is prose only. The check runs in its own Bash call, so its exit status cannot stop a later call. The flip (step 2.5.4 and the GitHub provider's ready-for-review.md) runs gh pr ready with only check-ready-holds.sh in front of it, and that script never reads a verify result.

Evidence

On #8495 the PR was marked ready at 04:41:54Z on 2026-10-20 after its verify gate failed, with no ready-skip record. It was returned to draft at 04:45:44Z and fixed in 526a296 ("map the extraction packages to their test-node lane").

Fix

The verify step records a result bound to the head commit. A pre-flip script, run in the same shell command as gh pr ready, exits non-zero unless it reads pass for the current HEAD_SHA, or a recorded --skip verify exists for that head. Add a test that a failed or missing result refuses the flip.

🤖 Generated with Claude Code

https://claude.ai/code/session_015Je65UWD8kTTF22Shd8fgY

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 20, 2026
  2. github-actions commented on Oct 20, 2026

    @github-actions
    Contributor

    Thanks for the report. As I understand it, the verify gate in /source-control:pull-request ready is only prose. Its result is not tied to the head commit, so gh pr ready can run after a failed check, as happened on #8495. The proposed fix is a pre-flip script, run in the same shell command as the flip. It would require a recorded pass for the current HEAD SHA or a recorded --skip verify, and a test would cover the refusal. The scope and evidence are clear. I found no exact duplicate. Related, but not the same: #7216 (ready flip racing a push) and #6997 (eval fixture for ready runs). A maintainer will confirm the priority and work class.

    Automated triage. A maintainer reviews it.

  3. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 20, 2026
  4. added
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Oct 20, 2026
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

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions