Adds the conditional verbose test rerun pattern as a policy recommendation in REPO_POLICIES.md.
Per sneak's request from sneak/chat PR #82: document the pattern where make test runs tests without -v first, then automatically reruns with -v on failure for full diagnostic output.
Changes
prompts/REPO_POLICIES.md (root REPO_POLICIES.md is a symlink to this):
Added new policy bullet after the make test timeout rule
Explains the rationale: clean CI/Docker build logs on success, full verbose output on failure
Includes a generic shell pattern template
Includes concrete Go and Python examples
Documents that exit 1 ensures the target always fails after a rerun (the rerun is solely for diagnostic output)
Updated last_modified from 2026-03-12 to 2026-03-18
The Pattern
test:
@go test -timeout 30s -race -cover ./... ||\
{echo"--- Rerunning with -v for details ---";\
go test -timeout 30s -race -v ./...;exit 1;}
On success: concise package summaries only, no per-test noise
On failure: automatic verbose rerun shows every test case and assertion
Always fails: exit 1 ensures the build fails regardless of second run's exit code
## Summary
Adds the conditional verbose test rerun pattern as a policy recommendation in REPO_POLICIES.md.
Per sneak's request from [sneak/chat PR #82](https://git.eeqj.de/sneak/chat/pulls/82): document the pattern where `make test` runs tests without `-v` first, then automatically reruns with `-v` on failure for full diagnostic output.
## Changes
**`prompts/REPO_POLICIES.md`** (root `REPO_POLICIES.md` is a symlink to this):
- Added new policy bullet after the `make test` timeout rule
- Explains the rationale: clean CI/Docker build logs on success, full verbose output on failure
- Includes a generic shell pattern template
- Includes concrete Go and Python examples
- Documents that `exit 1` ensures the target always fails after a rerun (the rerun is solely for diagnostic output)
- Updated `last_modified` from 2026-03-12 to 2026-03-18
## The Pattern
```makefile
test:
@go test -timeout 30s -race -cover ./... || \
{ echo "--- Rerunning with -v for details ---"; \
go test -timeout 30s -race -v ./...; exit 1; }
```
- **On success**: concise package summaries only, no per-test noise
- **On failure**: automatic verbose rerun shows every test case and assertion
- **Always fails**: `exit 1` ensures the build fails regardless of second run's exit code
closes https://git.eeqj.de/sneak/prompts/issues/20
Add policy recommending the conditional verbose test rerun pattern for
make test targets. Tests run without -v first for clean output on
success, then automatically rerun with -v on failure for full
diagnostics. Includes generic pattern, Go example, and Python example.
Add as policy/recommendation in Makefile conventions section
✅ Met — added after the make test timeout rule
Show a concrete Makefile snippet implementing the pattern
✅ Met — generic template + Go and Python examples
Explain the rationale (clean CI logs on success, actionable output on failure)
✅ Met — rationale in opening sentence + exit 1 explanation
Build Result
docker build . — PASS (all layers cached, make check passes including prettier formatting)
Detailed Findings
Scope: Single file changed (prompts/REPO_POLICIES.md), +37/-1 lines. Only the documented pattern and last_modified date update. No scope creep.
Formatting: make fmt-check passes (prettier with --prose-wrap always --tab-width 4).
Style consistency: New content uses the same indented code-block-under-bullet pattern as the existing Dockerfile lint stage section. Uses "should" (recommendation) rather than "must" (requirement), which is appropriate for a pattern recommendation.
Content accuracy: The shell pattern correctly uses || { ...; exit 1; } — the exit 1 ensures the target fails regardless of the rerun's exit code. Explanation is technically correct.
Placement: Inserted immediately after the make test 20-second timeout rule, which is the logical location in the Makefile conventions section.
Date: last_modified updated from 2026-03-12 to 2026-03-18, matching the PR creation date.
No cheating: No changes to Makefile, Dockerfile, CI config, linter config, or test assertions.
Rebase: Branch is already up to date with main.
Human comments: None on PR or issue.
Verdict: PASS✅
Clean documentation addition. All issue requirements fully addressed. No policy violations. Build passes.
## Review: [PR #21](https://git.eeqj.de/sneak/prompts/pulls/21) — conditional -v test rerun pattern
### Policy Divergences
No policy violations found.
### Requirements Checklist ([issue #20](https://git.eeqj.de/sneak/prompts/issues/20))
| Requirement | Status |
|---|---|
| Add as policy/recommendation in Makefile conventions section | ✅ Met — added after the `make test` timeout rule |
| Show a concrete Makefile snippet implementing the pattern | ✅ Met — generic template + Go and Python examples |
| Explain the rationale (clean CI logs on success, actionable output on failure) | ✅ Met — rationale in opening sentence + `exit 1` explanation |
### Build Result
`docker build .` — **PASS** (all layers cached, `make check` passes including prettier formatting)
### Detailed Findings
- **Scope**: Single file changed (`prompts/REPO_POLICIES.md`), +37/-1 lines. Only the documented pattern and `last_modified` date update. No scope creep.
- **Formatting**: `make fmt-check` passes (prettier with `--prose-wrap always --tab-width 4`).
- **Style consistency**: New content uses the same indented code-block-under-bullet pattern as the existing Dockerfile lint stage section. Uses "should" (recommendation) rather than "must" (requirement), which is appropriate for a pattern recommendation.
- **Content accuracy**: The shell pattern correctly uses `|| { ...; exit 1; }` — the `exit 1` ensures the target fails regardless of the rerun's exit code. Explanation is technically correct.
- **Placement**: Inserted immediately after the `make test` 20-second timeout rule, which is the logical location in the Makefile conventions section.
- **Date**: `last_modified` updated from 2026-03-12 to 2026-03-18, matching the PR creation date.
- **No cheating**: No changes to Makefile, Dockerfile, CI config, linter config, or test assertions.
- **Rebase**: Branch is already up to date with `main`.
- **Human comments**: None on PR or issue.
### Verdict: **PASS** ✅
Clean documentation addition. All issue requirements fully addressed. No policy violations. Build passes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds the conditional verbose test rerun pattern as a policy recommendation in REPO_POLICIES.md.
Per sneak's request from sneak/chat PR #82: document the pattern where
make testruns tests without-vfirst, then automatically reruns with-von failure for full diagnostic output.Changes
prompts/REPO_POLICIES.md(rootREPO_POLICIES.mdis a symlink to this):make testtimeout ruleexit 1ensures the target always fails after a rerun (the rerun is solely for diagnostic output)last_modifiedfrom 2026-03-12 to 2026-03-18The Pattern
exit 1ensures the build fails regardless of second run's exit codecloses #20
Review: PR #21 — conditional -v test rerun pattern
Policy Divergences
No policy violations found.
Requirements Checklist (issue #20)
make testtimeout ruleexit 1explanationBuild Result
docker build .— PASS (all layers cached,make checkpasses including prettier formatting)Detailed Findings
prompts/REPO_POLICIES.md), +37/-1 lines. Only the documented pattern andlast_modifieddate update. No scope creep.make fmt-checkpasses (prettier with--prose-wrap always --tab-width 4).|| { ...; exit 1; }— theexit 1ensures the target fails regardless of the rerun's exit code. Explanation is technically correct.make test20-second timeout rule, which is the logical location in the Makefile conventions section.last_modifiedupdated from 2026-03-12 to 2026-03-18, matching the PR creation date.main.Verdict: PASS ✅
Clean documentation addition. All issue requirements fully addressed. No policy violations. Build passes.