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

@ -3,14 +3,31 @@
# 러너에 설치된 더 새 Node 를 찾아 PATH 에 올리고, 그래도 안 되면 명확히 실패시킨다.
set -euo pipefail
MIN_MAJOR=20
# 개발·CI 최소 버전. 설치된 CLI 의 런타임 기준(engines >=20.11)과 다르다.
# 테스트가 `node --test --experimental-strip-types` 를 쓰고 이 플래그는 Node 22.6 부터 있다.
MIN_MAJOR=22
MIN_MINOR=6
add_path() { echo "$1" >> "${GITHUB_PATH:-/dev/null}"; export PATH="$1:$PATH"; }
# 현재 PATH 의 Node 메이저 버전. 없으면 0.
current_major() {
command -v node >/dev/null 2>&1 || { echo 0; return; }
node -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo 0
# <메이저> <마이너> 가 MIN_MAJOR.MIN_MINOR 이상이면 성공.
version_ok() {
local maj="$1" min="$2"
[ "$maj" -gt "$MIN_MAJOR" ] && return 0
[ "$maj" -eq "$MIN_MAJOR" ] && [ "$min" -ge "$MIN_MINOR" ]
}
# 주어진 node 바이너리의 "메이저 마이너". 실행에 실패하면 "0 0".
node_ver_of() { # <node 경로>
"$1" -p 'process.versions.node.split(".").slice(0,2).join(" ")' 2>/dev/null || echo "0 0"
}
# 현재 PATH 의 node 가 기준을 만족하는가.
current_ok() {
command -v node >/dev/null 2>&1 || return 1
local maj min
read -r maj min <<<"$(node_ver_of node)"
version_ok "${maj:-0}" "${min:-0}"
}
# 러너에 흔히 있는 위치를 훑어 조건을 만족하는 Node 를 찾는다.
@ -21,25 +38,30 @@ current_major() {
# fnm 으로 v22 를 넣었는데도 v18 을 보고 실패했다.
# **없을 때가 아니라 모자랄 때 찾아야 한다.**
adopt_newer_node() {
local cand v
for cand in \
"$HOME/.nvm/versions/node"/*/bin \
"$HOME/.local/share/fnm/node-versions"/*/installation/bin \
"$HOME/.fnm/node-versions"/*/installation/bin \
"$HOME/.volta/bin" \
/usr/local/bin
do
local cand maj min
# 글롭은 사전순이라 v20 이 v22 보다 먼저 나온다. 버전 역순으로 정렬해 가장 높은 버전부터 본다.
while IFS= read -r cand; do
[ -x "$cand/node" ] || continue
v="$("$cand/node" -p 'process.versions.node.split(".")[0]' 2>/dev/null || echo 0)"
if [ "$v" -ge "$MIN_MAJOR" ]; then
read -r maj min <<<"$(node_ver_of "$cand/node")"
if version_ok "${maj:-0}" "${min:-0}"; then
add_path "$cand"
return 0
fi
done
done < <(
for cand in \
"$HOME/.nvm/versions/node"/*/bin \
"$HOME/.local/share/fnm/node-versions"/*/installation/bin \
"$HOME/.fnm/node-versions"/*/installation/bin \
"$HOME/.volta/bin" \
/usr/local/bin
do
printf '%s\n' "$cand"
done | sort -rV
)
return 1
}
if [ "$(current_major)" -lt "$MIN_MAJOR" ]; then
if ! current_ok; then
adopt_newer_node || true
fi
@ -47,7 +69,7 @@ if ! command -v node >/dev/null 2>&1; then
cat >&2 <<'MSG'
Node 를 찾을 수 없다.
이 워크플로는 self-hosted host 러너에서 돈다. 러너 머신에 Node 20 이상을 설치해라.
이 워크플로는 self-hosted host 러너에서 돈다. 러너 머신에 Node 22.6 이상을 설치해라.
curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell
fnm install 22 && fnm default 22
셸 rc 를 고치지 않아도 된다 — 이 스크립트가 설치 경로를 직접 찾는다.
@ -55,10 +77,9 @@ MSG
exit 1
fi
major="$(current_major)"
if [ "$major" -lt "$MIN_MAJOR" ]; then
if ! current_ok; then
cat >&2 <<MSG
Node $MIN_MAJOR 이상이 필요하다 (현재 $(node -v)).
Node $MIN_MAJOR.$MIN_MINOR 이상이 필요하다 (현재 $(node -v)).
러너에 새 Node 가 설치돼 있는데도 이 메시지가 나오면, 이 스크립트가 훑는 경로 밖에
있는 것이다. 아래 중 한 곳에 두거나 러너 사용자의 PATH 에 올려라.