@chrono-meta/fh-gate 3.16.0 → 3.17.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 (60) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/AGENTS.md +27 -0
  3. package/CATALOG.md +60 -0
  4. package/CLAUDE.md +5 -0
  5. package/README.ja.md +2 -2
  6. package/README.ko.md +2 -2
  7. package/README.md +2 -2
  8. package/README.zh.md +2 -2
  9. package/docs/OUTPUT_EVIDENCE.md +1 -1
  10. package/docs/codex-compat.md +24 -0
  11. package/knowledge/shared/harness-core/checkout_layer_drift.md +301 -0
  12. package/knowledge/shared/learnings/subagent_invocations_log.yaml +25 -0
  13. package/package.json +11 -1
  14. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  15. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  16. package/plugins/fh-meta/CHANGELOG.md +42 -0
  17. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  18. package/plugins/fh-preprep/skills/preprep/SKILL.md +5 -0
  19. package/plugins/fh-preprep/skills/preprep/lane_font_embed.py +235 -0
  20. package/plugins/fh-preprep/skills/preprep/ooxml/gate.py +67 -5
  21. package/plugins/fh-preprep/skills/preprep/ooxml/test_gate_exitcodes.py +136 -0
  22. package/plugins/fh-preprep/skills/preprep/preprep.py +16 -1
  23. package/plugins/fh-preprep/skills/preprep/presentation_checklist.md +108 -6
  24. package/plugins/fh-preprep/skills/preprep/safe_install.py +22 -3
  25. package/plugins/fh-preprep/skills/preprep/surfaces.example.yaml +11 -0
  26. package/plugins/fh-preprep/skills/preprep/test_lane_font_embed.py +117 -0
  27. package/plugins/fh-preprep/skills/preprep/test_safe_install_app_xml.py +77 -0
  28. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  29. package/scripts/count_check.sh +46 -14
  30. package/scripts/daily_report.sh +17 -1
  31. package/scripts/env_layer_fingerprint.sh +309 -0
  32. package/scripts/gate_bootstrap_ephemeral.sh +248 -0
  33. package/scripts/governor_board.sh +841 -0
  34. package/scripts/map_postprocess.py +89 -4
  35. package/scripts/multibyte_bracket_lint.sh +135 -0
  36. package/scripts/outbound_pr_gate.sh +12 -0
  37. package/scripts/package_coverage_check.sh +34 -0
  38. package/scripts/selfcheck.sh +245 -0
  39. package/scripts/session_close_check.sh +96 -1
  40. package/scripts/stale_ref_scan.py +2 -1
  41. package/scripts/test_count_check_decl_lanes.sh +176 -0
  42. package/scripts/test_env_layer_fingerprint_lanes.sh +192 -0
  43. package/scripts/test_gate_bootstrap_ephemeral_lanes.sh +262 -0
  44. package/scripts/test_locale_invariance_lanes.sh +581 -0
  45. package/scripts/test_map_postprocess_lanes.sh +84 -4
  46. package/scripts/test_marker_crossfamily_lanes.sh +5 -1
  47. package/scripts/test_marker_defense_lanes.sh +5 -1
  48. package/scripts/test_marker_standpoint_lanes.sh +5 -1
  49. package/scripts/test_marker_thirdparty_lanes.sh +5 -1
  50. package/scripts/test_multibyte_bracket_lint_lanes.sh +107 -0
  51. package/scripts/test_outbound_pr_gate_lanes.sh +133 -0
  52. package/scripts/test_preprep_drift_anchor.sh +34 -9
  53. package/scripts/test_preprep_drift_anchor_lanes.sh +64 -2
  54. package/scripts/test_session_close_chain_lanes.sh +45 -0
  55. package/scripts/test_stale_ref_close_lanes.sh +197 -0
  56. package/scripts/test_stale_ref_scan_lanes.sh +6 -1
  57. package/scripts/test_worktree_reclaim_lanes.sh +267 -1
  58. package/scripts/worktree_reclaim.sh +246 -11
  59. package/templates/.git-hooks/pre-commit +108 -27
  60. package/templates/settings.PreToolUse.snippet.json +54 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python3
2
- """docs/map 의 archify 산출 HTML 에 붙이는 재생성-후 후처리 — 두 가지만 한다.
2
+ """docs/map 의 archify 산출 HTML 에 붙이는 재생성-후 후처리 — 두 가지를 하고 하나를 지킨다.
3
3
 
4
4
  (1) reader-width floor 뷰어의 `MIN_READER_WIDTH = 960` 상수를 뷰포트 비례 하한으로 바꾼다.
5
5
  archify 뷰어는 «스크롤 없이 다 담기» 를 목표로 폭을 줄이는데, 세로 예산이 모자라면
@@ -11,6 +11,18 @@
11
11
  기존 커밋본 두 장(fh_trust.dataflow.svg · fh_assets.architecture.svg)에 대해
12
12
  바이트 동일 재현을 known-pair 로 확인하고 만든 추출기다.
13
13
 
14
+ (3) 깜빡임 계약 검사 재생성된 HTML 이 «깜빡임 억제» 두 가지를 아직 들고 있나만 본다(쓰지 않는다).
15
+ ⓐ 첫 페인트 전 테마 해소 — `<html data-theme=…>` 로 시작하는 문서는 `<body>` **앞에서**
16
+ 테마를 확정해야 한다. 안 그러면 라이트 선호 사용자에게 어두운 한 프레임이 스친다.
17
+ ⓑ 펄스 기본 정지 — `.pulse-dot` 에 애니메이션을 **거는** 규칙은 셀렉터에
18
+ `data-motion-capable` 게이트를 달고 있어야 한다. 게이트 없이 걸리면 부팅 중에도
19
+ reduced-motion 에서도 점이 깜빡인다.
20
+ 🟥 **둘 다 «있으면 검사, 없으면 통과»다.** 문서가 `data-theme` 를 아예 안 쓰거나 점을
21
+ 뛰게 하는 규칙이 아예 없으면 깜빡일 것도 없다 — 없는 것을 요구하면 다른 archify
22
+ 다이어그램 종류를 과차단하고, 과차단은 override 를 훈련시킨다(CLAUDE.md §Integration branch).
23
+ 🟥 그리고 이 검사는 «실제로 안 깜빡인다» 의 증거가 아니다 — **기록의 형태**만 본다.
24
+ 실물은 사람이 라이트 모드로 하드 리로드해서 눈으로 본다(`docs/map/FH_MAP.md` §그림·재생성).
25
+
14
26
  fail-closed: 기대한 리터럴이 없으면(렌더러 버전 드리프트) 종료코드 3 으로 멈춘다 —
15
27
  조용히 «패치할 게 없었다» 로 넘어가면 다음 발행이 옛 동작으로 나간다.
16
28
 
@@ -25,6 +37,74 @@ OLD = 'var MIN_READER_WIDTH = 960;'
25
37
  NEW = ('var MIN_READER_WIDTH = Math.min(1440, '
26
38
  'Math.max(960, Math.round(window.innerWidth * 0.80)));')
27
39
 
40
+ # ── 깜빡임 억제 계약 (검사만 한다 — 이 스크립트는 이걸 고치지 않는다) ───────────
41
+ # 리터럴 출처: archify 2.17.0-dev.1 산출본(docs/map/*.html, PR #720 에 실려 들어왔다).
42
+ THEME_DECL = re.compile(r'<html\b[^>]*\bdata-theme\s*=', re.I)
43
+ # 따옴표 종류는 렌더러 취향이라 둘 다 받는다 — 픽스처가 큰따옴표로 쓰여 L1 이 빨개진 자리다.
44
+ THEME_APPLY = re.compile(r'''setAttribute\(\s*['"]data-theme['"]''')
45
+ MOTION_GATE = 'data-motion-capable'
46
+ PULSE_SEL = '.pulse-dot'
47
+ PULSE_HIT = re.compile(r'\.pulse-dot\b')
48
+ ANIM_DECL = re.compile(r'\banimation(?:-name)?\s*:\s*([^;}]+)')
49
+ STYLE_BLOCK = re.compile(r'<style[^>]*>(.*?)</style>', re.S)
50
+
51
+
52
+ def pulse_rules(css: str):
53
+ """`.pulse-dot` 가 실제로 받는 규칙을 (셀렉터 조각, 본문) 으로 돌려준다.
54
+
55
+ 🟥 CSS 한 벌을 `([^{}]*)\\.pulse-dot…` 로 훑지 않는다 — 그 모양은 문서 길이에 제곱으로
56
+ 드는 역추적을 만든다(실측: 734 KB 한 장에 22 초, 세 장이면 한 번 돌릴 때마다 1 분).
57
+ 리터럴을 먼저 선형으로 찾고 그 주변만 잘라 본다.
58
+ """
59
+ out, seen = [], set()
60
+ for m in PULSE_HIT.finditer(css):
61
+ brace = css.find('{', m.end())
62
+ if brace < 0 or brace in seen:
63
+ continue # 한 규칙이 `.pulse-dot` 을 여러 번 담아도 한 번만 본다
64
+ seen.add(brace)
65
+ head = max(css.rfind('}', 0, m.start()), css.rfind('{', 0, m.start()))
66
+ selectors = css[head + 1:brace]
67
+ close = css.find('}', brace + 1)
68
+ body = css[brace + 1:close] if close > 0 else css[brace + 1:]
69
+ # 🟥 조각을 «첫 하나» 로 접지 않는다 — `html[…capable] .pulse-dot, .pulse-dot { … }` 처럼
70
+ # 한 목록 안에 게이트 있는 조각과 없는 조각이 같이 있으면 앞엣것만 보고 통과한다.
71
+ parts = [part.strip() for part in selectors.split(',') if PULSE_SEL in part]
72
+ for part in (parts or [selectors.strip()]):
73
+ out.append((part, body))
74
+ return out
75
+
76
+
77
+ def flash_contract(html: str):
78
+ """어긋난 항목을 문장으로 돌려준다. 빈 리스트 = 계약 충족(또는 해당 없음)."""
79
+ bad = []
80
+ if THEME_DECL.search(html):
81
+ m = THEME_APPLY.search(html)
82
+ i_theme = m.start() if m else -1
83
+ i_body = html.find('<body')
84
+ if i_theme < 0:
85
+ bad.append('<html data-theme> is declared but setAttribute(data-theme) never runs — '
86
+ 'the declared theme is the only one a reader gets')
87
+ elif 0 <= i_body < i_theme:
88
+ # 🟥 기준은 <body> 이지 <head> 안의 <style> 이 아니다. 머리의 스타일은 아무것도
89
+ # 안 그리고, 그 뒤에 인라인 스크립트가 와도 페인트는 여전히 그 스크립트 뒤다.
90
+ # <style> 을 기준으로 두면 무해한 렌더러 변경을 막는다(과차단 → override 훈련).
91
+ bad.append('theme is applied only after <body> starts — the first frame can paint '
92
+ 'with the declared (dark) theme before the reader preference lands')
93
+ # 🟥 «어느 규칙이 점을 **뛰게 하나**» 만 본다 — 정지시키는 규칙이 몇 개든 세지 않는다.
94
+ # 초판은 «게이트 없는 규칙 중 하나라도 animation: none 이면 통과» 였고, 되돌림 프로브가
95
+ # 그것을 공허하게 통과시켰다: reduced-motion 미디어쿼리 안의 `animation: none !important`
96
+ # 가 기본 규칙 대신 그 조건을 채워서, 기본값을 `pulse 2s infinite` 로 바꿔도 초록이었다.
97
+ css = '\n'.join(STYLE_BLOCK.findall(html))
98
+ for selector, body in pulse_rules(css):
99
+ runs = [v.strip() for v in ANIM_DECL.findall(body)
100
+ if v.strip() and not v.strip().startswith('none')]
101
+ if runs and MOTION_GATE not in selector:
102
+ where = selector or '(no selector — the default rule)'
103
+ bad.append(f'a .pulse-dot rule starts an animation without the {MOTION_GATE} '
104
+ f'gate: {where} {{ animation: {runs[0]} }} — the dot blinks before '
105
+ 'the motion governor boots, and keeps blinking under reduced-motion')
106
+ return bad
107
+
28
108
 
29
109
  def build_svg(html: str) -> str:
30
110
  styles = re.findall(r'<style[^>]*>(.*?)</style>', html, re.S)
@@ -47,10 +127,15 @@ def process(path: str, check_only: bool) -> int:
47
127
  print(f'ERROR {path}: {exc}', file=sys.stderr)
48
128
  return 4
49
129
  has_old, has_new = OLD in html, NEW in html
130
+ problems = []
50
131
  if not has_old and not has_new:
51
- print(f'DRIFT {path}: neither the original nor the patched reader-width '
52
- f'literal is present — archify version drift, patch NOT applied',
53
- file=sys.stderr)
132
+ problems.append('neither the original nor the patched reader-width literal is '
133
+ 'present — archify version drift')
134
+ problems += flash_contract(html)
135
+ if problems:
136
+ for p in problems:
137
+ print(f'DRIFT {path}: {p}', file=sys.stderr)
138
+ print(f'DRIFT {path}: patch NOT applied, nothing written', file=sys.stderr)
54
139
  return 3
55
140
  if check_only:
56
141
  print(f'{"PATCHED" if has_new else "UNPATCHED"} {path}')
@@ -0,0 +1,135 @@
1
+ #!/usr/bin/env bash
2
+ # multibyte_bracket_lint.sh — 셸 브래킷 표현 안의 멀티바이트 문자를 막는다.
3
+ #
4
+ # THE DEFECT (2026-09-21 하루에 세 자리에서 실측)
5
+ # POSIX 브래킷 표현 `[...]` / `[^...]` 은 로케일이 UTF-8 이 아닐 때 **바이트 집합으로 퇴화**한다.
6
+ # `LANG` 이 안 걸린 셸(베어 컨테이너 · CI 러너 · **그리고 운영자 맥의 기본 셸** — 실측:
7
+ # `LANG` unset → `LC_CTYPE="C"`)에서 `—`(E2 80 94)나 `①`(E2 91 A0)을 브래킷에 넣으면,
8
+ # 정규식은 그 **선두 바이트 0xE2** 에 걸린다. 같은 바이트를 공유하는 다른 문자까지 함께.
9
+ #
10
+ # 실측된 세 자리, 방향이 **제각각**이라 한 방향으로 못 읽는다:
11
+ # `[:—-]` / `[^:—-]*` 영혼 복붙 검사 → BLOCK 이 PASS 로 샌다 (fail-OPEN)
12
+ # `[^[:alnum:]«]*` soul_check → 순한글 줄이 통째로 먹힌다 (fail-OPEN)
13
+ # `[^ⓕ]*` axes-run → 채워진 필드가 빈칸으로 읽힌다 (과차단)
14
+ # `[^”]{2,}` below-floor-ack → **양방향**(아래 §양방향)
15
+ #
16
+ # 🟥 **`bash -n` 은 전부 통과한다.** 이것은 문법 오류가 아니라 의미 변화다.
17
+ #
18
+ # WHY A LINT AND NOT A LIST OF FIXES
19
+ # 같은 클래스를 2026-08-30 에 한 번 고쳤다(`tr -d '[:space:].·—-]'` 자리). 훅 주석이 그 함정을
20
+ # 적어 두기까지 했는데, **열 줄 아래의 `sed` 자리는 그대로 남아 오늘까지 왔다.** 그리고 오늘
21
+ # 이 자리들을 «전수 열거» 하려던 첫 계기가 11 중 1 을 놓쳤다 — 정규식이 `[:alnum:]` 의 첫 `]`
22
+ # 에서 끊겨서, 하필 실측된 fail-OPEN 자리를 못 봤다. 사람이 세면 빠지고, 세는 계기도 빠진다.
23
+ # 그래서 처방은 목록이 아니라 **열두 번째가 생기는 순간 빨개지는 것**이다.
24
+ #
25
+ # SCOPE — 의도적으로 좁다
26
+ # 기본 대상은 **게이트 파일**(`templates/.git-hooks/*`)뿐이다. 거기서의 결함은 BLOCK/PASS 를
27
+ # 바꾸지만, 레인 파일에서의 같은 결함은 레인이 빨개져서 드러난다 — 심각도가 다르다.
28
+ # 🟥 **남은 표면을 숨기지 않고 이름으로 남긴다**: 같은 스캔을 레포 전체에 돌리면 셸 파일에
29
+ # 100자리 넘게 나온다(측정 2026-09-21). 그것은 **미측정**이지 무결이 아니다. 넓히려면 인자로
30
+ # 파일을 주면 된다. 파이썬은 대상이 아니다 — `re` 는 바이트-로케일 방식이 아니라 해당 없다.
31
+ #
32
+ # NOT EVERY HIT IS A LIVE BUG — 그리고 그렇게 말하지 않는다
33
+ # `[^—-]*` 두 자리는 오늘 재보니 두 로케일에서 **같은 출력**을 냈다(뒤따르는 `(—|--)` 교차가
34
+ # 우연히 받쳐 준다). 이 린트는 그것도 잡는다. 「지금 깨졌다」가 아니라 **「우연히 맞는 구성이라
35
+ # 조용히 바뀔 수 있다」** 이고, 고치는 값이 한 줄이라 그 교환이 성립한다. 판정 문구도 그렇게 적는다.
36
+ #
37
+ # 처방: 브래킷 대신 **교차(alternation)** 를 쓴다. `[:—-]` → `(:|—|-)` `[^”]` → `[^"]` 또는 명시 교차
38
+ #
39
+ # Usage: bash scripts/multibyte_bracket_lint.sh [FILE...]
40
+ # bash scripts/multibyte_bracket_lint.sh --selftest
41
+ # Exit: 0 = 깨끗 · 1 = 적발 · 2 = 계기 오류(부재·읽기 실패 — 「통과」가 아니다)
42
+
43
+ set -uo pipefail
44
+ cd "$(dirname "$0")/.." || exit 2
45
+
46
+ SELFTEST=0
47
+ FILES=()
48
+ for a in "$@"; do
49
+ case "$a" in
50
+ --selftest) SELFTEST=1 ;;
51
+ -*) echo "unknown flag: $a" >&2; exit 2 ;;
52
+ *) FILES+=("$a") ;;
53
+ esac
54
+ done
55
+
56
+ command -v python3 >/dev/null 2>&1 || { echo "❌ INSTRUMENT ERROR — python3 없음. 부재는 통과가 아니다"; exit 2; }
57
+
58
+ _scan() { # $@ = files ; prints "path:line:fragment" per hit ; rc 0 always (판정은 호출부)
59
+ python3 - "$@" <<'PY'
60
+ import sys, re, io, os
61
+ # POSIX 클래스 [:name:] 를 먼저 소비한다. 안 그러면 `[^[:alnum:]«]` 의 첫 `]` 에서 끊겨
62
+ # 하필 멀티바이트가 든 브래킷을 놓친다 — 2026-09-21 에 실제로 그렇게 한 자리를 놓쳤다.
63
+ RX = re.compile(r'\[\^?\]?(?:\[:[a-z]+:\]|[^]\n])*\]')
64
+ for p in sys.argv[1:]:
65
+ if not os.path.isfile(p):
66
+ print("MISSING\t%s" % p); continue
67
+ try:
68
+ lines = io.open(p, encoding='utf-8', errors='strict').read().split('\n')
69
+ except Exception as e:
70
+ print("UNREADABLE\t%s\t%s" % (p, e)); continue
71
+ for i, l in enumerate(lines, 1):
72
+ if l.lstrip().startswith('#'): # 주석은 코드가 아니다
73
+ continue
74
+ for m in RX.finditer(l):
75
+ frag = m.group(0)
76
+ if any(ord(c) > 127 for c in frag):
77
+ print("HIT\t%s\t%d\t%s" % (p, i, frag))
78
+ PY
79
+ }
80
+
81
+ # ── 계기 교정 — 알려진 쌍. 이 린트가 «무엇이든 잡는» 것도 «아무것도 못 잡는» 것도 아님을 보인다 ──
82
+ _calibrate() {
83
+ local d rc_pos rc_neg
84
+ d=$(mktemp -d) || return 2
85
+ # known-POSITIVE: 실측된 결함 형태 그대로(브래킷 안 em-dash)
86
+ printf '%s\n' 'x=$(printf %s "$l" | sed -E "s/^[^:—-]*[:—-]//")' > "$d/bad.sh"
87
+ # known-NEGATIVE: 같은 일을 교차로 쓴 것 + 순-ASCII 브래킷 + 멀티바이트가 든 **주석**
88
+ {
89
+ printf '%s\n' 'x=$(printf %s "$l" | sed -E "s/^(:|—|-)*//")'
90
+ printf '%s\n' 'y=$(printf %s "$l" | grep -oE "[A-Za-z0-9_]+")'
91
+ printf '%s\n' '# 주석 안의 [^—-] 는 코드가 아니다'
92
+ } > "$d/good.sh"
93
+ rc_pos=$(_scan "$d/bad.sh" | grep -c '^HIT' || true)
94
+ rc_neg=$(_scan "$d/good.sh" | grep -c '^HIT' || true)
95
+ rm -rf "$d"
96
+ [ "${rc_pos:-0}" -ge 1 ] || { echo "❌ INSTRUMENT ERROR — 알려진 양성을 못 잡는다 (hits=$rc_pos)"; return 2; }
97
+ [ "${rc_neg:-0}" -eq 0 ] || { echo "❌ INSTRUMENT ERROR — 알려진 음성에서 $rc_neg 건 오탐"; return 2; }
98
+ return 0
99
+ }
100
+
101
+ if [ "$SELFTEST" = 1 ]; then
102
+ echo "── multibyte-bracket lint · selftest ──"
103
+ if _calibrate; then echo "✅ known-pair 분리 (양성 잡고 음성 안 잡는다)"; exit 0; else exit 2; fi
104
+ fi
105
+
106
+ _calibrate || exit 2
107
+
108
+ if [ "${#FILES[@]}" -eq 0 ]; then
109
+ # 기본 대상 = 게이트. 글롭이 안 맞으면 리터럴이 루프에 들어오므로 존재 검사를 건다.
110
+ for f in templates/.git-hooks/*; do [ -f "$f" ] && FILES+=("$f"); done
111
+ fi
112
+ [ "${#FILES[@]}" -gt 0 ] || { echo "❌ INSTRUMENT ERROR — 대상 파일이 0개다. 부재는 통과가 아니다"; exit 2; }
113
+
114
+ OUT=$(_scan "${FILES[@]}")
115
+ if printf '%s\n' "$OUT" | grep -qE '^(MISSING|UNREADABLE)'; then
116
+ printf '%s\n' "$OUT" | grep -E '^(MISSING|UNREADABLE)' | while IFS=$'\t' read -r k p rest; do
117
+ echo "❌ INSTRUMENT ERROR — $k: $p ${rest:-}"
118
+ done
119
+ exit 2
120
+ fi
121
+
122
+ HITS=$(printf '%s\n' "$OUT" | grep -c '^HIT' || true)
123
+ if [ "${HITS:-0}" -eq 0 ]; then
124
+ echo "✅ multibyte-bracket lint: ${#FILES[@]} 파일, 브래킷 안 멀티바이트 0건"
125
+ exit 0
126
+ fi
127
+
128
+ echo "❌ multibyte-bracket lint — $HITS 건. 브래킷은 비-UTF-8 로케일에서 **바이트 집합**이 된다."
129
+ printf '%s\n' "$OUT" | grep '^HIT' | while IFS=$'\t' read -r _ p n frag; do
130
+ printf ' %s:%s %s\n' "$p" "$n" "$frag"
131
+ done
132
+ echo " 처방: 브래킷 대신 교차를 써라 — [:—-] → (:|—|-) · [^”] → [^\"] 또는 명시 교차"
133
+ echo " 🟥 「지금 깨졌다」가 아니라 「로케일이 바뀌면 조용히 바뀐다」이다. 방향은 자리마다 다르고,"
134
+ echo " 오늘 실측된 셋은 fail-OPEN 둘 · 과차단 하나였다."
135
+ exit 1
@@ -221,6 +221,18 @@ _records=$(ls -1 "$RECDIR"/outbound_pr_"$TODAY"_*.md 2>/dev/null | wc -l | tr -d
221
221
 
222
222
  if [ "${_records:-0}" -eq 0 ]; then
223
223
  _add "no record: expected $RECDIR/outbound_pr_${TODAY}_<slug>.md — none exists."
224
+ # COLD START. The three field syntaxes live in the per-field "line absent" branches below, and
225
+ # those are unreachable when there is no file at all — so the very first session to hit this gate
226
+ # was told a path and nothing else, and had to read this script to learn the form. Print the
227
+ # skeleton here. Not a bullet: it is the continuation of the one bullet above, not a fourth
228
+ # reason. Deliberately a SKELETON and not an example with plausible values — a fillable example
229
+ # is a form to copy, and this gate exists because a record can be true in form and false in fact.
230
+ REASONS="${REASONS} Write those three lines; each value owes >=20 chars of grounds naming a real run:
231
+ standpoint: tier2(<repo>) — ran <cmd> there, output: <what you saw>
232
+ generated-path: none-found(<the generator grep you ran>) | found(<path> -> <generator>)
233
+ fixture-carries: asserted(<cmd>, <what you saw>) | not-applicable(<grounds>)
234
+ Write it and re-run — any line that still does not pass is then explained in full.
235
+ "
224
236
  else
225
237
  _sp=$(_field standpoint); _sp=${_sp#*:}
226
238
  _spv=$(printf '%s' "$_sp" | sed -E 's/^[[:space:]]*//; s/[[:space:]]*(—|--).*$//; s/[[:space:]]+$//; s/^["'"'"']//')
@@ -39,6 +39,24 @@ cd "$REPO_ROOT" || exit 1
39
39
  # scripts/sync_to_be_lanes.sh — forward-path lane suite for sync-to-be.sh, itself
40
40
  # ACCEPTED_ABSENT above; added 2026-08-14, pmh-dev#69.
41
41
  ACCEPTED_ABSENT=(
42
+ # 🟥 2026-09-21 (야간) — 정책렌즈 채점기와 그 레인. **FH 자기 연구의 실험 기록**이지 소비자
43
+ # 능력이 아니다: 판정 대상이 `scripts/fixtures/policy_lens_knownpair_2026-09-21/` 안의
44
+ # 1차 런 48개 파일(236K)이고, 그것까지 실어 보내면 아무도 안 쓰는 실험 아카이브가 패키지
45
+ # 무게가 된다. 🟥 **조용한 통과가 아니다** — `selfcheck.sh` 의 이 블록은 `_absent_subject_verdict`
46
+ # 를 거치므로, 소비자 트리에서는 「files[] 에 없고 부재」→ **SKIP 으로 이름이 찍히고**,
47
+ # 반대로 출하 선언이 생겼는데 파일이 없으면 FAIL 로 뒤집힌다.
48
+ # 이걸 «수치 도구» 로 일반화해 출하할 거면 픽스처를 일반 코퍼스로 바꾸는 것이 먼저다.
49
+ "scripts/score_policy_lens.sh"
50
+ "scripts/test_policy_lens_scorer_lanes.sh"
51
+ # 🟥 2026-09-21 — 지도 «깜빡임» 렌더 프로브 4종. 이 넷의 **판정 대상이 `docs/map/*.html`**
52
+ # 인데 그 지도는 files[] 에 없다(발행은 GitHub Pages 로 하고 npm 으로는 안 나간다). 소비자
53
+ # 트리에는 잴 것이 아예 없으므로 계기를 실어 보내는 것은 무게만 늘린다. 레인 자신이 그
54
+ # 상태를 `NOT MEASURED` 로 크게 적고 rc=0 으로 끝나므로 조용한 통과도 아니다.
55
+ # 지도가 언젠가 출하되면 이 세 줄을 지우고 files[] 로 옮겨라 — 순서가 반대면 안 된다.
56
+ "scripts/map_flash_render_probe.js"
57
+ "scripts/png_luma.py"
58
+ "scripts/test_map_flash_render_lanes.sh"
59
+ "scripts/test_png_luma_lanes.sh"
42
60
  # 🟥 2026-09-05 — outbound 가드와 그 레인은 **이 목록에서 나갔다(= 이제 출하한다).**
43
61
  # 종전 사유는 «override 층이 없으면 fail-closed 라 신선 설치를 100% 차단한다» 였는데,
44
62
  # 그 문장은 **두 가지를 뭉쳤다**: 가드가 fail-closed 인 것은 맞지만 **신선 설치에서 그 가드를
@@ -95,6 +113,18 @@ ACCEPTED_ABSENT=(
95
113
  # ⚠️ **남은 갭을 이름으로**: 소비자는 자기 install 의 soul 다리를 검증할 레인을 못 받는다.
96
114
  # `test_hook_leg_wiring_lanes.sh` 는 원리상 등록부 없이도 돌 수 있어야 하고(호출부만 보므로),
97
115
  # 그렇게 고치면 이 목록에서 빼는 것이 맞다. 오늘은 안 고쳤다 — 미측정이 아니라 미착수다.
116
+ # 🟥 pipefail 클래스 스캐너 + 그 레인 — **일부러 출하하지 않는다.**
117
+ # ⓐ 레인 L12c 가 `changed` 모드를 돌리는데 그건 **git 레포 + `origin/main` 기준선**을
118
+ # 요구한다. 소비자 install(추출된 tarball·git 아님)에서는 계기 오류로 죽고, 그건
119
+ # 신선 설치의 selfcheck 를 막는 형태다 — `sim_isolated_run.sh` 를 안 싣는 것과 같은 이유다.
120
+ # ⓑ 스캐너의 «레포 부채 113 곳» 기준선은 **이 레포의 사실**이지 소비자의 사실이 아니다.
121
+ # 남의 레포 숫자를 우리 기준으로 렌더하면 그건 판정이 아니라 오표기다.
122
+ # ⓒ selfcheck 쪽 배선은 `_absent_subject_verdict` 를 타므로, 미출하 + 부재 = **SKIP**(통과)다.
123
+ # 즉 소비자는 이 레그를 조용히 건너뛰고, 이 레포에서는 실제로 돈다.
124
+ # ⚠️ 남은 갭을 이름으로: 그 SKIP 규약 때문에 **이 레포에서 스캐너를 지워도 selfcheck 가
125
+ # 안 짖는다**(미출하 subject 공통 한계). 삭제를 잡는 것은 `lane_runner_check.sh` 쪽이다.
126
+ "scripts/pipefail_earlyexit_scan.sh"
127
+ "scripts/test_pipefail_class_lock_lanes.sh"
98
128
  "scripts/test_marker_soul_tenet_lanes.sh"
99
129
  "scripts/test_hook_leg_wiring_lanes.sh"
100
130
  "scripts/soul_trace.sh"
@@ -135,6 +165,10 @@ ACCEPTED_ABSENT=(
135
165
  # sibling directly above: it exercises scripts/sync-to-be.sh, itself ACCEPTED_ABSENT — a lane
136
166
  # suite for a script that never ships has nothing to verify on a consumer's machine either.
137
167
  "scripts/sync_to_be_lanes.sh"
168
+ # 2026-09-21 — 그 포워드 레인의 «형태» 앵커(pipefail × 조기종료 소비자 × 64 KiB 파이프 버퍼).
169
+ # 판정 대상이 scripts/sync_to_be_lanes.sh 이고 그 자신이 바로 위에서 ACCEPTED_ABSENT 다.
170
+ # 안 나가는 레인의 앵커를 소비자 트리에 실어 보내면 잴 것이 없는 검사를 하나 더 주는 셈이다.
171
+ "scripts/test_pipefail_sigpipe_lanes.sh"
138
172
  # NOTE (2026-08-29): `scripts/fh_hub_identity.sh` USED to sit here, with a comment saying it had
139
173
  # been removed from files[] on 2026-08-15 as a confidentiality misclassification. Both halves are
140
174
  # now stale: #484 deliberately put it BACK in files[] (without it, `fh_session_load.sh`'s hub-
@@ -402,6 +402,24 @@ else
402
402
  fail=1
403
403
  fi
404
404
 
405
+ # count_check's COUNT DECLARATION parser — the sweep reads "N skills"/"N agents" out of a plugin
406
+ # description and compares it to disk. #768 shipped that sweep and wrote its own residual down:
407
+ # «순회는 description 의 첫 N skills 패턴만 읽는다 — 과탐/미탐 방향 미측정». Both were measured
408
+ # 2026-09-21 and both were real: a stale declaration masked by an earlier prose number went GREEN
409
+ # (false PASS, the #763/#768 substring class a third time), and `M1/M2/M3 skill tier map` — live
410
+ # in marketplace.json — was read AS a declaration (false FAIL). Without this anchor the "모호≠통과"
411
+ # branch and the boundary can both be deleted with every gate still green.
412
+ if [ ! -f scripts/count_check.sh ]; then
413
+ _absent_subject_verdict "count_check declaration lanes" "scripts/count_check.sh" || fail=1
414
+ elif [ -f scripts/test_count_check_decl_lanes.sh ]; then
415
+ if ! bash scripts/test_count_check_decl_lanes.sh; then
416
+ fail=1
417
+ fi
418
+ else
419
+ echo "FAIL count_check declaration lanes: count_check.sh present but its anchor is missing"
420
+ fail=1
421
+ fi
422
+
405
423
  # The public-surface scanner's SINGLE-FILE and MISUSE paths. Same subject-present/anchor-gone shape:
406
424
  # the scanner is a fail-closed gate on an irreversible surface, and its failure mode is a green that
407
425
  # was never earned — a misuse, an unloaded pattern set, or dead plumbing all used to render as clean.
@@ -449,6 +467,29 @@ else
449
467
  fail=1
450
468
  fi
451
469
 
470
+ # policy-lens scorer — the known-pair that decides whether a blind sim's numbers may be trusted.
471
+ # 🟥 Wired here because the gate caught it MENTION_ONLY: the scorer shipped with its own
472
+ # --selftest and no runner surface ever dispatched it, so «the suite is green» said nothing
473
+ # about this file. That is the same shape the scorer itself was fixed for on 2026-09-21
474
+ # (a zero-row run reporting rc=0). A calibration nobody runs is not a calibration.
475
+ if [ ! -f scripts/score_policy_lens.sh ]; then
476
+ _absent_subject_verdict "policy-lens scorer lanes" "scripts/score_policy_lens.sh" || fail=1
477
+ elif [ -f scripts/test_policy_lens_scorer_lanes.sh ]; then
478
+ # direct dispatch of the subject's own known pair (caller surface), then the lane suite —
479
+ # P2 there is the load-bearing one: it re-scores the COMMITTED round-1 runs and demands the
480
+ # recorded SCORES.tsv byte-for-byte, so a scorer change cannot silently restate a published
481
+ # number. P3 is P2's control (one tampered cell must turn it red).
482
+ if ! bash scripts/score_policy_lens.sh --selftest >/dev/null 2>&1; then
483
+ echo "FAIL policy-lens scorer selftest: known-pair calibration failed"; fail=1
484
+ fi
485
+ if ! bash scripts/test_policy_lens_scorer_lanes.sh; then
486
+ fail=1
487
+ fi
488
+ else
489
+ echo "FAIL policy-lens scorer lanes: script present but its anchor is missing"
490
+ fail=1
491
+ fi
492
+
452
493
  # gate-shape classifier — the mechanical half of the unmapped-file trigger of the Field-Harness
453
494
  # Load-Bearing Change Gate (2026-09-08). A classifier of scope, not a verdict; its lane holds the
454
495
  # known-pair (exposure/verdict positives · util/comment negatives · Promise reject( FP anchor).
@@ -467,6 +508,124 @@ else
467
508
  fail=1
468
509
  fi
469
510
 
511
+ # pipefail 조기종료 클래스 잠금 (2026-09-21) — #785 가 한 자리를 고쳤고, 그 파일에 같은 형태가
512
+ # **아직 셋** 남아 있었다(sync_to_be_lanes.sh:153·571·599, 생산자도 같은 `_sync_src`). 목록형
513
+ # 잠금이 왜 안 되는지의 실물 증거다. 🟥 이 스캐너는 «레포 전체 0» 을 요구하지 않는다 — 오늘
514
+ # 113 곳이라 그건 만족 불가능한 요구이고 override 훈련이다(§Mechanization Boundary). 잠그는
515
+ # 것은 **이 변경이 새 사례를 들여오는가 = 0** 이다. 여기서는 그 계기가 살아 있는지만 본다.
516
+ if [ ! -f scripts/pipefail_earlyexit_scan.sh ]; then
517
+ _absent_subject_verdict "pipefail class-lock lanes" "scripts/pipefail_earlyexit_scan.sh" || fail=1
518
+ elif [ -f scripts/test_pipefail_class_lock_lanes.sh ]; then
519
+ # 🟥 출력을 삼키지 마라. 초판은 둘 다 `>/dev/null 2>&1` 이었고, CI 에서 빨개졌을 때
520
+ # «known-pair calibration failed» 한 줄만 남아 **어느 팔이 깨졌는지 알 수 없었다.**
521
+ # 실패는 시끄러워야 한다 — 진단을 지우면 재현이 한 라운드씩 늘어난다.
522
+ _pf_out="$(bash scripts/pipefail_earlyexit_scan.sh --self-test 2>&1)" || {
523
+ echo "FAIL pipefail class-lock selftest: known-pair calibration failed"
524
+ printf '%s\n' "$_pf_out" | sed 's/^/ /'
525
+ fail=1
526
+ }
527
+ # 🟥 **rc=1(실패)과 rc=2(계기 오류)를 갈라서 받는다.** 스위트 계약이 `0 통과 · 1 실패 ·
528
+ # 2 팔 하나 이상 UNMEASURED` 인데, 초판은 `||` 로 둘을 같은 값으로 읽었다.
529
+ # 실측 2026-09-21: 런타임 프로브의 한 표기(`… | awk "/NEEDLE/{exit}"`)가 **맥에서 5/5,
530
+ # 리눅스 mawk 에서 0/5** 다. 그건 이 레포의 결함이 아니라 «이 환경에서 그 결함을 만들 수
531
+ # 없다» 는 사실이고, FAIL 로 렌더하면 리눅스 CI 가 영구 빨강이 된다.
532
+ # ⇒ rc=2 는 **시끄럽게 표면화하되 막지 않는다**(커밋은 가역 표면이고, 이 저장소가
533
+ # `portability_lint`·①-b 에 쓰는 것과 같은 형태다). 🟥 «통과» 로 접지는 않는다 —
534
+ # 줄이 남고, 무엇이 미측정인지 이름이 찍힌다.
535
+ _pf_out="$(bash scripts/test_pipefail_class_lock_lanes.sh 2>&1)"; _pf_rc=$?
536
+ case "$_pf_rc" in
537
+ 0) : ;;
538
+ 2) echo "⚠️ pipefail class-lock lanes: 팔 하나 이상 UNMEASURED (계기 오류 — 통과 아님, 막지도 않음)"
539
+ printf '%s\n' "$_pf_out" | grep -E '^ ⬜' | sed 's/^/ /' ;;
540
+ *) echo "FAIL pipefail class-lock lanes (rc=$_pf_rc)"
541
+ printf '%s\n' "$_pf_out" | grep -vE '^ ✅' | sed 's/^/ /'
542
+ fail=1 ;;
543
+ esac
544
+ else
545
+ echo "FAIL pipefail class-lock: scanner present but its anchor is missing"
546
+ fail=1
547
+ fi
548
+
549
+ # 휘발 클론 부트스트랩 (2026-09-21 신설) — 클라우드 컨테이너처럼 훅·기록·패턴 층이 없는
550
+ # 체크아웃에서 «무엇을 세울 수 있고 무엇이 구조적으로 못 서는가»를 가르는 계기. 게이트가
551
+ # 아니라 계기다(어떤 훅도 안 부른다) — 그래서 앵커는 여기 하나뿐이고, 레인이 안 돌면 이
552
+ # 스크립트는 그냥 산문이 된다. 레인의 하중 지는 자리는 L8 «증거를 안 만든다»: 마커를
553
+ # 자동 생성하는 부트스트랩은 4축을 가짜로 닫는 것이고 fh_4axis_gate.md 가 금지한다.
554
+ if [ ! -f scripts/gate_bootstrap_ephemeral.sh ]; then
555
+ _absent_subject_verdict "ephemeral-bootstrap lanes" "scripts/gate_bootstrap_ephemeral.sh" || fail=1
556
+ elif [ -f scripts/test_gate_bootstrap_ephemeral_lanes.sh ]; then
557
+ # 주체의 자기 known-pair 를 먼저 직접 부른다(계기 교정), 그다음 레인.
558
+ # 🟥 rc=1 은 «이 기계에 UTF-8 로케일이 없다»는 정직한 미측정이므로 실패로 치지 않는다.
559
+ # 계기 고장(rc=10)만 실패다 — 못 잰 것과 고장난 것은 다른 명제다.
560
+ _gbe_rc=0
561
+ bash scripts/gate_bootstrap_ephemeral.sh --selftest >/dev/null 2>&1 || _gbe_rc=$?
562
+ if [ "$_gbe_rc" = "10" ]; then
563
+ echo "FAIL ephemeral-bootstrap selftest: 계기 오류(wc -w 컨트롤 사망)"; fail=1
564
+ elif [ "$_gbe_rc" != "0" ]; then
565
+ # rc=1 은 「못 쟀다」가 아니라 **측정된 결함**이다 — 이 기계에서 정직한 한글이 훅의
566
+ # 비공허성 바닥을 못 넘는다(LC_CTYPE). 수리는 PR #780. 여기서 FAIL 로 안 올리는 이유는
567
+ # 환경 조건이지 이 레포의 회귀가 아니어서다 — 과차단은 override 를 훈련시킨다.
568
+ echo "WARN ephemeral-bootstrap selftest: 정직한 한글이 비공허성 바닥을 못 넘는다(LC_CTYPE) — 한국어 마커가 차단된다"
569
+ fi
570
+ if ! bash scripts/test_gate_bootstrap_ephemeral_lanes.sh >/dev/null; then
571
+ echo "FAIL ephemeral-bootstrap lanes"; fail=1
572
+ fi
573
+ else
574
+ echo "FAIL ephemeral-bootstrap lanes: gate_bootstrap_ephemeral.sh present but its anchor is missing"
575
+ fail=1
576
+ fi
577
+
578
+ # env-layer fingerprint — 두 체크아웃(운영자 맥 ↔ 클라우드 클론)의 **층 대조**를 가능하게 하는
579
+ # 계기. 게이트가 아니라 계기이므로 어떤 훅도 이걸 부르지 않는다 — 그래서 앵커는 여기 하나뿐이고,
580
+ # 레인이 안 돌면 이 스크립트는 그냥 산문이 된다(lane_runner_check.sh 가 세는 클래스).
581
+ if [ ! -f scripts/env_layer_fingerprint.sh ]; then
582
+ _absent_subject_verdict "env-layer lanes" "scripts/env_layer_fingerprint.sh" || fail=1
583
+ elif [ -f scripts/test_env_layer_fingerprint_lanes.sh ]; then
584
+ # 주체의 자기 known-pair 를 먼저 직접 부른다(계기 교정), 그다음 레인.
585
+ if ! bash scripts/env_layer_fingerprint.sh --selftest >/dev/null 2>&1; then
586
+ echo "FAIL env-layer selftest: known-pair calibration failed"; fail=1
587
+ fi
588
+ if ! bash scripts/test_env_layer_fingerprint_lanes.sh >/dev/null; then
589
+ echo "FAIL env-layer lanes"; fail=1
590
+ fi
591
+ else
592
+ echo "FAIL env-layer lanes: env_layer_fingerprint.sh present but its anchor is missing"
593
+ fail=1
594
+ fi
595
+
596
+ # locale-invariance — 같은 마커를 두 로케일에서 읽었을 때 판정이 같은가. 훅의 비공허성 바닥과
597
+ # 「①영혼 복붙」 검출이 `LC_CTYPE` 에 의존했다(2026-09-21, 갓 클론한 컨테이너에서 실측: 마커
598
+ # 레인 22건이 `LC_ALL` 만으로 뒤집혔고, 방향이 과차단·무음침묵·fail-OPEN 셋이었다).
599
+ # 🟥 UTF-8 로케일이 없는 기계에서는 rc=2 다 — 대조군 없는 초록은 측정이 아니므로 FAIL 로 센다.
600
+ if [ ! -f scripts/test_locale_invariance_lanes.sh ]; then
601
+ echo "FAIL locale-invariance lanes: scripts/test_locale_invariance_lanes.sh 가 없다 (부재는 통과가 아니다)"
602
+ fail=1
603
+ elif ! bash scripts/test_locale_invariance_lanes.sh >/dev/null 2>&1; then
604
+ echo "FAIL locale-invariance lanes"
605
+ fail=1
606
+ fi
607
+
608
+ # multibyte-bracket lint — 열거로는 안 닫힌다. POSIX 브래킷은 비-UTF-8 로케일에서 바이트
609
+ # 집합이 되고, 방향은 자리마다 다르다(2026-09-21 실측: fail-OPEN 둘 · 과차단 하나).
610
+ # 전수를 세려던 첫 계기가 11 중 1 을 놓쳤기 때문에 사람의 열거도 자동 열거도 믿지 않는다.
611
+ # 린트는 매 호출마다 known-pair 로 자가검정하고 그게 안 갈리면 rc=2 로 죽는다 — 여기서는 둘 다 FAIL 이다.
612
+ if [ ! -f scripts/multibyte_bracket_lint.sh ]; then
613
+ echo "FAIL multibyte-bracket lint: scripts/multibyte_bracket_lint.sh 가 없다 (부재는 통과가 아니다)"
614
+ fail=1
615
+ elif ! bash scripts/multibyte_bracket_lint.sh >/dev/null 2>&1; then
616
+ echo "FAIL multibyte-bracket lint (게이트 파일의 브래킷 안에 멀티바이트, 또는 자가검정 실패)"
617
+ fail=1
618
+ fi
619
+ # 그리고 린트 자신의 앵커. 내장 `_calibrate` 는 린트 파일 안에 살아서 정규식이 약해져도
620
+ # 자기 픽스처는 통과할 수 있다 — 이 스위트는 **실물 훅의 사본을 되돌려** 잡히는지를 본다.
621
+ if [ ! -f scripts/test_multibyte_bracket_lint_lanes.sh ]; then
622
+ echo "FAIL multibyte-bracket lint lanes: scripts/test_multibyte_bracket_lint_lanes.sh 가 없다 (부재는 통과가 아니다)"
623
+ fail=1
624
+ elif ! bash scripts/test_multibyte_bracket_lint_lanes.sh >/dev/null 2>&1; then
625
+ echo "FAIL multibyte-bracket lint lanes"
626
+ fail=1
627
+ fi
628
+
470
629
  # package-coverage — a shipped doc must not point at a file the tarball omits. Distinct from the
471
630
  # ref-path check below: that one asks "does this path exist at all", this one asks "does the
472
631
  # CONSUMER get it". Measured 2026-07-28: 35 paths existed, were named by a shipped doc, and were
@@ -695,6 +854,8 @@ for _pair in \
695
854
  "scripts/fixture_guard_lib.sh|scripts/test_fixture_guard_lanes.sh" \
696
855
  "scripts/stray_path_scan.sh|scripts/test_stray_path_lanes.sh" \
697
856
  "scripts/session_close_check.sh|scripts/test_stray_path_lanes.sh" \
857
+ `# ── ①-g stale-ref (2026-09-21 신설) — #773 이 「배선 안 함」이라 적은 자리의 호출부. SUBJECT 는 스캐너가 아니라 «마감 블록»이다: 스캐너 자체는 test_stale_ref_scan_lanes.sh 가 이미 앵커한다 ──` \
858
+ "scripts/session_close_check.sh|scripts/test_stale_ref_close_lanes.sh" \
698
859
  `# 티키타카 채점기 (2026-09-19 신설) — 다중턴 sim 의 «수렴/반영» 을 채점한다. 러너(--turns)는 있었고 채점기가 0줄이었다.` \
699
860
  "scripts/tikitaka_score.py|scripts/test_tikitaka_score_lanes.sh" \
700
861
  `# 체크리스트 unblocked (2026-09-19 신설) — 막혀 있던 행의 블로커가 DONE 이 됐는데 그 행이 안 움직였나.
@@ -706,8 +867,16 @@ for _pair in \
706
867
  "docs/map/fh_assets.architecture.json|scripts/test_fh_map_paths_lanes.sh" \
707
868
  `# ── 지도 후처리(2026-09-06): 발행 폭 하한 + SVG 재생성. 리터럴 드리프트를 fail-closed 로 잡는다 ──` \
708
869
  "scripts/map_postprocess.py|scripts/test_map_postprocess_lanes.sh" \
870
+ `# ── 지도 «깜빡임» 실물 렌더(2026-09-21): 위 줄은 억제 코드가 **문서에 있나**를 본다. 이 줄은 그것이 **실제 렌더에서 듣나**를 본다 — 첫 페인트 프레임과 헤더 점의 픽셀. 브라우저가 없는 머신에서는 레인이 NOT MEASURED 로 크게 적고 rc=0 으로 끝난다(되돌릴 수 있는 표면이라 advisory 로 떨어뜨린다) ──` \
871
+ "scripts/map_flash_render_probe.js|scripts/test_map_flash_render_lanes.sh" \
872
+ `# ── 휘도계(2026-09-21): 위 레인의 «눈» 이다. 브라우저 뒤에 숨기면 브라우저 없는 머신(= CI)에서 앵커가 통째로 죽으므로 자기 레인으로 분리한다 — 표준 라이브러리 전용이라 어디서든 돈다 ──` \
873
+ "scripts/png_luma.py|scripts/test_png_luma_lanes.sh" \
709
874
  `# ── 플로어 없는 채널(2026-09-14): 원격 자율 노드가 FH 자산을 바꾸면 마커가 tracks/ 와 함께 휘발한다. 실측 2/2(#675·#716). CI 가 gitignored 마커를 구조적으로 못 보므로, 그 채널에만 «마커가 커밋 기록에 실려 왔나» 를 건다 ──` \
710
875
  "scripts/remote_marker_gate.sh|scripts/test_remote_marker_gate_lanes.sh" \
876
+ `# ── pipefail × 조기종료 소비자 × 64 KiB 파이프 버퍼(2026-09-21): 「생산자 | grep -q」 는 **찾았을 때만** 거짓 빨강을 낸다. 실사고 = PR #782 의 validate 가 같은 커밋에서 push 초록·pull_request 빨강으로 갈렸다. known-positive 가 결정적이라 확률 레인이 아니다 ──` \
877
+ "scripts/sync_to_be_lanes.sh|scripts/test_pipefail_sigpipe_lanes.sh" \
878
+ `# ── 휘발 클론 부트스트랩(2026-09-21): 훅이 안 걸린 클론에서 커밋은 무음으로 성공한다. SUBJECT 는 그 계기의 판정과 **부작용 부재**다 ──` \
879
+ "scripts/gate_bootstrap_ephemeral.sh|scripts/test_gate_bootstrap_ephemeral_lanes.sh" \
711
880
  `# ── 발신 전 3프로브(2026-09-18): 비소유 레포에 PR 을 «열기 직전» 에 건다. 실측 — outbound 9건 중 기술 결함 지적 3건이 전부 같은 형태다: 우리 가드와 우리 테스트가 «대상의 모형» 위에서 돌았고, 메인테이너의 증거는 우리가 한 번도 안 돌린 실행이었다 ──` \
712
881
  "scripts/outbound_pr_gate.sh|scripts/test_outbound_pr_gate_lanes.sh" \
713
882
  `# ── 발행 «확인» 예산(2026-09-18): npm publish 는 이미 rc=0 으로 끝났고 이 스크립트는 전파만 관측한다. 둘을 한 종료코드로 접으면 성공한 발행이 빨간 잡이 되고, 그 빨강이 정확히 «손 발행» 을 훈련시킨다(v3.2.0·v3.4.0) ──` \
@@ -1354,6 +1523,22 @@ else
1354
1523
  fi
1355
1524
  fi
1356
1525
 
1526
+ # governor_board — 거버너/워크트리/계열 판. 자기검사 24 레인(known-pair 중심).
1527
+ # 🟥 이 계기의 핵심 known-pair 는 «마커 있음 → 계열이 나온다» ↔ «마커 없음 → 미측정» 이다.
1528
+ # 그 둘이 같은 글자로 나오면 판은 측정이 아니라 생성이고, 사람이 그걸 읽고 판단한다.
1529
+ # subject 있는데 anchor 없으면 FAIL 이지 skip 이 아니다.
1530
+ if [ ! -f scripts/governor_board.sh ]; then
1531
+ _absent_subject_verdict "governor_board --self-test" "scripts/governor_board.sh" || fail=1
1532
+ else
1533
+ if ! bash scripts/governor_board.sh --self-test >/dev/null 2>&1; then
1534
+ echo "FAIL governor_board --self-test"
1535
+ bash scripts/governor_board.sh --self-test 2>&1 | grep '❌' | head -5
1536
+ fail=1
1537
+ else
1538
+ echo "PASS governor_board --self-test (24 lanes)"
1539
+ fi
1540
+ fi
1541
+
1357
1542
  # launchd_wiring_check — 주기 실행(frontier-digest)이 실제로 배선됐나. 자기검사 10 레인.
1358
1543
  # 🟥 이 검사가 없던 동안, 추적본 plist 는 «템플릿»(/path/to/ 플레이스홀더)인데 «바꿨는지»도
1359
1544
  # «걸렸는지»도 보는 것이 0개였다. 소비자는 digest 가 돈다고 믿으면서 한 번도 안 도는 상태로
@@ -2240,6 +2425,66 @@ else
2240
2425
  echo "SKIP ref-path (package mode: no .git at package root — source-tree-only check)"
2241
2426
  fi
2242
2427
 
2428
+ # ── .claude/rules 아래 dotfile 은 tracked 이거나 ignored 여야 한다 (둘 다 아님 = 유출 상태) ──
2429
+ # 그 자리의 dotfile 은 «리터럴은 gitignored 소스에만» 규약을 쓰는 운영자-사설 파일들이다
2430
+ # (.public-surface-patterns · .residency-patterns · .owned-owners). 🟥 **같은 누락이 두 번 났다**:
2431
+ # .residency-patterns 가 2026-08-09 스윕에서 발견됐고(.gitignore:23-26 이 그 경위를 적고 있다),
2432
+ # .owned-owners 가 2026-09-21 에 같은 모양으로 또 빠졌다. untracked 는 ignored 가 아니라서
2433
+ # 누가 `git add -A` 하면 공개 레포로 그대로 간다. 이름을 하나씩 세는 대신 **자리**를 검사한다 —
2434
+ # 다음 형제는 추가되는 순간 여기서 잡힌다.
2435
+ # 🟥 판별식은 «ignored 인가»가 아니라 **«tracked 도 ignored 도 아닌가»** 다. 같은 자리의
2436
+ # `.public-surface-patterns.defaults` · `.residency-patterns.defaults` 는 **일부러 tracked**
2437
+ # 이고 package.json files[] 로 출하된다(소비자가 받는 기본 패턴). 초판은 «전부 ignored» 로
2438
+ # 썼고 깨끗한 트리에서 그 둘에 FAIL 을 냈다 — 과차단은 override 를 훈련시키므로 결함이다.
2439
+ # 남는 한 칸 «tracked 도 ignored 도 아님» 이 정확히 유출 상태다.
2440
+ if [ -e .git ]; then
2441
+ # 🟥 «디렉터리가 없다»와 «있는데 비었다»를 한 칸으로 접지 않는다 — find 는 둘 다 빈 출력이다.
2442
+ # 앞은 계기 오류(이 검사가 겨눌 자리가 없다), 뒤는 소비자 설치의 정상 상태다.
2443
+ if [ ! -d .claude/rules ]; then
2444
+ echo "SKIP rules-dotfile: .claude/rules 디렉터리 자체가 없다 — 측정 불가(깨끗함 아님)"
2445
+ _rules_dot=""
2446
+ else
2447
+ _rules_dot=$(find .claude/rules -maxdepth 1 -type f -name '.*' 2>/dev/null | sed 's#^\./##')
2448
+ fi
2449
+ if [ ! -d .claude/rules ]; then
2450
+ :
2451
+ elif [ -z "$_rules_dot" ]; then
2452
+ echo "SKIP rules-dotfile: .claude/rules 에 dotfile 이 없다 (소비자 설치의 정상 상태)"
2453
+ else
2454
+ # 알려진 음성 — 이 검사가 «무엇이든 ignored 라고 말하는» 계기가 아님을 보인다.
2455
+ if git check-ignore -q ".claude/rules/__selfcheck_probe_not_ignored" 2>/dev/null; then
2456
+ echo "FAIL rules-dotfile: INSTRUMENT ERROR — 존재하지 않는 비-dotfile 도 ignored 라고 한다"
2457
+ fail=1
2458
+ else
2459
+ while IFS= read -r p; do
2460
+ [ -z "$p" ] && continue
2461
+ if git check-ignore -q "$p" 2>/dev/null; then
2462
+ echo "PASS rules-dotfile (ignored): $p"
2463
+ elif git ls-files --error-unmatch "$p" >/dev/null 2>&1; then
2464
+ # 🟥 «tracked 면 통과»로 두면 사고가 자기를 사면한다 — .owned-owners 가 실수로 한 번
2465
+ # 커밋되는 순간 이 레인이 영구히 초록이 된다. 그래서 tracked 가 정당한 경우를
2466
+ # **이름으로** 좁힌다: 출하되는 기본값은 `.defaults` 로 끝난다(package.json files[]).
2467
+ case "$p" in
2468
+ *.defaults) echo "PASS rules-dotfile (tracked — shipped defaults): $p" ;;
2469
+ *) echo "FAIL rules-dotfile: $p — tracked 인데 \`.defaults\` 가 아니다. 운영자-사설"
2470
+ echo " 파일이 커밋된 상태일 수 있다. 의도한 출하면 이름을 .defaults 로, 아니면"
2471
+ echo " \`git rm --cached\` 후 .gitignore 에 줄을 추가해라"
2472
+ fail=1 ;;
2473
+ esac
2474
+ else
2475
+ echo "FAIL rules-dotfile: $p — tracked 도 ignored 도 아니다. \`git add -A\` 한 번이면"
2476
+ echo " 공개 레포로 간다. 출하할 기본값이면 커밋하고, 운영자-사설이면 .gitignore 에 줄을 추가해라"
2477
+ fail=1
2478
+ fi
2479
+ done <<RULESDOT
2480
+ $_rules_dot
2481
+ RULESDOT
2482
+ fi
2483
+ fi
2484
+ else
2485
+ echo "SKIP rules-dotfile (package mode: .git 없음 — 소스 트리 전용 검사)"
2486
+ fi
2487
+
2243
2488
  if [ "$fail" -ne 0 ]; then
2244
2489
  echo "SELFCHECK: FAIL"
2245
2490
  exit 1