Repository navigation
Conversation
Reading every selected PR in one wave timed out the tail of a large backlog, so PRs stayed pending across passes. Cap each wave and carry the deferred PRs first into the next pass.
FM_PR_HEALTH_BATCH=08 aborted every poll in the batch arithmetic. Normalize it as base 10 and keep it a test-only seam.
[Medium impact] The PR appears safe to merge; both previous findings are addressed. Reviews (2) · Last reviewed commit: "no-mistakes(ci): Keep pending order on d..." · Reviewed by Greptile |
Contributor
Author
|
Closing in favour of #8646, which bounds the same owned-PR reads (at most 4 at a time, with a 3-pass backoff for a timed-out read) and has been reviewed. Thanks for flagging the overlap. |
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.
Contract-class: restore
This restores the intended behavior that every owned PR is read within a bounded number of passes, with no new config key. Starting a due rebase stays a supervisor action under the standing rebase rule; this change adds no rebase trigger.
What Changed
bin/fm-pr-health.shreads at most 20 owned PRs per pass (defaultREAD_BATCH, overridable for tests viaFM_PR_HEALTH_BATCH). Invalid, empty or zero values fall back to 20, and a leading-zero value is parsed as decimal.notifications.pending. Pending PRs are ordered first on the next pass, so a large backlog is read in full over a bounded number of passes instead of every read timing out at once.docs/configuration.mdand the script header comment describe the 20-PR cap.tests/fm-pr-health.test.shis extended with batch and override coverage.Risk Assessment
✅ Low: The change is bounded to poll(). It caps each read wave at 20 PRs and carries deferred PRs to the front of the next pass. I traced the full-sweep, event, unsettled and persistently-unsettled cases, and each one rotates fairly with no duplicate or lost URLs. The batch override is a normalized test-only seam, the user already declined a finding to remove it, and the docs add no config key. The change adds no rebase text and no auto-rebase, so it matches the intent.
Testing
I ran the PR health test file, which drives the real fm-pr-health.sh against a fake forge. The new backlog-rotation and leading-zero tests passed. The one-wave concurrency test failed once in the full run, possibly because other test processes were running at the same time. It passed on both solo reruns. I did not rerun it on the base commit, so the cause is unconfirmed. The change has no rebase trigger and no user-facing config key. The batch override is documented in the script header as test-only.
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-pr-health.test.sh(full file)test_all_owned_pr_reads_start_in_one_waverun alone twice via a temporary trimmed copy of the test script (since removed)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.