Uh oh!
There was an error while loading. Please reload this page.
fix(runtime): end Grep options before the pattern in the sandboxed worker - #3734
fix(runtime): end Grep options before the pattern in the sandboxed worker#3734udsy19 wants to merge 1 commit into
Conversation
6209c29 to
b5a29f2Compare…rker
The filesystem worker appended the model-supplied Grep pattern as a bare
positional, so ripgrep parsed a pattern beginning with `-` as flags. An
option-like pattern such as `-webkit-box` exits 1, which this worker
reports as `{ kind: 'grep', matches: [] }` — the model is told the string
is absent from a file that contains it, with no error anywhere.
The host-local sibling already passes `--` first
(packages/runtime/src/workspace-executor.ts). That separator was added by
its argv unchanged, so the two search paths have disagreed since. The
worker is the default path on macOS and Linux for every boundary except
bypass and external.
Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
Generated-by: Claude Codeb5a29f2 to
d698f52CompareM4n5ter
commented
Aug 27, 2026
Relationship note: PRs #3734, #3735, and #3903 all close #3733, touch the same two runtime files, and apply the same This comment records the relationship only; it is not a merge decision. Automated review note posted by @未开智选手. This is not an independent human review; a human should verify the conclusion. |
M4n5ter
commented
Aug 27, 2026
Thank you for working on this fix. I compared this implementation with #3735 and #3903. All three correctly address the same root cause by placing the user-controlled pattern after ripgrep's #3903 was selected because its regression pins both the exact terminal argv order ( Posted by an automated review agent operated by @M4n5ter. This is not an 简体中文本条评论由 @M4n5ter 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md |
fix(runtime): end Grep options before the pattern in the sandboxed worker
Summary
The filesystem worker appended the model-supplied Grep pattern as a bare
positional, so ripgrep parsed a pattern starting with
-as flags.-webkit-boxexits 1, andpackages/runtime/src/filesystem-worker/operations.ts:425maps exit 1 to
{ kind: 'grep', matches: [] }— the model is told the string isabsent from a file that contains it, silently.
The host-local sibling already passes
--first(
packages/runtime/src/workspace-executor.ts:455). That separator arrived in#2961, which edited this worker's grep case in the same commit but left its argv
unchanged, so the two search paths have disagreed since. This propagates it.
Fixes#3733
Verification
Ran locally on macOS 26.5.1 (25F80), Node v26.7.0, ripgrep 15.1.0:
npm --workspace @maka/runtime run test:dist— 3090 tests, 0 failures(baseline on
mainwas 3089/0; the delta is the new case).operations.tsfromorigin/mainand rebuilt — thenew test fails (
actual [… '--max-count=50', '-webkit-box', …]vs expected['--', '-webkit-box', …]) while the other 20 cases in the file still pass.npm run lint,npm run format:check,npm run typecheck,npm run check:asf-headers— all clean.Not run: Windows and Linux sandbox surfaces.
AI use
Select exactly one:
Tool(s) and scope: Claude Code — located the divergence, drafted the one-line fix
and the regression test. Reviewed, reproduced and verified by me before submitting.
Checklist
Does this PR entail a change in behavior?