ci(auto-rebase): the tick checks out with git, so an unreachable forge cannot stop setup (#2366) #2370

Merged
jaylouisw merged 1 commit from fix/1121-0502 into main 2026-11-21 05:45:04 +00:00
Owner

Fixes #2366

auto-rebase.yml was the only workflow left with a uses: (actions/checkout@v4). The runner pre-clones every action of a job into /data/.cache/act before step one, so when the runner lost egress to data.forgejo.org on 2026-11-20 every tick died in Set up job: runs 8472 and 8476-8490 (tasks 22392-22413, 10:30Z-17:30Z), 7 h 20 m with no pull request rebased and no scheduled arming, and 16 red runs that read like code failures while the action-free workflows kept running.

What changed

  • auto-rebase.yml: the Check out the queue step is now git init + one blobless fetch of main - the shape pr-rebase.yml and close-merged-issues.yml already use. Credentials are passed per command through an inline helper (nothing written into .git/config, the property persist-credentials: false gave the action; http.extraheader is rejected by this instance - see close-merged-issues.yml). A fetch that cannot reach the forge warns and stands the pass down green, so an outage costs a retry rather than a red X. Same commits, same gate on room, same Rebase and arm step untouched.
  • test/ci-disk-hygiene.test.js: the #1508 invariant becomes "the room guard precedes whatever checks out" - the matcher accepts uses: actions/checkout@ or git init + fetch, and guardAt < checkoutAt / gated() are unchanged. A new case asserts the rebase job holds no uses: at all, which is the invariant #2366 is about.
  • docs/CI.md: one clause on the auto-rebase.yml row saying it checks out with git.

Verified

  • node --test test/ci-disk-hygiene.test.js: 13 tests, 13 pass (the new case fails on origin/main with found: uses: actions/checkout@v4).
  • node scripts/syntax-check.js: 515 files, all OK. scripts/check-ci-disk-hygiene.js and scripts/check-rebase-push-guard.js clean.
  • npm test: 435 suites, 14,614 assertions, 0 failed.
  • The step was run for real against this instance in a scratch directory: blobless main fetched, git checkout -B of the tree in 0.42 s, git rebase replayed a commit and git diff --quiet origin/main HEAD answered correctly - so the partial clone is enough for every command the loop runs.
  • grep -rn '^\s*uses:' .forgejo/workflows/ now finds nothing: no workflow in the repository needs the action cache to start.
Fixes #2366 `auto-rebase.yml` was the only workflow left with a `uses:` (`actions/checkout@v4`). The runner pre-clones every action of a job into `/data/.cache/act` before step one, so when the runner lost egress to `data.forgejo.org` on 2026-11-20 every tick died in `Set up job`: runs 8472 and 8476-8490 (tasks 22392-22413, 10:30Z-17:30Z), 7 h 20 m with no pull request rebased and no scheduled arming, and 16 red runs that read like code failures while the action-free workflows kept running. ## What changed - `auto-rebase.yml`: the `Check out the queue` step is now `git init` + one blobless fetch of `main` - the shape `pr-rebase.yml` and `close-merged-issues.yml` already use. Credentials are passed per command through an inline helper (nothing written into `.git/config`, the property `persist-credentials: false` gave the action; `http.extraheader` is rejected by this instance - see `close-merged-issues.yml`). A fetch that cannot reach the forge warns and stands the pass down green, so an outage costs a retry rather than a red X. Same commits, same gate on `room`, same `Rebase and arm` step untouched. - `test/ci-disk-hygiene.test.js`: the #1508 invariant becomes "the room guard precedes whatever checks out" - the matcher accepts `uses: actions/checkout@` **or** `git init` + fetch, and `guardAt < checkoutAt` / `gated()` are unchanged. A new case asserts the `rebase` job holds no `uses:` at all, which is the invariant #2366 is about. - `docs/CI.md`: one clause on the `auto-rebase.yml` row saying it checks out with `git`. ## Verified - `node --test test/ci-disk-hygiene.test.js`: 13 tests, 13 pass (the new case fails on `origin/main` with `found: uses: actions/checkout@v4`). - `node scripts/syntax-check.js`: 515 files, all OK. `scripts/check-ci-disk-hygiene.js` and `scripts/check-rebase-push-guard.js` clean. - `npm test`: 435 suites, 14,614 assertions, 0 failed. - The step was run for real against this instance in a scratch directory: blobless `main` fetched, `git checkout -B` of the tree in 0.42 s, `git rebase` replayed a commit and `git diff --quiet origin/main HEAD` answered correctly - so the partial clone is enough for every command the loop runs. - `grep -rn '^\s*uses:' .forgejo/workflows/` now finds nothing: no workflow in the repository needs the action cache to start.
ci(auto-rebase): the tick checks out with git, so an unreachable forge cannot stop setup (#2366)
All checks were successful
CI / Classify the change (pull_request) Successful in 12s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Test (Node 20) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 1m1s
CI / Server smoke and Docker build (pull_request) Successful in 18s
CI / Arm auto-merge (pull_request) Successful in 4s
9ec257b21a
`auto-rebase.yml` was the last workflow with a `uses:` (`actions/checkout@v4`).
The runner pre-clones every action of a job into /data/.cache/act before step
one, so when egress to data.forgejo.org dropped on 2026-11-20 every tick died
in `Set up job` - 16 runs (8472, 8476-8490), 7 h 20 m with nothing rebased and
no scheduled arming, all of it reading like a code failure.

The tree now arrives the way pr-rebase.yml and close-merged-issues.yml do it:
`git init` plus one blobless fetch of `main`, credentials passed per command
through an inline helper so nothing is written into .git/config, and a fetch
that cannot reach the forge warns and stands the pass down green. Same commits,
same gate on `room`.

test/ci-disk-hygiene.test.js: the #1508 invariant is now "the room guard
precedes whatever checks out" (accepting the action or `git init` + fetch),
plus a new case asserting the rebase job holds no `uses:` at all. Verified
against this instance: the step fetches blobless, checks the tree out in
0.42 s and rebases from it.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 05:13:07 +00:00
jaylouisw deleted branch fix/1121-0502 2026-11-21 05:45:06 +00:00
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!2370
No description provided.