fix(queue): re-gate every PR linked to changed issue - #3787
Merged
Conversation
Contributor
|
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 #3787 +/- ##
=======================================
Coverage 93.30% 93.30%
=======================================
Files 317 317
Lines 32384 32384
Branches 11876 11876
=======================================
Hits 30215 30215
Misses 1537 1537
Partials 632 632
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
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
slice(0, SWEEP_MAX_PRS)cap inmaybeReReviewOnLinkedIssueChangeso every open PR that links the changed issue is enqueued for a staggeredagent-regate-prjob (preserves the per-PR delay staggering behavior).test/unit/queue.test.tsto seed more thanSWEEP_MAX_PRSlinked PRs and assert that all linked PRs are enqueued with the expected staggereddelaySecondsvalues.Testing
npx vitest run test/unit/queue.test.ts -t "issue-side linked PR wake re-gates every linked PR", and the targeted test passed.npm run typecheck, which succeeded.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 --checkwas validated locally (no diff-check errors reported).Codex Task