Skip to content

docs(tests): split snapshot env-drift guidance into cosmetic vs. leak - #2768

Merged
max-sixty merged 1 commit into
mainfrom
status
May 15, 2026
Merged

max-sixty merged 1 commit into
mainfrom
status

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The tests/CLAUDE.md "Snapshot env drift is cosmetic" rule was too broad. It correctly covers stable values ("", C, redacted placeholders) but also waved through host-specific leaks. While regenerating snapshots in #2764, a macOS LLVM_PROFILE_FILE tempdir path leaked into the env block and the "cosmetic" framing nearly let it pass review.

This splits the section into two cases: stable values stay accept-silently; host/temp/PID/timestamp values are leaks that must be redacted via add_redaction(".env.VAR", "[VAR]") in add_standard_env_redactions. It also records the non-obvious gotcha that add_filter never touches the env: block (it only substitutes on captured snapshot content) — the actual fix mechanism applied in #2764.

Docs-only; no code or test changes.

The old "env drift is cosmetic — accept without comment" rule was too
broad: it correctly covers stable values (`""`, `C`, placeholders) but
also waved through host-specific leaks. A regenerated snapshot in #2764
embedded a macOS `LLVM_PROFILE_FILE` tempdir path; the cosmetic framing
nearly let it through review.

Split the section: stable values stay accept-silently; host/temp/PID/
timestamp values are leaks that must be redacted via
`add_redaction(".env.VAR", "[VAR]")` in `add_standard_env_redactions`.
Also record the non-obvious gotcha that `add_filter` never touches the
`env:` block (it only substitutes captured snapshot content), so a
redaction is the only tool that works there.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 7d1cb83 into main May 15, 2026
33 checks passed
@max-sixty
max-sixty deleted the status branch May 15, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants