Skip to content

fix(review): auto-merge reads live mergeable_state (green+approved PRs were stuck open) - #1076

Merged
JSONbored merged 1 commit into
mainfrom
fix/auto-merge-live-mergestate
Jun 22, 2026
Merged

fix(review): auto-merge reads live mergeable_state (green+approved PRs were stuck open)#1076
JSONbored merged 1 commit into
mainfrom
fix/auto-merge-live-mergestate

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Follow-up to #1075. With requireApprovals=0, green+approved PRs should auto-merge, but the planner read the STORED mergeableState which lags GitHub's async recompute after the bot's own APPROVE flips blocked→clean — leaving PRs stuck OPEN at mergeState=CLEAN (awesome-claude#4206, metagraphed#1438/#1448). Now maybeRunAgentMaintenance fetches the LIVE mergeable_state (GET /pulls/{n}) and the planner uses it; 'unknown' defers to a later trigger/sweep. Already deployed (e100bf57); full suite 3448 green.

…s were stuck OPEN)

With requireApprovals=0, a green+approved PR should auto-merge — but the planner read the STORED mergeableState,
which lags GitHub's async recompute after gittensory[bot]'s own APPROVE flips blocked→clean. Result: PRs stuck
OPEN at mergeState=CLEAN, never merged (e.g. awesome-claude#4206, metagraphed#1438/#1448). Fix: maybeRunAgentMaintenance
fetches the LIVE mergeable_state (fetchLivePullRequestMergeState, GET /pulls/{n}) and the planner uses it
(falls back to stored on a fetch error); 'unknown' is treated as not-yet-clean so a later trigger/sweep retries.
@dosubot dosubot Bot added the size:S label Jun 22, 2026
@ghost

ghost commented Jun 22, 2026

Copy link
Copy Markdown

Note

🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦

💡 Gittensory review — advisory only

0 files · no blockers · readiness 0/100

💡 Advisory only — PR closed before full evaluation. No late first comment was created.

Signal Result Evidence
Code review ✅ No blockers synthesized
Gate result ⚠️ Skipped #1076 is no longer open.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost added the gittensory:reviewed label Jun 22, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.93%. Comparing base (58d3d34) to head (3cb50b6).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/queue/processors.ts 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1076      +/-   ##
==========================================
- Coverage   94.94%   94.93%   -0.01%     
==========================================
  Files         150      150              
  Lines       18212    18216       +4     
  Branches     6598     6601       +3     
==========================================
+ Hits        17291    17294       +3     
  Misses        413      413              
- Partials      508      509       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 1f432e7 into main Jun 22, 2026
18 of 19 checks passed
@JSONbored
JSONbored deleted the fix/auto-merge-live-mergestate branch June 22, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant