Repository navigation
Conversation
…eusData#2634) Signed-off-by: tahodev <[email protected]>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclosure: this pull request was written with AI assistance on behalf of the account owner, who reviews and certifies every commit (DCO sign-off).
Summary
Implements the first phase of #2634 for the
searchpipeline: on POSIX, the unscoped code-search scan no longer builds a/bin/sh -ccommand string. Instead it runs as three supervised argv stages using the existing argv-based subprocess API:find <root> -type f [-name <file_pattern>] -print0writes the NUL-delimited candidate listsort -zunderLC_ALL=Corders the list in placegrep -Hn -E|-F -f <pattern_file> -- <files...>scans it in chunks of 256 files per invocationgrep exit status 1 (no matches in a chunk) is an ordinary empty result, and an empty file list short-circuits to an empty success without spawning grep — the same contract the retired xargs wrapper encoded.
What does not change
mcp_run_argv_stage_cancellable_boundedrunner reusescbm_subprocess_spawn/cbm_subprocess_pollwith the same cancellation latch, deadline handling, and cumulative output-limit latch as the existing shell runner, so cancel/deadline/oversized-output semantics are unchanged. find/sort failures fail closed, exactly like the old pipeline's status checks.system()/popen()/fork()calls — everything goes through the existingcbm_subprocess_*API, so the security allowlist is untouched.The git helpers are left for a follow-up PR to keep this one under the project's size guidance.
Tested
build/c/test-runner mcp(ASan+UBSan, x86_64 Linux): 383 PASS / 0 FAIL, including the existingsearch_code_recursive_fallback_propagates_discovery_failuresfamily (discovery/sort failure propagation, no-match success, empty discovery), which now runs through the argv stages.tests/test_mcp.c, each on an unindexed project so the unscoped argv scan is exercised end to end:$,;) is discovered and searched literally;"total_grep_matches":0;file_patternreaches find as a-nameoperand, so a non-matching extension is excluded and the same search without it matches.make -f Makefile.cbm testrun does not complete in my 2 GB sandbox — the ASan/UBSan process is OOM-killed partway through (4,350 tests passed, 0 failures at the kill point, across the mcp, cross_repo, index_resilience, fqn, route_canon, path_alias, watcher, lz4, zstd, sqlite_writer, artifact, scope, type_rep and go_lsp suites). No failure was observed in any suite that ran; I'm relying on CI for the complete run.Not tested
scripts/lint.sh(no cppcheck/clang-format toolchain available in my environment).Closes first phase of #2634.