@chrono-meta/fh-gate 3.7.0 → 3.9.0

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.
Files changed (36) hide show
  1. package/.claude/regression/probes_live.yaml +108 -6
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/CLAUDE.md +1 -1
  4. package/knowledge/shared/harness-core/governance_engineering_definition.md +7 -3
  5. package/knowledge/shared/harness-core/self_evolution_routine.md +14 -0
  6. package/knowledge/shared/harness-core/sonnet_floor_doctrine.md +75 -0
  7. package/knowledge/shared/learnings/subagent_invocations_log.yaml +71 -0
  8. package/package.json +5 -2
  9. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  10. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  11. package/plugins/fh-meta/CHANGELOG.md +97 -0
  12. package/plugins/fh-meta/skills/asset-placement-gate/SKILL.md +30 -0
  13. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  14. package/plugins/fh-preprep/skills/preprep/SKILL.md +7 -1
  15. package/plugins/fh-preprep/skills/preprep/fixtures/font_revert_probe.py +6 -4
  16. package/plugins/fh-preprep/skills/preprep/lane_attr_consistency.py +77 -6
  17. package/plugins/fh-preprep/skills/preprep/lane_font.py +105 -16
  18. package/plugins/fh-preprep/skills/preprep/lane_screen_parity.py +14 -1
  19. package/plugins/fh-preprep/skills/preprep/test_lane_font.py +170 -21
  20. package/plugins/fh-preprep/skills/preprep/test_preprep_lanes_rp.py +73 -3
  21. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  22. package/scripts/adapters/peer_resolve.sh +4 -0
  23. package/scripts/cluster_capability_scan.sh +21 -2
  24. package/scripts/com.forge-harness.live-eval.plist +5 -2
  25. package/scripts/fh-run.sh +19 -2
  26. package/scripts/fh_track_resolve.sh +22 -0
  27. package/scripts/probe_live_eval.sh +117 -3
  28. package/scripts/probe_live_eval_lib.py +178 -5
  29. package/scripts/remote_marker_gate.sh +186 -0
  30. package/scripts/selfcheck.sh +25 -0
  31. package/scripts/test_adapter_lanes.sh +46 -1
  32. package/scripts/test_fh_run_resolver_lanes.sh +20 -3
  33. package/scripts/test_probe_live_eval_lanes.sh +271 -10
  34. package/scripts/test_remote_marker_gate_lanes.sh +190 -0
  35. package/scripts/test_temper_check_lanes.sh +307 -0
  36. package/scripts/test_track_resolve_lanes.sh +51 -7
@@ -698,6 +698,9 @@ for _pair in \
698
698
  "docs/map/fh_assets.architecture.json|scripts/test_fh_map_paths_lanes.sh" \
699
699
  `# ── 지도 후처리(2026-09-06): 발행 폭 하한 + SVG 재생성. 리터럴 드리프트를 fail-closed 로 잡는다 ──` \
700
700
  "scripts/map_postprocess.py|scripts/test_map_postprocess_lanes.sh" \
701
+ `# ── 플로어 없는 채널(2026-09-14): 원격 자율 노드가 FH 자산을 바꾸면 마커가 tracks/ 와 함께 휘발한다. 실측 2/2(#675·#716). CI 가 gitignored 마커를 구조적으로 못 보므로, 그 채널에만 «마커가 커밋 기록에 실려 왔나» 를 건다 ──` \
702
+ "scripts/remote_marker_gate.sh|scripts/test_remote_marker_gate_lanes.sh" \
703
+ ".github/workflows/validate.yml|scripts/test_remote_marker_gate_lanes.sh" \
701
704
  "templates/.git-hooks/pre-commit|scripts/test_precommit_staged_drift_lanes.sh" \
702
705
  "templates/.git-hooks/pre-commit|scripts/test_marker_address_lanes.sh" \
703
706
  "templates/.git-hooks/pre-commit|scripts/test_precommit_pointer_index_lanes.sh" \
@@ -1415,6 +1418,28 @@ else
1415
1418
  fail=1
1416
1419
  fi
1417
1420
 
1421
+ # temper_check lanes — 🟥 `templates/temper_check.sh` 는 게이트체인 7경로 중 **유일하게 실행 레인이
1422
+ # 0** 이었다(2026-09-14 frontier-digest 후보 #1 → 독립 재현으로 참 판정). 참조 6곳이 전부 비실행
1423
+ # 이었고, 그중 하나가 **바로 이 파일의 `bash -n` 목록**이다 — 즉 selfcheck 자신이 «구문 검사» 를
1424
+ # «검증» 으로 세고 있었다. steel-quench SKILL.md 의 T-1 행은 그 사이 그것을 `measured` 로 선언한다.
1425
+ # `bash -n` 은 계기가 아니다([[feedback_gate_verification_must_execute]]) — 아래가 그 자리를 실행으로
1426
+ # 바꾼다. 레인은 격리 픽스처(실물 내용 · 실제 두 커밋 쌍)를 쓰고 네트워크·API 를 안 탄다.
1427
+ #
1428
+ # ⚠️ Subject-absent 는 여기서도 FAIL 이다(SKIP 아님) — `templates/temper_check.sh` 는 package.json
1429
+ # files[] 에 있으므로 부재는 «정당한 미출하» 가 아니라 삭제다. 위 branch_claim 블록과 같은 근거.
1430
+ # rc=2 는 계기 오류(HARNESS-ERROR)라 rc=1 과 같이 fail 로 접는다 — «못 쟀다» 는 «통과» 가 아니다.
1431
+ if [ ! -f templates/temper_check.sh ]; then
1432
+ echo "FAIL templates/temper_check.sh is in package.json files[] but absent — a deleted subject, not a skip"
1433
+ fail=1
1434
+ elif [ -f scripts/test_temper_check_lanes.sh ]; then
1435
+ if ! bash scripts/test_temper_check_lanes.sh; then
1436
+ fail=1
1437
+ fi
1438
+ else
1439
+ echo "FAIL test_temper_check_lanes.sh: temper_check.sh present but its anchor is missing"
1440
+ fail=1
1441
+ fi
1442
+
1418
1443
  # listing_watch — 같은 형태. 🟥 이 블록을 «레인을 짓는 같은 커밋에서» 붙인다: 바로 위 주석이
1419
1444
  # 기록한 「레인은 지었는데 selfcheck 배선을 안 했다」 재발이 **최소 다섯 번**이고, 그 다섯 다 CI 나
1420
1445
  # lane-runner 가 뒤늦게 잡았다. 순서를 바꾸는 것이 유일한 처방이라 여기서 그렇게 한다.
@@ -80,6 +80,21 @@ W="$ADAPTER_DIR/qasp_web_rules.sh"
80
80
  # (빈 **문자열**이 아니다 — 그건 「어디를 볼지 자체가 없다」는 다른 명제이고 전제 파손이다.)
81
81
  EMPTY_WORLD="$T/empty_world"; mkdir -p "$EMPTY_WORLD"
82
82
 
83
+ # 🟥 **상속된 `FH_CLUSTER_ROOTS` 를 여기서 끊는다 — pmh-dev #80 ⓑ 제보 (2026-09-14).**
84
+ # `fh_peer_resolve` 는 `FH_CLUSTER_ROOTS` 가 있으면 **그것이 전부**다(다른 팔을 안 본다).
85
+ # 그래서 운영자가 그 변수를 export 해 두면 픽스처 세계를 지어 놓고도 레인이 **실물 머신**을
86
+ # 읽는다. 계기가 자기 대상 대신 저자의 환경을 재는 형태다.
87
+ # 🟥 실측(이 레포, 같은 날): pin 을 export 한 채 돌리면 **레인 9개가 빨개진다**
88
+ # (M2 M3 M2b M2c M5 M6 P1 P2 P3) — 회귀가 아니라 **환경 누수**인데 같은 빨강으로 읽힌다.
89
+ # PMH 는 4건으로 봤고 실제로는 더 넓었다.
90
+ # ⇒ 여기서 한 번 끊고, **필요한 레인은 호출 시점에 인라인으로 다시 준다**(이미 그렇게 쓰고 있다:
91
+ # `FH_CLUSTER_ROOTS="$GS_ROOT" _rc bash …`). 값을 «비우는» 게 아니라 **unset** 이다 —
92
+ # 빈 문자열은 「어디를 볼지 자체가 없다」는 다른 명제라 전제 파손으로 읽힌다.
93
+ if [ -n "${FH_CLUSTER_ROOTS:-}" ]; then
94
+ printf ' ℹ️ 상속된 FH_CLUSTER_ROOTS 를 끊는다(픽스처 격리) — 원래 값: %s\n' "$FH_CLUSTER_ROOTS"
95
+ fi
96
+ unset FH_CLUSTER_ROOTS
97
+
83
98
  _rc() { "$@" >/dev/null 2>&1; printf '%s' "$?"; } # 판정은 파이프를 통과시키지 않는다
84
99
 
85
100
  # 실물 peer 루트 — 있으면 alias/control 레인을 돌리고, 없으면 그 레인은 SKIP 으로 **말한다**.
@@ -292,6 +307,10 @@ else
292
307
  else
293
308
  _PW="$(mktemp -d)"
294
309
  mkdir -p "$_PW/sp ace" "$_PW/aliased-dev" "$_PW/dual" "$_PW/dual-dev"
310
+ # 🟥 2026-09-14 (pmh-dev #80 B안 «exact match wins»): `dual` 은 이제 **정확 일치라 이긴다** —
311
+ # 그래서 그걸로 «모호 검출이 살아 있나» 를 물으면 컨트롤이 대상과 같이 죽는다.
312
+ # 진짜 모호는 **정확 일치가 없는** 자리다: my_repo(없음) · my_repo-dev · my-repo.
313
+ mkdir -p "$_PW/my_repo-dev" "$_PW/my-repo"
295
314
  # P0 컨트롤 — 계기가 대상을 실제로 부르는가. 이게 초록이 아니면 아래 셋은 의미가 없다.
296
315
  FH_PROJECTS_HOME="$_PW" fh_peer_resolve nosuchpeer >/dev/null 2>&1; _prc=$?
297
316
  _lane P0 control "계기 생존 — 없는 peer 는 부재(1)로 온다(rc=0 무음이면 대상을 안 부른 것)" 1 "$_prc"
@@ -299,11 +318,37 @@ else
299
318
  FH_PROJECTS_HOME="$_PW" fh_peer_resolve 'sp ace' >/dev/null 2>&1; _prc=$?
300
319
  _lane P1 resolve-guard "공백 이름 1건은 정상 해소 — 거짓 AMBIGUOUS 아님" 0 "$_prc"
301
320
  # P2 컨트롤 — 진짜 모호는 여전히 거부해야 한다(P1 의 통과가 모호검출을 죽인 게 아니다)
321
+ FH_PROJECTS_HOME="$_PW" fh_peer_resolve my_repo >/dev/null 2>&1; _prc=$?
322
+ _lane P2 control "진짜 모호(정확 일치 없음: my_repo-dev + my-repo)는 여전히 고르지 않는다" 2 "$_prc"
323
+ # P2-b (신규) — 정확 일치가 있으면 별칭이 같이 있어도 이긴다. 제보 증상 그 자체
324
+ # (한 노드에 ~/projects/<name> + ~/projects/<name>-dev 공존 → 종전엔 AMBIGUOUS → M2/M3 가 HARNESS_ERROR)
302
325
  FH_PROJECTS_HOME="$_PW" fh_peer_resolve dual >/dev/null 2>&1; _prc=$?
303
- _lane P2 control "진짜 모호(dual + dual-dev)는 여전히 고르지 않는다" 2 "$_prc"
326
+ _lane P2b resolve-exact "exact match wins — dual+dual-dev 에서 dual 로 해소(제보 증상)" 0 "$_prc"
304
327
  # P3 컨트롤 — 별칭 해소가 실제로 살아 있나(P 레인이 통째로 공허하지 않다는 증거)
305
328
  FH_PROJECTS_HOME="$_PW" fh_peer_resolve aliased >/dev/null 2>&1; _prc=$?
306
329
  _lane P3 resolve-alias "'-dev' 별칭이 해소된다" 0 "$_prc"
330
+ # ── P4·P5 — 파일 머리의 `unset FH_CLUSTER_ROOTS` 가 **장식이 아님**을 박는다 ──────────
331
+ # 🟥 pmh-dev #80 ⓑ. `FH_CLUSTER_ROOTS` 가 있으면 그것이 **전부**이고 `FH_PROJECTS_HOME` 팔은
332
+ # 아예 안 돈다. 그래서 운영자가 그 변수를 export 해 두면 픽스처 세계를 지어 놓고도 레인이
333
+ # 실물 머신을 읽는다 — 실측 9개 적색(M2 M3 M2b M2c M5 M6 P1 P2 P3).
334
+ # 아래 둘이 그 **기전**을 직접 잰다. 머리의 unset 을 지우면 이 둘이 무의미해지는 게 아니라,
335
+ # 이 둘이 살아 있으므로 «왜 unset 이 필요한가» 가 기록으로 남는다.
336
+ _DECOY="$(mktemp -d)"; mkdir -p "$_DECOY/aliased" # 미끼 세계: 'aliased' 가 **정확히** 있다
337
+ # P4 known-positive — 미끼가 켜져 있으면 픽스처 세계(aliased-dev)가 아니라 미끼가 이긴다
338
+ _got="$(FH_CLUSTER_ROOTS="$_DECOY/aliased" FH_PROJECTS_HOME="$_PW" fh_peer_resolve aliased 2>/dev/null)"
339
+ case "$_got" in
340
+ "$_DECOY/aliased") _prc=0 ;;
341
+ *) _prc=1 ;;
342
+ esac
343
+ _lane P4 env-dominance "FH_CLUSTER_ROOTS 가 있으면 FH_PROJECTS_HOME 팔을 **덮는다**(그래서 머리에서 unset 한다)" 0 "$_prc"
344
+ # P5 컨트롤 — 미끼를 끄면 같은 호출이 픽스처 세계로 돌아온다(P4 가 항상-참이 아니다)
345
+ _got="$(FH_PROJECTS_HOME="$_PW" fh_peer_resolve aliased 2>/dev/null)"
346
+ case "$_got" in
347
+ "$_PW/aliased-dev") _prc=0 ;;
348
+ *) _prc=1 ;;
349
+ esac
350
+ _lane P5 control "미끼를 끄면 픽스처 세계로 돌아온다 — P4 가 항상-참이 아니다" 0 "$_prc"
351
+ rm -rf "$_DECOY"
307
352
  rm -rf "$_PW"
308
353
  fi
309
354
  fi
@@ -20,6 +20,23 @@
20
20
  set -uo pipefail
21
21
  HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
22
  cd "$HERE" || exit 2
23
+
24
+ # ── TTL 게이트 (pmh-dev #80 ⓑ 제보, 2026-09-14) ──────────────────────────────
25
+ # 🟥 `timeout` 은 **GNU coreutils** 이고 macOS 기본에는 없다. 맨몸으로 부르면 그 머신에서
26
+ # 레인이 «실패» 로 뜨는데 그건 **회귀가 아니라 계기 부재**다 — 둘이 같은 빨강으로 읽힌다.
27
+ # (이 레포에 이미 같은 부류의 전례가 있다: 로컬 6/6 · CI 0/6 — `stat -f` BSD-first.)
28
+ # 순서: timeout → gtimeout → **없으면 그냥 실행**. 🟥 없을 때 «건너뛰지» 않는다 — 레인은
29
+ # 돌아야 하고, 잃는 것은 «무한 대기 보호» 뿐이므로 그 사실만 한 줄로 남긴다.
30
+ _TTL=""
31
+ if command -v timeout >/dev/null 2>&1; then _TTL="timeout"
32
+ elif command -v gtimeout >/dev/null 2>&1; then _TTL="gtimeout"
33
+ else
34
+ printf ' ⚠️ timeout/gtimeout 없음 — 시간 제한 없이 돈다(레인은 그대로 돈다, 건너뛰지 않는다)\n'
35
+ fi
36
+ _ttl() { # _ttl <초> <명령…>
37
+ local sec="$1"; shift
38
+ if [ -n "$_TTL" ]; then "$_TTL" "$sec" "$@"; else "$@"; fi
39
+ }
23
40
  PASS=0; FAIL=0
24
41
  ok(){ printf ' ✅ %s\n' "$1"; PASS=$((PASS+1)); }
25
42
  ng(){ printf ' ❌ %s\n' "$1"; FAIL=$((FAIL+1)); }
@@ -33,7 +50,7 @@ ng(){ printf ' ❌ %s\n' "$1"; FAIL=$((FAIL+1)); }
33
50
  # ⚠️ 명명된 잔여: 「백엔드 부재」가 「스킬 못 찾음」을 **가린다**(순서상 먼저 죽는다).
34
51
  # 더 쓸모 있는 순서는 해석이 먼저지만, 그건 이 PR 의 범위가 아니라 별건이다.
35
52
  resolve(){
36
- FH_DRY_RUN=1 timeout 60 bash "$HERE/scripts/fh-run.sh" --backend codex --skill "$1" 2>&1 \
53
+ FH_DRY_RUN=1 _ttl 60 bash "$HERE/scripts/fh-run.sh" --backend codex --skill "$1" 2>&1 \
37
54
  | /usr/bin/grep -oE 'plugins/[A-Za-z0-9_-]+/skills/[A-Za-z0-9_.-]+/SKILL\.md' | head -1
38
55
  }
39
56
 
@@ -54,7 +71,7 @@ esac
54
71
 
55
72
  echo
56
73
  echo "== 🟥 컨트롤 — 아무 이름이나 닿으면 위 둘은 아무것도 증명 안 한다 =="
57
- OUT=$(FH_DRY_RUN=1 timeout 60 bash "$HERE/scripts/fh-run.sh" --backend codex --skill zz_no_such_skill_probe 2>&1); RC=$?
74
+ OUT=$(FH_DRY_RUN=1 _ttl 60 bash "$HERE/scripts/fh-run.sh" --backend codex --skill zz_no_such_skill_probe 2>&1); RC=$?
58
75
  if [ "$RC" -ne 0 ] && printf '%s' "$OUT" | /usr/bin/grep -q 'unable to resolve'; then
59
76
  ok "F3 없는 이름 → rc=$RC · «unable to resolve» (판별력 있음)"
60
77
  else
@@ -100,7 +117,7 @@ echo "== 백엔드 바이너리가 없는 환경에서도 같은 답인가 (CI
100
117
  # 🟥 `timeout` 이 `env` «앞»이어야 한다 — GNU coreutils 의 timeout 은 /usr/bin 에 없어서
101
118
  # PATH 를 깎은 «뒤»에 찾으면 command-not-found 로 죽는다. 초판이 그렇게 써서 F7 이
102
119
  # 로컬에서도 빨갰고, 그게 사실은 «이 레인이 계기 고장을 잡았다»는 증거다.
103
- R7=$(timeout 60 env PATH=/usr/bin:/bin FH_DRY_RUN=1 bash "$HERE/scripts/fh-run.sh" \
120
+ R7=$(_ttl 60 env PATH=/usr/bin:/bin FH_DRY_RUN=1 bash "$HERE/scripts/fh-run.sh" \
104
121
  --backend codex --skill preprep 2>&1 \
105
122
  | /usr/bin/grep -oE 'plugins/[A-Za-z0-9_-]+/skills/[A-Za-z0-9_.-]+/SKILL\.md' | head -1)
106
123
  case "${R7}" in
@@ -9,8 +9,14 @@
9
9
  # score-pair known-pair calibration of score_probe(): PASS / FAIL / UNCALIBRATED(present) /
10
10
  # UNCALIBRATED(absent) / FAILED-TO-RUN, both empty-string and missing-file shapes
11
11
  # select-guard the mechanical selection rule (class filter, utterance-shape, INERT-ANCHOR,
12
- # CLI-event exclude) reproduces the 12-selected / 21-excluded split against the
13
- # REAL probes.md + probes_live.yaml shipped in this repo
12
+ # CLI-event / arm-capability / arm-state excludes) reproduces the CURRENT
13
+ # 13-selected / 20-excluded split against the REAL probes.md + probes_live.yaml
14
+ # shipped in this repo. The numbers are PINNED, not derived — see the S2 note.
15
+ # blackout a whole run whose every probe was silent in BOTH arms is UNCALIBRATED, not a
16
+ # wall of FAIL; the boundary and its deliberate narrowness are pinned by BL1-BL5
17
+ # control-b the optional second known-negative, incl. its fail-closed degrade (a declared
18
+ # second control that did not run is FAILED-TO-RUN, never a quiet PASS)
19
+ # advisory advisory_re is recorded and never moves a verdict
14
20
  # dead-pointer probes_live.yaml naming an id absent from probes.md is caught (nonzero exit),
15
21
  # not silently ignored — this IS the "id 가 probes.md 에 실재하는지" guard the
16
22
  # dispatching session's task named explicitly
@@ -30,10 +36,33 @@ PROBES_LIVE="$REPO_ROOT/.claude/regression/probes_live.yaml"
30
36
  command -v python3 >/dev/null 2>&1 || { echo "❌ HARNESS-ERROR — python3 missing"; exit 10; }
31
37
  [ -f "$LIB" ] || { echo "❌ HARNESS-ERROR — $LIB missing"; exit 10; }
32
38
  [ -f "$RUNNER" ] || { echo "❌ HARNESS-ERROR — $RUNNER missing"; exit 10; }
39
+ # 🟥 ADJACENT FINDING, fixed here 2026-09-14 because this file is shipped and was failing OPEN in
40
+ # the wrong direction. `package.json` files[] packs probe_live_eval.sh, probe_live_eval_lib.py,
41
+ # THIS FILE and probes_live.yaml — but NOT `.claude/regression/probes.md` (verified with
42
+ # `npm pack --dry-run --json`: the only packed `probes.md` is the unrelated
43
+ # tests/seam_absence_probes.md). The RUNNER already degrades correctly on that
44
+ # (`[ -f "$PROBES_MD" ] || exit 2`); this suite had no such guard, so in a consumer install the
45
+ # select lanes crashed with a FileNotFoundError traceback and the suite printed
46
+ # **RESULT: REGRESSION** — reporting a missing fixture as a broken harness. exit 10 is the value
47
+ # this file's own header reserves for exactly this ("harness error (setup failed, not a verdict)").
48
+ # 🟥 This does NOT decide whether probes.md should ship. That is an operator call and is untouched;
49
+ # what changes is only that the non-answer stops rendering as a verdict.
50
+ [ -f "$PROBES_MD" ] || { echo "❌ HARNESS-ERROR — $PROBES_MD missing (not shipped in the npm package; the select/dry-run lanes need the hub repo)"; exit 10; }
51
+ [ -f "$PROBES_LIVE" ] || { echo "❌ HARNESS-ERROR — $PROBES_LIVE missing"; exit 10; }
33
52
 
34
53
  T="$(mktemp -d)" || { echo "❌ HARNESS-ERROR — mktemp failed"; exit 10; }
35
54
  trap 'rm -rf "$T"' EXIT
36
55
 
56
+ # Snapshot the LIVE evidence dir BEFORE any lane runs, so EV8 can prove this suite did not deposit
57
+ # into it. Taken here, at the top, because a snapshot taken next to its own assertion proves
58
+ # nothing. "ABSENT" and "0" are different states and stay different.
59
+ _LIVE_EV_DIR="$REPO_ROOT/tracks/_meta/live_eval_runs"
60
+ if [ -d "$_LIVE_EV_DIR" ]; then
61
+ LIVE_EV_BEFORE="$(find "$_LIVE_EV_DIR" -mindepth 1 -maxdepth 1 | wc -l | tr -d ' ')"
62
+ else
63
+ LIVE_EV_BEFORE="ABSENT"
64
+ fi
65
+
37
66
  FAIL=0; N=0
38
67
  _lane() { # $1=id $2=class $3=desc $4=expected $5=actual
39
68
  N=$((N + 1))
@@ -183,8 +212,45 @@ fi
183
212
  # — confirmed by a known-pair: "list every Skill available to you" -> NO-SKILL-TOOL while the
184
213
  # tool-listing control answered correctly). It failed 0/5 for that reason alone.
185
214
  # 🟥 The exclusion does NOT mean the delegation works — that question is now UNMEASURED, not answered.
186
- _lane S2 select-guard "selected count == 11 (12 minus G-TRIG-03, ARM_CAPABILITY_EXCLUDE)" "11" "$sel_count"
187
- _lane S3 select-guard "excluded count == 22 (33 probes.md rows - 11 selected)" "22" "$exc_count"
215
+ # 🟥 11/22 -> 13/20 on 2026-09-14, and the pin did its job again — it went red and this paragraph is
216
+ # the required explanation. Two rows gained live coverage and one exclusion reason was corrected:
217
+ # +G-GREET-02, +G-GREET-05 — both were being dropped as NO-UTTERANCE, which was TRUE and
218
+ # IRRELEVANT: their probes.md Input cells carried no quoted literal, while the utterance they
219
+ # need ("안녕") sat one row above in G-GREET-01 the whole time. G-GREET-05 is the one CLAUDE.md
220
+ # itself calls a downstream remap anchor that forks machine-map (pmh-dev #54), and it had ZERO
221
+ # live coverage.
222
+ # ~G-GREET-03 — still excluded, but now by name (ARM_STATE_EXCLUDE) with its real reason instead
223
+ # of NO-UTTERANCE. Its 4-door menu renders only on the RETURNING branch and the arm has no Bash
224
+ # to run the branch test. Measured 2026-09-14: three reps of the identical input against the
225
+ # identical clone split 2 returning-menu / 1 new-user-menu, so a ①②③④ regex would score a
226
+ # possibly-correct answer red. Deliberately left UNCOVERED — a decorative probe is worse.
227
+ # ~G-LINT-01 — moved from NOT-YET-AUTHORED into ARM_CAPABILITY_EXCLUDE. Excluded either way, so
228
+ # the counts are unaffected; what changed is that it no longer emits a nightly warning that
229
+ # reads like a to-do for a spec nobody can write against a route the arm cannot take.
230
+ _lane S2 select-guard "selected count == 13 (11 + G-GREET-02 + G-GREET-05)" "13" "$sel_count"
231
+ _lane S3 select-guard "excluded count == 20 (33 probes.md rows - 13 selected)" "20" "$exc_count"
232
+
233
+ # S7/S8: the two newly-covered rows must actually be IN the selection, and the state-excluded row
234
+ # must carry its OWN reason rather than the generic utterance-shape one. Counting alone would pass
235
+ # if some unrelated pair of rows had swapped in ([[feedback_count_is_true_but_referent_drifted]] —
236
+ # the count is true and the referent drifted).
237
+ greet_new=$(python3 -c "
238
+ import json; s=json.load(open('$SELECT_JSON'))['selected']
239
+ ids={p['id'] for p in s}
240
+ print('yes' if {'G-GREET-02','G-GREET-05'} <= ids else 'no')")
241
+ _lane S7 select-guard "G-GREET-02 and G-GREET-05 are selected BY NAME (not just a count of 13)" "yes" "$greet_new"
242
+
243
+ g03_reason=$(python3 -c "
244
+ import json; e=json.load(open('$SELECT_JSON'))['excluded']
245
+ r=[x['reason'] for x in e if x['id']=='G-GREET-03']
246
+ print('branch-state' if r and 'branch-state' in r[0] else (r[0] if r else 'MISSING'))")
247
+ _lane S8 select-guard "G-GREET-03 excluded with its real reason, not NO-UTTERANCE" "branch-state" "$g03_reason"
248
+
249
+ # S9: both nightly warnings are closed. They had fired identically for 8 consecutive nights, which
250
+ # is how a warning becomes background noise. A warning count is the right assertion here precisely
251
+ # because ANY new drift between probes.md and probes_live.yaml should re-break this lane.
252
+ warn_count=$(python3 -c "import json; print(len(json.load(open('$SELECT_JSON'))['warnings']))")
253
+ _lane S9 select-guard "no STALE-YAML-ENTRY / NOT-YET-AUTHORED warnings remain" "0" "$warn_count"
188
254
 
189
255
  # --subset and --ids filters
190
256
  sub_out="$(python3 "$LIB" select --probes-md "$PROBES_MD" --probes-live "$PROBES_LIVE" --subset 3 \
@@ -245,11 +311,12 @@ dry_stdout="$(cd "$REPO_ROOT" && bash "$RUNNER" --dry-run --out "$DRY_OUT" 2>&1)
245
311
  dry_rc=$?
246
312
  _lane R1 dry-run "probe_live_eval.sh --dry-run exits 0" "0" "$dry_rc"
247
313
  _lane R2 dry-run "--dry-run creates no OUTDIR (no live run attempted)" "absent" "$([ -d "$DRY_OUT" ] && echo present || echo absent)"
314
+ # Pinned like S2/S3 and for the same reason — see the S2 note for why 11 became 13 on 2026-09-14.
248
315
  case "$dry_stdout" in
249
- *"SELECTED (11)"*) r3=yes ;;
316
+ *"SELECTED (13)"*) r3=yes ;;
250
317
  *) r3=no ;;
251
318
  esac
252
- _lane R3 dry-run "--dry-run stdout shows the real 11-probe selection" "yes" "$r3"
319
+ _lane R3 dry-run "--dry-run stdout shows the real 13-probe selection" "yes" "$r3"
253
320
 
254
321
  # ── fail-fast: probe_live_eval.sh aborts on the FIRST rc=2 runner call, not after burning the
255
322
  # rest of the selected set (2026-09-05, the launchd incident this exists for) ────────────────────
@@ -308,7 +375,7 @@ _live_hash() { if [ -f "$LIVE_REPORT" ]; then shasum "$LIVE_REPORT" | cut -c1-40
308
375
  live_before="$(_live_hash)"
309
376
  COUNTER1="$T/failfast_counter_broken.txt"; : > "$COUNTER1"
310
377
  ff_out="$(cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_broken.sh" FH_FAKESIM_COUNTER="$COUNTER1" \
311
- bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_broken" --report-out "$T/failfast_report_broken.md" 2>&1)"
378
+ bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_broken" --report-out "$T/failfast_report_broken.md" 2>&1)"
312
379
  ff_rc=$?
313
380
  _lane FF1 fail-fast "aborts with rc=2 on the runner's own preflight failure" "2" "$ff_rc"
314
381
  ff_calls=$(wc -l < "$COUNTER1" | tr -d ' ')
@@ -325,7 +392,7 @@ _lane FF3 fail-fast "abort message names what happened (not a silent stop)" "yes
325
392
  # ([[feedback_control_presence_is_not_discrimination]]).
326
393
  COUNTER2="$T/failfast_counter_ok.txt"; : > "$COUNTER2"
327
394
  ( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_ok.sh" FH_FAKESIM_COUNTER="$COUNTER2" \
328
- bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_ok" --report-out "$T/failfast_report_ok.md" ) >/dev/null 2>&1
395
+ bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_ok" --report-out "$T/failfast_report_ok.md" ) >/dev/null 2>&1
329
396
  ff2_calls=$(wc -l < "$COUNTER2" | tr -d ' ')
330
397
  _lane FF4 fail-fast "control — a healthy runner (rc=0) is called for all 4 (2 probes x 2 arms), not stopped early" "4" "$ff2_calls"
331
398
  live_after="$(_live_hash)"
@@ -354,10 +421,10 @@ if PATH="$SHADOW_NOCLAUDE" command -v claude >/dev/null 2>&1; then
354
421
  else
355
422
  COUNTER3="$T/failfast_counter_noclaude.txt"; : > "$COUNTER3"
356
423
  ( cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_ok.sh" FH_FAKESIM_COUNTER="$COUNTER3" \
357
- bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_noclaude" --report-out "$T/failfast_report_noclaude.md" ) >/dev/null 2>&1
424
+ bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_noclaude" --report-out "$T/failfast_report_noclaude.md" ) >/dev/null 2>&1
358
425
  ff7_calls=$(wc -l < "$COUNTER3" | tr -d ' ')
359
426
  _lane FF7 fail-fast "claude absent from PATH + stub runner: stub still called for all 4 (the seam bypasses the CLI preflight)" "4" "$ff7_calls"
360
- ff7b_out="$(cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_noclaude_real" --report-out "$T/failfast_report_noclaude_real.md" 2>&1)"
427
+ ff7b_out="$(cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_noclaude_real" --report-out "$T/failfast_report_noclaude_real.md" 2>&1)"
361
428
  ff7b_rc=$?
362
429
  case "$ff7b_out" in *"claude CLI not on PATH"*) ff7b_msg=yes ;; *) ff7b_msg=no ;; esac
363
430
  _lane FF7b fail-fast "control — the REAL runner path with claude absent still exits 2 and names claude" "2/yes" "$ff7b_rc/$ff7b_msg"
@@ -426,6 +493,200 @@ _lane MV7 majority "control: reps=1 unchanged (PASS, 1/1)" "PASS 1/1" "$r"
426
493
  r="$(_score_run 1 F)"
427
494
  _lane MV8 majority "control: reps=1 failing case unchanged" "FAIL 0/1" "$r"
428
495
 
496
+ echo ""
497
+ echo "── run-blackout / second control / advisory (2026-09-14) ─────────"
498
+ # WHY THESE LANES EXIST. On 2026-09-13 all 11 probes scored 0/3 — G-GREET-01 included, which is 3/3
499
+ # on every other night in the record — and the report rendered ten of them as FAIL: "the rule did
500
+ # not fire", when nothing had been measured at all. score_run now separates those two facts.
501
+ # _blackout: $1=polarity-spec list "id:pol:primaryhits:controlhits" (hits = 3 chars of 1/0)
502
+ # prints "OVERALL rc silent/scored blackout suspect firstrowverdict"
503
+ _blackout() {
504
+ python3 - "$REPO_ROOT" "$@" <<'PY'
505
+ import sys, os, tempfile
506
+ sys.path.insert(0, os.path.join(sys.argv[1], 'scripts'))
507
+ from probe_live_eval_lib import score_run
508
+ PAT = 'XHITX'
509
+ root = tempfile.mkdtemp(); live = []; ids = []
510
+ for spec in sys.argv[2:]:
511
+ pid, pol, ph, ch = spec.split(':')
512
+ base = os.path.join(root, pid); os.makedirs(base)
513
+ for i in range(3):
514
+ open(os.path.join(base, 'primary_r%d.txt' % (i+1)), 'w').write(PAT if ph[i] == '1' else 'x')
515
+ open(os.path.join(base, 'control_r%d.txt' % (i+1)), 'w').write(PAT if ch[i] == '1' else 'x')
516
+ live.append({'id': pid, 'polarity': pol, 'expect_re': PAT}); ids.append(pid)
517
+ r = score_run(live, root, ids, 0.8, 'sonnet', reps=3)
518
+ print('%s %d %d/%d %s %s %s' % (r['overall'], r['rc'], r['silent'], r['scored'],
519
+ r['blackout'], r['blackout_suspect'], r['rows'][0]['verdict']))
520
+ PY
521
+ }
522
+
523
+ # BL1 — the 2026-09-13 shape: every probe silent in BOTH arms. Nothing was measured.
524
+ r="$(_blackout A:present:000:000 B:present:000:000 C:present:000:000 D:present:000:000)"
525
+ _lane BL1 blackout "all probes silent in both arms -> RUN-BLACKOUT, rows UNCALIBRATED not FAIL" \
526
+ "UNCALIBRATED 2 4/4 True False UNCALIBRATED" "$r"
527
+
528
+ # 🟥 BL2 is the load-bearing control, and it is the 2026-09-12 shape. ONE probe's channel was alive
529
+ # (its pattern hit), so a verdict IS computable and a genuine broad regression is a live hypothesis.
530
+ # Converting this to UNCALIBRATED would hide exactly the failure the instrument exists to catch.
531
+ # Verdict must be untouched; only an advisory flag is raised.
532
+ r="$(_blackout A:present:111:000 B:present:000:000 C:present:000:000 D:present:000:000)"
533
+ _lane BL2 blackout "one live channel -> NOT blackout; verdict stays FAIL, suspect flag only" \
534
+ "FAIL 1 3/4 False True PASS" "$r"
535
+
536
+ # BL3 — control: a healthy run must not trip either flag. Without this, BL1/BL2 could both be
537
+ # passing because the detector fires on everything.
538
+ r="$(_blackout A:present:111:000 B:present:111:000 C:present:111:000 D:present:111:000)"
539
+ _lane BL3 blackout "control — a healthy run raises neither flag" \
540
+ "PASS 0 0/4 False False PASS" "$r"
541
+
542
+ # BL4 — the >=3 guard. A two-probe spot-check that finds nothing is the ORDINARY answer ("the rule
543
+ # did not fire"), not evidence the instrument died. Widening the guard down to 1 would make every
544
+ # failing single-probe --ids run report itself as unmeasurable.
545
+ r="$(_blackout A:present:000:000 B:present:000:000)"
546
+ _lane BL4 blackout "fewer than 3 scored probes -> no blackout (a spot-check keeps its FAIL)" \
547
+ "FAIL 1 2/2 False True FAIL" "$r"
548
+
549
+ # BL5 — the advisory boundary sits at a MAJORITY (0.50), not at the observed incident value (0.73).
550
+ # 2 of 4 silent is exactly 0.50 and must raise the flag while leaving the verdict alone.
551
+ r="$(_blackout A:present:111:000 B:present:111:000 C:present:000:000 D:present:000:000)"
552
+ _lane BL5 blackout "silent_fraction exactly 0.50 -> suspect flag, verdict unchanged" \
553
+ "FAIL 1 2/4 False True PASS" "$r"
554
+
555
+ # ── second control (control_input_b) + advisory channel ───────────────────────────────────────
556
+ # _ctrlb: $1=has_b(y/n) $2=ctrl hit(1/0) $3=ctrl_b hit(1/0|MISSING) $4=advisory(y/n)
557
+ # prints "VERDICT|reason"
558
+ _ctrlb() {
559
+ python3 - "$REPO_ROOT" "$@" <<'PY'
560
+ import sys, os, tempfile
561
+ sys.path.insert(0, os.path.join(sys.argv[1], 'scripts'))
562
+ from probe_live_eval_lib import score_run
563
+ has_b, ch, cbh, adv = sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]
564
+ root = tempfile.mkdtemp(); base = os.path.join(root, 'X'); os.makedirs(base)
565
+ for i in (1, 2, 3):
566
+ open(os.path.join(base, 'primary_r%d.txt' % i), 'w').write('HIT and deep-clarify')
567
+ open(os.path.join(base, 'control_r%d.txt' % i), 'w').write('HIT' if ch == '1' else 'x')
568
+ if cbh != 'MISSING':
569
+ open(os.path.join(base, 'control_b_r%d.txt' % i), 'w').write('HIT' if cbh == '1' else 'x')
570
+ spec = {'id': 'X', 'polarity': 'present', 'expect_re': 'HIT'}
571
+ if has_b == 'y':
572
+ spec['control_input_b'] = 'second known-negative'
573
+ if adv == 'y':
574
+ spec['advisory_re'] = 'deep-clarify'
575
+ row = score_run([spec], root, ['X'], 0.8, 'sonnet', reps=3)['rows'][0]
576
+ print('%s|%s' % (row['verdict'], row.get('reason', '')))
577
+ PY
578
+ }
579
+
580
+ # CB1 — the whole point of a second known-negative: it catches a false positive the FIRST control
581
+ # cannot see. control stays clean, control_b fires -> the pattern does not discriminate.
582
+ r="$(_ctrlb y 0 1 n)"
583
+ _lane CB1 control-b "a hit in the SECOND control alone -> UNCALIBRATED" "UNCALIBRATED|" "$r"
584
+
585
+ # CB2 — 🟥 the degrade direction. A declared second control that produced nothing DID NOT RUN, and
586
+ # an uncalibrated probe must never read as calibrated-and-passing. Folding a missing calibration
587
+ # arm into "the control stayed silent, so we discriminate" is not-found-is-not-zero aimed at the
588
+ # calibration channel.
589
+ r="$(_ctrlb y 0 MISSING n)"
590
+ _lane CB2 control-b "declared control_b that never ran -> FAILED-TO-RUN, never PASS" \
591
+ "FAILED-TO-RUN|control_b: rc=? bytes=0" "$r"
592
+
593
+ # CB3 — control: a probe with NO control_b declared behaves exactly as before. A change that only
594
+ # works for the new field would silently alter all 12 existing probes.
595
+ r="$(_ctrlb n 0 MISSING n)"
596
+ _lane CB3 control-b "control — no control_b declared -> unchanged PASS" "PASS|" "$r"
597
+
598
+ # CB4 — control: clean both controls still passes (CB1 must not be passing because control_b
599
+ # poisons everything).
600
+ r="$(_ctrlb y 0 0 n)"
601
+ _lane CB4 control-b "control — both known-negatives clean -> PASS" "PASS|" "$r"
602
+
603
+ # AD1 — the advisory channel records the ROUTE while the widened pattern scores the BEHAVIOR, and
604
+ # it must NEVER move the verdict. This is what keeps the G-TRIG-07 proposal-format residual visible
605
+ # after the row goes green.
606
+ r="$(_ctrlb n 0 MISSING y)"
607
+ _lane AD1 advisory "advisory_re is recorded in reason and does not change the verdict" \
608
+ "PASS|advisory[deep-clarify] 3/3" "$r"
609
+
610
+ echo ""
611
+ echo "── evidence preservation (2026-09-14) ────────────────────────────"
612
+ # WHY. Every run's response bodies went into a mktemp and died with it, so 2026-09-12 (pass_rate
613
+ # 0.18) and 2026-09-13 (every probe 0/3) are PERMANENTLY unattributable — model blip, rate limit,
614
+ # clone failure and real regression all left the same trace: none. These lanes pin that the flat
615
+ # artifacts survive AND that the clone trees do not (sim_isolated_run.sh puts a full
616
+ # `git clone --local` under <out>/w_<arm>_r<n>/repo; preserving those would be tens of GB a night).
617
+ EVSTUB="$T/ev_stub"; mkdir -p "$EVSTUB"
618
+ cat > "$EVSTUB/fake_sim_bodies.sh" <<'FAKEEV'
619
+ #!/usr/bin/env bash
620
+ arm=""; out=""
621
+ while [ $# -gt 0 ]; do
622
+ case "$1" in
623
+ --arm) arm="$2"; shift 2 ;;
624
+ --out) out="$2"; shift 2 ;;
625
+ *) shift ;;
626
+ esac
627
+ done
628
+ mkdir -p "$out"
629
+ printf '🐿️ stub body for %s\n' "$arm" > "$out/${arm}_r1.txt"
630
+ printf 'stub prompt\n' > "$out/${arm}_r1.prompt.txt"
631
+ printf 'corpus\tX\n' > "$out/${arm}_r1.meta.tsv"
632
+ # the clone tree the real runner leaves behind — must NOT be preserved
633
+ mkdir -p "$out/w_${arm}_r1/repo/deep/nested"
634
+ head -c 200000 /dev/zero > "$out/w_${arm}_r1/repo/deep/nested/big.bin" 2>/dev/null
635
+ echo "RESULT: CLEAN"
636
+ exit 0
637
+ FAKEEV
638
+ chmod +x "$EVSTUB/fake_sim_bodies.sh"
639
+
640
+ EVROOT="$T/evidence_root"
641
+ ( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$EVSTUB/fake_sim_bodies.sh" \
642
+ FH_LIVE_EVAL_EVIDENCE_ROOT="$EVROOT" \
643
+ bash "$RUNNER" --ids "G-GREET-01,G-TRIG-07" --report-out "$T/ev_report.md" ) >"$T/ev.log" 2>&1
644
+
645
+ ev_day="$(find "$EVROOT" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)"
646
+ _lane EV1 evidence "a run creates a dated evidence dir under the evidence root" \
647
+ "yes" "$([ -n "$ev_day" ] && echo yes || echo no)"
648
+
649
+ _lane EV2 evidence "the response BODY is preserved (primary_r1.txt survives the mktemp)" \
650
+ "yes" "$([ -s "$ev_day/G-TRIG-07/primary_r1.txt" ] && echo yes || echo no)"
651
+
652
+ # 🟥 EV3 is the cost guard. `find -maxdepth 1 -type f` is the only thing standing between this
653
+ # feature and tens of GB a night; if someone "simplifies" it to `cp -r`, this lane is what says so.
654
+ clone_leak=$(find "$EVROOT" -name 'big.bin' 2>/dev/null | wc -l | tr -d ' ')
655
+ _lane EV3 evidence "the per-rep CLONE TREE is NOT preserved (w_*/repo/** excluded)" "0" "$clone_leak"
656
+
657
+ # EV4: the second control's body is preserved too — it is the arm a future reader needs most when
658
+ # a probe scores UNCALIBRATED and they have to see WHICH negative leaked.
659
+ _lane EV4 evidence "control body preserved alongside primary" \
660
+ "yes" "$([ -s "$ev_day/G-TRIG-07/control_r1.txt" ] && echo yes || echo no)"
661
+
662
+ # EV5: the verdict travels with the bodies — a body set with no report forces the next reader to
663
+ # re-derive what the run concluded.
664
+ _lane EV5 evidence "the run's report is copied in beside the bodies" \
665
+ "yes" "$([ -s "$ev_day/_report.md" ] && echo yes || echo no)"
666
+
667
+ # 🟥 EV6 — the delete guard. The ONLY line in probe_live_eval.sh that removes anything must refuse
668
+ # to run against a root outside $REPO_ROOT/tracks/_meta, which is exactly the case this lane is in.
669
+ # Without this, an overridable evidence root would be an overridable `rm -rf` target.
670
+ case "$(cat "$T/ev.log" 2>/dev/null)" in
671
+ *"refusing to prune"*) ev_guard=yes ;;
672
+ *) ev_guard=no ;;
673
+ esac
674
+ _lane EV6 evidence "prune REFUSES an evidence root outside tracks/_meta (and says so)" "yes" "$ev_guard"
675
+
676
+ # EV7 control: --no-evidence really writes nothing, so EV1-EV5 are not passing on a path that gets
677
+ # populated no matter what the flag says.
678
+ EVROOT2="$T/evidence_root_off"
679
+ ( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$EVSTUB/fake_sim_bodies.sh" \
680
+ FH_LIVE_EVAL_EVIDENCE_ROOT="$EVROOT2" \
681
+ bash "$RUNNER" --ids "G-GREET-01" --no-evidence --report-out "$T/ev_report2.md" ) >/dev/null 2>&1
682
+ _lane EV7 evidence "control — --no-evidence creates no evidence root at all" \
683
+ "absent" "$([ -d "$EVROOT2" ] && echo present || echo absent)"
684
+
685
+ # 🟥 EV8 — the live evidence path must be untouched by this suite, same guard as FF5 for the report.
686
+ LIVE_EV="$REPO_ROOT/tracks/_meta/live_eval_runs"
687
+ _lane EV8 evidence "control — the LIVE evidence dir was not written by these lanes" \
688
+ "$LIVE_EV_BEFORE" "$([ -d "$LIVE_EV" ] && find "$LIVE_EV" -mindepth 1 -maxdepth 1 | wc -l | tr -d ' ' || echo ABSENT)"
689
+
429
690
  echo ""
430
691
  echo "── summary ──────────────────────────────────────────────────────"
431
692
  echo "lanes: $N failed: $([ "$FAIL" -eq 0 ] && echo 0 || echo '>=1')"