feat: migrate eval storage to project-scoped paths

Move eval results and E2E run artifacts from ~/.gstack-dev/evals/ to
~/.gstack/projects/$SLUG/evals/ so each project's eval history lives
alongside its other gstack data. Falls back to legacy path if slug
detection fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-23 10:52:46 -07:00
parent f4b8f2592f
commit f3151839d8
5 changed files with 37 additions and 7 deletions
+2 -1
View File
@@ -15,10 +15,11 @@ import {
findPreviousRun,
compareEvalResults,
formatComparison,
getProjectEvalDir,
} from '../test/helpers/eval-store';
import type { EvalResult } from '../test/helpers/eval-store';
const EVAL_DIR = path.join(os.homedir(), '.gstack-dev', 'evals');
const EVAL_DIR = getProjectEvalDir();
function loadResult(filepath: string): EvalResult {
// Resolve relative to EVAL_DIR if not absolute
+2 -1
View File
@@ -8,8 +8,9 @@
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import { getProjectEvalDir } from '../test/helpers/eval-store';
const EVAL_DIR = path.join(os.homedir(), '.gstack-dev', 'evals');
const EVAL_DIR = getProjectEvalDir();
// Parse args
const args = process.argv.slice(2);
+2 -1
View File
@@ -9,8 +9,9 @@ import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import type { EvalResult } from '../test/helpers/eval-store';
import { getProjectEvalDir } from '../test/helpers/eval-store';
const EVAL_DIR = path.join(os.homedir(), '.gstack-dev', 'evals');
const EVAL_DIR = getProjectEvalDir();
let files: string[];
try {