@chrono-meta/fh-gate 3.25.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/regression/probes_live.yaml +9 -3
- package/.claude/rules/fh_4axis_gate.md +2 -0
- package/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +69 -13
- package/CLAUDE.md +3 -3
- package/README.ja.md +90 -379
- package/README.ko.md +130 -379
- package/README.md +122 -364
- package/README.zh.md +90 -346
- package/docs/REFERENCE.md +465 -0
- package/docs/USER_GUIDE.md +19 -0
- package/docs/codex-compat.md +36 -9
- package/knowledge/shared/harness-core/agents_md_runtime_details.md +49 -5
- package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +7 -3
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +73 -0
- package/knowledge/shared/rules/operations.md +3 -2
- package/package.json +10 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +32 -0
- package/plugins/fh-meta/skills/prompt-regression/SKILL.md +2 -2
- package/plugins/fh-meta/skills/sim-conductor/SKILL.md +3 -3
- package/plugins/fh-meta/skills/sim-conductor/SKILL_detail.md +4 -2
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-preprep/skills/preprep/lane_speech_coach.py +14 -22
- package/plugins/fh-preprep/skills/preprep/test_lane_speech_coach.py +47 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/fixtures/generated_harness/P1_r1/.claude/agents/todo-developer.md +28 -0
- package/scripts/fixtures/generated_harness/P1_r1/.claude/agents/todo-qa.md +25 -0
- package/scripts/fixtures/generated_harness/P1_r1/.claude/skills/harness/SKILL.md +6 -0
- package/scripts/fixtures/generated_harness/P1_r1/.claude/skills/todo-dev/SKILL.md +37 -0
- package/scripts/fixtures/generated_harness/P1_r1/CLAUDE.md +10 -0
- package/scripts/fixtures/generated_harness/P1_r1/tests/test_cli.py +1 -0
- package/scripts/fixtures/generated_harness/P1_r1/todo/cli.py +13 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/note-organizer.md +26 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/summary-reviewer.md +20 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/summary-writer.md +23 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/meeting-notes-organize/SKILL.md +23 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/weekly-meeting-summary/SKILL.md +39 -0
- package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/weekly-summary-write/SKILL.md +25 -0
- package/scripts/fixtures/generated_harness/P2_r2/CLAUDE.md +10 -0
- package/scripts/fixtures/generated_harness/P2_r2/tests/test_cli.py +1 -0
- package/scripts/fixtures/generated_harness/P2_r2/todo/cli.py +13 -0
- package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-developer.md +30 -0
- package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-reviewer.md +21 -0
- package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-tester.md +23 -0
- package/scripts/fixtures/generated_harness/P3_r1/.claude/settings.json +11 -0
- package/scripts/fixtures/generated_harness/P3_r1/.claude/skills/todo-dev/SKILL.md +38 -0
- package/scripts/fixtures/generated_harness/P3_r1/CLAUDE.md +12 -0
- package/scripts/fixtures/generated_harness/P3_r1/tests/test_cli.py +1 -0
- package/scripts/fixtures/generated_harness/P3_r1/todo/cli.py +13 -0
- package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-developer.md +27 -0
- package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-reviewer.md +15 -0
- package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-tester.md +20 -0
- package/scripts/fixtures/generated_harness/P3_r2/.claude/settings.json +12 -0
- package/scripts/fixtures/generated_harness/P3_r2/.claude/skills/todo-dev-team/SKILL.md +32 -0
- package/scripts/fixtures/generated_harness/P3_r2/CLAUDE.md +12 -0
- package/scripts/fixtures/generated_harness/P3_r2/tests/test_cli.py +1 -0
- package/scripts/fixtures/generated_harness/P3_r2/todo/cli.py +13 -0
- package/scripts/fixtures/generated_harness/P4_r2/.claude/agents/todo-developer.md +27 -0
- package/scripts/fixtures/generated_harness/P4_r2/.claude/agents/todo-qa.md +23 -0
- package/scripts/fixtures/generated_harness/P4_r2/.claude/skills/todo-dev/SKILL.md +19 -0
- package/scripts/fixtures/generated_harness/P4_r2/.claude/skills/todo-orchestrator/SKILL.md +33 -0
- package/scripts/fixtures/generated_harness/P4_r2/CLAUDE.md +10 -0
- package/scripts/fixtures/generated_harness/P4_r2/tests/test_cli.py +1 -0
- package/scripts/fixtures/generated_harness/P4_r2/todo/cli.py +13 -0
- package/scripts/gate_bootstrap_ephemeral.sh +0 -2
- package/scripts/generated_harness_check.py +740 -0
- package/scripts/lane_onoff_compare.py +138 -0
- package/scripts/lane_stub_env.allow +5 -0
- package/scripts/lane_stub_env.sh +63 -0
- package/scripts/mutation_probe.py +0 -5
- package/scripts/pr_merge_verified.sh +27 -3
- package/scripts/probe_live_eval.sh +1 -1
- package/scripts/probe_live_eval_lib.py +2 -2
- package/scripts/selfcheck.sh +22 -1
- package/scripts/test_axis4_lane_substitute_lanes.sh +93 -0
- package/scripts/test_card_drift_probe.sh +7 -0
- package/scripts/test_channel_inventory_lanes.sh +7 -1
- package/scripts/test_generated_harness_check_lanes.sh +325 -0
- package/scripts/test_hook_source_gate_lanes.sh +14 -3
- package/scripts/test_lane_stub_env_lanes.sh +218 -0
- package/scripts/test_marker_floor_lanes.sh +7 -0
- package/scripts/test_pr_merge_verified_lanes.sh +50 -3
- package/scripts/test_probe_live_eval_lanes.sh +1 -1
- package/scripts/test_push_zone_lanes.sh +6 -0
- package/scripts/test_session_close_lanes.sh +7 -0
- package/scripts/test_utterance_intake_lanes.sh +20 -1
- package/templates/.claude/rules/session.md +11 -0
- package/templates/.git-hooks/pre-commit +63 -21
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test_generated_harness_check_lanes.sh — scripts/generated_harness_check.py 회귀 앵커.
|
|
3
|
+
# 지키는 것은 «판별력»: 실물 픽스처(외부 생성기가 실제로 쓴 산출)에서 H1/H2 가 갈리는가,
|
|
4
|
+
# 아직 없는 입출력 경로·실재하는 settings 참조가 죽은 참조로 «안» 세어지는가(실측 오탐 2종),
|
|
5
|
+
# 금지문이 사람 확인으로 «안» 읽히는가, 빈 입력이 PASS 로 새지 «않는가»(rc=3).
|
|
6
|
+
# 픽스처 = scripts/fixtures/generated_harness/<런>/ (실물에서 복사한 최소 파일).
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
HERE="$(cd "$(dirname "$0")" && pwd)"; CHK="${GHC_CHK:-$HERE/generated_harness_check.py}"; FX="$HERE/fixtures/generated_harness" # GHC_CHK = fail-before 확인용 수리 전 사본
|
|
9
|
+
. "$HERE/fixture_guard_lib.sh" # 픽스처는 실레포에 쓰지 않는다
|
|
10
|
+
PY="${PYTHON:-python3}"
|
|
11
|
+
PASS=0; FAIL=0
|
|
12
|
+
ok(){ PASS=$((PASS+1)); printf ' ✅ %s\n' "$1"; }
|
|
13
|
+
no(){ FAIL=$((FAIL+1)); printf ' ❌ %s — %s\n' "$1" "${2:-}"; }
|
|
14
|
+
has(){ printf '%s' "$1" | /usr/bin/grep -qF -- "$2"; } # needle 단언 (고정 문자열)
|
|
15
|
+
echo "── test_generated_harness_check_lanes ──"
|
|
16
|
+
[ -f "$CHK" ] || { no "L1 존재" "$CHK"; echo "FAILED=1"; exit 1; }
|
|
17
|
+
"$PY" -m py_compile "$CHK" 2>/dev/null && ok "L1 구문" || no "L1 구문"
|
|
18
|
+
OUT=$("$PY" "$CHK" --selftest 2>&1); RC=$? # 직접 호출(변수 경유 아님) — new-code-anchor 가 실행으로 센다
|
|
19
|
+
[ "$RC" -eq 0 ] && ok "L2 selftest rc=0 (known-pair)" || no "L2 selftest" "rc=$RC · $OUT"
|
|
20
|
+
D="$(mktemp -d 2>/dev/null)" || D=""; [ -n "$D" ] && [ -w "$D" ] || { no "L3 환경" "mktemp -d 불가 — 레인 미측정(통과 아님)"; echo "PASS=$PASS FAIL=$FAIL"; echo "FAILED=1"; exit 1; }
|
|
21
|
+
D="$(fh_fixture_root "$D")" || { no "L3 환경" "fixture guard"; echo "FAILED=1"; exit 1; }
|
|
22
|
+
[ -d "$FX/P3_r1" ] && [ -d "$FX/P1_r1" ] || { no "L3 픽스처" "$FX 없음 — 레인 미측정(통과 아님)"; echo "FAILED=1"; exit 1; }
|
|
23
|
+
|
|
24
|
+
# L4 — 실물 픽스처: 기대 rc + needle
|
|
25
|
+
OUT=$("$PY" "$CHK" "$FX/P3_r1" 2>&1); RC=$?
|
|
26
|
+
[ "$RC" -eq 1 ] && ok "L4a P3_r1 HUMAN_REVIEW rc=1" || no "L4a P3_r1 rc" "rc=$RC"
|
|
27
|
+
has "$OUT" 'Bash(rm todo.json)' && has "$OUT" 'Bash(git push origin:*)' && ok "L4b P3_r1 H1 원문 보고 (rm todo.json · git push origin)" || no "L4b P3_r1 H1 needle" "$OUT"
|
|
28
|
+
has "$OUT" 'H2 CLAUDE.md:7' && ok "L4c P3_r1 H2 가 «해도 된다» 문장을 짚는다 (CLAUDE.md:7)" || no "L4c P3_r1 H2" "$OUT"
|
|
29
|
+
has "$OUT" 'W1 .claude/agents/todo-reviewer.md' && ok "L4d P3_r1 W1: 읽기 전용 reviewer + Bash" || no "L4d W1" "$OUT"
|
|
30
|
+
OUT=$("$PY" "$CHK" "$FX/P3_r2" 2>&1); RC=$?
|
|
31
|
+
[ "$RC" -eq 1 ] && has "$OUT" 'Bash(git push)' && ok "L4e P3_r2 rc=1 + git push 원문" || no "L4e P3_r2" "rc=$RC"
|
|
32
|
+
for P in P1_r1 P4_r2 P2_r2; do
|
|
33
|
+
OUT=$("$PY" "$CHK" "$FX/$P" 2>&1); RC=$?
|
|
34
|
+
[ "$RC" -eq 0 ] && ok "L4f $P PASS rc=0 (사람 확인 없음)" || no "L4f $P" "rc=$RC · $OUT"
|
|
35
|
+
done
|
|
36
|
+
OUT=$("$PY" "$CHK" "$FX/P1_r1" 2>&1)
|
|
37
|
+
has "$OUT" 'rm -rf' && no "L4g 생성기 스킬 제외" "harness 스텁의 지시문이 검사됐다" || ok "L4g 생성기 스킬(harness)은 검사 대상에서 빠진다"
|
|
38
|
+
|
|
39
|
+
# L5 — W4 오탐 회귀 (실측 2종) + known-pair
|
|
40
|
+
OUT=$("$PY" "$CHK" "$FX/P2_r2" 2>&1)
|
|
41
|
+
if printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ' | /usr/bin/grep -qF 'meetings/'; then no "L5a meetings/ 는 죽은 참조가 아니다" "W4 로 셌다"; else ok "L5a P2_r2 meetings/ · summaries/weekly_YYYY-MM-DD.md 는 W4 가 «아니다»"; fi
|
|
42
|
+
has "$OUT" 'meetings/' && has "$OUT" 'IO ' && ok "L5a' 같은 토큰이 INFO(입출력 경로)로는 보고된다" || no "L5a' INFO" "$OUT"
|
|
43
|
+
mkdir -p "$D/w4/.claude/skills/s/references" "$D/w4/.claude/agents"
|
|
44
|
+
printf '{"permissions":{"allow":["Bash(python -m pytest:*)"]}}\n' > "$D/w4/.claude/settings.json"
|
|
45
|
+
printf -- '---\nname: s\ndescription: d\n---\n## Done When\n- 끝\n설정은 `.claude/settings.json` 을, 가이드는 `references/g.md` 를 본다. 없는 것은 `docs/ghost_file.md` 다.\n' > "$D/w4/.claude/skills/s/SKILL.md"
|
|
46
|
+
printf 'g\n' > "$D/w4/.claude/skills/s/references/g.md"
|
|
47
|
+
OUT=$("$PY" "$CHK" "$D/w4" 2>&1)
|
|
48
|
+
W4=$(printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ')
|
|
49
|
+
if has "$W4" 'settings.json'; then no "L5b 실재하는 .claude/settings.json 이 죽은 참조로 셌다" "$W4"; else ok "L5b 실재 .claude/settings.json 참조는 W4 가 «아니다» (오탐 ⓐ)"; fi
|
|
50
|
+
if has "$W4" 'references/g.md'; then no "L5c 파일 디렉터리 기준 참조가 죽은 참조로 셌다" "$W4"; else ok "L5c 스킬 디렉터리 기준 references/g.md 는 W4 가 «아니다»"; fi
|
|
51
|
+
has "$W4" 'docs/ghost_file.md' && ok "L5d known-pair: 진짜 없는 파일 docs/ghost_file.md 는 W4" || no "L5d 진짜 죽은 참조 미검출" "$OUT"
|
|
52
|
+
|
|
53
|
+
# L6 — H2 부정문 (한국어·영어 각 1쌍)
|
|
54
|
+
h2case(){ # $1=이름 $2=문장 $3=기대 rc
|
|
55
|
+
local d="$D/h2_$1"; mkdir -p "$d"; printf '%s\n' "$2" > "$d/CLAUDE.md"
|
|
56
|
+
"$PY" "$CHK" "$d" >/dev/null 2>&1; local rc=$?
|
|
57
|
+
[ "$rc" -eq "$3" ] && ok "L6 $1: rc=$rc" || no "L6 $1" "rc=$rc 기대 $3 · 문장: $2"
|
|
58
|
+
}
|
|
59
|
+
h2case ko_neg 'git push 는 확인 없이 하지 않는다.' 0
|
|
60
|
+
h2case ko_pos 'git push 는 확인 없이 해도 된다.' 1
|
|
61
|
+
h2case en_neg 'The agent must never push to main without asking the user.' 0
|
|
62
|
+
h2case en_pos 'The agent may push to main without asking.' 1
|
|
63
|
+
h2case ko_ban '실데이터 삭제는 알아서 하지 말고 반드시 사용자에게 묻는다. 허용하지 않는다.' 0
|
|
64
|
+
|
|
65
|
+
# L7 — 빈 입력이 PASS 로 새지 않는다
|
|
66
|
+
mkdir -p "$D/empty"; "$PY" "$CHK" "$D/empty" >/dev/null 2>&1; RC=$?
|
|
67
|
+
[ "$RC" -eq 3 ] && ok "L7a 빈 디렉터리 → rc=3 (HARNESS_ERROR, PASS 아님)" || no "L7a 빈 디렉터리" "rc=$RC"
|
|
68
|
+
"$PY" "$CHK" "$D/없는경로" >/dev/null 2>&1; RC=$?
|
|
69
|
+
[ "$RC" -eq 3 ] && ok "L7b 없는 경로 → rc=3" || no "L7b 없는 경로" "rc=$RC"
|
|
70
|
+
mkdir -p "$D/badjson/.claude"; printf '# x\n' > "$D/badjson/CLAUDE.md"; printf '{ "permissions": ' > "$D/badjson/.claude/settings.json"
|
|
71
|
+
"$PY" "$CHK" "$D/badjson" >/dev/null 2>&1; RC=$?
|
|
72
|
+
[ "$RC" -eq 3 ] && ok "L7c 깨진 settings.json → rc=3 (0건으로 접히지 않는다)" || no "L7c 깨진 JSON" "rc=$RC"
|
|
73
|
+
mkdir -p "$D/badfm/.claude/agents"; printf 'frontmatter 없음\n' > "$D/badfm/.claude/agents/a.md"
|
|
74
|
+
"$PY" "$CHK" "$D/badfm" >/dev/null 2>&1; RC=$?
|
|
75
|
+
[ "$RC" -eq 3 ] && ok "L7d frontmatter 없는 에이전트 → rc=3" || no "L7d frontmatter" "rc=$RC"
|
|
76
|
+
JS=$("$PY" "$CHK" "$FX/P3_r1" --json 2>/dev/null) # pipefail 이라 파이프에 검사기 rc=1 을 물리지 않는다
|
|
77
|
+
printf '%s' "$JS" | "$PY" -c 'import sys,json; d=json.load(sys.stdin); sys.exit(0 if d["verdict"]=="HUMAN_REVIEW" and d["rc"]==1 and d["human_review"] else 1)' \
|
|
78
|
+
&& ok "L7e --json 이 같은 판정을 싣는다" || no "L7e --json"
|
|
79
|
+
|
|
80
|
+
# L8 — 되돌림 ⓐ: H1 패턴 목록에서 git push 를 지우면 push-만-허용 레포가 1→0 으로 떨어지는가
|
|
81
|
+
mkdir -p "$D/pushonly/.claude"; printf '# x\n' > "$D/pushonly/CLAUDE.md"
|
|
82
|
+
printf '{"permissions":{"allow":["Bash(git push)","Bash(python -m pytest:*)"]}}\n' > "$D/pushonly/.claude/settings.json"
|
|
83
|
+
"$PY" "$CHK" "$D/pushonly" >/dev/null 2>&1; R0=$?
|
|
84
|
+
MUT="$D/chk_mut_a.py"; /usr/bin/sed -e '/("git push",/d' -e 's/if "push" in words:/if False:/' "$CHK" > "$MUT"
|
|
85
|
+
if cmp -s "$CHK" "$MUT"; then no "L8 변이 ⓐ 적용" "HARNESS-ERROR: sed 가 아무것도 바꾸지 않았다 (변이 미적용)"
|
|
86
|
+
else
|
|
87
|
+
"$PY" "$MUT" "$D/pushonly" >/dev/null 2>&1; R1=$?
|
|
88
|
+
[ "$R0" -eq 1 ] && [ "$R1" -eq 0 ] && ok "L8 되돌림 ⓐ: H1 에서 git push 제거 → push-만-허용 레포가 rc 1→0 (레인이 실물을 잰다)" || no "L8 되돌림 ⓐ" "원본 rc=$R0 변이 rc=$R1 (변이해도 초록/빨강이 안 바뀌면 앵커가 장식)"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
# L9 — 되돌림 ⓑ: «루트/파일 디렉터리 둘 다 해석» 을 루트만으로 바꾸면 L5c 가 빨개지는가
|
|
92
|
+
MUT="$D/chk_mut_b.py"; /usr/bin/sed 's/or os.path.exists(os.path.join(fdir, cand))/or False/' "$CHK" > "$MUT"
|
|
93
|
+
if cmp -s "$CHK" "$MUT"; then no "L9 변이 ⓑ 적용" "HARNESS-ERROR: sed 가 아무것도 바꾸지 않았다 (변이 미적용)"
|
|
94
|
+
else
|
|
95
|
+
OUTM=$("$PY" "$MUT" "$D/w4" 2>&1); W4M=$(printf '%s' "$OUTM" | /usr/bin/grep -E '^ W4 ')
|
|
96
|
+
has "$W4M" 'references/g.md' && ok "L9 되돌림 ⓑ: 루트만 해석 → references/g.md 가 죽은 참조로 떨어진다 (L5c 가 빨개진다)" || no "L9 되돌림 ⓑ" "변이해도 L5c 조건이 안 바뀐다 (앵커가 장식)"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# L10 — 코덱스 R1 12건 (거버너가 실행으로 재현한 것) — 건마다 레인 하나. fail-before: GHC_CHK=<수리 전 사본> 으로 돌리면 빨개진다.
|
|
100
|
+
stl(){ # $1=이름 $2=settings 원문 $3=기대 rc
|
|
101
|
+
local d="$D/st_$1"; mkdir -p "$d/.claude"; printf '%s' "$2" > "$d/.claude/settings.json"
|
|
102
|
+
"$PY" "$CHK" "$d" >/dev/null 2>&1; local rc=$?
|
|
103
|
+
[ "$rc" -eq "$3" ] && ok "L10 $1: rc=$rc" || no "L10 $1" "rc=$rc 기대 $3 · $2"
|
|
104
|
+
}
|
|
105
|
+
stl S2_glob_star_star '{"permissions":{"allow":["Bash(* *)"]}}' 1
|
|
106
|
+
stl A3_branch_delete '{"permissions":{"allow":["Bash(git branch --delete x)"]}}' 1
|
|
107
|
+
stl A3_git_dash_C '{"permissions":{"allow":["Bash(git -C . push origin main)"]}}' 1
|
|
108
|
+
stl A3_glob_git_p '{"permissions":{"allow":["Bash(git p*)"]}}' 1
|
|
109
|
+
stl A5_top_not_object '[]' 3
|
|
110
|
+
stl A5_permissions_str '{"permissions":"Bash"}' 3
|
|
111
|
+
stl A5_allow_not_str '{"permissions":{"allow":[42]}}' 3
|
|
112
|
+
stl A5_allow_not_list '{"permissions":{"allow":"Bash"}}' 3
|
|
113
|
+
stl A5_no_permissions_ok '{"env":{"A":"b"}}' 0
|
|
114
|
+
stl B8_echo_rm_is_arg '{"permissions":{"allow":["Bash(echo rm:*)"]}}' 0
|
|
115
|
+
stl B8_cd_and_rm_is_head '{"permissions":{"allow":["Bash(cd x && rm y)"]}}' 1
|
|
116
|
+
stl B8_env_prefix_stripped '{"permissions":{"allow":["Bash(FOO=1 sudo git push)"]}}' 1
|
|
117
|
+
# 인터프리터·간접 실행 와일드카드 = 임의 명령 (카트리지 codex R8 A1) — 고정 대상은 통과
|
|
118
|
+
stl R8_sh_star '{"permissions":{"allow":["Bash(sh:*)"]}}' 1
|
|
119
|
+
stl R8_python3_star '{"permissions":{"allow":["Bash(python3:*)"]}}' 1
|
|
120
|
+
stl R8_bash_dash_c '{"permissions":{"allow":["Bash(bash -c:*)"]}}' 1
|
|
121
|
+
stl R8_node_space_star '{"permissions":{"allow":["Bash(node *)"]}}' 1
|
|
122
|
+
stl R8_timeout_wrap '{"permissions":{"allow":["Bash(timeout 5 *)"]}}' 1
|
|
123
|
+
stl R8_xargs_wrap '{"permissions":{"allow":["Bash(xargs:*)"]}}' 1
|
|
124
|
+
stl R8_path_head_sh '{"permissions":{"allow":["Bash(/bin/sh:*)"]}}' 1
|
|
125
|
+
stl R1_env_i_star '{"permissions":{"allow":["Bash(env -i *)"]}}' 1
|
|
126
|
+
stl R1_sudo_n_star '{"permissions":{"allow":["Bash(sudo -n *)"]}}' 1
|
|
127
|
+
stl R1_bash_cl '{"permissions":{"allow":["Bash(bash -cl:*)"]}}' 1
|
|
128
|
+
stl R1_bash_noprofile_c '{"permissions":{"allow":["Bash(bash --noprofile -c:*)"]}}' 1
|
|
129
|
+
stl R1_python_O_c '{"permissions":{"allow":["Bash(python3 -O -c:*)"]}}' 1
|
|
130
|
+
stl R1_node_eval_eq '{"permissions":{"allow":["Bash(node --eval=*)"]}}' 1
|
|
131
|
+
stl R1_python_stdin '{"permissions":{"allow":["Bash(python3 - :*)"]}}' 1
|
|
132
|
+
stl R1_python_versioned '{"permissions":{"allow":["Bash(python3.12:*)"]}}' 1
|
|
133
|
+
stl R1_lua '{"permissions":{"allow":["Bash(lua:*)"]}}' 1
|
|
134
|
+
stl R1_quoted_sh '{"permissions":{"allow":["Bash(\"sh\":*)"]}}' 1
|
|
135
|
+
stl R1_awk '{"permissions":{"allow":["Bash(awk:*)"]}}' 1
|
|
136
|
+
stl R1_git_alias '{"permissions":{"allow":["Bash(git -c alias.ship=!* ship)"]}}' 1
|
|
137
|
+
stl R1_ok_git_c_nonalias '{"permissions":{"allow":["Bash(git -c color.ui=never status)"]}}' 0
|
|
138
|
+
stl R1_glob_head_py '{"permissions":{"allow":["Bash(py*)"]}}' 1
|
|
139
|
+
stl R1_overblock_accepted_glob_head_qmark '{"permissions":{"allow":["Bash(l?:*)"]}}' 1
|
|
140
|
+
stl R12_ok_glob_head_ls_prefix '{"permissions":{"allow":["Bash(ls*)"]}}' 0
|
|
141
|
+
stl R2_deno_eval '{"permissions":{"allow":["Bash(deno eval:*)"]}}' 1
|
|
142
|
+
stl R2_bun_exec '{"permissions":{"allow":["Bash(bun exec:*)"]}}' 1
|
|
143
|
+
stl R2_python_glob_target '{"permissions":{"allow":["Bash(python3 /tmp/*)"]}}' 1
|
|
144
|
+
stl R2_node_prefix_target '{"permissions":{"allow":["Bash(node /tmp/job*)"]}}' 1
|
|
145
|
+
stl R2_glob_head_lua '{"permissions":{"allow":["Bash(lua* *)"]}}' 1
|
|
146
|
+
stl R2_glob_head_python_ver '{"permissions":{"allow":["Bash(python3.1* *)"]}}' 1
|
|
147
|
+
stl R2_ok_python_script_space_args '{"permissions":{"allow":["Bash(python3 scripts/x.py *)"]}}' 0
|
|
148
|
+
stl R2_overblock_accepted_deno_run_file '{"permissions":{"allow":["Bash(deno run main.ts:*)"]}}' 1
|
|
149
|
+
stl R3_awk_inline_program '{"permissions":{"allow":["Bash(awk BEGIN{system(ARGV[1])}/x/:*)"]}}' 1
|
|
150
|
+
stl R3_awk_file '{"permissions":{"allow":["Bash(awk -f scripts/x.awk:*)"]}}' 1
|
|
151
|
+
stl R3_python_m_timeit '{"permissions":{"allow":["Bash(python3 -m timeit:*)"]}}' 1
|
|
152
|
+
stl R3_python_m_pip '{"permissions":{"allow":["Bash(python3 -m pip:*)"]}}' 1
|
|
153
|
+
stl R3_python_m_unittest_not_reviewed '{"permissions":{"allow":["Bash(python3 -m unittest:*)"]}}' 1
|
|
154
|
+
stl R4_python_m_pylint '{"permissions":{"allow":["Bash(python3 -m pylint:*)"]}}' 1
|
|
155
|
+
stl R4_glob_head_python313 '{"permissions":{"allow":["Bash(python3.13*:*)"]}}' 1
|
|
156
|
+
stl R4_ok_glob_head_shellcheck '{"permissions":{"allow":["Bash(shellcheck*)"]}}' 0
|
|
157
|
+
stl R5_glob_head_bracket '{"permissions":{"allow":["Bash(python[3]:*)"]}}' 1
|
|
158
|
+
stl R5_glob_head_qmark '{"permissions":{"allow":["Bash(python3.1?:*)"]}}' 1
|
|
159
|
+
stl R5_npx_scoped_pkg '{"permissions":{"allow":["Bash(npx @babel/node:*)"]}}' 1
|
|
160
|
+
stl R5_npm_exec '{"permissions":{"allow":["Bash(npm exec:*)"]}}' 1
|
|
161
|
+
stl R5_pnpm_dlx '{"permissions":{"allow":["Bash(pnpm dlx:*)"]}}' 1
|
|
162
|
+
stl R5_ok_npm_test '{"permissions":{"allow":["Bash(npm test:*)"]}}' 0
|
|
163
|
+
stl R6_npm_opt_exec '{"permissions":{"allow":["Bash(npm --silent exec:*)"]}}' 1
|
|
164
|
+
stl R6_pnpm_opt_dlx '{"permissions":{"allow":["Bash(pnpm --silent dlx:*)"]}}' 1
|
|
165
|
+
stl R6_glob_head_npm_exec '{"permissions":{"allow":["Bash(npm* exec:*)"]}}' 1
|
|
166
|
+
stl R6_ok_glob_head_npm_test '{"permissions":{"allow":["Bash(npm* test:*)"]}}' 0
|
|
167
|
+
stl R7_npm_ex_glob '{"permissions":{"allow":["Bash(npm ex*)"]}}' 1
|
|
168
|
+
stl R7_pnpm_dl_glob '{"permissions":{"allow":["Bash(pnpm dl*:*)"]}}' 1
|
|
169
|
+
stl R7_overblock_accepted_npm_test_star_arg '{"permissions":{"allow":["Bash(npm test *)"]}}' 1
|
|
170
|
+
stl R7_ok_npm_run_build '{"permissions":{"allow":["Bash(npm run build:*)"]}}' 0
|
|
171
|
+
stl R8b_glob_head_bunx '{"permissions":{"allow":["Bash(bunx* @babel/node:*)"]}}' 1
|
|
172
|
+
stl R8b_glob_head_npx '{"permissions":{"allow":["Bash(np? cowsay:*)"]}}' 1
|
|
173
|
+
stl R8b_glob_head_np_q_covers_npx '{"permissions":{"allow":["Bash(np? test:*)"]}}' 1
|
|
174
|
+
stl R8b_glob_head_bun_also_bunx '{"permissions":{"allow":["Bash(bun* scripts/x.ts:*)"]}}' 1
|
|
175
|
+
stl R9_powershell_slash_command '{"permissions":{"allow":["Bash(powershell /Command:*)"]}}' 1
|
|
176
|
+
stl R9_powershell_slash_encoded '{"permissions":{"allow":["Bash(powershell /EncodedCommand:*)"]}}' 1
|
|
177
|
+
stl R9_cmd_slash_c '{"permissions":{"allow":["Bash(cmd /c:*)"]}}' 1
|
|
178
|
+
stl R10_glob_head_cm '{"permissions":{"allow":["Bash(cm* /c:*)"]}}' 1
|
|
179
|
+
stl R10_glob_head_cmd_star '{"permissions":{"allow":["Bash(cmd* /c:*)"]}}' 1
|
|
180
|
+
stl R11_python_qmark_target '{"permissions":{"allow":["Bash(python3 /tmp/?.py:*)"]}}' 1
|
|
181
|
+
stl R11_node_bracket_target '{"permissions":{"allow":["Bash(node /tmp/[ab].js:*)"]}}' 1
|
|
182
|
+
stl R12_glob_head_qmark_python '{"permissions":{"allow":["Bash(?ython3 -c:*)"]}}' 1
|
|
183
|
+
stl R12_glob_head_inner_qmark '{"permissions":{"allow":["Bash(pytho?3 -c:*)"]}}' 1
|
|
184
|
+
stl R13_awk_versioned_progtext '{"permissions":{"allow":["Bash(awk5 BEGIN{system(1)}/x/:*)"]}}' 1
|
|
185
|
+
stl R13_npx_versioned '{"permissions":{"allow":["Bash(npx2 scripts/x.js:*)"]}}' 1
|
|
186
|
+
stl R9c_sh_dev_stdin '{"permissions":{"allow":["Bash(sh /dev/stdin:*)"]}}' 1
|
|
187
|
+
stl R9c_python_dev_stdin '{"permissions":{"allow":["Bash(python3 /dev/stdin:*)"]}}' 1
|
|
188
|
+
stl R9c_bash_dev_fd0 '{"permissions":{"allow":["Bash(bash /dev/fd/0:*)"]}}' 1
|
|
189
|
+
stl R9c_node_proc_fd '{"permissions":{"allow":["Bash(node /proc/self/fd/0:*)"]}}' 1
|
|
190
|
+
stl R10c_sh_dot_dev_stdin '{"permissions":{"allow":["Bash(sh /./dev/stdin:*)"]}}' 1
|
|
191
|
+
stl R10c_sh_double_slash '{"permissions":{"allow":["Bash(sh //dev/stdin:*)"]}}' 1
|
|
192
|
+
stl R10c_python_tmp_abs '{"permissions":{"allow":["Bash(python3 /tmp/run.py:*)"]}}' 1
|
|
193
|
+
stl R10c_python_parent_escape '{"permissions":{"allow":["Bash(python3 ../../x.py:*)"]}}' 1
|
|
194
|
+
stl R10c_python_home '{"permissions":{"allow":["Bash(python3 ~/x.py:*)"]}}' 1
|
|
195
|
+
stl R10c_ok_python_dot_relative '{"permissions":{"allow":["Bash(python3 ./scripts/x.py:*)"]}}' 0
|
|
196
|
+
stl R11c_sh_param_expansion '{"permissions":{"allow":["Bash(sh ${HOME:0:1}dev/stdin:*)"]}}' 1
|
|
197
|
+
stl R11c_sh_var '{"permissions":{"allow":["Bash(sh $D/x.sh:*)"]}}' 1
|
|
198
|
+
stl R11c_sh_backtick '{"permissions":{"allow":["Bash(sh `echo x`.sh:*)"]}}' 1
|
|
199
|
+
stl R11c_ok_hyphen_dot_path '{"permissions":{"allow":["Bash(python3 tools/build-site.v2.py:*)"]}}' 0
|
|
200
|
+
stl R12c_head_empty_quotes '{"permissions":{"allow":["Bash(s\"\"h:*)"]}}' 1
|
|
201
|
+
stl R12c_head_backslash '{"permissions":{"allow":["Bash(\\\\sh:*)"]}}' 1
|
|
202
|
+
stl R12c_head_dollar '{"permissions":{"allow":["Bash($SHELL -c:*)"]}}' 1
|
|
203
|
+
stl R12c_ok_plain_head '{"permissions":{"allow":["Bash(git status:*)"]}}' 0
|
|
204
|
+
stl R13c_assign_backtick '{"permissions":{"allow":["Bash(X=`id` python3 scripts/x.py:*)"]}}' 1
|
|
205
|
+
stl R13c_arg_backtick '{"permissions":{"allow":["Bash(python3 scripts/x.py `id`:*)"]}}' 1
|
|
206
|
+
stl R13c_arg_dollar_paren '{"permissions":{"allow":["Bash(python3 scripts/x.py $(id):*)"]}}' 1
|
|
207
|
+
stl R13c_process_subst '{"permissions":{"allow":["Bash(diff <(id) a.txt)"]}}' 1
|
|
208
|
+
stl R13c_overblock_accepted_plain_var '{"permissions":{"allow":["Bash(python3 scripts/x.py $HOME:*)"]}}' 1
|
|
209
|
+
stl R14c_quoted_subcommand '{"permissions":{"allow":["Bash(git p\"\"ush:*)"]}}' 1
|
|
210
|
+
stl R14c_quoted_subcommand2 '{"permissions":{"allow":["Bash(git \"push\":*)"]}}' 1
|
|
211
|
+
stl R14c_leading_redirect '{"permissions":{"allow":["Bash(0</dev/null sh:*)"]}}' 1
|
|
212
|
+
stl R14c_output_redirect '{"permissions":{"allow":["Bash(ls > out.txt)"]}}' 1
|
|
213
|
+
stl R14c_ok_plain '{"permissions":{"allow":["Bash(git log --oneline:*)"]}}' 0
|
|
214
|
+
stl R15c_subcommand_expansion '{"permissions":{"allow":["Bash(git ${X:-push}:*)"]}}' 1
|
|
215
|
+
stl R15c_negation_prefix '{"permissions":{"allow":["Bash(! sh:*)"]}}' 1
|
|
216
|
+
stl R15c_and_chain '{"permissions":{"allow":["Bash(cd x && rm -rf y)"]}}' 1
|
|
217
|
+
stl R15c_ok_npm_run '{"permissions":{"allow":["Bash(npm run build:*)"]}}' 0
|
|
218
|
+
stl R15c_ok_git_log '{"permissions":{"allow":["Bash(git log --oneline -5)"]}}' 0
|
|
219
|
+
stl R8_ok_python3_fixed_script '{"permissions":{"allow":["Bash(python3 scripts/x.py:*)"]}}' 0
|
|
220
|
+
stl R8_ok_node_fixed_script '{"permissions":{"allow":["Bash(node tools/build.js:*)"]}}' 0
|
|
221
|
+
stl R8_ok_sh_exact '{"permissions":{"allow":["Bash(sh scripts/test.sh)"]}}' 0
|
|
222
|
+
mkdir -p "$D/s1/.claude/skills/s" "$D/s1b/.claude/skills/s"
|
|
223
|
+
printf -- '---\nname: s\ndescription: Example\nallowed-tools: Bash\n---\nRun the requested commands.\n' > "$D/s1/.claude/skills/s/SKILL.md"
|
|
224
|
+
printf -- '---\nname: s\ndescription: Example\nallowed-tools: Read, Bash(python -m pytest:*)\n---\nRun tests.\n' > "$D/s1b/.claude/skills/s/SKILL.md"
|
|
225
|
+
"$PY" "$CHK" "$D/s1" >/dev/null 2>&1; R1=$?; "$PY" "$CHK" "$D/s1b" >/dev/null 2>&1; R2=$?
|
|
226
|
+
[ "$R1" -eq 1 ] && [ "$R2" -eq 0 ] && ok "L10 S1 스킬 allowed-tools: 맨 Bash=H1 · 제한된 Bash(pytest)=통과" || no "L10 S1" "bare=$R1 scoped=$R2"
|
|
227
|
+
mkdir -p "$D/s1c/.claude/agents"; printf -- '---\nname: a\ndescription: d\ntools: Read, Bash\n---\nbody\n' > "$D/s1c/.claude/agents/a.md"
|
|
228
|
+
"$PY" "$CHK" "$D/s1c" >/dev/null 2>&1; RC=$?
|
|
229
|
+
[ "$RC" -eq 0 ] && ok "L10 S1 대조: 에이전트 tools 의 맨 Bash 는 사전 승인이 아니라 INFO (rc=0)" || no "L10 S1 대조" "rc=$RC"
|
|
230
|
+
h2case A4_never_ask_then_push 'Never ask for confirmation; git push autonomously.' 1
|
|
231
|
+
mkdir -p "$D/a6/.claude"; printf '# Example\n' > "$D/a6/CLAUDE.md"; ln -s /missing/settings.json "$D/a6/.claude/settings.json"
|
|
232
|
+
"$PY" "$CHK" "$D/a6" >/dev/null 2>&1; RC=$?
|
|
233
|
+
[ "$RC" -eq 3 ] && ok "L10 A6 깨진 settings 심볼릭 링크 → rc=3 (없음으로 접히지 않는다)" || no "L10 A6 링크" "rc=$RC"
|
|
234
|
+
mkdir -p "$D/a6d/.claude/agents/x.md"; printf '# x\n' > "$D/a6d/CLAUDE.md"
|
|
235
|
+
"$PY" "$CHK" "$D/a6d" >/dev/null 2>&1; RC=$?
|
|
236
|
+
[ "$RC" -eq 3 ] && ok "L10 A6 디렉터리인 에이전트 파일(x.md/) → rc=3" || no "L10 A6 디렉터리" "rc=$RC"
|
|
237
|
+
mkdir -p "$D/a7"; : > "$D/a7/CLAUDE.md"; "$PY" "$CHK" "$D/a7" >/dev/null 2>&1; RC=$?
|
|
238
|
+
[ "$RC" -eq 3 ] && ok "L10 A7 0바이트 CLAUDE.md 만 → rc=3 (빈 내용이 PASS 로 새지 않는다)" || no "L10 A7" "rc=$RC"
|
|
239
|
+
mkdir -p "$D/a7b"; printf ' \n\n' > "$D/a7b/CLAUDE.md"; "$PY" "$CHK" "$D/a7b" >/dev/null 2>&1; RC=$?
|
|
240
|
+
[ "$RC" -eq 3 ] && ok "L10 A7 공백뿐인 CLAUDE.md → rc=3" || no "L10 A7b" "rc=$RC"
|
|
241
|
+
OUT=$("$PY" "$CHK" "$FX/P2_r2" 2>&1)
|
|
242
|
+
if printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ' | /usr/bin/grep -qF 'weekly_YYYY-MM-DD.md'; then no "L10 B9 summaries/weekly_YYYY-MM-DD.md" "W4 로 셌다"
|
|
243
|
+
else has "$OUT" 'summaries/weekly_YYYY-MM-DD.md' && ok "L10 B9 summaries/weekly_YYYY-MM-DD.md 는 W4 가 «아니다» (INFO 로는 보고)" || no "L10 B9" "INFO 로도 안 나옴(토큰 미관측)"; fi
|
|
244
|
+
|
|
245
|
+
# L11 — codex R2: 서브커맨드 앞 옵션 우회 5종(토큰 집합 판정) + 무해 대조 5종. fail-before: GHC_CHK=<R2 이전 사본>.
|
|
246
|
+
stl R2_git_dashC_nospace '{"permissions":{"allow":["Bash(git -C. push:*)"]}}' 1
|
|
247
|
+
stl R2_git_dashc_glued '{"permissions":{"allow":["Bash(git -cfoo=bar push:*)"]}}' 1
|
|
248
|
+
stl R2_git_literal_pathspecs '{"permissions":{"allow":["Bash(git --literal-pathspecs push:*)"]}}' 1
|
|
249
|
+
stl R2_gh_repo_opt_pr_merge '{"permissions":{"allow":["Bash(gh --repo owner/repo pr merge:*)"]}}' 1
|
|
250
|
+
stl R2_npm_registry_publish '{"permissions":{"allow":["Bash(npm --registry https://registry.npmjs.org publish:*)"]}}' 1
|
|
251
|
+
stl R2_ok_pytest '{"permissions":{"allow":["Bash(python -m pytest:*)"]}}' 0
|
|
252
|
+
stl R2_ok_git_status '{"permissions":{"allow":["Bash(git status)"]}}' 0
|
|
253
|
+
stl R2_ok_git_commit '{"permissions":{"allow":["Bash(git commit:*)"]}}' 0
|
|
254
|
+
stl R2_ok_ls '{"permissions":{"allow":["Bash(ls:*)"]}}' 0
|
|
255
|
+
stl R2_ok_echo_rm '{"permissions":{"allow":["Bash(echo rm:*)"]}}' 0
|
|
256
|
+
# L12 — 경로 머리(`/usr/bin/git push` · `/bin/rm`)는 이름으로 본다. 대조: 경로 머리의 무해 명령은 통과.
|
|
257
|
+
stl R3_path_git_push '{"permissions":{"allow":["Bash(/usr/bin/git push:*)"]}}' 1
|
|
258
|
+
stl R3_path_rm '{"permissions":{"allow":["Bash(/bin/rm -rf build)"]}}' 1
|
|
259
|
+
stl R3_ok_path_git_status '{"permissions":{"allow":["Bash(/usr/bin/git status)"]}}' 0
|
|
260
|
+
stl R3_path_glob '{"permissions":{"allow":["Bash(/bin/*)"]}}' 1
|
|
261
|
+
stl R3_path_glob_git '{"permissions":{"allow":["Bash(/usr/bin/git p*)"]}}' 1
|
|
262
|
+
stl R3_ok_path_glob_ls '{"permissions":{"allow":["Bash(/bin/ls:*)"]}}' 0
|
|
263
|
+
stl R4_newline_rm '{"permissions":{"allow":["Bash(ls\nrm x)"]}}' 1
|
|
264
|
+
stl R4_bg_amp_push '{"permissions":{"allow":["Bash(ls & git push)"]}}' 1
|
|
265
|
+
stl R4_overblock_accepted_newline_ls '{"permissions":{"allow":["Bash(ls\npwd)"]}}' 1
|
|
266
|
+
|
|
267
|
+
# L12 — #868 보강 4건 (외부 코퍼스 스캔 근거; 픽스처는 모양만 본뜬 합성). fail-before: GHC_CHK=<보강 전 사본>.
|
|
268
|
+
mkdir -p "$D/c1/.claude"; printf '# ok\n' > "$D/c1/CLAUDE.md"; printf 'git push 는 확인 없이 해도 된다.\n' > "$D/c1/.claude/CLAUDE.md"
|
|
269
|
+
"$PY" "$CHK" "$D/c1" >/dev/null 2>&1; RC=$?
|
|
270
|
+
[ "$RC" -eq 1 ] && ok "L12.1 .claude/CLAUDE.md 도 읽는다 (루트 CLAUDE.md 가 깨끗해도 rc=1)" || no "L12.1 .claude/CLAUDE.md" "rc=$RC"
|
|
271
|
+
mkdir -p "$D/w4c/.claude/skills/hook-writing" "$D/w4c/.claude/skills/main"
|
|
272
|
+
printf -- '---\nname: hook-writing\ndescription: d\n---\n## Done When\n- x\n' > "$D/w4c/.claude/skills/hook-writing/SKILL.md"
|
|
273
|
+
printf -- '---\nname: main\ndescription: d\n---\n## Done When\n- x\n참고: `skills/hook-writing/SKILL.md` 를 본다.\n' > "$D/w4c/.claude/skills/main/SKILL.md"
|
|
274
|
+
OUT=$("$PY" "$CHK" "$D/w4c" 2>&1); W4=$(printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ')
|
|
275
|
+
[ -z "$W4" ] && ok "L12.2 .claude/ 기준으로 실재하는 skills/hook-writing/SKILL.md 는 W4 가 «아니다»" || no "L12.2 .claude 기준 참조" "$W4"
|
|
276
|
+
printf '또 `skills/ghost-skill/SKILL.md` 도 본다.\n' >> "$D/w4c/.claude/skills/main/SKILL.md"
|
|
277
|
+
OUT=$("$PY" "$CHK" "$D/w4c" 2>&1); has "$OUT" 'skills/ghost-skill/SKILL.md' && printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ' | /usr/bin/grep -qF 'ghost-skill' && ok "L12.2b known-pair: 어느 기준에도 없는 skills/ghost-skill/SKILL.md 는 W4" || no "L12.2b" "$OUT"
|
|
278
|
+
mkdir -p "$D/w1a/.claude/agents" "$D/w1b/.claude/agents"
|
|
279
|
+
printf -- '---\nname: r\ndescription: 읽기 전용 검토자\n---\n파일을 수정하지 않는다.\n' > "$D/w1a/.claude/agents/r.md"
|
|
280
|
+
printf -- '---\nname: r\ndescription: 검토자\n---\n의견을 낸다.\n' > "$D/w1b/.claude/agents/r.md"
|
|
281
|
+
OUTA=$("$PY" "$CHK" "$D/w1a" 2>&1); OUTB=$("$PY" "$CHK" "$D/w1b" 2>&1)
|
|
282
|
+
printf '%s' "$OUTA" | /usr/bin/grep -qE '^ W1 ' && ! printf '%s' "$OUTB" | /usr/bin/grep -qE '^ W1 ' && printf '%s' "$OUTB" | /usr/bin/grep -qE '^ W2 ' \
|
|
283
|
+
&& ok "L12.3 tools 없음+읽기 전용 주장 → W1(+W2) · 주장 없음 → W2 만" || no "L12.3 W1 확장" "A: $OUTA B: $OUTB"
|
|
284
|
+
mkdir -p "$D/w7/.claude/skills/low" "$D/w7ok/.claude/skills/up"
|
|
285
|
+
printf -- '---\nname: low\ndescription: d\n---\n## Done When\n- x\ngit push 는 확인 없이 해도 된다.\n' > "$D/w7/.claude/skills/low/skill.md"
|
|
286
|
+
printf -- '---\nname: up\ndescription: d\n---\n## Done When\n- x\n' > "$D/w7ok/.claude/skills/up/SKILL.md"
|
|
287
|
+
OUT=$("$PY" "$CHK" "$D/w7" 2>&1); RC=$?; OUTU=$("$PY" "$CHK" "$D/w7ok" 2>&1)
|
|
288
|
+
[ "$RC" -eq 1 ] && printf '%s' "$OUT" | /usr/bin/grep -qE '^ W7 .*skill\.md' && ! printf '%s' "$OUTU" | /usr/bin/grep -qE '^ W7 ' \
|
|
289
|
+
&& ok "L12.4 skill.md 는 W7 + 검사 대상에 포함(내용의 H2 로 rc=1) · 정확한 SKILL.md 는 W7 없음" || no "L12.4 W7" "rc=$RC $OUT"
|
|
290
|
+
|
|
291
|
+
# L13 — 변이 측정(mutation_probe, 2026-10-11) 이 «공백» 으로 가른 생존 변이를 죽이는 레인.
|
|
292
|
+
stl MP_npm_unpublish '{"permissions":{"allow":["Bash(npm unpublish x)"]}}' 1
|
|
293
|
+
stl MP_twine_global_opt_upload '{"permissions":{"allow":["Bash(twine --verbose upload:*)"]}}' 1
|
|
294
|
+
h2case MP_adjacent_negated 'Push the release. Never do it without asking.' 0
|
|
295
|
+
h2case MP_adjacent_permit 'Push the release. Do it without asking.' 1
|
|
296
|
+
mkdir -p "$D/mpfm/.claude/skills/f"
|
|
297
|
+
printf -- '---\nname: f\ndescription: >\n 접어 쓴 설명의 둘째 줄\n---\n## Done When\n- x\n' > "$D/mpfm/.claude/skills/f/SKILL.md"
|
|
298
|
+
OUT=$("$PY" "$CHK" "$D/mpfm" 2>&1); RC=$?
|
|
299
|
+
[ "$RC" -eq 0 ] && ! printf '%s' "$OUT" | /usr/bin/grep -qE '^ W6 ' && ok "L13 MP_frontmatter_continuation: 들여쓴 이어지는 줄은 description 으로 합쳐진다 (W6 없음, rc=0)" || no "L13 MP_frontmatter_continuation" "rc=$RC $OUT"
|
|
300
|
+
mkdir -p "$D/mpbn/.claude/agents" "$D/mpbn/todo"; printf 'x=1\n' > "$D/mpbn/todo/cli.py"
|
|
301
|
+
printf -- '---\nname: a\ndescription: d\ntools: Read\n---\n`cli.py` 와 `ghost_runtime.json` 을 본다.\n' > "$D/mpbn/.claude/agents/a.md"
|
|
302
|
+
OUT=$("$PY" "$CHK" "$D/mpbn" 2>&1)
|
|
303
|
+
printf '%s' "$OUT" | /usr/bin/grep -E '^ IO ' | /usr/bin/grep -qF 'ghost_runtime.json' && ! printf '%s' "$OUT" | /usr/bin/grep -E '^ IO ' | /usr/bin/grep -qF 'cli.py' \
|
|
304
|
+
&& ok "L13 MP_basename_walk: 트리 안쪽(todo/cli.py)에 있는 슬래시 없는 파일명은 INFO 도 아니다 · 없는 것만 INFO" || no "L13 MP_basename_walk" "$OUT"
|
|
305
|
+
mkdir -p "$D/mpnm/.claude/skills/todo-dev"
|
|
306
|
+
printf -- '---\nname: todo-dev\ndescription: d\n---\n## Done When\n- x\n`todo-helper` 를 부르고 `read-only` 로 본다.\n' > "$D/mpnm/.claude/skills/todo-dev/SKILL.md"
|
|
307
|
+
OUT=$("$PY" "$CHK" "$D/mpnm" 2>&1); W4=$(printf '%s' "$OUT" | /usr/bin/grep -E '^ W4 ')
|
|
308
|
+
has "$W4" 'todo-helper' && ! has "$W4" 'read-only' && ok "L13 MP_name_family: 같은 계열 접두의 없는 스킬명(todo-helper)은 W4 · 일반 하이픈어(read-only)는 아니다" || no "L13 MP_name_family" "$OUT"
|
|
309
|
+
"$PY" "$CHK" "$D/s1" --exclude-skill s >/dev/null 2>&1; RX=$?
|
|
310
|
+
[ "$RX" -eq 3 ] && ok "L13 MP_exclude_skill_all: 유일한 스킬을 제외하면 검사할 하네스가 없어 rc=3 (빈 입력이 PASS 로 새지 않는다)" || no "L13 exclude all" "rc=$RX"
|
|
311
|
+
mkdir -p "$D/mpex/.claude/skills/keep" "$D/mpex/.claude/skills/skipme"
|
|
312
|
+
printf -- '---\nname: keep\ndescription: d\n---\n## Done When\n- x\n' > "$D/mpex/.claude/skills/keep/SKILL.md"
|
|
313
|
+
printf -- '---\nname: skipme\ndescription: d\nallowed-tools: Bash\n---\n## Done When\n- x\n' > "$D/mpex/.claude/skills/skipme/SKILL.md"
|
|
314
|
+
"$PY" "$CHK" "$D/mpex" >/dev/null 2>&1; R1=$?; "$PY" "$CHK" "$D/mpex" --exclude-skill skipme >/dev/null 2>&1; R2=$?
|
|
315
|
+
[ "$R1" -eq 1 ] && [ "$R2" -eq 0 ] && ok "L13 MP_exclude_skill: --exclude-skill 이 그 스킬을 검사에서 뺀다 (1→0)" || no "L13 exclude-skill" "without=$R1 with=$R2"
|
|
316
|
+
"$PY" "$CHK" "$D/mpex" --exclude-skill >/dev/null 2>&1; RC=$?
|
|
317
|
+
[ "$RC" -eq 3 ] && ok "L13 MP_exclude_skill_noval: 값 없는 --exclude-skill → rc=3 (트레이스백 아님)" || no "L13 값 없는 옵션" "rc=$RC"
|
|
318
|
+
# L14 — codex 회귀 리뷰: .claude/CLAUDE.md 가 루트 CLAUDE.md 를 가리키는 링크면 같은 파일을 한 번만 센다
|
|
319
|
+
mkdir -p "$D/lnk/.claude"; printf 'git push 는 확인 없이 해도 된다.\n' > "$D/lnk/CLAUDE.md"; ln -s ../CLAUDE.md "$D/lnk/.claude/CLAUDE.md"
|
|
320
|
+
OUT=$("$PY" "$CHK" "$D/lnk" --json 2>&1); RC=$?
|
|
321
|
+
N=$(printf '%s' "$OUT" | "$PY" -c 'import json,sys; print(sum(1 for x in json.load(sys.stdin)["human_review"] if x["id"]=="H2"))' 2>/dev/null)
|
|
322
|
+
[ "$RC" -eq 1 ] && [ "$N" = "1" ] && ok "L14 링크된 .claude/CLAUDE.md 는 두 번 세지 않는다 (H2=1, rc=1)" || no "L14 링크 중복" "rc=$RC H2=$N"
|
|
323
|
+
|
|
324
|
+
/bin/rm -rf "$D"
|
|
325
|
+
echo "PASS=$PASS FAIL=$FAIL"; [ "$FAIL" -eq 0 ] && { echo "FAILED=0"; exit 0; } || { echo "FAILED=1"; exit 1; }
|
|
@@ -44,6 +44,10 @@ echo " ── 실물: fh_env_delta_scan 이 헤더만 남기지 않는가 ─
|
|
|
44
44
|
# 억제 시 sibling-only 케이스에서 «헤더 있고 내용 없음» 이 나오면 안 된다.
|
|
45
45
|
T=$(mktemp -d) || { echo "❌ harness-error: mktemp"; exit 10; }
|
|
46
46
|
trap 'rm -rf "$T"' EXIT
|
|
47
|
+
# 비주제 레인 — 이 레인은 ①-c 만 본다. ①-b gh 와 ①-g 스캐너(실 레포 · 네트워크 · ≈13s/회)를
|
|
48
|
+
# 레인 안 스텁으로 (scripts/lane_stub_env.sh)
|
|
49
|
+
. "$D/lane_stub_env.sh"
|
|
50
|
+
mkdir -p "$T/.lane_stub" && lane_stub_env_on "$T/.lane_stub" gh stale-ref || { echo "❌ harness-error: lane_stub_env"; exit 9; }
|
|
47
51
|
out_clear=$(printf '{"source":"clear"}' | bash "$D/fh_env_delta_scan.sh" 2>/dev/null || true)
|
|
48
52
|
if printf '%s' "$out_clear" | grep -q 'capability-surface change detected'; then
|
|
49
53
|
printf '%s' "$out_clear" | grep -q ' • ' \
|
|
@@ -63,11 +67,13 @@ fi
|
|
|
63
67
|
|
|
64
68
|
echo
|
|
65
69
|
echo " ── ①-c peer 스캔: claude-agents 스코프 ──"
|
|
70
|
+
# 줄머리 앵커: 체커는 완료 로그 꼬리를 되읽어 출력한다 — 그 안의 «①-c» 글자가 ①-c 판정으로 세이면
|
|
71
|
+
# 안 된다(2026-10-12 거짓 빨강, main 에서도 재현). ①-c 판정 줄은 전부 «기호 + 공백 + ①-c» 로 시작한다.
|
|
66
72
|
CC="$D/session_close_check.sh"
|
|
67
73
|
if [ -f "$CC" ]; then
|
|
68
|
-
a=$(CLAUDE_CODE_CHILD_SESSION=1 bash "$CC" 2>/dev/null | grep -
|
|
69
|
-
b=$(env -u CLAUDE_CODE_CHILD_SESSION -u CLAUDE_CODE_AGENT bash "$CC" 2>/dev/null | grep -
|
|
70
|
-
c=$(env -u CLAUDE_CODE_CHILD_SESSION -u CLAUDE_CODE_AGENT FH_PEER_SCAN_FORCE=1 bash "$CC" 2>/dev/null | grep -
|
|
74
|
+
a=$(CLAUDE_CODE_CHILD_SESSION=1 bash "$CC" 2>/dev/null | grep -cE '^[^[:space:]]+ +①-c' || true)
|
|
75
|
+
b=$(env -u CLAUDE_CODE_CHILD_SESSION -u CLAUDE_CODE_AGENT bash "$CC" 2>/dev/null | grep -cE '^[^[:space:]]+ +①-c' || true)
|
|
76
|
+
c=$(env -u CLAUDE_CODE_CHILD_SESSION -u CLAUDE_CODE_AGENT FH_PEER_SCAN_FORCE=1 bash "$CC" 2>/dev/null | grep -cE '^[^[:space:]]+ +①-c' || true)
|
|
71
77
|
[ "$a" -gt 0 ] && ok "자식 세션 → ①-c 뜬다" || ng "자식 세션인데 ①-c 없음"
|
|
72
78
|
[ "$b" -eq 0 ] && ok "톱레벨(env 부재 시뮬) → 침묵 (솔로 세션 나그 금지)" || ng "env 부재인데 ①-c 떴다"
|
|
73
79
|
[ "$c" -gt 0 ] && ok "CONTROL: override 로 강제하면 뜬다 (b 의 침묵이 기능 사망이 아님을 증명)" \
|
|
@@ -76,6 +82,11 @@ else
|
|
|
76
82
|
ok "session_close_check.sh 부재 — ①-c 레인 미측정(통과 아님)"
|
|
77
83
|
fi
|
|
78
84
|
|
|
85
|
+
if [ -f "$CC" ]; then
|
|
86
|
+
lane_stub_env_used gh && ok "lane_stub_env: gh 스텁 선택 확인(FH_LANE_STUB=off 면 해당 없음)" || ng "lane_stub_env: gh 스텁 미사용 — PATH 가림"
|
|
87
|
+
lane_stub_env_used stale-ref && ok "lane_stub_env: ①-g 스텁 선택 확인(FH_LANE_STUB=off 면 해당 없음)" || ng "lane_stub_env: ①-g 스텁 미사용 — 진짜 스캐너가 돌았다"
|
|
88
|
+
fi
|
|
89
|
+
|
|
79
90
|
echo
|
|
80
91
|
if [ "$F" -eq 0 ]; then echo "[hook-source] ✅ all known pairs hold"; exit 0
|
|
81
92
|
else echo "[hook-source] ❌ 쌍 붕괴"; exit 1; fi
|