Hi, thanks for creating this. It's super useful. I wanted to raise a new issue that I had found recently upon updating my pkg version to the latest: teich extract hangs on the last file, it appears there is quadratic backtracking in _generic_secret_pattern or some other re logic
Ran these two separately and both hung on the final file:
teich extract codex --private --out codex # stuck at 1828/1829
teich extract claude --private --out claude # stuck at 942/943
Different file each time, remaining worker pinned at 100% CPU, no error and no timeout - it just sits there indefinitely.
Poking around, _generic_secret_pattern in src/teich/anonymize.py:289 looks like the culprit. The (?:[A-Za-z0-9]+[_-])* prefix backtracks quadratically over long hyphen-separated runs (From what I gather and having some LMs look at the code) ie what UUIDs and tool-call IDs look like
Environment: teich 0.3.1, Python 3.12.13, Ubuntu 24.04
Hi, thanks for creating this. It's super useful. I wanted to raise a new issue that I had found recently upon updating my pkg version to the latest: teich extract hangs on the last file, it appears there is quadratic backtracking in
_generic_secret_patternor some otherrelogicRan these two separately and both hung on the final file:
Different file each time, remaining worker pinned at 100% CPU, no error and no timeout - it just sits there indefinitely.
Poking around,
_generic_secret_patterninsrc/teich/anonymize.py:289looks like the culprit. The(?:[A-Za-z0-9]+[_-])*prefix backtracks quadratically over long hyphen-separated runs (From what I gather and having some LMs look at the code) ie what UUIDs and tool-call IDs look likeEnvironment: teich 0.3.1, Python 3.12.13, Ubuntu 24.04