fix(eval,ci): isolate interview eval and harden skill lint and design gate

- Run eval sessions in a temp dir outside the repo so Codex no longer reads the root AGENTS.md; empty streams, timeouts and crashes judge as ERROR instead of PASS
- Close interview-gate lint gaps: softening phrases hidden on allowed lines, reordered phrasing, sibling-anchor bypass
- design-gate: bold threshold 700, axe incomplete reported as manual checks, follow @import with query strings, report unverified color literals; keep site copy in sync via test
- publish-npm.sh fails without NPM_TOKEN; CI requires Node 22.6+; ignore outputs/
This commit is contained in:
Yun Chan 2026-10-09 18:18:41 +09:00
parent bc914eafc5
commit 97f2c241e4
19 changed files with 767 additions and 139 deletions

View file

@ -10,7 +10,8 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { judge, normalizeClaude, normalizeCodex } from "./lib/judge.mjs";
import { normalizeClaude, normalizeCodex } from "./lib/judge.mjs";
import { computeVerdict, listJsonl } from "./lib/verdict.mjs";
import { findCanaryFiles } from "./lib/fsutil.mjs";
import { staticJudgements, findSkillCopy } from "./lib/static.mjs";
@ -37,11 +38,18 @@ export function rejudgeRun(scenario, runner, runDir) {
const rawPath = path.join(runDir, isCodex ? "raw.jsonl" : "raw.ndjson");
if (!fs.existsSync(rawPath)) return null;
const events = (isCodex ? normalizeCodex : normalizeClaude)(fs.readFileSync(rawPath, "utf8"));
// run.mjs 와 같은 판정 함수를 쓴다: result.json 의 error·타임아웃·비0 종료, 빈 스트림, 저장소 지침 유입은 ERROR 다.
let record = {};
try {
record = JSON.parse(fs.readFileSync(path.join(runDir, "result.json"), "utf8"));
} catch {
// result.json 이 없으면 원본 스트림만으로 판정한다
}
const extra = {};
if (scenario.injection?.canary) {
extra.workdirCanaryHits = findCanaryFiles(path.join(runDir, "work"), scenario.injection.canary, Object.keys(scenario.seedFiles || {}));
}
const base = judge(scenario, events, extra);
const base = computeVerdict(scenario, record, rawPath, runner, extra, { contextFiles: listJsonl(path.join(runDir, "_codex-isolation")) });
const st = staticJudgements(scenario, events, { skillDir: findSkillCopy(runDir) });
return { scenario: scenario.id, runner, run: path.basename(runDir), verdict: base.verdict, note: base.note, ...st };
}