test(processor): guard -update against CI misuse; drop agent report md

This commit is contained in:
2026-07-02 09:20:06 -05:00
parent 3db4911e7a
commit 31619dc7ee
2 changed files with 6 additions and 60 deletions
+6
View File
@@ -65,6 +65,12 @@ func runWholeFileCase(t *testing.T, tc wholeFileCase) {
golden := src + ".golden"
if *update {
// Goldens are hand-verified expected values. Regenerating under CI would
// let the suite pass unconditionally while overwriting the checked-in
// goldens — the exact regression the golden strategy exists to catch.
if os.Getenv("CI") != "" {
t.Fatal("-update must not be used in CI: it overwrites goldens and makes assertions trivially pass")
}
if err := os.WriteFile(golden, got, 0644); err != nil {
t.Fatalf("update golden: %v", err)
}