Skip to content

Flow alarm: the train's progress marker no longer hides the queue it counts - #2185

Merged
remigiusz-antczak merged 1 commit into
mainfrom
land/wave-f1
Nov 1, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
land/wave-f1

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

The stop-starting cap and the symptom alarm 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.py ready() skips the perun/train-stage status 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 with that directory off sys.path (python3 -P or -I, PYTHONSAFEPATH).
  • One test: a PR the train queued or dropped stays ready, also with the directory off sys.path; another pending status blocks; the cap counts the train's queue.

Known limits

  • With landing_watchdog.py missing beside the hook (a broken install), the cap fails open like any unread queue, and symptom exits 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

…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>
@remigiusz-antczak
remigiusz-antczak merged commit fa04f84 into main Nov 1, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the land/wave-f1 branch November 1, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant