feat(cloudflare)!: Match rpcTracePropagationBindings case-insensitively - #23625
Open
JPeer264 wants to merge 1 commit into
Open
Conversation
Contributor
size-limit report 📦
|
JPeer264
force-pushed
the
jp/rpc-trace-propagation-bindings-case-insensitive
branch
from
August 26, 2026 09:18
5194115 to
ecf53cc
Compare
JPeer264
force-pushed
the
jp/rpc-trace-propagation-bindings-case-insensitive
branch
from
August 26, 2026 10:54
ecf53cc to
d82956a
Compare
`rpcTracePropagationBindings` matched binding names with `stringMatchesSomePattern`, which compares strings case-sensitively and calls `test()` on the regex as given. A target carrying the `g` or `y` flag is stateful through `lastIndex`, so it matched only every other binding lookup. The bindings now go through `matchesTracePropagationTargets`, the same matcher `tracePropagationTargets` uses since #23534. It lower-cases both sides and drops the `g`/`y` flags before testing. `matchesTracePropagationTargets` gained a `requireExactStringMatch` parameter for this, named after the same parameter on `isMatchingPattern`. Binding names need an exact string match, otherwise an entry of `DB` would also enable propagation for `MY_DB`. The new integration suite lists the bindings as `'my_durable_object'` and `/^svc_/g` while they are named `MY_DURABLE_OBJECT`, `SVC_ALPHA` and `SVC_BETA`. `SVC_BETA` is the binding a stateful `g` regex drops, because matching `SVC_ALPHA` already moved its `lastIndex` past the start of the string. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/rpc-trace-propagation-bindings-case-insensitive
branch
from
August 26, 2026 11:48
d82956a to
4d6c2e7
Compare
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4d6c2e7. Configure here.
JPeer264
marked this pull request as ready for review
August 26, 2026 14:44
JPeer264
requested review from
andreiborza,
chargome and
isaacs
and removed request for
a team
August 26, 2026 14:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rpcTracePropagationBindingsmatched binding names withstringMatchesSomePattern, which compares strings case-sensitively and callstest()on the regex as given. A target carrying thegoryflag is stateful throughlastIndex, so it matched only every other binding lookup.The bindings now go through
matchesTracePropagationTargets, the same matchertracePropagationTargetsuses since #23534. It lower-cases both sides and drops theg/yflags before testing.matchesTracePropagationTargetsgained arequireExactStringMatchparameter for this, named after the same parameter onisMatchingPattern. Binding names need an exact string match, otherwise an entry ofDBwould also enable propagation forMY_DB.The new integration suite lists the bindings as
'my_durable_object'and/^svc_/gwhile they are namedMY_DURABLE_OBJECT,SVC_ALPHAandSVC_BETA.SVC_BETAis the binding a statefulgregex drops, because matchingSVC_ALPHAalready moved itslastIndexpast the start of the string.