Add -count=1 to the canonical Go make test example #45
Reference in New Issue
Block a user
Delete Branch "go-test-count1"
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?
Proposed answer to #44 — speculative, not yet ruled on.
The canonical Go
testtarget omitted-count=1, so Go replayed cached successful results and the target could exit 0 having executed no test. Every repo that copied it inherited the false green.Replacement:
The rerun needs the flag too: without it a failing run replays from cache instead of reproducing the failure.
Changed:
prompts/REPO_POLICIES.md— the Go example (both invocations), plus one paragraph of justification and alast_modifiedbump. RootREPO_POLICIES.mdis a symlink to it, so it is covered.TODO.md— Completed Steps entry.Next Stepleft alone; this was not that item.Searched and deliberately not changed:
prompts/CODE_STYLEGUIDE_GO.mdline 91 mentionsgo test ./...in prose about committing a test file as a compile check; not a canonical target.<test-command>template above the Go example — language-agnostic, nothing to add.python -m pytest). pytest does not replay cached results by default; its.pytest_cachestores failure/nodeid state for--lf/--ff, not pass results substituted for a run. Result replay needs a plugin (e.g. testmon). No flag exists to add, and inventing one would be wrong.jest/vitestor other language example targets exist in this repo —jest/vitestappear only in a prose list of test frameworks.script/testis aNo tests defined.stub (docs repo, no Go code), so it did not carry the bug.Evidence and measurements are on #44.
make checkgreen: no tests defined, prettier--checkclean on all markdown.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.