You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: scripts/gate03-sweep.sh helper functions declare no local variables (WR-03, carried from Phase 3) #181
Carried since the Phase 3 code review (WR-03) and re-confirmed at the Phase 5 close-out: scripts/gate03-sweep.sh's helpers (sweep_one, build_summary, do_compare, ...) assign out_dir, dir and similar names as globals; there is no local declaration in any function body (grep -n 'local ' scripts/gate03-sweep.sh matches only two comment lines).
It has not bitten, because the script is run once per invocation and the helpers do not call each other with colliding names. It is a latent hazard for anyone who edits the script, so it is tracked here instead of living only in a Phase 3 and Phase 4 planning note (04-CONTEXT.md). Not a Phase 5 concern and not fixed in Phase 5.
Filed at the close-out of Phase 5 (CAT-03, #35), plan 05-07 Task 2, from .planning/phases/05-persistence-lifecycle-hijack-cat-03-35/deferred-items.md. Nothing here is fixed in v0.2.0.
Added local declarations for working variables in sweep_one, build_summary, and main. do_compare’s variables already belong to its Python subprocess.
Added a regression check for caller-variable isolation, scanner exit codes 0/1/2, missing directories, and manifest/summary/comparison outputs, and wired it into CI.
The check fails against upstream and passes with the fix. Both scripts also pass bash -n.
Activity
BasilZafar11 commentedon Oct 15, 2026
Implemented in PR #192: #192
Added local declarations for working variables in sweep_one, build_summary, and main. do_compare’s variables already belong to its Python subprocess.
Added a regression check for caller-variable isolation, scanner exit codes 0/1/2, missing directories, and manifest/summary/comparison outputs, and wired it into CI.
The check fails against upstream and passes with the fix. Both scripts also pass bash -n.