Repository navigation
Flow alarm: the train's progress marker no longer hides the queue it counts - #2185
Merged
Merged
Conversation
…counts ready() in flow_alarm.py counted the train's own progress marker (the perun/train-stage status that merge_train.py stage posts pending on each PR it queued) as a check, so every PR a train had queued read as not ready. The stop-starting cap and the symptom alarm then undercounted the waiting queue exactly while a train was running, and the cap let new work start that it should have held. ready() now skips the marker in any state, with the rule landing_watchdog.green() uses; any other pending status still blocks, and a PR whose only status is the marker has no check. The module puts its own directory on sys.path and sets dont_write_bytecode, as merge_train.py does, so the lazy import also works when that directory is off sys.path (python3 -P or -I, PYTHONSAFEPATH) and writes no bytecode for the module it loads. Tests: run-ci-tests.sh --affected 9/9 on an identical tree; flow_alarm 69/69; changelog fragments 23/23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The stop-starting cap and the
symptomalarm no longer undercount the waiting queue while a merge train runs:ready()stops treating the train's own progress marker as a check.What changes
flow_alarm.pyready()skips theperun/train-stagestatus in any state, with the rulelanding_watchdog.green()uses; any other pending status still blocks, and a PR whose only status is the marker has no check.sys.pathand setsdont_write_bytecode, asmerge_train.pydoes, so the lazy import also works with that directory offsys.path(python3 -Por-I,PYTHONSAFEPATH).sys.path; another pending status blocks; the cap counts the train's queue.Known limits
landing_watchdog.pymissing beside the hook (a broken install), the cap fails open like any unread queue, andsymptomexits 1 with no ALARM line.Verification
Tests: run-ci-tests.sh --affected 9/9 on an identical tree; flow_alarm 69/69; changelog fragments 23/23
🤖 Generated with Claude Code