From 133e6a3743dd64191187e2cc34b50b73dded4ab5 Mon Sep 17 00:00:00 2001 From: Tyler Skelton Date: Wed, 7 Oct 2026 17:42:16 -0700 Subject: [PATCH 1/3] Run checks with their text on fd 3, never in argv Every check run (bar, mutation, drafting trials, reference try, mission assertions) starts its shell with one fixed wrapper. The command arrives on fd 3, which the wrapper reads to the end and closes before evaluating it, so the text is in no process's cmdline or environment and nothing the check starts inherits the descriptor. --- src/bar.ts | 8 +++++-- src/criteria.ts | 3 +++ src/mission.ts | 1 + src/reference.ts | 2 +- src/run.ts | 60 ++++++++++++++++++++++++++++++++++++++++-------- 5 files changed, 62 insertions(+), 12 deletions(-) diff --git a/src/bar.ts b/src/bar.ts index 8425eb1..f72b3ae 100644 --- a/src/bar.ts +++ b/src/bar.ts @@ -1006,7 +1006,7 @@ async function mutationCheck( }; } if (!prior) { - const baseline = await runCommand(run, { cwd: ctx.cwd, timeoutMs, signal: ctx.signal }); + const baseline = await runCommand(run, { cwd: ctx.cwd, timeoutMs, signal: ctx.signal, hideCommand: true }); if (baseline.code !== 0) { return { ok: false, @@ -1039,6 +1039,7 @@ async function mutationCheck( cwd: ctx.cwd, timeoutMs, signal: ctx.signal, + hideCommand: true, }); // A mutation the command still passes is a line nothing checks — unless // it was a boundary nudge and negating the same condition is caught. @@ -1052,7 +1053,7 @@ async function mutationCheck( let negKilled = false; if (neg && negText !== null && negText !== file.text) { writeFileSync(file.abs, negText, "utf8"); - const rn = await runCommand(run, { cwd: ctx.cwd, timeoutMs, signal: ctx.signal }); + const rn = await runCommand(run, { cwd: ctx.cwd, timeoutMs, signal: ctx.signal, hideCommand: true }); negKilled = rn.code !== 0; } if (negKilled) boundaryOnly.push(`${m.path}:${m.line} (${m.operator}) — ${m.before.trim()}`); @@ -2193,6 +2194,9 @@ export async function runCheck(check: Check, ctx: BarContext): Promise