Skip to content

fix(queue): re-gate every PR linked to changed issue - #3787

Merged
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-linked-issue-re-gate-cap
Jul 6, 2026
Merged

fix(queue): re-gate every PR linked to changed issue#3787
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-linked-issue-re-gate-cap

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Issue-side label/assignment changes can flip deterministic linked-issue hard rules and must promptly re-evaluate all linked PRs to avoid stale passing gate state that could permit an ineligible contributor PR to merge.
  • The previous implementation capped the immediate wake at SWEEP_MAX_PRS, leaving a tail of linked PRs un-re-gated until a later staleness sweep and creating a security-relevant race window.

Description

  • Remove the slice(0, SWEEP_MAX_PRS) cap in maybeReReviewOnLinkedIssueChange so every open PR that links the changed issue is enqueued for a staggered agent-regate-pr job (preserves the per-PR delay staggering behavior).
  • Update the doc comment above the function to reflect that every linked PR is woken promptly (still coalesced per-PR where appropriate).
  • Update the regression test in test/unit/queue.test.ts to seed more than SWEEP_MAX_PRS linked PRs and assert that all linked PRs are enqueued with the expected staggered delaySeconds values.

Testing

  • Ran the focused unit test: npx vitest run test/unit/queue.test.ts -t "issue-side linked PR wake re-gates every linked PR", and the targeted test passed.
  • Ran type checking with npm run typecheck, which succeeded.
  • Ran the full coverage job npm run test:coverage; the run produced coverage output but failed the repository global coverage thresholds (this is a global-suite result, not a regression of the focused change).
  • git diff --check was validated locally (no diff-check errors reported).

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.30%. Comparing base (8398615) to head (509d6a5).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3787   +/-   ##
=======================================
  Coverage   93.30%   93.30%           
=======================================
  Files         317      317           
  Lines       32384    32384           
  Branches    11876    11876           
=======================================
  Hits        30215    30215           
  Misses       1537     1537           
  Partials      632      632           
Files with missing lines Coverage Δ
src/queue/processors.ts 94.12% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 6, 2026
@JSONbored
JSONbored merged commit f15b832 into main Jul 6, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-linked-issue-re-gate-cap branch July 6, 2026 10:08
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 6, 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.

Development

Successfully merging this pull request may close these issues.

1 participant