Skip to content

search: rg's binary-file warning is not a record path (D5) - #600

Merged
jaredLunde merged 45 commits into
mainfrom
jared/fix-d5-binary-warning
Oct 27, 2026
Merged

jaredLunde merged 45 commits into
mainfrom
jared/fix-d5-binary-warning

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

Fixes D5. After the matches of a file it stopped searching at a NUL byte, rg prints PATH: WARNING: stopped searching binary file after match (found "\0" byte around offset N) on stdout. It has no NUL, so the parser read it as the start of the next record's path.

Measured flags: --no-messages does not suppress it; --binary rewords it (PATH: binary file matches (...), still on stdout); --text removes it but searches binary files whole, which changes the results. So the fix is in the parser, all clients (Rust, TS, Python sync/async; sandbox-mcp uses the Rust crate): a line is the warning when it is exactly the previous record's path followed by the warning text, and parsing resumes on the next line. A file merely named like the warning stays a path. Spec: Parsing section. GNU grep -I prints nothing for such a file; busybox prints Binary file PATH matches, which has no LINE field and is already dropped. The scenario now runs on every engine (its control step no longer uses a glob, which busybox applies to the full path).

Removes the D5 xfails and the last differential tolerance (known.rs now has none). test:differential: 6/6 with rust, ts, python, python-async and mcp; search scenarios pass on local/alpine/debian-runas/readonly/tinydisk.

Stacked on #598 (D3); retarget once it lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64

jaredLunde and others added 30 commits October 27, 2026 09:20
Hegel generates operation sequences (files, search, exec, and changes made behind
the client's back); each runs in lockstep through every registered driver on its own
root, and the answers are compared with each other and, on local backends, with std::fs.
Findings D1..D5 are scenarios in differential-found.json, xfail for the clients that fail them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…lit at CR, VT, FF, U+2028)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
… even on SIGKILL; differential tests run only in the clients job

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…, not a rejected pattern

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…o jared/fix-d2-search-bad-git

# Conflicts:
#	sdk/conformance/FILES-OVER-EXEC.md
…rches the line again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…ferential tolerance

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…gs clip at the head

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
… jared/fix-d2-search-bad-git

# Conflicts:
#	crates/sandbox-conformance/ARCHITECTURE.md
jaredLunde and others added 15 commits October 27, 2026 12:05
…rches the line again (docs, merge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
… built on the Rust client)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…rop exec.exact from the comparison

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…er lead out of the root

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…ad-git

# Conflicts:
#	sdk/conformance/FILES-OVER-EXEC.md
… jared/fix-d2-search-bad-git

# Conflicts:
#	crates/sandbox-conformance/ARCHITECTURE.md
#	sdk/conformance/scenarios/differential-found.json
…o jared/fix-d3-clip-rg-column

# Conflicts:
#	crates/sandbox-conformance/ARCHITECTURE.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJRTKuPpNNqCLEdyUwZj64
…arning

# Conflicts:
#	crates/sandbox-conformance/ARCHITECTURE.md
#	crates/sandbox-conformance/tests/differential/known.rs
#	crates/sandbox-conformance/tests/differential/oracle.rs
#	crates/sandbox-conformance/tests/differential/world.rs
#	sdk/conformance/scenarios/differential-found.json
@jaredLunde
jaredLunde enabled auto-merge October 27, 2026 20:47
@jaredLunde
jaredLunde added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 67b3f02 Oct 27, 2026
23 checks passed
@jaredLunde
jaredLunde deleted the jared/fix-d5-binary-warning branch October 27, 2026 21:10
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