From 39c83994faf4a21fc15b1a08dd165a979c03b49e Mon Sep 17 00:00:00 2001 From: wassname Date: Wed, 17 Jun 2026 18:16:32 +0800 Subject: [PATCH] FIXME: judge side-effect clones pollute user workspace pi -p --no-session clones the repo into the parent of cwd, leaving a stale directory that the NEXT judge then finds and rejects the goal over. Needs a temp-dir fix or in-repo inspection. --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index d782649..5978d7c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -461,6 +461,10 @@ async function runJudge( // user sees "Working" indefinitely with no way to know what's happening. Add a setTimeout that // resolves with a reject verdict after, say, 120s, and surface progress (e.g. stderr lines) so // the user can tell the judge is still alive. See also: no progress indication in TUI while judging. + // FIXME(side-effect): pi -p --no-session clones the repo into the PARENT of cwd (so alongside + // the working dir), leaving a stale pi-plan/ directory. The judge should run in a temp dir or + // inside the existing repo checkout so it doesn't pollute the user's workspace with side-effect + // clones that then fail the next sign-off (the judge found its own clone and rejected the goal). const JUDGE_TIMEOUT_MS = 120_000; const output = await new Promise((resolve) => { let settled = false;