From 075defe19e982a9a6d799eecb3152eccfca53db5 Mon Sep 17 00:00:00 2001 From: Christopher Tso Date: Wed, 15 Apr 2026 18:40:35 +1000 Subject: [PATCH 1/3] feat(pipeline): add --target and --targets flags to pipeline run and pipeline input Mirrors the --target / --targets options already available on \gentv eval run\. Allows reusing the same eval.yaml across different targets without duplicating files. Both commands now accept: --target Override target name from targets.yaml --targets Path to targets.yaml (overrides discovery) These values are forwarded directly to selectTarget() via cliTargetName and explicitTargetsPath, the same pathway used by eval run. Fixes #1107 --- apps/cli/src/commands/pipeline/input.ts | 14 +++++++++++++- apps/cli/src/commands/pipeline/run.ts | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/apps/cli/src/commands/pipeline/input.ts b/apps/cli/src/commands/pipeline/input.ts index 125d6fea3..caffe39c4 100644 --- a/apps/cli/src/commands/pipeline/input.ts +++ b/apps/cli/src/commands/pipeline/input.ts @@ -65,8 +65,18 @@ export const evalInputCommand = command({ long: 'experiment', description: 'Experiment label (e.g. with_skills, without_skills)', }), + target: option({ + type: optional(string), + long: 'target', + description: 'Override target name from targets.yaml (mirrors eval run --target)', + }), + targets: option({ + type: optional(string), + long: 'targets', + description: 'Path to targets.yaml (overrides discovery)', + }), }, - handler: async ({ evalPath, out, experiment }) => { + handler: async ({ evalPath, out, experiment, target, targets }) => { const resolvedEvalPath = resolve(evalPath); const outDir = resolve(out ?? buildDefaultRunDir(process.cwd(), experiment)); const repoRoot = await findRepoRoot(dirname(resolvedEvalPath)); @@ -94,6 +104,8 @@ export const evalInputCommand = command({ testFilePath: resolvedEvalPath, repoRoot, cwd: evalDir, + cliTargetName: target, + explicitTargetsPath: targets, dryRun: false, dryRunDelay: 0, dryRunDelayMin: 0, diff --git a/apps/cli/src/commands/pipeline/run.ts b/apps/cli/src/commands/pipeline/run.ts index 86c1b2289..82f8f3622 100644 --- a/apps/cli/src/commands/pipeline/run.ts +++ b/apps/cli/src/commands/pipeline/run.ts @@ -27,6 +27,7 @@ import { selectTarget } from '../eval/targets.js'; import type { GraderTask } from './grade.js'; import { runCodeGraders } from './grade.js'; + /** * Convert a Message[] array to plain text. * Single message: returns content directly (no role prefix). @@ -92,8 +93,18 @@ export const evalRunCommand = command({ description: 'Which grading phase to run: "code" runs code-graders inline, omit to skip grading (use pipeline grade separately)', }), + target: option({ + type: optional(string), + long: 'target', + description: 'Override target name from targets.yaml (mirrors eval run --target)', + }), + targets: option({ + type: optional(string), + long: 'targets', + description: 'Path to targets.yaml (overrides discovery)', + }), }, - handler: async ({ evalPath, out, workers, experiment, graderType }) => { + handler: async ({ evalPath, out, workers, experiment, graderType, target, targets }) => { const resolvedEvalPath = resolve(evalPath); const outDir = resolve(out ?? buildDefaultRunDir(process.cwd(), experiment)); const repoRoot = await findRepoRoot(dirname(resolvedEvalPath)); @@ -124,6 +135,8 @@ export const evalRunCommand = command({ testFilePath: resolvedEvalPath, repoRoot, cwd: evalDir, + cliTargetName: target, + explicitTargetsPath: targets, dryRun: false, dryRunDelay: 0, dryRunDelayMin: 0, From f833742db7d6292325bf4ff5b10216f45585bc8e Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 15 Apr 2026 09:34:57 +0000 Subject: [PATCH 2/3] style(pipeline): remove stray blank line in run.ts --- apps/cli/src/commands/pipeline/run.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/cli/src/commands/pipeline/run.ts b/apps/cli/src/commands/pipeline/run.ts index 82f8f3622..67235123b 100644 --- a/apps/cli/src/commands/pipeline/run.ts +++ b/apps/cli/src/commands/pipeline/run.ts @@ -27,7 +27,6 @@ import { selectTarget } from '../eval/targets.js'; import type { GraderTask } from './grade.js'; import { runCodeGraders } from './grade.js'; - /** * Convert a Message[] array to plain text. * Single message: returns content directly (no role prefix). From 07b0f8324f26f6f0645437d61780cc6e766353da Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 15 Apr 2026 09:52:14 +0000 Subject: [PATCH 3/3] docs(agents): note bun install after branch/PR checkout --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index cf1406ced..336fb0500 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -494,6 +494,10 @@ cp "$(git worktree list --porcelain | head -1 | sed 's/worktree //')/.env" .env ``` Both steps are required before running builds, tests, or evals in the worktree. +### After Checking Out an Existing Branch or PR + +Whenever you `git checkout`, `gh pr checkout`, `git pull`, or otherwise switch to a ref that may have changed `package.json` / `bun.lock`, run `bun install` before building, testing, or pushing. The pre-push hook builds all workspaces — if dependencies are stale, the push fails with errors like `Cannot find module 'recharts'` even though the source change is unrelated. `bun install` is cheap when already up-to-date, so run it by default after any ref switch. + ## Version Management This project uses a simple release script for version bumping. The git commit history serves as the changelog.