autoresearch iter 31: isolate lint result cache per checkout in harness

This commit is contained in:
ryan
2026-08-29 18:55:36 +08:00
parent 53fc3a81dc
commit 5193bd0451
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -9,6 +9,14 @@
set -uo pipefail
cd "$(dirname "$0")/../backend"
# Hermetic lint result cache. golangci-lint's default cache is machine-wide, so
# entries written while analysing a different worktree are replayed carrying that
# checkout's absolute paths, which misattributes findings and can serve a stale
# verdict. Key the cache to this directory. Count-neutral: cold and shared-warm
# runs both report the same number of findings.
GOLANGCI_LINT_CACHE="${TMPDIR:-/tmp}/ar-lint-cache-$(pwd | cksum | awk '{print $1}')"
export GOLANGCI_LINT_CACHE
REF_CFG="$(cd .. && pwd)/.auto/lint.ref.yaml"
# Primary: pinned yardstick findings (never the mutable project config).