@@ -78,6 +78,26 @@ with `rm -rf .venv && python3 -m venv .venv && pip install "maturin>=1.10,<1.14"
7878diffctx-specific hygiene: stale ` src/treemapper.egg-info/ ` from a rebrand-era
7979` pip install ` is gitignored but may linger — delete on hygiene pass.
8080
81+ ## Secret-Handling Test Fixtures Break the Secret Hooks
82+
83+ The private-key exclusion tests (` test_secret_ignores_diff.py ` ,
84+ ` test_default_ignores.py ` ) assert that diffctx drops key/keystore files. Both the
85+ Rust ` is_secret_path ` and the Python ` ignore.py ` match ** by filename only**
86+ (` id_rsa ` , ` *.pem ` , ` *.key ` , …) — the fixture content is irrelevant to what they
87+ test. So fixtures must NOT embed a literal PEM ` BEGIN…PRIVATE KEY ` banner:
88+ ` detect-private-key ` (no pragma support) and ` detect-secrets ` both flag it, and a
89+ file committed past local hooks (e.g. ` --no-verify ` ) then turns `Pre-commit
90+ hooks` + ` Lint & Type Check` red on ` --all-files` while a 20-case CI YAML subset
91+ stays green. Use inert content (` "private-key-material <MARKER>\n" ` ) plus
92+ ` # pragma: allowlist secret ` for the entropy detector; keep distinctive leak
93+ markers (` LEAK_RSA ` , …) so leakage is still detectable. High-entropy base64
94+ findings come from concatenating tokens with no separator — keep a space.
95+
96+ Catch this class only with the FULL local suite: ` pre-commit run --all-files `
97+ (NOT a staged-files commit run, which skips clean files). When backgrounding it,
98+ note the shell exit code is the trailing ` echo ` 's, not pre-commit's — grep the
99+ log for ` Failed ` , don't trust the reported exit.
100+
81101## Diff-Mode Self-Eat
82102
83103` diffctx --diff <range> ` runs on this repo's own history. The tool is its own
0 commit comments