auto-rebase: measure the room a checkout needs, and stand down green (#1508) #1624

Merged
jaylouisw merged 1 commit from fix/1116-0705 into main 2026-11-16 07:10:35 +00:00
Owner

Fixes #1508.

While the volume was full (#1507) every tick of auto-rebase checked this repository out into the runner workspace and then failed at its first write: six red crosses an hour that were indistinguishable from a regression in the code being rebased, and each one spending the bytes the host was waiting for.

What changed

  • The rebase job's first step measures free space where the checkout will land (df -Pk, walking up to a directory that exists) and stands down green below the threshold, printing the number it measured and naming #1507. MIN_FREE_MB overrides the 512 MB default.
  • The snippet in the issue used a bare exit 0, which ends the step and nothing else - the checkout on the next line then runs anyway and the bytes are still spent. The verdict is published as a step output (room = true|false) and the checkout and the Rebase and arm step are both gated on it, so a stand-down is a stand-down.
  • Unmeasurable defaults to room=true: a df that answers nothing (or a runner that never creates the workspace) must not be able to switch this workflow off silently with a green tick.
  • docs/CI.md: the workflow table row says it stands down when short of disk, and the troubleshooting table gains the "green and did not even check out" row.

Test

test/ci-disk-hygiene.test.js gains the rebase tick measures the room it needs before it checks out, which was written first and failed against origin/main (no df, no gate). It asserts the measurement exists and comes before the checkout, the stand-down is green and names #1507, a threshold is compared rather than printed, room=true is the default, and both the checkout and the rebase are gated on the step output.

Extracted the guard script and ran it: with room it prints 81098 MB free ... and writes room=true; with a threshold above the free space it prints the ::error annotation, writes room=false, and exits 0. node -e 'yaml' parses the file to three steps in the right order.

Gates: node scripts/syntax-check.js - 342 files, all OK. node scripts/check-control-bytes.js - clean. test/ci-disk-hygiene.test.js - 9/9. test/canonical-urls.test.js - 52/52. No engine code touched, so no full npm test.

Not in this PR

The issue also notes the other workflows that check out (ci.yml, pr-rebase.yml, closed-audit.yml, wiki-sync.yml). They are deliberately untouched here: gating a checkout there means a job that can silently pass without running its tests, which needs its own decision, not a copy of this step.

Fixes #1508. While the volume was full (#1507) every tick of `auto-rebase` checked this repository out into the runner workspace and then failed at its first write: six red crosses an hour that were indistinguishable from a regression in the code being rebased, and each one spending the bytes the host was waiting for. ## What changed - The `rebase` job's first step measures free space where the checkout will land (`df -Pk`, walking up to a directory that exists) and **stands down green** below the threshold, printing the number it measured and naming #1507. `MIN_FREE_MB` overrides the 512 MB default. - The snippet in the issue used a bare `exit 0`, which ends **the step** and nothing else - the checkout on the next line then runs anyway and the bytes are still spent. The verdict is published as a step output (`room = true|false`) and **the checkout and the `Rebase and arm` step are both gated on it**, so a stand-down is a stand-down. - Unmeasurable defaults to `room=true`: a `df` that answers nothing (or a runner that never creates the workspace) must not be able to switch this workflow off silently with a green tick. - `docs/CI.md`: the workflow table row says it stands down when short of disk, and the troubleshooting table gains the "green and did not even check out" row. ## Test `test/ci-disk-hygiene.test.js` gains `the rebase tick measures the room it needs before it checks out`, which was written first and failed against `origin/main` (no `df`, no gate). It asserts the measurement exists and comes *before* the checkout, the stand-down is green and names #1507, a threshold is compared rather than printed, `room=true` is the default, and both the checkout and the rebase are gated on the step output. Extracted the guard script and ran it: with room it prints `81098 MB free ...` and writes `room=true`; with a threshold above the free space it prints the `::error` annotation, writes `room=false`, and exits 0. `node -e 'yaml'` parses the file to three steps in the right order. Gates: `node scripts/syntax-check.js` - 342 files, all OK. `node scripts/check-control-bytes.js` - clean. `test/ci-disk-hygiene.test.js` - 9/9. `test/canonical-urls.test.js` - 52/52. No engine code touched, so no full `npm test`. ## Not in this PR The issue also notes the other workflows that check out (`ci.yml`, `pr-rebase.yml`, `closed-audit.yml`, `wiki-sync.yml`). They are deliberately untouched here: gating a checkout there means a job that can silently pass without running its tests, which needs its own decision, not a copy of this step.
auto-rebase: measure the room a checkout needs, and stand down green (#1508)
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 43s
CI / Test (Node 20) (pull_request) Successful in 1m16s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 18) (pull_request) Successful in 1m33s
CI / Test (Node 22) (pull_request) Successful in 1m33s
a5114627ef
While the volume was full (#1507) every tick of this workflow checked the repository
out into the runner workspace and then failed at its first write - six red crosses an
hour, indistinguishable from a regression in the code being rebased, and each one
spending the bytes the host was waiting for.

The job now measures free space in the workspace before the checkout and stands down
green, with the number and the reason in the log, when there is less than 512 MB
(`MIN_FREE_MB` overrides).

The snippet in the issue used a bare `exit 0`, which ends the step and nothing else:
the checkout on the next line then runs anyway, so the bytes are still spent. The
verdict is published as a step output (`room`) and the checkout and the rebase are
both gated on it. Unmeasurable defaults to `room=true`, so a `df` that answers
nothing cannot switch this workflow off silently.

test/ci-disk-hygiene.test.js keeps the shape: measurement before the checkout,
green stand-down, the threshold, and the gate that makes the stand-down real.

Fixes #1508
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 07:10:23 +00:00
jaylouisw force-pushed fix/1116-0705 from a5114627ef
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 16s
CI / Server smoke test (pull_request) Successful in 43s
CI / Test (Node 20) (pull_request) Successful in 1m16s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 18) (pull_request) Successful in 1m33s
CI / Test (Node 22) (pull_request) Successful in 1m33s
to f6aefb02e4
All checks were successful
CI / Classify the change (pull_request) Successful in 11s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 14s
CI / Test (Node 18) (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Has been skipped
CI / Test (Node 22) (pull_request) Has been skipped
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
2026-11-16 07:10:26 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1624
No description provided.