fix(go): default CacheDir to tmp/go to avoid Python collision #20
Reference in New Issue
Block a user
Delete Branch "fix/cache-collision"
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?
Summary
go/internal/config/config.go: changedCacheDirdefault fromtmptotmp/go.CACHE_DIRenv override still works;os.MkdirAllcreates the subdir on first write.tmp/and writing the same cache keys (attendance_regular,attendance_juniors,payments_transactions,exceptions_dict) with different shapes (Python: post-processed tuples; Go: raw rows). Whichever wrote last poisoned the cache, breaking the other backend./adultsfailed withValueError: too many values to unpack (expected 2, got 68)once the Go server populatedtmp/attendance_regular_cache.jsonwith 68 raw CSV rows.make parityflow (both backends running in parallel).Test plan
cd go && go build ./...— cleanPOST /flush-cacheon Python; verify/adultsreturns 200 (rewritestmp/*.jsonwith Python's shape)make web-go— verify Go writes totmp/go/*_cache.jsonand leavestmp/*_cache.jsonalonemake parity(after merging M5.4) should succeed end-to-endAfter merge
The next PR (M5.4 —
feat/go-m5-4-parity-binary, #19) will rebase on this fix.🤖 Generated with Claude Code
tmp/goto avoid Python collision