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

@ -517,6 +517,18 @@ if (STATIC_ONLY_SCOPE) {
assert.match(r.out, /"fixed pa" 1\.\d+:1/);
});
test("F092 굵기 경계 — 18.7px 은 700 이상일 때만 큰 글자(3:1), 600 은 4.5:1 이다", async () => {
const gray = "color:#8a8a8a"; // 흰 배경 대비 약 3.5:1
const bold = await contrast("contrast-weight-700", `<h1 style="color:#111">Title</h1><p style="${gray};font-size:18.7px;font-weight:700">bold large</p>`);
assert.equal(bold.status, 0, bold.out);
assert.match(bold.out, /^PASS {2}fixture\/single 대비 AA/m);
const semibold = await contrast("contrast-weight-600", `<h1 style="color:#111">Title</h1><p style="${gray};font-size:18.7px;font-weight:600">semibold</p>`);
assert.equal(semibold.status, 1, semibold.out);
assert.match(semibold.out, /^FAIL {2}fixture\/single 대비 — "semibold" 3\.\d+:1/m);
const small = await contrast("contrast-size-18.5", `<h1 style="color:#111">Title</h1><p style="${gray};font-size:18.5px;font-weight:700">bold small</p>`);
assert.equal(small.status, 1, small.out);
});
test("대비: 시각적으로 숨긴 텍스트·투명 텍스트는 대상이 아니다", async () => {
const r = await contrast("contrast-hidden", `<style>${SR_ONLY}</style><h1 style="color:#111">Title</h1><span class="sr-only" style="color:#fff">screen reader only</span><p style="opacity:0;color:#fff">invisible</p><p style="visibility:hidden;color:#fff">hidden</p>`);
assert.equal(r.status, 0, r.out);
@ -623,6 +635,15 @@ if (STATIC_ONLY_SCOPE) {
assert.match(r.out, /^FAIL {2}fixture\/single axe — .*image-alt/m);
});
test("F093 axe 가 판정하지 못한 항목(incomplete)은 위반이 아니라 '수동 확인 n건'으로 덧붙인다", async () => {
const dir = caseDir("axe-incomplete");
fs.writeFileSync(path.join(dir, "index.html"), `<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Axe incomplete</title></head><body><main><h1>Axe</h1><div style="background-image:linear-gradient(#111,#333)"><p style="color:#eee">on gradient</p></div></main></body></html>`);
fs.writeFileSync(path.join(dir, "gate.config.json"), JSON.stringify({ pages: [{ name: "fixture", path: "index.html" }], widths: [390], checks: { ...ALL_OFF, axe: "auto" } }));
const r = await runGate(["--no-report"], { cwd: dir });
assert.equal(r.status, 0, r.out);
assert.match(r.out, /^PASS {2}fixture\/single axe — WCAG 2\.x AA 위반 0건 · 수동 확인 \d+건\(.*color-contrast.*\)/m);
});
// ── 시각 회귀 ──
test("V-19 기준 화면이 없던 첫 실행은 '일치'가 아니라 미검증이고, 기준은 --out-dir 아래에 쓴다", async () => {
const out = caseDir("visual-out");