Skip to content

fix: guard low-signal PR closes - #482

Merged
steipete merged 1 commit into
mainfrom
fix/recent-author-low-signal-guard
Jul 10, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/recent-author-low-signal-guard

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • require a live mergeable=false / mergeable_state=dirty conflict before applying low_signal_unmergeable_pr
  • require dated current-head evidence and at least the configured stale interval without contributor comments, reviews, inline comments, or head activity
  • fail closed during stale F-rated promotion and route trusted low-signal close markers through the authoritative apply path
  • leave duplicate, superseded, and implemented-on-main close reasons unchanged

Why

OpenClaw PRs #91271 and #91280 were closed as low-signal even though both were MERGEABLE / UNSTABLE and their contributor had commented and force-pushed roughly 4.5 hours earlier. The old final guard checked maintainer signals but did not verify the claimed conflict or contributor activity.

Validation

  • pnpm test — 1454 passed
  • pnpm run build:all
  • pnpm run lint
  • pnpm run format:check
  • focused promotion/router suite — 134 passed
  • GPT-5.6 Sol High structured review — clean

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c910696432

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/clawsweeper.ts
Comment on lines 22127 to +22129
const lowSignalBlockReason =
closeReason === "low_signal_unmergeable_pr"
? lowSignalUnmergeablePrApplyBlockReason(number)
? lowSignalUnmergeablePrApplyBlockReasonSafe(number, staleMinAgeDays)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check low-signal liveness before syncing close comments

For an unsynced low_signal_unmergeable_pr report whose live PR is now mergeable or has recent author activity, this guard runs only after the earlier needsReviewCommentSync block has already upserted the durable close-proposal comment, and it can be skipped entirely for the run if that sync hits the processed limit. That leaves a public ClawSweeper “close this PR” comment on a PR that the new live guard keeps open; add the low-signal block to the pre-sync gates like the product-direction and inactivity checks.

Useful? React with 👍 / 👎.

@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 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 10, 2026
@clawsweeper

clawsweeper Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 9:55 AM ET / 13:55 UTC.

Summary
The PR requires a live DIRTY merge conflict, dated current-head evidence, and at least the configured inactivity interval without contributor activity before low-signal PR closure, while routing trusted markers through authoritative apply checks.

Reproducibility: yes. at source level. Current main’s final low-signal guard lacks the live conflict and contributor/current-head inactivity checks needed to reject the reported MERGEABLE/UNSTABLE and recently active cases.

Review metrics: 3 noteworthy metrics.

  • Patch surface: 6 files, +576/-30. The change affects final close eligibility and trusted routing, with most additions devoted to focused regression coverage.
  • Activity sources: 5 sources checked. Issue comments, reviews, inline comments, timeline events, and current-head source activity can each prevent an unsafe close.
  • Focused safety scenarios: 5 principal cases added. Coverage exercises the incident state, recent activity, valid stale conflict, missing head evidence, and stale-promotion behavior.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

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

Rank-up moves:

  • [P1] Post redacted authoritative apply dry-run output covering both a blocked active PR and an eligible inactive DIRTY PR.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR reports tests, build, lint, formatting, and structured review only; add redacted terminal or live output from the real apply path, then update the PR body to trigger a fresh review or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] No after-fix real GitHub apply or dry-run output is attached, so production API-shape and sequencing behavior remain unproven despite strong mocked coverage.

Maintainer options:

  1. Add live apply proof (recommended)
    Provide redacted authoritative dry-run output for the reported active-PR state and a legitimate stale-conflict state before merge.
  2. Explicitly override proof
    A maintainer may accept the focused automated coverage without live proof and own the residual production GitHub-state risk.

Next step before merge

  • [P1] No code repair is indicated; the contributor should add real apply-path proof, or a maintainer must explicitly override that merge gate.

Security
Cleared: The diff introduces no dependency, workflow-permission, secret-handling, package-resolution, artifact-download, or third-party execution changes.

Review details

Best possible solution:

Keep the centralized fail-closed guard and merge it after redacted authoritative apply output demonstrates both an active MERGEABLE/UNSTABLE PR being skipped and an inactive DIRTY PR remaining eligible.

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

Yes at source level. Current main’s final low-signal guard lacks the live conflict and contributor/current-head inactivity checks needed to reject the reported MERGEABLE/UNSTABLE and recently active cases.

Is this the best way to solve the issue?

Yes. Fresh fail-closed checks at the authoritative mutation boundary are the narrowest maintainable fix, and aligning stale promotion plus trusted routing prevents alternate paths from bypassing them.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P1: The PR fixes a live automation regression capable of closing active contributor pull requests incorrectly.
  • add merge-risk: 🚨 automation: The diff changes production close eligibility and trusted marker routing, so incorrect assumptions could repeat wrongful closures or block legitimate cleanup.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports tests, build, lint, formatting, and structured review only; add redacted terminal or live output from the real apply path, then update the PR body to trigger a fresh review or ask a maintainer to comment @clawsweeper re-review.

Label justifications:

  • P1: The PR fixes a live automation regression capable of closing active contributor pull requests incorrectly.
  • merge-risk: 🚨 automation: The diff changes production close eligibility and trusted marker routing, so incorrect assumptions could repeat wrongful closures or block legitimate cleanup.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports tests, build, lint, formatting, and structured review only; add redacted terminal or live output from the real apply path, then update the PR body to trigger a fresh review or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

What I checked:

  • Current-main regression: The existing final low-signal guard checks assignees, requested reviewers, maintainer comments, and reviews but does not verify a live conflict or recent contributor/current-head activity. (src/clawsweeper.ts:3647, 0667396551a4)
  • Live conflict gate: The branch permits low-signal closure only when GitHub reports both mergeable=false and mergeable_state=dirty; mergeable, unstable, unknown, or contradictory state fails closed. (src/clawsweeper.ts:3648, c910696432ac)
  • Contributor inactivity gate: The branch considers issue comments, reviews, inline comments, qualifying timeline events, and current-head source activity, then requires at least 30 days or the longer configured stale interval. (src/clawsweeper.ts:3688, c910696432ac)
  • Authoritative apply guard: Final apply rehydrates paginated comments, reviews, inline comments, timeline, pull conflict state, and current-head activity; missing data or API errors return a keep-open block reason. (src/clawsweeper.ts:3765, c910696432ac)
  • Promotion guard: Stale F-rated promotion refuses truncated activity context and requires the same live conflict, review, head-evidence, and inactivity conditions before persisting a low-signal marker. (src/clawsweeper.ts:14970, c910696432ac)
  • Trusted routing boundary: The generic trusted close router no longer directly accepts low-signal markers and requires the apply-decisions path to prove live conflict and author inactivity. (src/repair/comment-router-core.ts:1228, c910696432ac)

Likely related people:

  • steipete: Introduced the current low-signal apply guard in commit 0667396, authored the adjacent promotion-semantics work in dda199e, and dominates recent history on the central apply and routing files independently of this proposal. (role: feature owner and recent area contributor; confidence: high; commits: 0667396551a4, dda199e48a10, d43deab4b78d; files: src/clawsweeper.ts, src/repair/comment-router-core.ts, test/apply-pr-promotion.test.ts)
  • brokemac79: Recent merged commits touch apply cursor handling, timestamp reporting, and nearby automation behavior, making this person a useful secondary reviewer for close-path safety. (role: adjacent apply-path contributor; confidence: medium; commits: 373716be22af, 7af92c124673; files: src/clawsweeper.ts, test/apply-pr-promotion.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 3110fe8 into main Jul 10, 2026
12 checks passed
@steipete
steipete deleted the fix/recent-author-low-signal-guard branch July 10, 2026 13:58
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P1 Urgent regression or broken agent/channel workflow affecting real users now. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant