Regression test test_build_output_directories_not_tracked fails whenever .next build output exists (over-strict assertion, flaky) #27
Labels
No labels
blocked:needs-attention
blocked:needs-decision
bug
chore
in-progress
quickfix
security/high
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AuWoMe/forgeflow#27
Loading…
Add table
Add a link
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?
Summary
tests/test_security_scan_config.py::test_build_output_directories_not_trackedfails spuriously whenever.next/build output exists in the working tree. The fix for #21 landed correctly (.next/untracked + gitignored,.semgrepignoreexcludes it, scanner prunes it), but the regression test added with the fix asserts something stricter than the actual security requirement and breaks under completely normal conditions (any localnext buildor pipeline build).Reproduction steps
AuWoMe/forgeflowonmain(verified on commitf473d0a, tree state 2026-07-31).test_build_output_directories_not_trackedFAILS (the other two tests pass).Current failure output (verified by probe and re-verified at filing time — 1702 JS artifacts under
.next/):Actual vs expected behavior
if .next/ exists, it must contain NO JS artifacts(assert not js_artifactsattests/test_security_scan_config.py:43). Any localnext buildor pipeline build regenerates.next/(this is what.gitignoreand.semgrepignoreare for), so the test fails in normal operation. It passed the 2026-07-30 23:59 kilo-gsd verify gate only because.nexthappened to be absent at that moment — latent flaky test..next/build output is (a) not tracked by git and (b) excluded from Semgrep scanning — not that it never exists on disk. The test already verifies both requirements in its lower half (git ls-files .nextis empty,git check-ignore .next/generated.jsreturns 0). The "no artifacts on disk" assertion should be relaxed (e.g. dropped, or scoped to tracked files only) so the test passes whenever build output legitimately exists.Impact
pytestgets a spurious failure..nextwas never generated in that checkout.1 failed / 2 passedintests/test_security_scan_config.py;tests/test_pre_commit_loop_detector.py5/5 passed. Nosrc/code involved.Reference
t_1c6c1e47(post-deploy probe for AuWoMe/forgeflow#21)f94c948, 2026-07-07/08 remediation commits)Fixed on main by commit
07599d0. Removed the over-strictjs_artifactsassertion fromtest_build_output_directories_not_tracked— build output may legitimately exist in the working tree afternext build; the actual security requirement is that those files are never tracked and are gitignored so Semgrep's:include .gitignoreexcludes them. The test now verifiesgit ls-filesis empty for .next/ and out/ andgit check-ignorerejects generated files. Verified with .next/ present (1700+ artifacts): 9/9 pytest pass (previously 1 failed).