Skip to content

fix(queue): fast-track a PR whose merge/close got denied by a live staleness recheck - #7886

Merged
JSONbored merged 1 commit into
mainfrom
claude/pr-7438-open-state-bug-c1a62a
Jul 21, 2026
Merged

fix(queue): fast-track a PR whose merge/close got denied by a live staleness recheck#7886
JSONbored merged 1 commit into
mainfrom
claude/pr-7438-open-state-bug-c1a62a

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Root-caused why review-good, gate-passed PRs (loopover fix(queue): stamp console.error payloads as level error #7859, test(miner-ui): add unit coverage for chat-scroll stick-to-bottom logic #7847) sat open needing a manual approve+merge, and why a metagraphed PR blocked on a duplicate-issue link stayed open despite the bot recommending close: the executor's live staleness rechecks (duplicate-cluster winner / base-conflict / review-thread) and the mergeable_state-not-yet-resolved hold are all correct on their own, but nothing schedules a prompt follow-up look afterward — the PR just waits out the ordinary sweep cadence, which for a busy repo can take a long time. GitHub sends no webhook when async mergeable_state computation finishes or when a sibling PR merges, so nothing else naturally re-triggers a look either.
  • Extends the existing outage-repair priority set (surfaceRepairPriorityPullNumbers) to also fast-track: (1) a PR the bot already approved at its current head whose mergeable_state is still ambiguous (neither clean nor dirty), and (2) a PR whose most recent close/merge attempt was denied by one of those three self-resolving live staleness rechecks (new recentStaleRecheckDeniedPullNumbers query). Both inherit the existing per-head-SHA attempt cap, so a genuinely stuck PR still falls back to ordinary cadence rather than being re-selected forever.
  • Deliberately excludes CI-staleness and "manual-review label present" denials — CI flipping already re-triggers a fresh look via the check-run/status webhook that changed it, and a label-present denial is durable (needs a human to clear it), so fast-retrying it would just waste cycles.

Test plan

  • npm run typecheck
  • New tests: test/unit/surface-repair-priority.test.ts (9 cases) + additions to test/unit/db-parsers.test.ts (8 cases, incl. a source-text parity guard against wording drift in agent-action-executor.ts)
  • 100% line/branch coverage on every new line (verified via scoped vitest --coverage)
  • Full unsharded npm run test:coverage: only pre-existing, environment-dependent failures (missing packages/loopover-mcp/loopover-miner build output in a fresh npm ci, missing Claude API credentials) — none touch the changed files; confirmed by rebuilding those sub-packages and seeing the affected tests pass

…aleness recheck

A duplicate-cluster winner merging, a base conflict clearing, or GitHub finishing
its async mergeable_state computation all carry no webhook to the affected PR, so
a review-good PR left in this state waited out the ordinary sweep cadence instead
of getting a prompt re-look. Extends the existing outage-repair priority set
(surfaceRepairPriorityPullNumbers) to also fast-track these cases, reusing its
existing per-head-SHA attempt cap so a genuinely stuck PR still falls back to
ordinary cadence.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 21, 2026
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.23%. Comparing base (1454d22) to head (f94197d).
⚠️ Report is 42 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7886      +/-   ##
==========================================
- Coverage   91.40%   90.23%   -1.17%     
==========================================
  Files         730       90     -640     
  Lines       74763    26200   -48563     
  Branches    22815     5401   -17414     
==========================================
- Hits        68335    23642   -44693     
+ Misses       5385     2241    -3144     
+ Partials     1043      317     -726     
Flag Coverage Δ
shard-1 76.79% <60.00%> (+18.22%) ⬆️
shard-2 44.96% <66.66%> (-6.88%) ⬇️
shard-3 53.08% <93.33%> (+2.87%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/db/repositories.ts 96.71% <100.00%> (+0.01%) ⬆️
src/queue/processors.ts 95.78% <100.00%> (+<0.01%) ⬆️

... and 640 files with indirect coverage changes

@JSONbored
JSONbored merged commit 2364ad4 into main Jul 21, 2026
14 checks passed
@JSONbored
JSONbored deleted the claude/pr-7438-open-state-bug-c1a62a branch July 21, 2026 16:24
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant