Skip to content

fix(ci): sweep PRs with unknown mergeability in pr-ci-sweeper#110945

Merged
steipete merged 1 commit into
mainfrom
claude/pr-ci-sweeper-null-mergeable
Jul 18, 2026
Merged

fix(ci): sweep PRs with unknown mergeability in pr-ci-sweeper#110945
steipete merged 1 commit into
mainfrom
claude/pr-ci-sweeper-null-mergeable

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The hourly PR CI sweeper (#110889) never repaired its primary targets. Live verification found three genuinely dropped-CI PRs (#110837, #110776, #110657) skipped as mergeability-pending across three consecutive sweeps: their mergeable stays null / mergeable_state: "unknown" indefinitely, so the conservative guard made exactly the PRs the sweeper exists for permanently unsweepable.

Why This Change Was Made

Probing showed the stuck merge-ref computation IS the pathology: repeated pulls.get calls over 16+ seconds never resolve mergeability for dropped-CI PRs, while healthy PRs compute within seconds. Close/reopen is what un-sticks GitHub's merge-ref machinery (validated on four maintainer PRs this week). The classify guard now re-fires on unknown mergeability and keeps skipping computed conflicts (mergeable: false); the pre-close revalidation applies the same policy. A not-yet-computed conflict costs at most one budgeted re-fire before the post-reopen recomputation yields false and skips it — bounded by the existing per-PR budget of two closes.

User Impact

The sweeper actually heals dropped PR CI instead of logging skips forever. No other behavior changes.

Evidence

  • Live sweep logs (runs 29657783396, 29659015960): skip #110837/#110776/#110657 (mergeability-pending) with zero re-fires despite those heads having zero pull_request CI runs.
  • Direct probes: mergeable: null, mergeable_state: "unknown" persisting across repeated GETs 16+ seconds apart for fix(ui): keep agent avatar initials on grapheme clusters #110837.
  • node scripts/run-vitest.mjs test/scripts/pr-ci-sweeper.test.ts — 14 tests pass with the inverted null-mergeability case.
  • Structured autoreview (gpt-5.6-sol): clean (0.97).
  • Post-merge: live dispatch must show re-fires on the three stuck PRs and CI attaching to their heads.

… target pathology

Live verification showed dropped-CI PRs report mergeable=null and
mergeable_state=unknown indefinitely: the stuck merge-ref computation is
the same failure that dropped their CI, and close/reopen is what
un-sticks it. The pending-mergeability skip therefore made the primary
repair population permanently unsweepable (three real dropped PRs skipped
across three consecutive sweeps). Keep skipping computed conflicts; a
not-yet-computed conflict costs at most one budgeted re-fire.
@steipete
steipete marked this pull request as ready for review July 18, 2026 20:14
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Jul 18, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 4:18 PM ET / 20:18 UTC.

Summary
The PR changes the PR-CI sweeper to re-fire on GitHub’s unknown/null mergeability while continuing to skip computed merge conflicts, with the same policy used during pre-close revalidation.

PR surface: Tests 0, Other -1. Total -1 across 2 files.

Reproducibility: no. high-confidence after-fix reproduction is attached. The PR body gives a source-consistent production path—missing CI plus persistent unknown mergeability—but the claimed repaired behavior still needs a monitored live dispatch.

Review metrics: 1 noteworthy metric.

  • Destructive eligibility guard: 1 changed decision threshold. A single condition changes which third-party PRs can be closed and reopened by the hourly automation, so the rollout evidence matters more than the small diff.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Attach redacted output from a controlled live dispatch showing a target re-fire and CI attachment to its unchanged head.
  • Have the feature owner or another designated reviewer confirm the one-re-fire behavior for a transient unknown conflict and the continuing auto-merge exclusion.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR includes live observations of the pre-fix failure and a focused unit-test claim, but it does not provide after-fix live evidence that unknown-mergeability targets were re-fired and received CI; attach redacted dispatch output when safely available. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging expands a destructive close/reopen operation to PRs whose conflict status has not yet computed; a transient unknown conflict can be re-fired once before the recomputed conflict state is skipped.
  • [P1] The PR body provides production observations and a focused test result, but no attached after-fix live dispatch showing the three target PRs re-fired and received CI on their heads.

Maintainer options:

  1. Land with monitored rollout (recommended)
    Use the existing per-PR budget, then have a designated maintainer monitor one immediate live dispatch and verify that the affected unknown-mergeability PRs receive CI without refiring auto-merge or computed-conflict PRs.
  2. Require a narrower predicate first
    Keep the current guard until the author can establish an additional reliable signal for a stuck merge-ref computation rather than treating all unknown states as eligible.

Next step before merge

  • [P1] A protected maintainer-labelled PR changes destructive automation eligibility and needs an owner-approved rollout decision plus after-fix live evidence, not an automated repair.

Maintainer decision needed

  • Question: Should the existing destructive CI-recovery automation be allowed to close/reopen PRs while GitHub reports mergeability as unknown, relying on the existing per-PR budget and post-reopen conflict recomputation?
  • Rationale: The code change is narrow, but it deliberately changes the safety threshold for a workflow that mutates other contributors’ PR lifecycle state; protected maintainer handling and rollout ownership require an explicit human choice.
  • Likely owner: steipete — They introduced the merged sweeper and documented the production probes that motivate this follow-up.
  • Options:
    • Land with monitored rollout (recommended): Merge the bounded guard change and have the feature owner monitor an immediate live dispatch for the named dropped-CI population, retaining redacted output that CI attaches to their current heads.
    • Keep the pending guard: Retain the current conservative skip until maintainers have a safer way to distinguish a permanently stuck merge-ref computation from a transient unknown conflict.
    • Add a narrower diagnostic gate: Revise the sweeper to require an additional observable stuck-state signal before re-firing unknown mergeability, then rerun focused tests and review the new failure mode.

Security
Cleared: The diff changes a local eligibility predicate and test only; it adds no dependency, workflow permission, token, action reference, download, or package-execution surface.

Review details

Best possible solution:

Keep the bounded two-close budget and computed-conflict guard, then land only with a designated maintainer monitoring the first live dispatch and preserving redacted evidence that affected unknown-mergeability PRs re-fire and attach CI without disturbing auto-merge or computed-conflict PRs.

Do we have a high-confidence way to reproduce the issue?

No high-confidence after-fix reproduction is attached. The PR body gives a source-consistent production path—missing CI plus persistent unknown mergeability—but the claimed repaired behavior still needs a monitored live dispatch.

Is this the best way to solve the issue?

Yes, conditionally: reusing the existing bounded re-fire path while preserving explicit conflict and auto-merge exclusions is narrower than adding a parallel recovery system, but the safety threshold needs maintainer rollout approval.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a7e47653fc89.

Label changes

Label changes:

  • add P1: The merged sweeper currently fails to repair a documented class of dropped CI runs on active pull requests, leaving contributor workflows without required CI.
  • add merge-risk: 🚨 automation: The patch broadens the set of PRs that an hourly GitHub automation may close and reopen when GitHub reports an unresolved mergeability state.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes live observations of the pre-fix failure and a focused unit-test claim, but it does not provide after-fix live evidence that unknown-mergeability targets were re-fired and received CI; attach redacted dispatch output when safely available. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P1: The merged sweeper currently fails to repair a documented class of dropped CI runs on active pull requests, leaving contributor workflows without required CI.
  • merge-risk: 🚨 automation: The patch broadens the set of PRs that an hourly GitHub automation may close and reopen when GitHub reports an unresolved mergeability state.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes live observations of the pre-fix failure and a focused unit-test claim, but it does not provide after-fix live evidence that unknown-mergeability targets were re-fired and received CI; attach redacted dispatch output when safely available. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Tests 0, Other -1. Total -1 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 7 -1
Total 2 8 9 -1

What I checked:

  • Current sweeper decision surface: Current main contains the sweeper’s mergeability gate at this location; the PR removes the skip for null/unknown values while retaining the explicit mergeable === false conflict skip. (scripts/github/pr-ci-sweeper.mjs:37, a7e47653fc89)
  • Proposed revalidation alignment: The branch changes the authoritative pre-close check from requiring mergeable === true to rejecting only a computed false, matching the proposed classify policy for unknown mergeability. (scripts/github/pr-ci-sweeper.mjs:202, e5c9cdfbf59c)
  • Regression coverage updated: The focused table test now expects a null mergeability result with no CI runs to take the bounded re-fire path rather than remain permanently skipped. (test/scripts/pr-ci-sweeper.test.ts:113, e5c9cdfbf59c)
  • Feature provenance: The initial hourly close/reopen sweeper was merged in the related automation change; this PR targets its pending-mergeability guard after production observations showed affected PRs remaining unknown across successive sweeps. (scripts/github/pr-ci-sweeper.mjs:37, 53ad69c6eec5)
  • Operational evidence in PR discussion: The PR body identifies three separate dropped-CI PRs that remained mergeable: null / mergeable_state: "unknown" across repeated sweeps, directly connecting the proposed condition to the sweeper’s intended repair population. (e5c9cdfbf59c)

Likely related people:

  • steipete: Authored the merged initial PR-CI sweeper and this narrowly scoped follow-up to its mergeability guard, so the current behavior and rollout assumptions appear to be connected to their feature history. (role: feature owner; confidence: high; commits: 53ad69c6eec5, e5c9cdfbf59c; files: scripts/github/pr-ci-sweeper.mjs, test/scripts/pr-ci-sweeper.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 0f5d030 into main Jul 18, 2026
168 of 178 checks passed
@steipete
steipete deleted the claude/pr-ci-sweeper-null-mergeable branch July 18, 2026 20:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 19, 2026
… target pathology (openclaw#110945)

Live verification showed dropped-CI PRs report mergeable=null and
mergeable_state=unknown indefinitely: the stuck merge-ref computation is
the same failure that dropped their CI, and close/reopen is what
un-sticks it. The pending-mergeability skip therefore made the primary
repair population permanently unsweepable (three real dropped PRs skipped
across three consecutive sweeps). Keep skipping computed conflicts; a
not-yet-computed conflict costs at most one budgeted re-fire.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant