Skip to content

[codex] fix path matcher performance#645

Merged
winhowes merged 1 commit intomainfrom
codex/fix-path-matcher-performance
Apr 25, 2026
Merged

[codex] fix path matcher performance#645
winhowes merged 1 commit intomainfrom
codex/fix-path-matcher-performance

Conversation

@winhowes
Copy link
Copy Markdown
Owner

Summary

  • Replace the recursive ** path segment matcher with an iterative backtracking matcher.
  • Add regression coverage for pathological ** patterns and bounded semantic parity with the previous recursive behavior.

Root cause

The previous matcher branched recursively for every ** segment. Certain valid allowlist or denylist patterns could force exponential matching work against longer paths.

Impact

Request path matching now avoids recursive branch explosion while preserving existing * and ** semantics.

Validation

  • go test ./app -run 'TestMatch(Path|Segments)'
  • go test ./...

@winhowes winhowes merged commit 461abda into main Apr 25, 2026
3 checks passed
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