fix_until_safe
Iteratively rewrites a regex pattern until it is verified safe against ReDoS and equivalent to the original, or returns an honest failure.
Instructions
Drive suggest_rewrites in a loop and return a GUARANTEED-safe equivalent
or an honest failure. Use this when you want the server to do the iteration
for you and hand back a single fixed pattern you can trust.
success=true requires the fixed pattern to be verified non-super-linear on
EVERY requested engine (default ["python"]) AND provably/empirically
equivalent to the original input. If no such pattern exists, or a requested
engine isn't installed, returns success=false with failure_reason and the
closest candidate -- never a fabricated fix. Deterministic for a given seed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| fuzz_n | No | ||
| engines | No | ||
| pattern | Yes | ||
| negatives | No | ||
| positives | No | ||
| timeout_ms | No | ||
| max_iterations | No | ||
| equivalence_mode | No | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||