Skip to content

feat: add brace expansion support for glob patterns#368

Draft
karthiknadig wants to merge 1 commit intomainfrom
feat/issue-366
Draft

feat: add brace expansion support for glob patterns#368
karthiknadig wants to merge 1 commit intomainfrom
feat/issue-366

Conversation

@karthiknadig
Copy link
Member

Adds {a,b} brace expansion support to glob pattern handling, enabling patterns like ./**/{bin,Scripts}/python{,.exe} to work as search paths.

Changes

  • Brace expansion in pet-fs/src/glob.rs: expands {a,b} groups before passing patterns to the glob crate (which doesn't support braces natively)
  • Safety cap: expansion limited to 1024 patterns to prevent exponential blowup
  • Progress logging: trace-level logs during glob expansion showing pattern, match count, and elapsed time
  • Robust detection: is_glob_pattern() correctly identifies brace patterns (requires matched {...} pair with comma, scans all groups)
  • JSONRPC docs: documented brace expansion syntax and example in searchPaths
  • Comprehensive tests: 27 new tests covering edge cases, cap behavior, filesystem integration, and performance

Fixes #366

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 100ms 317ms 96ms 4ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 64.0%
Base Branch Coverage 62.7%
Delta 1.3% ✅

Coverage increased! Great work!

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 50ms 447ms 66ms -16ms
Full Refresh 92ms 25738ms 114ms -22ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 60.21%
Base Branch Coverage 58.89%
Delta 1.32% ✅

Coverage increased! Great work!

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Performance Report (Windows) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 10ms 13ms 9ms 1ms 11.1%
Full Refresh 167ms 3458ms 165ms 2ms 1.2%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

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.

accept direct path to interpreter as search path

1 participant