From 129a64030aeb8a3f94792168df8f047069f8fe4b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 28 Sep 2026 21:30:47 -0700 Subject: [PATCH] test(pr): stub host tools in canonical-wrapper trust tests CI runners switched to an image without ripgrep, so the parked-canonical wrapper test failed at scripts/pr's required-command check (Missing required command(s): rg) before reaching the trust routing it covers. Stub rg and pnpm in the fixture bin like the other wrapper fixtures. --- test/scripts/pr-wrappers.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/scripts/pr-wrappers.test.ts b/test/scripts/pr-wrappers.test.ts index 28cb88eac0e4..73e9e4c5a5b2 100644 --- a/test/scripts/pr-wrappers.test.ts +++ b/test/scripts/pr-wrappers.test.ts @@ -2089,6 +2089,11 @@ exit 99 mkdirSync(join(dir, "bin")); writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n"); chmodSync(join(dir, "bin/gh"), 0o755); + // These tests cover wrapper trust routing, not the host command inventory. + for (const command of ["pnpm", "rg"]) { + writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n"); + chmodSync(join(dir, "bin", command), 0o755); + } const git = (cwd: string, args: string[]) => spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" }); expect(git(repo, ["init", "-b", "main"]).status).toBe(0); @@ -2169,6 +2174,11 @@ exit 99 mkdirSync(join(dir, "bin")); writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n"); chmodSync(join(dir, "bin/gh"), 0o755); + // These tests cover wrapper trust routing, not the host command inventory. + for (const command of ["pnpm", "rg"]) { + writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n"); + chmodSync(join(dir, "bin", command), 0o755); + } const git = (cwd: string, args: string[]) => spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" }); expect(git(repo, ["init", "-b", "main"]).status).toBe(0);