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
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at random #300
tests/fuzz/repository-text.fuzz.test.ts ("workflow files and package scripts") fails on main from time to time, depending on the random seed. It failed in CI on #291, a docs-only PR (run 44197635763, check (ubuntu-26.04, 22)):
not ok 2 - workflow files and package scripts
Property failed after 4 tests
{ seed: -1959240610, path: "3:6:4:7:7", endOnFailure: true }
Counterexample: ["\"\"`````````…"]
[cause]: Error: took 3238 ms
On a part that holds a " followed by a long run of backticks with no closing quote, [^"]* backtracks over the whole run from every starting point, so time grows quadratically. discoverGateChecks() reaches this through any gate script, for example "check": "tsc && \"\"" + "".repeat(n)`:
backticks
discoverGateChecks({ check: "tsc && " + text })
25,000
0.9 s
50,000
3.5 s
100,000
12.9 s
Without the leading "" it takes 1 to 3 ms. The text comes from the analysed repository's package.json, so a repository can stall planning. The fuzz test was written to catch exactly this, which is why it fails whenever the generator draws that shape.
Expected: the check is linear and gives the same answers as the regex, and the fuzz test passes for every seed.
Activity
ci: re-run after an unrelated fuzz failure (DiffCI#300)
ci: re-run checks after the Windows fuzz-timing flake (DiffCI#300, fi…
ci: re-run checks after the fuzz-timing flake (DiffCI#300, fixed by D…
docs: say Rust is supported experimentally in the roadmap (#291)
fix(impact): treat modelled Python files as code when resolving reade…
fix(planner): check double-quoted expansion in linear time (DiffCI#302)