Repository navigation
setup: make LOGFILE overridable — cure the shared-log packaging-suites flake - #948
Amperstrand wants to merge 2 commits into
Conversation
99-tollgate-setup assigned LOGFILE=/tmp/tollgate-setup.log
unconditionally, so every offline suite that sources the script and
exports its own per-run LOGFILE was silently repointed at one shared
file: all suites then truncated and grepped /tmp/tollgate-setup.log,
and any concurrent run (two worktrees, parallel act jobs, or an async
writer surviving its suite) ate another run's log lines. This is the
packaging-suites flake that turned the ngit lane red on main: the
naive suites' 'no log line' assertions fail exactly when another suite
writes the shared file between run and grep (reproduced 3-way
concurrent on one suite; sequential runs never see it).
The default is unchanged when LOGFILE is unset — the shipped script
still logs to /tmp/tollgate-setup.log on a router; uci-defaults-
rootfs_test.sh (which reads that path) is untouched and green.
- 99-tollgate-setup: LOGFILE="${LOGFILE:-/tmp/tollgate-setup.log}"
(the shape SHADOW_FILE already uses), with the contract stated where
the assignment lives.
- eleven sed-rewriting suites: their rewrite pattern follows the new
line shape, so their copied scripts keep carrying their TMP paths and
their rewrite guards stay meaningful.
- uci-defaults-private-credential_test.sh: a guard asserting the
script honours the harness redirect — reverting the assignment to
unconditional fails the suite by name (mutation-checked).
Evidence: 36/36 suites green sequentially; credential x subnet x
recheck concurrently 15/15; four concurrent copies of the credential
suite 4/4; rootfs suite green; bash -n clean.
|
@felixfelix-bot — small one for your queue when convenient (behind #933/#934): the packaging-suites flake cure promised in the classification comments on those two PRs. Pre-fix reproduction, post-fix evidence, and a mutation-checked guard are in the PR body. No textual overlap with #933/#934; merging in any order is safe. |
Local CI gate — PR #948: setup: make LOGFILE overridable — cure the shared-log packaging-suites flakeRun of
Verdict: 6 legs green. What this gate does not run (no vacuous green)
|
Review: APPROVEReviewed cold at head The bug is real and I confirmed it on LOGFILE=/tmp/tollgate-setup.logso every offline suite that sources the script and exports its own per-run The fix changes it to Verified (all observed, not inferred):
The negative control is the point: it shows the old behaviour genuinely put two runs' output in one Back-compat is preserved deliberately. The The change is broader than one line, correctly. It touches eight packaging/uci-defaults suites Not hardware-tested. This is a shell script with an offline suite; I verified the override Labels: not applied — this account has FULL_REVIEW: ~/reports/reviews/tollgate-module-basic-go-pr948-kimi.md |
Tier evidence — config/setup wave vs
|
Hardware evidence — config-state read on a live benchreviewer_model: hermes-manager (this session, glm family) Vantage: bench router Caveat stated up front: this is a config/state read, which is valid #860 — SSID carries a leading
|
What
99-tollgate-setupassignedLOGFILE=/tmp/tollgate-setup.logunconditionally (line 55). Every offline suite that sources the script and exports its own per-runLOGFILEwas silently repointed at that one shared file — all suites then truncated and grepped/tmp/tollgate-setup.log, and any concurrent run (two worktrees, parallel lanes) or a straggler async writer ate another run's log lines mid-assert.This is the packaging-suites flake that turns the ngit lane red on main (visible in the Oct 14–15 mirror runs: the job fails while its surviving log tail shows a passing suite): the naive suites'
no log line …assertions fail exactly when another suite writes the shared file between their run and their grep.Proof (this branch, ai-legion seat)
/tmp/tollgate-setup.log; per-runsetup.logfiles are 0 bytes (the redirect never had a chance).uci-defaults-rootfs_test.sh(reads the default path) green;bash -nclean.uci-defaults-private-credential_test.shby name (the script clobbered the harness LOGFILE redirect).The change
99-tollgate-setup:LOGFILE="${LOGFILE:-/tmp/tollgate-setup.log}"— the shapeSHADOW_FILEalready uses. Router behavior unchanged whenLOGFILEis unset.LOGFILErewrite pattern follows the new line shape (copied scripts keep their TMP paths; rewrite guards stay meaningful).uci-defaults-private-credential_test.sh: guard asserting the script honours the harness redirect — the planted-drift fence for this fix.Relation to open PRs: none — #933 and #934 are unaffected textually (their trees carry the old suites verbatim and their lanes benefit from this cure the moment it merges). Found while classifying pre-existing vs PR-caused reds for #933/#934 (classification posted there).