Files
oh-my-pi/packages/coding-agent/src
Mathews-Tom 37bf147f79 fix(secrets): bound nonmatching-replacement search for short values
findNonMatchingReplacement special-cased value.length <= 3 with a fully
exhaustive search over every base**length candidate (base = 90, so up to
729000 for a 3-character match). A default replace-mode regex of that
length matching every candidate (e.g. `[\s\S]{3}`) burned the entire
sweep \u2014 measured ~70ms \u2014 on every single match before reaching the
whitespace/keyed fallback, stalling provider requests on modest tool
output.

All lengths now use the same bounded single-position-substitution
search already used for values longer than 3 chars: O(length * 90)
instead of O(90^length). Measured ~1ms for the same case post-fix.
Correctness is unaffected \u2014 any regex whose rejection depends on a
single position (the realistic case: character classes, literal
matches, bounded repeats) is still found; this is the same bounded-
search tradeoff already accepted for longer values.
2026-07-02 21:07:34 +05:30
..
2026-06-08 15:47:57 -03:00
2026-07-02 03:29:30 +02:00
2026-07-01 00:07:30 +00:00
…