From d19b604797cde41931d1de2c6dac759de57f3926 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 15 Oct 2026 14:22:46 +0000 Subject: [PATCH] Give a reason that holds for not keeping the module cache Go builds from whatever files a kept module cache holds without checking them again, so a changed file would go unnoticed; skipping a download skipped no check and was no reason. Model: opus-5-5 --- prompts/REPO_POLICIES.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prompts/REPO_POLICIES.md b/prompts/REPO_POLICIES.md index fbe2f8f..5b24098 100644 --- a/prompts/REPO_POLICIES.md +++ b/prompts/REPO_POLICIES.md @@ -280,9 +280,10 @@ style conventions are in separate documents: check builds, and Go reuses one only when all its inputs are unchanged, so it saves the compile without skipping a check. Nothing else is kept: golangci-lint's own cache would replay stored findings in place of a lint - run, and the module cache would skip downloading the modules. Go's build - cache also holds test results, which is why both `go test` runs carry - `-count=1`. + run, and Go builds from whatever files a kept module cache holds without + checking them again (only `go mod verify` does), so a file changed there + would go unnoticed. Go's build cache also holds test results, which is why + both `go test` runs carry `-count=1`. - If the project uses `//go:embed` directives that reference build artifacts (e.g. a web frontend compiled in a separate stage), the lint phase must create placeholder files so the embed directives resolve. Example: