Task · SKT-0166

Investigate TestEnvSurfaceAligned failing in gate sweeps of a fresh clone

Description

Seen by loop52 replan3 lane in gaterun sweeps run from a fresh clone (codex/loop52/REPLAN/rev3/); the composed gates from git worktrees pass. internal/config.TestEnvSurfaceAligned compares the Go-read, .env.example, Compose and project-.env surfaces, so a clone without the ignored .env may change its inputs. Classify: test-environment dependency vs real surface drift.

Acceptance Criteria

Definition of Done

Implementation Notes

Classified without code change: an uncommitted diagnostic non-test source read REPLAN_MARGIN, correctly triggering the environment-surface guard. Controlled remote reproduction fails with that injected read both with and without example-only project environment, and passes after removing the read in both cases. Pristine config build/vet/package test passes on 8545834. No production surface change or test weakening is needed; inherited diagnostics preserved.

No-code diagnosis accepted and evidence recorded before board commit pushed in 13e4258. The existing scanner passes without project environment and still rejects injected undocumented Go reads. No inherited diagnostic artifact removed; no production guard weakened. Full composed just check on 13e4258 also passed.

Final Summary

Fresh checkout was not the defect. Untracked diagnostic instrumentation added an undocumented environment read and correctly failed alignment. Controlled four-case red/green proof distinguishes that cause from ignored environment-file presence. No code change required.

View the source file on GitHub