Skip to content

chore(deps): bump fancy-regex to 0.20.0 across all three lockfiles - #2813

Merged
chaliy merged 3 commits into
mainfrom
eve/clever-mccarthy-plzps0
Nov 2, 2026
Merged

chaliy merged 3 commits into
mainfrom
eve/clever-mccarthy-plzps0

Conversation

@chaliy

@chaliy chaliy commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Moves the workspace fancy-regex requirement to 0.20 and refreshes every
lockfile that resolves it: root Cargo.lock, crates/bashkit/fuzz/Cargo.lock
and examples/hyperlight/Cargo.lock. No call sites change; the builder methods
bashkit uses (delegate_size_limit, delegate_dfa_size_limit,
backtrack_limit) are unchanged in 0.20.0.

Also corrects the REGEX_DFA_SIZE_LIMIT doc comment, which was silently wrong
after this bump: one constant feeds two engines whose contracts have now
diverged (details below).

The unrelated transitive fancy-regex 0.17.0 in the root lockfile is untouched.

Why

Supersedes #2806. Dependabot's fuzz-dependencies group is scoped to
crates/bashkit/fuzz, but the dependency it found lives in the workspace
root
Cargo.toml. So #2806 edited the root manifest while refreshing only
fuzz/Cargo.lock, leaving the root and examples/hyperlight lockfiles pinned
to 0.19.2. Every --locked job then failed:

error: cannot update the lock file /home/runner/work/bashkit/bashkit/Cargo.lock
       because --locked was passed to prevent this

That is a manifest/lockfile split dependabot cannot fix from the fuzz group, so
the bump has to land as one atomic change instead.

Worth noting for whoever reads this later: today's aggregated root cargo group
run failed outright (turso_core, unknown_error), which is why fancy-regex
reached us only through the fuzz group in the first place.

Before / After

Before — cargo test --locked on #2806's head fails before compiling anything
(6 red checks: all three CPython legs, both WASM jobs, Audit).

After — the full CI-equivalent slice is green:

$ cargo test --workspace --lib --bins --tests --features http_client,sqlite --no-fail-fast
... 7091 passed; 0 failed
$ cargo clippy --workspace --all-targets --features http_client,sqlite -- -D warnings
Finished (0 warnings)
$ cargo fmt --check                # clean

No observable behavior change in the shipped builtins. 0.20.0 does carry three
upstream changes that land on code paths bashkit cares about, since grep, sed,
rg and jq all compile on this engine under TM-DOS-025 backtracking bounds:

  • delegate_dfa_size_limit now sets the lazy-DFA cache capacity rather than
    a compiled-DFA size cap, and delegate_dfa_skip_cache_capacity_check is on by
    default — so our 1 MB value degrades instead of hard-erroring when undersized.
  • In Unicode mode \xHH above 0x7F now matches the codepoint (\xFF → ÿ).
  • \b, \B, \< and \> are no longer hard outside lookbehinds.

The TM-DOS-025 bounds are intact — all five backtracking-limit tests pass:

builtins::sed::tests::fancy_regex_backtrack_limit_is_enforced ... ok
builtins::grep::tests::test_grep_perl_catastrophic_backtrack_is_bounded ... ok
builtins::grep::tests::test_grep_bre_backreference_backtracking_is_bounded ... ok
interpreter::tests::test_cond_extglob_backtracking_is_bounded ... ok
interpreter::glob::tests::star_backtracking_restores_bracket_cache_state ... ok

Not run locally: ssh_supabase_connects, which dials the live public
supabase.sh endpoint and is unreachable from this sandbox. It is unrelated to
regex and remains a required CI gate.

Risk

  • Low for the lockfile bump itself: existing coverage over grep/sed/rg/jq regex
    behavior and the backtracking caps passes unchanged.
  • The residual risk is the three upstream semantic changes above. The ones with
    user-visible potential — \xHH in Unicode mode and word-boundary compilation
    — are covered by the grep/sed suites and the Bash/Debian oracle scoreboards,
    all green here and in CI.
  • delegate_dfa_size_limit becoming a cache capacity means the 1 MB value is no
    longer a hard ceiling on delegate DFA memory; it bounds cache size instead.
    REGEX_SIZE_LIMIT and FANCY_BACKTRACK_LIMIT still bound compilation and
    backtracking, so TM-DOS-025 does not depend on this knob.

Checklist

  • Tests added or updated — no new tests; this is a dependency bump, and the
    existing TM-DOS-025 and grep/sed/rg/jq suites are the regression gate
  • Backward compatibility considered — internal dependency only, no public
    API change

Follow-ups


Generated by Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Dependabot's #2806 bumped the workspace `fancy-regex` requirement in the root
Cargo.toml but only refreshed crates/bashkit/fuzz/Cargo.lock, because the
fuzz-dependencies group is scoped to that directory. The root and
examples/hyperlight lockfiles kept 0.19.2, so every `cargo --locked` job failed
with "cannot update the lock file ... because --locked was passed".

Bump the requirement and all three lockfiles that resolve fancy-regex together
(root, crates/bashkit/fuzz, examples/hyperlight). The unrelated transitive
fancy-regex 0.17.0 in the root lockfile is untouched.

0.20.0 carries behavior changes that matter here, since grep/sed/rg/jq all
compile on this engine under TM-DOS-025 backtracking bounds:
- `delegate_dfa_size_limit` now sets the lazy-DFA cache capacity rather than a
  compiled-DFA size limit, and `delegate_dfa_skip_cache_capacity_check` is on
  by default, so our 1 MB value no longer hard-errors when too small.
- In Unicode mode `\xHH` above 0x7F now matches the codepoint (`\xFF` -> U+00FF).
- `\b`, `\B`, `\<` and `\>` are no longer hard outside lookbehinds.

No call-site changes were needed: the builder methods bashkit uses
(delegate_size_limit, delegate_dfa_size_limit, backtrack_limit) are unchanged.
One constant feeds two engines with different contracts, which fancy-regex
0.20.0 made divergent. For the `regex` crate it stays `dfa_size_limit`, a cap
on compiled DFA size. For fancy-regex it is `delegate_dfa_size_limit`, which
0.20.0 redefined as the lazy-DFA cache capacity; 0.20.0 also turns on
`delegate_dfa_skip_cache_capacity_check` by default, so an undersized value
now degrades rather than failing compilation.

Documentation only; the value and every call site are unchanged.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 6cb3792 Commit Preview URL

Branch Preview URL
Nov 02 2026, 10:16 AM

`cargo vet --locked` failed the Audit job on this branch:

    1 unvetted dependencies:
      fancy-regex:0.20.0 missing ["safe-to-deploy"]

The exemption still named 0.19.2, which the bump removed from the graph.
Retarget it to 0.20.0, matching the surrounding entries. The separate 0.17.0
exemption stays: that is an unrelated transitive copy still in the root
lockfile.
@chaliy
chaliy merged commit a57831f into main Nov 2, 2026
54 checks passed
@chaliy
chaliy deleted the eve/clever-mccarthy-plzps0 branch November 2, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant