From c281b9066a0e7d3b1bf57af2e93ead702ea3c8d3 Mon Sep 17 00:00:00 2001 From: Christopher Tso Date: Fri, 27 Mar 2026 21:08:26 +1100 Subject: [PATCH] fix(pipeline): set AGENTV_RUN_TIMESTAMP so CLI targets share one output folder pipeline run invoked CLI targets in parallel without setting AGENTV_RUN_TIMESTAMP, causing each test case to create a separate timestamped output directory. The agentv eval command already sets this env var once at run start (run-eval.ts:766-770). Apply the same pattern in pipeline/run.ts so all targets within a single pipeline run share one output folder. --- apps/cli/src/commands/pipeline/run.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/cli/src/commands/pipeline/run.ts b/apps/cli/src/commands/pipeline/run.ts index c52e7445..ce249099 100644 --- a/apps/cli/src/commands/pipeline/run.ts +++ b/apps/cli/src/commands/pipeline/run.ts @@ -178,6 +178,13 @@ export const evalRunCommand = command({ // ── Step 2: Invoke CLI targets in parallel ─────────────────────── if (targetInfo) { const envVars = loadEnvFile(evalDir); + // Set AGENTV_RUN_TIMESTAMP so CLI targets group artifacts under one run folder. + if (!process.env.AGENTV_RUN_TIMESTAMP) { + process.env.AGENTV_RUN_TIMESTAMP = new Date() + .toISOString() + .replace(/:/g, '-') + .replace(/\./g, '-'); + } const mergedEnv = { ...process.env, ...envVars }; const maxWorkers = workers ?? testIds.length;