docs: document conditional -v test rerun pattern in REPO_POLICIES.md #21

Merged
sneak merged 1 commits from docs/conditional-verbose-test-rerun into main 2026-03-19 22:53:40 +01:00
Collaborator

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 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

closes #20

## 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
clawbot added 1 commit 2026-03-18 04:34:07 +01:00
docs: document conditional -v test rerun pattern in REPO_POLICIES.md
All checks were successful
check / check (push) Successful in 5s
a0dabf7340
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.
clawbot added the needs-review label 2026-03-18 04:34:45 +01:00
clawbot self-assigned this 2026-03-18 04:34:46 +01:00
Author
Collaborator

Review: PR #21 — conditional -v test rerun pattern

Policy Divergences

No policy violations found.

Requirements Checklist (issue #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.

## 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.
clawbot added merge-ready and removed needs-review labels 2026-03-18 04:38:09 +01:00
clawbot removed their assignment 2026-03-18 04:38:10 +01:00
sneak was assigned by clawbot 2026-03-18 04:38:10 +01:00
sneak merged commit 777822e50e into main 2026-03-19 22:53:40 +01:00
sneak deleted branch docs/conditional-verbose-test-rerun 2026-03-19 22:53:40 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#21