fix(ci): Review Integrity fits the runner's disk (swamp-club #3174) #500
Loading…
Reference in a new issue
No description provided.
Delete branch "cue/3174-swamp-extensions-ci-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes swamp-club #3174.
Cause
Review Integrity jobs went dark a few seconds after the claude download and were reaped by Forgejo about 10 minutes later, with no comment. The runners are KEDA ScaledJob pods on GKE Autopilot using the host executor, so every checkout and download lands on the pod's own disk. That disk had a 1 GiB ephemeral-storage limit. Every frozen task matched a GKE eviction ("Pod ephemeral local storage usage exceeds the total limit of containers 1Gi") 4 to 13 seconds after its last log line: six tasks on 10-08, run 2067 for PR 494 on 10-15, and the ec2 publish job in #3390.
The job needed about 1.07 to 1.1 GB:
fetch-depth: 0: 268 MBThe runner limit has since been raised in infra, and PR 494's re-run passed. This PR keeps the job well under any modest limit.
Change (
.forgejo/workflows/ci.yml, review-integrity only)git diff,logandshow. The fetch starts one commit deep and deepens by commit until base and head share an ancestor, falling back to--unshallow, so the three-dot diff keeps its merge base. A shallow history can only yield an older common ancestor, never a newer one, so the audit can only ever see more than the PR changed, never less. Fails closed if there is no shared history. The repo is public, so no credential is used. Measured: 37 MB for a branch based on today's main, 53 MB for one 30 commits behind, against 268 MB before.How this PR is audited
ci.yml runs as the pull request has it, so this PR's own Review Integrity run exercises the new fetch and cleanup steps. The audit prompt, the verdict rule and the poster script still come from the base commit.
Testing
refs/pull/N/headref. For branches based 0, 30 and 150 commits behind main, the true merge base was found while staying shallow, and the right trust-root files were flagged. This caught a bug: an up-to-date ref is not deepened, so deepening now names commits.1bfa2f080.Follow-ups
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.