Skip to content

fix(grep): retrieve content from explicitly selected files - #67

Merged
AlexMikhalev merged 2 commits into
mainfrom
codex/grep-single-file-20261015
Oct 15, 2026
Merged

AlexMikhalev merged 2 commits into
mainfrom
codex/grep-single-file-20261015

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Selecting a single Markdown file with --paths brief.md returned zero passages even when directory search found the authored synonym. The file path is now indexed explicitly through the existing FFF API; neighbouring files are neither scanned nor searched.

The pinned FFF version uses the wrong path arena when grep applies constraints to an explicitly added file. Its existing public file-search API safely applies the same parsed constraints first, then the unchanged grep engine handles content. The fix retains filename-hint fallback, query semantics, path guards, file-size limits and the no-mmap budget. Symlink and special-file roots are refused.

Validation: 110 grep tests passed; workspace Clippy with warnings denied, formatting and all-target checks passed. Seven new real CLI tests cover absolute/relative paths, synonyms, Unicode/CRLF, multiple files, filters and neighbour exclusion. Two pre-existing hostile-directory tests cannot run on APFS; the new hostile-filename case is Linux-only and requires CI. Independent review reproduced zero-to-one retrieval against the actual Cursor-saved document and exported graph, with source bytes unchanged.

Gitea issue submission is queued locally because the configured CLI returns401 and the browser is signed out. No issue or public release is claimed by this PR.

@AlexMikhalev
AlexMikhalev merged commit e1c7ad8 into main Oct 15, 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