test/cli.sh is not hermetic — 13 checks fail on any box that has a Forgejo runner installed #136
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#136
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
test/cli.shis not hermetic: 13 checks fail on any machine that has a Forgejo runner installed, which is exactly a machine that has been drilled or used as a ci-box. Measured 2026-07-31 on a box whererig forgejo-runner installhad really been run — unmodifiedorigin/main, so this is not any branch's doing:Two independent groups, both reading real host state instead of a fixture:
1. Seven
bootstrap --undo:checkscommands/bootstrap-undo.sh:46refuses to undo while a Forgejo runner exists — correct behaviour, and the guard is wanted. But the test never turns it off, so it fires against the real machine:The production code already ships the escape hatch, and says so,
bootstrap-undo.sh:33:test/cli.sh'sundo()helper setsRIG_ROLE_MARKERandRIG_RUNNER_DIR— but notRIG_FORGEJO_RUNNER_DIR. So it falls through to the host scan of/home/*/forgejo-runner/.runner,/root/forgejo-runner/.runnerand/etc/systemd/system/forgejo-runner.service. Adding the one variable turns the refusal intotailnet join removed; role marker removed— driven, not reasoned.2. Six
ci-box:checksdocs/templates/ci-box/install.sh:82early-exits when the binary is already there:Also correct behaviour — an install that finds the binary present has nothing to do. But the test stubs
curlandinstalland then drives the real script, so on a box with a real/usr/local/bin/forgejo-runnerthe script correctly does nothing and the checks see no install. Parking the binary recovers all six; restoring it breaks them again.Why it matters beyond the annoyance
The suite is the gate. A gate that passes only on machines that have never run the thing it gates is a gate you cannot trust on the machine that matters — and the failure is loud but misattributed: it reads as "this branch broke 13 tests", which is how it consumed a review round on !130.
It is also the same class the panel required to be fixed in
test/drill.shduring that round (a fixture copied from a scratch path). This is that bug, older and larger.Spec
Point both groups at fixtures instead of the host. No production behaviour changes; both guards stay exactly as they are.
undo()gainsRIG_FORGEJO_RUNNER_DIR="$UNDO_FIX/fjrunner", mirroring theRIG_RUNNER_DIRalready there. The knob exists for this.ci-boxharness pointsBINat a writable fixture path rather than letting the script default to/usr/local/bin/forgejo-runner, so a real binary on the host is irrelevant. If the script has no knob for it, add one in the same spirit asRIG_FORGEJO_RUNNER_DIR— a test-only override the production default ignores.Tasks
RIG_FORGEJO_RUNNER_DIRintest/cli.sh'sundo()helperci-boxchecks independent of/usr/local/bin/forgejo-runnerchangelog.d/<n>.mdonly if production files change; a test-only fix needs noneAcceptance criteria
bash test/cli.shpasses on a box with a Forgejo runner installed and a real/usr/local/bin/forgejo-runnerbootstrap-undo.sh's guard is unchanged — the refusal still fires for real operatorsci-box/install.sh's early-exit is unchangedshellcheck -xstep is cleanTest plan
RIG_FORGEJO_RUNNER_DIRand the seven undo checks go red again on such a box.Dependencies
None. Independent of #129, #133 and #135; test-only.
@andres — filed under your standing instruction. The 13 failures are reproducible on this box right now, on unmodified
main.