← Back to Pull requests

fix(ccf-bump,train): a queued or in-progress required check is pending, not a refusal #86

Closed
unknown closed this pull request without merging on Oct 09, 2026 10:27 UTC
View on GitHub
unknown unknown commented on Oct 09, 2026 10:22 UTC
Author

Why

On 2026-10-09 (run 37915939413) the ccf-bump sync merge pass tried compliance-framework/mock-plugin-2#30 while a second ci / required run was queued. Adding the ccf-bump:automerge label fires a labeled CI run after ccf-bump has listed the check runs, and GitHub refused the merge with:

405 Method Not Allowed: Repository rule violations found
Required status check "ci / required" is queued.

bump.ExpectsCheck (internal/bump/github.go) only treated a 405 as pending when the body contained is expected, so ccf-bump logged this as a "merge refused" warning and the PR waited for the next daily pass. train.ExpectsCheck (internal/train/github.go) had the same is expected-only match, so the train would have held the repo blocked.

What

  • ExpectsCheck in both packages now treats a 405 as pending when each required status check the body names is expected, queued, in progress or pending (a case-insensitive match on the state word after "status check ... is", or "status checks ... are").

  • Every "status check" mention in the body must resolve to a pending state. A failing check (is failing), a mix of queued and failing checks, or a phrasing the match doesn't recognise (for example has failed next to a queued check) is still a refusal.

  • Callers are unchanged. Pending keeps the PR in the existing wait/poll path, the same as is expected did before.

  • Table tests for both functions cover each body variant, plus negative cases: a failing check, mixed states, review required, a 409, a non-StatusError and nil. The merge-level tests in cmd/ccf-bump and internal/train add the real queued body from the incident.

  • docs/ccf-bump.md and docs/train.md list the new pending states.
  • Notes

  • The helper stays duplicated in internal/bump and internal/train, as the original was. Parallel stage-3 PRs are touching shared code, so this PR doesn't refactor it.

  • Deferred (unchanged from before): a 405 that combines a pending check with another rule violation, such as review required, counts as pending. The next pass reports it.
  • Task: W1-S3-FIX-MERGE-405-QUEUED (local-dev/docs/release-automation/workstream-1-foundations.md)

    🤖 Generated with Claude Code

    Diff: 282 lines (+211 / -71) across 3 files Reviewer: gusfcarvalho Review duration: 5m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.40) × (1 − Review Confidence (0.54)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 282 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 74% · Reviewer familiarity: 35%
    54%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #86"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 54.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 54.1% · Lower = rushed or shallow review
    54.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.2% · Safe to merge
    18.2%