fix(review): auto-merge reads live mergeable_state (green+approved PRs were stuck open) - #1076
Conversation
…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.
|
Note 🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦 💡 Gittensory review — advisory only
💡 Advisory only — PR closed before full evaluation. No late first comment was created.
🟩 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.