fix(test-infra): judge uses resolveClaudeBinary; eval:watch reads the real partials dir

judgePtyState spawned the bare string 'claude' three definitions below the
resolveClaudeBinary() helper this same file exports — broken under hermetic
PATHs where every other launch in the file resolves correctly.

eval:watch read _partial-e2e.json from the legacy global ~/.gstack-dev/evals/
while EvalCollector writes it into the per-project eval dir (or
GSTACK_EVAL_DIR) — so the dashboard's completed-tests panel was empty
whenever slug detection succeeded, i.e. the normal case. The heartbeat and
per-run progress logs stay global by design (session-runner.ts: 'heartbeat
stays global'). The three eval-CLI docstrings stop claiming the legacy dir
is the primary location.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-08-14 19:24:42 -07:00
parent dcc6b9d628
commit 7ef96ed0bd
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
5 changed files with 20 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bun
/**
* Compare two eval runs from ~/.gstack-dev/evals/
* Compare two eval runs from the project eval dir (~/.gstack/projects/<slug>/evals;
* legacy fallback ~/.gstack-dev/evals)
*
* Usage:
* bun run eval:compare # compare two most recent of same tier

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bun
/**
* List eval runs from ~/.gstack-dev/evals/
* List eval runs from the project eval dir (~/.gstack/projects/<slug>/evals;
* legacy fallback ~/.gstack-dev/evals)
*
* Usage: bun run eval:list [--branch <name>] [--tier e2e|llm-judge] [--limit N]
*/

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bun
/**
* Aggregate summary of all eval runs from ~/.gstack-dev/evals/
* Aggregate summary of eval runs from the project eval dir
* (~/.gstack/projects/<slug>/evals; legacy fallback ~/.gstack-dev/evals)
*
* Usage: bun run eval:summary
*/

View File

@ -11,10 +11,19 @@
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import { getProjectEvalDir } from '../test/helpers/eval-store';
const GSTACK_DEV_DIR = path.join(os.homedir(), '.gstack-dev');
// Heartbeat + per-run progress logs are GLOBAL by design — session-runner.ts
// writes ~/.gstack-dev/e2e-live.json regardless of project ("heartbeat stays
// global"). The PARTIAL file is per-project: EvalCollector writes it into
// getProjectEvalDir() (or GSTACK_EVAL_DIR), so watching the legacy global
// path missed it whenever slug detection succeeded — i.e. the normal case.
const HEARTBEAT_PATH = path.join(GSTACK_DEV_DIR, 'e2e-live.json');
const PARTIAL_PATH = path.join(GSTACK_DEV_DIR, 'evals', '_partial-e2e.json');
const PARTIAL_PATH = path.join(
process.env.GSTACK_EVAL_DIR || getProjectEvalDir(),
'_partial-e2e.json',
);
const STALE_THRESHOLD_SEC = 600; // 10 minutes
export interface HeartbeatData {

View File

@ -454,8 +454,11 @@ ${tail}
};
try {
// Use the same binary resolution as every PTY launch in this file —
// judgePtyState previously hardcoded bare 'claude' three definitions
// below resolveClaudeBinary(), breaking under hermetic PATHs.
const result = nodeSpawnSync(
'claude',
resolveClaudeBinary() ?? 'claude',
['-p', '--model', 'claude-haiku-4-5', '--max-turns', '1'],
{
input: prompt,