Skip to content

fix(tools): the merge train defers a PR whose build gets no lease - #304

Merged
DrunkOnJava merged 1 commit into
mainfrom
tools/train-defer
Oct 26, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
tools/train-defer

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

On a loaded Mac (load 136–221 on 12 cores), the machine's memory governor refused the cargo build for #278 after its 600 s wait. refresh.sh reported "build FAILED" and the train moved on, so the PR dropped out of the queue even though nothing was wrong with it.

  • refresh.sh: a build whose log says governor: no lease exits 75 (deferred) instead of 1. spec_examples now runs from the binary the build already produced rather than through cargo run, so the build is the only step that can be refused.
  • train.sh: on 75 the PR goes back to the end of the queue. Once every queued PR has been deferred in a row, it waits TRAIN_DEFER_SLEEP (default 600 s) before trying again. Real failures still stop the PR as before.

Evidence (E2E with a stub refresh.sh that always exits 75 and a stub gh, queue 901 and 902, TRAIN_DEFER_SLEEP=1): the log shows each PR deferred and requeued, then "every queued PR deferred; waiting 1 s", then the cycle repeating until the test's timeout. The real refresh.sh was restored afterwards and the diff is exactly the change above. bash -n is clean on all three scripts.

Source provenance: written for this repository; no external source consulted.

On a loaded machine the governor refused the build of #278 after 600 s and
the train dropped the PR as failed. refresh.sh now exits 75 when the build
log says the governor gave no lease, and train.sh puts the PR back at the
end of the queue, waiting TRAIN_DEFER_SLEEP (600 s) once every queued PR has
been deferred in a row. spec_examples runs from the built binary instead of
cargo run, so only the build can be refused.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T14:15:48.997829Z 826bc12 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 26, 2026 14:16
@DrunkOnJava
DrunkOnJava merged commit 39ffc22 into main Oct 26, 2026
25 checks passed
@DrunkOnJava
DrunkOnJava deleted the tools/train-defer branch October 26, 2026 14:22
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