Skip to content

Commit 1c62135

Browse files
authored
fix(pipeline): set AGENTV_RUN_TIMESTAMP so CLI targets share one output folder (#795)
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.
1 parent 0cc338b commit 1c62135

File tree

1 file changed

+7
-0
lines changed
  • apps/cli/src/commands/pipeline

1 file changed

+7
-0
lines changed

apps/cli/src/commands/pipeline/run.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ export const evalRunCommand = command({
178178
// ── Step 2: Invoke CLI targets in parallel ───────────────────────
179179
if (targetInfo) {
180180
const envVars = loadEnvFile(evalDir);
181+
// Set AGENTV_RUN_TIMESTAMP so CLI targets group artifacts under one run folder.
182+
if (!process.env.AGENTV_RUN_TIMESTAMP) {
183+
process.env.AGENTV_RUN_TIMESTAMP = new Date()
184+
.toISOString()
185+
.replace(/:/g, '-')
186+
.replace(/\./g, '-');
187+
}
181188
const mergedEnv = { ...process.env, ...envVars };
182189
const maxWorkers = workers ?? testIds.length;
183190

0 commit comments

Comments
 (0)