Repository navigation
Conversation
|
Speaking as Kun's firstmate: thanks @Azd325. Keeping one slow PR from starving the rest of the pass is a good fix. This is my first look at head Diff review (stands in for Greptile while it's out): safe, no P1. Contract class: new-default. The wave and ordering part restores the documented bounded pass. The new "pr-health: no PR read settled this sweep ..." lines, though, are a new kind of output that wakes the owning task, and today only author-actionable states, conflicts and failing checks print. Since that's switched on under the existing monitor flag, it needs Kun's word. VISION, rule by rule: One captain: cannot tell (an honest failure line versus a new kind of noise is Kun's call) · Authority: aligns · Scripts: aligns · Restart: aligns (pending state persists) · Delegation: aligns · Vendor: neutral · Scope: aligns. Gates: the attestation binds this head with no skipped steps; live validation is go (5 of 5, against a stubbed Where it stands: nothing is needed from you. This pass is at its cap on new |
|
Speaking as Kun's firstmate: a correction to my note above, @Azd325. This PR is the fix for your #8795. When I labelled that issue Contract class: restore (opt-in monitor), not new-default. VISION: aligns on every rule, One captain included ("silence never hides a failure"). Where it stands: unchanged otherwise. Diff review safe, no P1 (P3: |
Fixes #8795
What Changed
bin/fm-pr-health.shreads owned PRs in waves ofREAD_WAVE(4), in listed order. Each read gets the time left before the check timeout, with a floor ofREAD_FLOORseconds. PRs the timeout leaves unreached stay pending for the next pass. PRs whose read failed are recorded inread_failedand listed after untried PRs, so one stuck PR cannot hold back the rest.read_prrecords atimeoutcause, andread_failedentries are pruned when a PR is no longer owned.docs/configuration.mddescribes the new read order, pending behavior and failure announcements.tests/fm-pr-health.test.shadds coverage for these paths.Risk Assessment
✅ Low: The round-2 fix keeps the 'announced' flag apart from demotion, which closes the silent stuck-PR path (A and B are read together, A settles, and B then prints when it fails alone); the updated docs and the new regression test match the code.
Testing
I ran the whole fm-pr-health test file twice. It drives the real bin/fm-pr-health.sh against a stubbed
ghand a disposable home. Every case passed. That includes the wave, slow-forge, cannot-settle, stuck-PR and ordering cases. The docs match the new behavior. I did not run a real Herdr or Claude primary, because the monitor only talks togh.Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed (2) ✅
bin/fm-pr-health.sh:584- A slow PR in the first wave can block every later PR on every pass, and the monitor says nothing. Each read now gets the whole remaining deadline (READ_CAP=0, line 574). Each wave waits for all of its PRs (lines 584-587). Example: 8 owned PRs, and PR docs: polish README banner and repo housekeeping #2 has a paginated GraphQL or suite read that takes longer than ~20 s. Wave 1 uses up the deadline, the loop breaks at line 576, and PRs 5-8 stay pending. The next pass selects them in the same listed order, with PR docs: polish README banner and repo housekeeping #2 still pending ahead of them, so PRs 5-8 are never read. PRs 1, 3 and 4 settle, so settled>0 and the cannot-settle line never prints. Before this change, the 5 s cap let all 8 reads complete. The intent says an unreached PR 'stays pending for the next pass', but without rotation it never makes progress. Possible remedies: put unsettled or pending PRs after fresh ones, rotate the start offset, or keep a per-read cap below the full deadline. Each one changes the accepted ordering design, so the author must choose.bin/fm-pr-health.sh:614- The cannot-settle line repeats, with a wrong cause, when one PR can never settle but the forge is healthy. Examples: the suite list goes past the page bound (the changed test at tests/fm-pr-health.test.sh:820 now expects this line), or the repo returns 404/403 after access is lost. Sequence: pass 1 selects only stuck PR B and prints the line. Pass 2 gets a notification for PR A, A settles, and cannot_settle resets to false. Pass 3 selects only B (it is pending) and prints again. So the line prints again after every pass in which some other PR gets activity. Each time it says 'forge reads are slow or failing', but the reads were fast. That goes against the 'one line per new actionable condition' contract and the 'honest' wording in the intent. Possible remedies: track the stuck state per URL, or use a message that does not name forge slowness for a read that failed on content. The author must choose which behavior is correct.🔧 Fix applied.
4 issues (1 error, 3 warnings) still open:
bin/fm-pr-health.sh:584- A slow PR in the first wave can block every later PR on every pass, and the monitor says nothing. Each read now gets the whole remaining deadline (READ_CAP=0, line 574). Each wave waits for all of its PRs (lines 584-587). Example: 8 owned PRs, and PR docs: polish README banner and repo housekeeping #2 has a paginated GraphQL or suite read that takes longer than ~20 s. Wave 1 uses up the deadline, the loop breaks at line 576, and PRs 5-8 stay pending. The next pass selects them in the same listed order, with PR docs: polish README banner and repo housekeeping #2 still pending ahead of them, so PRs 5-8 are never read. PRs 1, 3 and 4 settle, so settled>0 and the cannot-settle line never prints. Before this change, the 5 s cap let all 8 reads complete. The intent says an unreached PR 'stays pending for the next pass', but without rotation it never makes progress. Possible remedies: put unsettled or pending PRs after fresh ones, rotate the start offset, or keep a per-read cap below the full deadline. Each one changes the accepted ordering design, so the author must choose.bin/fm-pr-health.sh:614- The cannot-settle line repeats, with a wrong cause, when one PR can never settle but the forge is healthy. Examples: the suite list goes past the page bound (the changed test at tests/fm-pr-health.test.sh:820 now expects this line), or the repo returns 404/403 after access is lost. Sequence: pass 1 selects only stuck PR B and prints the line. Pass 2 gets a notification for PR A, A settles, and cannot_settle resets to false. Pass 3 selects only B (it is pending) and prints again. So the line prints again after every pass in which some other PR gets activity. Each time it says 'forge reads are slow or failing', but the reads were fast. That goes against the 'one line per new actionable condition' contract and the 'honest' wording in the intent. Possible remedies: track the stuck state per URL, or use a message that does not name forge slowness for a read that failed on content. The author must choose which behavior is correct.bin/fm-pr-health.sh:634- The fix round made this regression. A stuck PR whose first failure falls in a pass where another PR settles is never reported. The final jq (lines 643-649) adds every failed URL to.read_failed, including in passes wheresettled > 0, and no line prints in those passes. Later,newly(lines 635-637) leaves out any URL that is already in.read_failed. Sequence: pass 1 is the first or a full sweep and selects A and B. A settles. B fails on the suite page bound, a 403/404, or a timeout. Nothing prints, andread_failed[B]is set. Pass 2 selects only B (it is pending). B fails andsettled == 0, but B is not counted as new, so nothing prints. Every later pass is silent too. The intent requires one honest cannot-settle line when a pass's selected reads all fail, and before the fix round the line printed in pass 2. The same failure happens on a slow forge if one PR in a wave happens to settle. The new testtest_one_stuck_pr_prints_once_across_other_activitymisses this because B fails alone first. Fix: record that the line was printed for a URL separately from the demotion marker. One way is to storeannounced: trueinread_failed[url]only when a line prints for that URL, and computenewlyagainst that field. Demotion can still useread_failedas it does now. Add a test where A and B are first read together, A settles and B is stuck, and the next pass then prints for B.docs/configuration.md:860- The user docs still describe the behavior from before the fix round. They say the line 'prints it again only after a pass in which a read completed', and they do not mention demotion. The code now prints one line per cause (timeout, or no usable answer) for each PR that newly fails. A PR prints again only after one of its own reads settles. A PR whose read failed is listed after the PRs that were not tried. The script header comment (bin/fm-pr-health.sh:98-102) was updated, but this doc was not. Update lines 858-860 to match.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-pr-health.test.sh(all cases ok, no non-ok lines)Checked docs/configuration.md lines 858-860 against the new behavior✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.