Skip to content

fix: add bounded Node regex fallback search - #121

Open
PracticalSwan wants to merge 1 commit into
rebel0789:mainfrom
PracticalSwan:fix/node-regex-fallback
Open

fix: add bounded Node regex fallback search#121
PracticalSwan wants to merge 1 commit into
rebel0789:mainfrom
PracticalSwan:fix/node-regex-fallback

Conversation

@PracticalSwan

Copy link
Copy Markdown

Summary

  • add regex support to the Node search fallback when ripgrep is unavailable
  • execute JavaScript regex matching in an interruptible worker with a 5s ceiling
  • retain existing file/result/scan bounds and reject oversized/invalid patterns cleanly
  • decode ripgrep stdout/stderr with streaming UTF-8 decoders so chunk boundaries cannot corrupt JSON/text
  • expose lightweight search capability metadata through server_config

Scope

This is intentionally narrower than issue #33: it does not add ffgrep/CodeGraph or a new indexing subsystem. It only restores bounded regex capability to the existing fallback without blocking the MCP server on pathological expressions.

It also does not duplicate open PR #115's Windows Bash/search-runtime diagnostics.

Verification

  • clean branch based on upstream main (587f7fd)
  • npm ci --ignore-scripts — 0 vulnerabilities
  • npm run build
  • focused runNodeFallbackSearchLimitStress() harness — passed
  • git diff --check

The complete upstream stress file additionally reaches a pre-existing Windows Bash adapter failure (/bin/bash cannot execute a literal C:\...\node.exe command), which is unrelated to this search change and is covered by open PR #115.

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