fix(review): treat an unstable GitHub mergeable_state as a held verdict in the PR panel - #5734
Conversation
…ct in the PR panel A PR whose mergeable_state is "unstable" (e.g. a non-required third-party check reporting non-success) was rendered "approve/merge recommended" / "safe to merge" even though the disposition planner already withholds the merge for any non-"clean" mergeable_state -- directly contradicting the comment on the same PR. deriveUnifiedStatus only downgraded ready->held for dirty/behind; unstable was a gap, not a deliberate exclusion (unlike unknown and blocked, which are already documented as intentionally non-downgrading).
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5734 +/- ##
=======================================
Coverage 95.06% 95.06%
=======================================
Files 581 581
Lines 46181 46181
Branches 14811 14811
=======================================
Hits 43904 43904
Misses 1516 1516
Partials 761 761
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-14 09:55:42 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
mergeable_stateasunstable, and the disposition planner's own audit trail showsagent.action.hold: merge withheld because mergeable_state is unstablefor the same PR at the same time.deriveUnifiedStatus(src/review/unified-comment.ts) only downgraded an otherwise-readystatus toheldfordirty/behindmerge states.agentHoldAuditDetail(src/queue/processors.ts) -- the function that actually decides whether to withhold a merge -- treats ANYmergeableState !== "clean"as a withhold reason.unstablefell through that gap: a real withhold, but the comment claimed "safe to merge" anyway.unstableto the downgrade condition. Leftunknownandblockedalone -- those are already documented as deliberately non-downgrading (a not-yet-computed state, and a pending-bot-approval state the bot itself will clear).Test plan
npx tsc --noEmitnpx vitest run test/unit/unified-comment.test.ts test/unit/unified-comment-bridge.test.ts(166 passing)npm run test:ci(full local gate; one unrelated pre-existing failure intest/unit/mcp-cli-doctor.test.tsthat depends on local machine env/credential state, not touched by this change)unstable(including case-insensitivity) alongside the existingdirty/behindfeat(mcp): add gittensory_explain_gate_disposition tool (#2234) #4220 coverage