script/test always runs with -v instead of the conditional verbose rerun pattern #103
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?
REPO_POLICIES.mdrequires the "conditional verbose rerun" pattern: run tests without-vfirst, and only if they fail, automatically rerun with-vto show full output. The stated purpose is that "this keeps CI logs anddocker buildoutput clean on success (just package/suite summaries) while providing full diagnostic detail on failure."Current state (audited against
origin/main, commit9347a28)script/test:8runs, unconditionally:-vis always on and there is no||fallback/rerun block anywhere inscript/testor theMakefile.Makefile:22-23is a correct thin shim (@script/test), so the fix belongs inscript/test.The
-timeout 30spart is already correct and must be preserved.The practical cost is real: a green
make checkonmaincurrently prints a--- PASS:line for every individual test case plus everyslogline the tests emit, burying the actual result. The canonical form inREPO_POLICIES.mdis:Definition of done
script/testrunsgo testwithout-von the first attempt, keeping-race,-timeout 30s, and-cover.-vadded.REPO_POLICIES.mdis explicit about why: "the first run already proved the tests are broken, so the build must not pass even if a flaky test happens to succeed on the second attempt. The rerun exists solely for diagnostic output." Do not let the rerun's exit status decide the outcome.script/testremains POSIXsh—#!/bin/sh,set -eu, no bashisms — because it runs inside minimal alpine containers with no bash. Note thatset -einteracts with||blocks; make sure the failure path is actually reached and the script does not abort before the rerun.$(cd "$(dirname "$0")/.." && pwd -P)idiom andcds there before running.make teston a green tree prints the concise summary and exits 0;make testwith a deliberately broken test prints the rerun marker, shows verbose output, and exits non-zero. Revert the deliberate breakage before committing — do not commit it.make checkis green, andTODO.mdis updated in the same commit as the work.The finishing commit's title must end with
(closes #N)referencing this issue.Out of scope
Do not change the test timeout, do not add
-short, and do not add any skip flags —TESTING.mdforbids both-shortand timeout inflation, and DNS mocking is banned repo-wide. This issue is purely about verbosity of output.[manager] Satisfied on
nextby6f6bf3a(#136), as a side effect of the test-cache work —script/test's primary run was unconditionally-v, so the pattern was absent rather than merely at risk.All seven items of the definition of done verified by independent review, including the
set -e/||interaction this issue warned about. One deliberate deviation:-timeout 30shere is superseded by the90sbackstop landed in9cb2c2bunder the 60s/20s org ruling.Left open rather than closed, since the fix is on
nextand not yet onmain, and the commit subject closes only #139. Close this by hand whennextmerges. Do not re-implement it.