You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assert_matches costs ~38x a string comparison, undocumented #1187
assert_matches forks grep -E per call. .claude/rules/perf-fork-budget.md
already records the reason — Bash 3.2 changed whether a quoted right-hand side
of [[ =~ ]] is a regex or a literal, so at the Bash 3.0 floor the same pattern
would match differently across supported versions, and removing the fork means
picking one semantic and breaking the other.
Not proposing to change it. That trade is decided, and the rule says not to
chase it.
What is missing
The cost was never quantified anywhere, and users have no way to know. A suite
asserting inside a large loop pays 38x without a hint that a cheaper assertion
would do.
Quantify it in the internal rule, so the trade is weighable rather than just
asserted.
Note it in docs/assertions.md, pointing at assert_contains when the
pattern is a fixed substring.
Activity
Chemaclass commentedon Aug 13, 2026
Done in #1188 (merged).