fix(eval-pass-rates): match trial-outcome files by basename so Windows backslash paths are read

This commit is contained in:
garrytan committed 2026-09-29 22:16:52 +00:00
1 parent bfabda7419
commit aba80c8fb6
1 file changed
+1 -1
+1 -1
View File
@@ -155,7 +155,7 @@ export function readTrialOutcomeDir(dir: string): { records: TrialRecord[]; erro
const errors: string[] = []; const errors: string[] = [];
if (!fs.existsSync(dir)) return { records, errors }; if (!fs.existsSync(dir)) return { records, errors };
for (const name of fs.readdirSync(dir, { recursive: true }) as string[]) { for (const name of fs.readdirSync(dir, { recursive: true }) as string[]) {
if (!/(^|\/)trial-outcomes[^/]*\.jsonl$/.test(name)) continue; if (!/^trial-outcomes[^/\\]*\.jsonl$/.test(path.basename(name))) continue;
const full = path.join(dir, name); const full = path.join(dir, name);
const parsed = parseTrialOutcomes(fs.readFileSync(full, 'utf8'), { maxBytes: TRIAL_OUTCOMES_MAX_BYTES }); const parsed = parseTrialOutcomes(fs.readFileSync(full, 'utf8'), { maxBytes: TRIAL_OUTCOMES_MAX_BYTES });
records.push(...parsed.records.map(record => ({ records.push(...parsed.records.map(record => ({