make test is served from Go's test cache, so a repeat green proves no DNS was queried #139
Reference in New Issue
Block a user
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?
Found during the review of #136. Pre-existing and repo-wide, so it was deliberately kept out of that unit.
The problem
script/testdoes not pass-count=1, so Go serves results from its test cache when nothing has changed. Three consecutive runs on an unchanged tree returned exit 0 withinternal/resolver (cached)and no DNS query was made at all.For a normal repo that is a feature. For this one it is a false green, and a particularly bad one:
TESTING.md). A cached pass asserts nothing about live resolution.This bit the #93 work directly: the implementer's first verification run came back green in about one second entirely from cache. He caught it and forced uncached runs, and the reviewer independently forced them with
GOFLAGS=-count=1— but nothing in the tooling prevents the next person from banking a cached green.Definition of done
script/testruns tests with caching disabled, so every invocation actually executes.-count=1is the standard mechanism.make testtwice on an unchanged tree and confirming zero(cached)markers and a realistic duration both times.REPO_POLICIES.mdonce caching is off — this makes every run pay full cost, and if it now exceeds 20s an improvement issue is owed per the owner's ruling at sneak/prompts#41 (comment) ("the hard cap is 60 for ci/green, but over 20s should be filed as an improvement bug"). Report the measured number.REPO_POLICIES.mdmandates — the rerun must not reintroduce caching.make checkgreen.Commit title ends with
(closes #N)for this issue.Landed on
nextas6f6bf3a, in #136.script/testnow passes-count=1. The conditional verbose rerunREPO_POLICIES.mdmandates was missing at the same spot (the primary run was unconditionally-v) and is added: quiet first,-vonly on failure,-count=1on both, exit forced to 1 regardless of the rerun's result.-timeout 90suntouched. No carve-out for the Docker build, whose test cache is empty anyway.Verification, all from a warm cache. Before: 8 of 8 packages
(cached),real 0m0.203s, no DNS queried. After, three back-to-back runs on an unchanged tree, zero(cached)in each:Uncached wall time 4.0-4.5s — inside the 20s target, so no improvement bug is owed.
-raceand-coverstill compose with-count=1; coverage percentages unchanged.Failure path exercised rather than assumed, against a flaky test that fails once then passes:
The rerun genuinely re-executed (it passed, so it did not replay the cached
FAIL) and the build still failed.make checkgreen, lint stage executed not cached (0 issues.,DONE 26.2s).[manager] Landed on
nextas6f6bf3a(#136). Review passed.make testuncached 3.7–6.2s, inside the 20s target.Scope note: the commit also implements the conditional-verbose-rerun pattern, which turned out to be missing entirely rather than at risk. That satisfies #103 — see the note there.
Worth keeping:
|| truebeforeexit 1is required, not sloppy. Underset -euthe brace group is the last command of the AND-OR list, so without it the script exits with the rerun's status and never reachesexit 1— a flake passing on retry would green the build. TheREPO_POLICIES.mdsnippet is amakerecipe and does not port to aset -escript unchanged.