fix(shared): harden ripgrep-cli, zip-extractor, binary-downloader subprocess paths

Same Web-Response-on-Node hazard existed in ripgrep auto-download flow,
zip extraction helpers, and binary downloader streams. Switch to the new
Node-safe reader and ensure no spawn path escapes as unhandledRejection.

Related to #3919.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-22 20:40:24 +09:00
parent d17b2127f2
commit aded57ff1f
8 changed files with 42 additions and 20 deletions
@@ -1,6 +1,7 @@
import { spawn, spawnSync } from "../bun-spawn-shim"
import type { ArchiveEntry } from "../archive-entry-validator"
import { readProcessStream } from "../process-stream-reader"
import { readZipSymlinkTarget } from "./read-zip-symlink-target"
export function parseZipInfoListedEntry(line: string): ArchiveEntry | null {
@@ -45,8 +46,9 @@ export async function listZipEntriesWithZipInfo(
const [exitCode, stdout, stderr] = await Promise.all([
proc.exited,
new Response(proc.stdout).text(),
new Response(proc.stderr).text(),
// #3919: Use Buffer-concat stream reads for Node utility-process compatibility.
readProcessStream(proc.stdout),
readProcessStream(proc.stderr),
])
if (exitCode !== 0) {