@chrono-meta/fh-gate 2.12.1 → 2.14.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.
- package/.claude/rules/fh_4axis_gate.md +35 -1
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +17 -0
- package/CHEATSHEET.md +19 -1
- package/CLAUDE.md +34 -9
- package/README.ja.md +186 -649
- package/README.ko.md +207 -698
- package/README.md +186 -698
- package/README.zh.md +167 -601
- package/docs/ETHOS.md +73 -1
- package/docs/IDENTITIES.md +83 -0
- package/docs/MODEL_SETUP.md +111 -0
- package/docs/OUTPUT_EVIDENCE.md +10 -2
- package/knowledge/shared/harness-core/fh_detail_protocols.md +131 -1
- package/knowledge/shared/harness-core/fh_three_layer_canon.md +15 -0
- package/knowledge/shared/harness-core/field_harness_diagnostic.md +30 -0
- package/knowledge/shared/harness-core/gate_locality_principle.md +29 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +80 -0
- package/knowledge/shared/harness-core/ship_readiness_gate.md +103 -15
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +120 -0
- package/knowledge/shared/rules/multi_session_close_protocol.md +7 -1
- package/package.json +22 -2
- package/plugins/fh-commons/.claude-plugin/plugin.json +2 -2
- package/plugins/fh-commons/skills/preprep/README.md +45 -0
- package/plugins/fh-commons/skills/preprep/SKILL.md +214 -0
- package/plugins/fh-commons/skills/preprep/canon_terms.example.yaml +36 -0
- package/plugins/fh-commons/skills/preprep/fixtures/adjdup_known_negative.md +7 -0
- package/plugins/fh-commons/skills/preprep/fixtures/adjdup_known_positive.md +8 -0
- package/plugins/fh-commons/skills/preprep/fixtures/progression_known_negative.md +13 -0
- package/plugins/fh-commons/skills/preprep/fixtures/progression_known_positive.md +13 -0
- package/plugins/fh-commons/skills/preprep/fixtures/promise_known_negative.md +9 -0
- package/plugins/fh-commons/skills/preprep/fixtures/promise_known_positive.md +7 -0
- package/plugins/fh-commons/skills/preprep/interslide_deps.py +223 -0
- package/plugins/fh-commons/skills/preprep/jargon_terms.example.yaml +40 -0
- package/plugins/fh-commons/skills/preprep/lane_adjacent_dup.py +86 -0
- package/plugins/fh-commons/skills/preprep/lane_progression.py +81 -0
- package/plugins/fh-commons/skills/preprep/lane_promise.py +121 -0
- package/plugins/fh-commons/skills/preprep/ooxml/c1_baseline.txt +12 -0
- package/plugins/fh-commons/skills/preprep/ooxml/gate.py +164 -0
- package/plugins/fh-commons/skills/preprep/preprep.py +776 -0
- package/plugins/fh-commons/skills/preprep/presentation_checklist.md +310 -0
- package/plugins/fh-commons/skills/preprep/surfaces.example.yaml +148 -0
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +150 -0
- package/plugins/fh-meta/skills/install-wizard/SKILL.md +39 -0
- package/scripts/activity_log.sh +144 -0
- package/scripts/com.forge-harness.daily-report.plist +44 -0
- package/scripts/context_continuity_score.sh +435 -0
- package/scripts/daily_report.sh +208 -0
- package/scripts/digest_landing_check.sh +71 -0
- package/scripts/fh_session_load.sh +71 -2
- package/scripts/field_canon_preload.sh +44 -0
- package/scripts/gate_pathspec_check.sh +10 -4
- package/scripts/lane_runner_check.sh +34 -1
- package/scripts/launchd_wiring_check.sh +182 -0
- package/scripts/mapped_tracks.sh +69 -0
- package/scripts/package_coverage_check.sh +28 -11
- package/scripts/portability_lint.sh +30 -0
- package/scripts/selfcheck.sh +98 -1
- package/scripts/sim_isolated_run.sh +339 -0
- package/scripts/test_heavy_classifier_lanes.sh +4 -1
- package/scripts/test_lane_runner_lanes.sh +75 -0
- package/scripts/test_mapped_tracks_lanes.sh +58 -0
- package/scripts/test_marker_address_lanes.sh +78 -0
- package/scripts/test_marker_soul_check_lanes.sh +36 -0
- package/scripts/test_precommit_staged_drift_lanes.sh +91 -0
- package/scripts/test_preprep_adjacent_dup_lanes.sh +57 -0
- package/scripts/test_preprep_drift_anchor.sh +65 -0
- package/scripts/test_preprep_progression_lanes.sh +53 -0
- package/scripts/test_preprep_promise_lanes.sh +56 -0
- package/scripts/test_preprep_retired_lanes.sh +54 -0
- package/scripts/test_sim_isolated_run_lanes.sh +219 -0
- package/scripts/test_skill_canon_preload_lanes.sh +58 -0
- package/scripts/universal_guard_check.sh +20 -8
- package/templates/.git-hooks/pre-commit +465 -8
- package/templates/regression_guard.sh +40 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# daily_report.sh — 어제 무엇을 했는지 **LLM 없이** 집계한다.
|
|
3
|
+
#
|
|
4
|
+
# ── 왜 (복원 기록) ──
|
|
5
|
+
# 이 스크립트는 2026-08-29 에 한 번 돌아 `tracks/_meta/daily_report_2026-08-28.md` 를 냈고,
|
|
6
|
+
# 그 뒤 **사라졌다** — git 이력에 추가된 적이 없고(`--diff-filter=A --all` 0건) plist 도
|
|
7
|
+
# 설치돼 있지 않았다. 그런데 운영자의 로컬 바인딩은 「매일 07:30 launchd」로 적어두고 있었다.
|
|
8
|
+
# 🟥 **규칙이 자기 기계를 잘못 서술하는** 형태다(`[[feedback_rule_misdescribes_its_own_machine]]`).
|
|
9
|
+
# `launchd_wiring_check.sh` 를 지은 날 그 검사가 이걸 찾아냈다. 이 파일은 그 복원이고,
|
|
10
|
+
# 명세는 둘에서 왔다 — 운영자 바인딩(집계 대상·경로·오버라이드)과 **살아남은 산출물 1건**(포맷).
|
|
11
|
+
#
|
|
12
|
+
# ── 하는 것 / 안 하는 것 ──
|
|
13
|
+
# ✅ `~/projects/*` 의 git 레포에서 **어제 하루** 본인 커밋을 모은다 (LLM 호출 0)
|
|
14
|
+
# ✅ 그날의 `tracks/_meta/fh_completed_<날짜>.md` 를 통째로 싣는다
|
|
15
|
+
# 🟥 판단하지 않는다. 요약하지 않는다. **집계만** 한다 — 판단이 섞이면 그날의 기록이 아니라
|
|
16
|
+
# 그날에 대한 «해석»이 되고, 나중에 인용할 때 무엇이 사실인지 안 갈린다.
|
|
17
|
+
#
|
|
18
|
+
# ── 멱등 ──
|
|
19
|
+
# 「어제」는 **실행 시각 기준으로 매번 재계산**한다. 같은 날 여러 번 돌려도 같은 파일을
|
|
20
|
+
# 덮어쓸 뿐이다. 그래서 재실행이 안전하고, launchd 가 밀린 잡을 깨어나서 돌려도 문제없다.
|
|
21
|
+
#
|
|
22
|
+
# ── 사용 ──
|
|
23
|
+
# bash scripts/daily_report.sh # 어제분
|
|
24
|
+
# DR_DATE=2026-08-28 bash scripts/daily_report.sh # 특정 날짜(테스트/보정)
|
|
25
|
+
# DR_AUTHOR=<email> bash scripts/daily_report.sh # author 필터 오버라이드
|
|
26
|
+
# bash scripts/daily_report.sh --self-test
|
|
27
|
+
|
|
28
|
+
set -uo pipefail
|
|
29
|
+
FH="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
|
30
|
+
PROJECTS="${DR_PROJECTS:-$HOME/projects}"
|
|
31
|
+
|
|
32
|
+
# ─────────────────────────────────────────────────────────────────────
|
|
33
|
+
# yesterday — 🟥 date(1) 은 GNU/BSD 가 문법이 다르다. 순서만으로 고치면 플랫폼이 하나 더
|
|
34
|
+
# 늘 때 또 깨지므로, **결과가 YYYY-MM-DD 인지 검증**까지 한다. 못 얻으면 빈 문자열을
|
|
35
|
+
# 돌려주고 호출부가 죽는다 — 틀린 날짜로 조용히 도는 것보다 낫다.
|
|
36
|
+
# (같은 함정을 sync-from-be.sh:116 · digest_landing_check.sh 가 이미 주석으로 남겼다.)
|
|
37
|
+
# ─────────────────────────────────────────────────────────────────────
|
|
38
|
+
yesterday() {
|
|
39
|
+
local d
|
|
40
|
+
d="$(date -v-1d +%Y-%m-%d 2>/dev/null)" || d="" # BSD/macOS
|
|
41
|
+
case "$d" in ????-??-??) printf '%s' "$d"; return 0 ;; esac
|
|
42
|
+
d="$(date -d 'yesterday' +%Y-%m-%d 2>/dev/null)" || d="" # GNU
|
|
43
|
+
case "$d" in ????-??-??) printf '%s' "$d"; return 0 ;; esac
|
|
44
|
+
printf ''
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# author_filter — 누구의 커밋을 모으나.
|
|
48
|
+
# 🟥 **레포 로컬 user.email 이 전역과 다를 수 있다** — 실측 2026-08-30: 이 레포는
|
|
49
|
+
# `test@example.com` 인데 전역은 다른 값이고, 원래 리포트는 전역 쪽으로 걸러져 있었다.
|
|
50
|
+
# 조용히 틀린 사람으로 거르면 「그날 커밋 0건」이 나오고 그건 **미측정을 0 으로 렌더**하는 것이다.
|
|
51
|
+
# 그래서 값을 고르되 **불일치를 헤더에 표면화**한다(고르는 건 기계, 판단은 사람).
|
|
52
|
+
author_filter() {
|
|
53
|
+
[ -n "${DR_AUTHOR:-}" ] && { printf '%s' "$DR_AUTHOR"; return 0; }
|
|
54
|
+
git -C "$FH" config user.email 2>/dev/null || true
|
|
55
|
+
}
|
|
56
|
+
author_note() {
|
|
57
|
+
[ -n "${DR_AUTHOR:-}" ] && { printf 'DR_AUTHOR 지정'; return 0; }
|
|
58
|
+
local loc glob
|
|
59
|
+
loc="$(git -C "$FH" config --local user.email 2>/dev/null || true)"
|
|
60
|
+
glob="$(git config --global user.email 2>/dev/null || true)"
|
|
61
|
+
if [ -n "$loc" ] && [ -n "$glob" ] && [ "$loc" != "$glob" ]; then
|
|
62
|
+
printf '🟥 레포 로컬(%s) ≠ 전역(%s) — 의도한 쪽이 아니면 DR_AUTHOR 로 지정해라' "$loc" "$glob"
|
|
63
|
+
else
|
|
64
|
+
printf '레포 설정'
|
|
65
|
+
fi
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
# repo_commits — 한 레포의 그날 커밋. 없으면 **빈 출력**이고, 호출부가 「없음」을 적는다.
|
|
69
|
+
# 🟥 «커밋 0건»과 «레포가 아님»을 같은 침묵으로 내지 않는다 — 호출부에서 갈라 적는다.
|
|
70
|
+
repo_commits() {
|
|
71
|
+
local repo="$1" day="$2" who="$3"
|
|
72
|
+
# 🟥 `-E` 가 없으면 `--author` 는 **BRE** 라 `|` 가 리터럴이 되고, 여러 신원을 한 필터로
|
|
73
|
+
# 묶으려는 순간 **조용히 0건**이 나온다(실측 2026-08-30: `-E` 117건 vs 기본 0건).
|
|
74
|
+
# 「커밋이 없었다」와 구분이 안 되는 실패라 이 스크립트에서 가장 위험한 자리였다.
|
|
75
|
+
# ⚠️ 컨트롤만 보면 못 잡는다 — 없는 author 는 두 모드 모두 0 을 낸다.
|
|
76
|
+
# known-positive(실재하는 다중 신원)를 같이 재야 갈린다.
|
|
77
|
+
git -C "$repo" log -E --all --no-merges \
|
|
78
|
+
--since="${day} 00:00:00" --until="${day} 23:59:59" \
|
|
79
|
+
${who:+--author="$who"} \
|
|
80
|
+
--pretty=format:' - %h %s (%cr)' 2>/dev/null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
build() {
|
|
84
|
+
local day="$1" out="$2" who; who="$(author_filter)"
|
|
85
|
+
{
|
|
86
|
+
printf '# Daily Report — %s (어제)\n\n' "$day"
|
|
87
|
+
printf '> Generated %s by scripts/daily_report.sh · author filter: %s (%s)\n\n' \
|
|
88
|
+
"$(date '+%Y-%m-%d %H:%M')" "${who:-<없음 — 전체 author>}" "$(author_note)"
|
|
89
|
+
printf '## Git commits\n\n'
|
|
90
|
+
local any=0 d name c
|
|
91
|
+
for d in "$PROJECTS"/*/; do
|
|
92
|
+
[ -d "$d/.git" ] || continue
|
|
93
|
+
name="$(basename "$d")"
|
|
94
|
+
c="$(repo_commits "$d" "$day" "$who")"
|
|
95
|
+
[ -n "$c" ] || continue
|
|
96
|
+
any=1
|
|
97
|
+
printf '### %s\n%s\n\n' "$name" "$c"
|
|
98
|
+
done
|
|
99
|
+
[ "$any" = 1 ] || printf '_그날 %s 명의 커밋이 없다._\n\n' "${who:-(전체)}"
|
|
100
|
+
|
|
101
|
+
local fc="$FH/tracks/_meta/fh_completed_${day}.md"
|
|
102
|
+
printf '## FH 완료 로그 (fh_completed_%s.md)\n\n' "$day"
|
|
103
|
+
if [ -f "$fc" ]; then
|
|
104
|
+
cat "$fc"
|
|
105
|
+
else
|
|
106
|
+
# 🟥 부재를 「한 일이 없다」로 렌더하지 않는다. 파일이 없는 것과 빈 것은 다르다.
|
|
107
|
+
printf '_파일 없음: `tracks/_meta/fh_completed_%s.md` — 기록이 «없다»이지 «일이 없었다»가 아니다._\n' "$day"
|
|
108
|
+
fi
|
|
109
|
+
} > "$out"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
notify() { # best-effort. 실패해도 리포트는 이미 디스크에 있다.
|
|
113
|
+
command -v osascript >/dev/null 2>&1 || return 0
|
|
114
|
+
osascript -e "display notification \"$1\" with title \"FH Daily Report\"" >/dev/null 2>&1 || true
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
self_test() {
|
|
118
|
+
local T; T="$(mktemp -d)" || return 10
|
|
119
|
+
local P=0 F=0
|
|
120
|
+
chk(){ if [ "$2" = "$3" ]; then P=$((P+1)); echo " ✅ $1"; else F=$((F+1)); echo " ❌ $1 (got=$2 want=$3)"; fi; }
|
|
121
|
+
|
|
122
|
+
local y; y="$(yesterday)"
|
|
123
|
+
case "$y" in ????-??-??) chk "L1 yesterday 가 YYYY-MM-DD 를 낸다(플랫폼 무관)" ok ok ;;
|
|
124
|
+
*) chk "L1 yesterday 가 YYYY-MM-DD 를 낸다(플랫폼 무관)" "[$y]" ok ;; esac
|
|
125
|
+
# 컨트롤: 오늘과 «달라야» 한다. 같으면 -v-1d/-d 가 무시된 것이고 그건 조용한 실패다.
|
|
126
|
+
local today; today="$(date +%Y-%m-%d)"
|
|
127
|
+
if [ "$y" != "$today" ]; then chk "L1-CTRL 어제 ≠ 오늘 (오프셋이 실제로 먹었다)" diff diff
|
|
128
|
+
else chk "L1-CTRL 어제 ≠ 오늘 (오프셋이 실제로 먹었다)" same diff; fi
|
|
129
|
+
|
|
130
|
+
# 픽스처 레포 — 실제 커밋을 만들어 집계가 «잡는지» 본다(빈 레포로는 아무것도 증명 못 한다)
|
|
131
|
+
mkdir -p "$T/projects/demo" && ( cd "$T/projects/demo" && git init -q . \
|
|
132
|
+
&& git config user.email me@t && git config user.name me \
|
|
133
|
+
&& echo x > a.txt && git add a.txt && GIT_AUTHOR_DATE="$y 12:00:00" \
|
|
134
|
+
GIT_COMMITTER_DATE="$y 12:00:00" git commit -qm "fixture: 어제 커밋" ) >/dev/null 2>&1
|
|
135
|
+
local got; got="$(repo_commits "$T/projects/demo" "$y" "me@t")"
|
|
136
|
+
case "$got" in *"fixture: 어제 커밋"*) chk "L2 known-positive: 어제 커밋을 잡는다" hit hit ;;
|
|
137
|
+
*) chk "L2 known-positive: 어제 커밋을 잡는다" miss hit ;; esac
|
|
138
|
+
# known-negative — 다른 author 로 필터하면 안 잡혀야 한다. 없으면 「항상 잡는다」와 구분 안 됨
|
|
139
|
+
local none; none="$(repo_commits "$T/projects/demo" "$y" "someone-else@t")"
|
|
140
|
+
[ -z "$none" ] && chk "L3 known-negative: 다른 author 는 안 잡는다(판별력)" empty empty \
|
|
141
|
+
|| chk "L3 known-negative: 다른 author 는 안 잡는다(판별력)" "nonempty" empty
|
|
142
|
+
# 🟥 다중 신원 정규식이 실제로 먹나 — `-E` 누락이면 여기서 0 이 나온다.
|
|
143
|
+
# known-negative(없는 author)만으로는 못 잡는다: 두 모드 다 0 이기 때문이다.
|
|
144
|
+
local multi; multi="$(repo_commits "$T/projects/demo" "$y" 'zzz-nobody|me@t')"
|
|
145
|
+
case "$multi" in *"fixture: 어제 커밋"*) chk "L4b 다중 신원 정규식(a|b)이 먹는다 — -E 앵커" hit hit ;;
|
|
146
|
+
*) chk "L4b 다중 신원 정규식(a|b)이 먹는다 — -E 앵커" miss hit ;; esac
|
|
147
|
+
|
|
148
|
+
# 날짜 창 — 그저께로 물으면 안 잡혀야 한다
|
|
149
|
+
local other; other="$(repo_commits "$T/projects/demo" "1999-01-01" "me@t")"
|
|
150
|
+
[ -z "$other" ] && chk "L4 다른 날짜 창은 안 잡는다" empty empty \
|
|
151
|
+
|| chk "L4 다른 날짜 창은 안 잡는다" nonempty empty
|
|
152
|
+
|
|
153
|
+
# 멱등 — 두 번 돌려 바이트 동일
|
|
154
|
+
DR_PROJECTS="$T/projects" PROJECTS="$T/projects"
|
|
155
|
+
build "$y" "$T/r1.md"; build "$y" "$T/r2.md"
|
|
156
|
+
# Generated 시각 줄만 빼고 비교(그 줄은 의도적으로 매번 다르다)
|
|
157
|
+
if diff <(grep -v '^> Generated' "$T/r1.md") <(grep -v '^> Generated' "$T/r2.md") >/dev/null 2>&1; then
|
|
158
|
+
chk "L5 멱등: 재실행이 같은 내용을 낸다(시각 줄 제외)" same same
|
|
159
|
+
else chk "L5 멱등: 재실행이 같은 내용을 낸다(시각 줄 제외)" diff same; fi
|
|
160
|
+
|
|
161
|
+
# author 불일치 표면화 — 조용히 틀린 사람으로 거르는 것이 이 스크립트의 최대 실패다
|
|
162
|
+
local _n; _n="$(DR_AUTHOR=x@y author_note)"
|
|
163
|
+
[ "$_n" = "DR_AUTHOR 지정" ] && chk "L7 DR_AUTHOR 가 있으면 그렇게 표기한다" ok ok \
|
|
164
|
+
|| chk "L7 DR_AUTHOR 가 있으면 그렇게 표기한다" "$_n" ok
|
|
165
|
+
build "$y" "$T/r4.md"
|
|
166
|
+
grep -q 'author filter:' "$T/r4.md" && chk "L8 헤더가 필터를 «항상» 명시한다(침묵 금지)" ok ok \
|
|
167
|
+
|| chk "L8 헤더가 필터를 «항상» 명시한다(침묵 금지)" missing ok
|
|
168
|
+
|
|
169
|
+
# 🟥 부재를 「일이 없었다」로 렌더하지 않는다.
|
|
170
|
+
# 초판은 «어제» 날짜로 검사했는데 이 레포엔 어제자 fh_completed 가 **실재**해서
|
|
171
|
+
# 부재 분기를 한 번도 안 탔다 — 픽스처가 조건 위에 있지 않은 판
|
|
172
|
+
# (`[[feedback_anchor_can_be_decorative]]` 원인 5). 없는 날짜로 강제한다.
|
|
173
|
+
build "1999-01-01" "$T/r3.md"
|
|
174
|
+
grep -q '기록이 «없다»이지 «일이 없었다»가 아니다' "$T/r3.md" \
|
|
175
|
+
&& chk "L6 fh_completed 부재를 «일이 없었다»로 안 적는다" ok ok \
|
|
176
|
+
|| chk "L6 fh_completed 부재를 «일이 없었다»로 안 적는다" missing ok
|
|
177
|
+
# 컨트롤: 실재하는 날짜면 그 문구가 «안» 나와야 한다. 없으면 「항상 그 문구」와 구분 안 됨.
|
|
178
|
+
local _real; _real="$FH/tracks/_meta/fh_completed_${y}.md"
|
|
179
|
+
if [ -f "$_real" ]; then
|
|
180
|
+
grep -q '기록이 «없다»이지' "$T/r1.md" \
|
|
181
|
+
&& chk "L6-CTRL 실재하면 부재 문구가 안 나온다(판별력)" 나옴 안나옴 \
|
|
182
|
+
|| chk "L6-CTRL 실재하면 부재 문구가 안 나온다(판별력)" 안나옴 안나옴
|
|
183
|
+
else
|
|
184
|
+
echo " ⏭ L6-CTRL SKIP — 어제자 fh_completed 가 없어 컨트롤 성립 불가 (**통과 아님**)"
|
|
185
|
+
fi
|
|
186
|
+
|
|
187
|
+
rm -rf "$T"
|
|
188
|
+
echo; echo "SELFTEST: $P passed, $F failed"
|
|
189
|
+
[ "$F" = 0 ] || return 1
|
|
190
|
+
return 0
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
case "${1:-run}" in
|
|
194
|
+
--self-test) self_test ;;
|
|
195
|
+
run)
|
|
196
|
+
DAY="${DR_DATE:-$(yesterday)}"
|
|
197
|
+
case "$DAY" in
|
|
198
|
+
????-??-??) ;;
|
|
199
|
+
*) echo "🟥 날짜를 못 만들었다 — date(1) 이 GNU 도 BSD 도 아니다. 중단한다." >&2; exit 10 ;;
|
|
200
|
+
esac
|
|
201
|
+
mkdir -p "$FH/tracks/_meta"
|
|
202
|
+
OUT="$FH/tracks/_meta/daily_report_${DAY}.md"
|
|
203
|
+
build "$DAY" "$OUT"
|
|
204
|
+
echo "✅ $OUT"
|
|
205
|
+
notify "$DAY 리포트 — $(basename "$OUT")"
|
|
206
|
+
;;
|
|
207
|
+
*) echo "usage: daily_report.sh [run|--self-test]" >&2; exit 2 ;;
|
|
208
|
+
esac
|
|
@@ -644,6 +644,77 @@ EOF
|
|
|
644
644
|
bash "$SELF_DIR/$(basename "${BASH_SOURCE[0]}")" "$IG/wiki/digest.md" ) >/dev/null 2>&1; rc_ie=$?
|
|
645
645
|
_t "★N-input e) 글롭이 확장되지 않는다(진짜 착지면을 과잉 제외 안 함)" 0 "$rc_ie"
|
|
646
646
|
rm -rf "$IG"
|
|
647
|
+
|
|
648
|
+
# ── ★N-self (2026-08-30) — 자기참조 차단 «세 분기»의 앵커 ─────────────────────────────
|
|
649
|
+
# 🟥 왜 지금 붙나: 세 분기(digest 자신 · 그 로그 · 타 digest)를 **각각 `continue` 에서 `:` 로
|
|
650
|
+
# 되돌려도 20 레인이 전부 초록**이었다(2026-08-30 실측). 즉 위 ★N-input 이 «프로필» 축만
|
|
651
|
+
# 덮고 있었고, 나머지 세 축은 코드에 있으되 **아무도 안 재는 장식**이었다.
|
|
652
|
+
# 이 파일 주석이 스스로 «첫 실물 실행에서 100% 오탐을 낸 원인» 이라 적어둔 그 분기들이다.
|
|
653
|
+
# 🟥 컨트롤 설계: 이 셋은 env 토글이 없다(하드코딩). 그래서 «끄는» 대신 **같은 내용의 파일을
|
|
654
|
+
# 제외되지 않는 위치에 두는** 팔을 짝으로 둔다 — 한 변수는 «파일의 자리» 하나뿐이다.
|
|
655
|
+
# 짝이 없으면 「제외가 다 죽인다」와 「픽스처가 애초에 안 잡힌다」가 구분되지 않는다.
|
|
656
|
+
local SG rc_s ctl_s
|
|
657
|
+
_mk_self() { # $1=배치할 상대경로 (digest 이후 커밋된다)
|
|
658
|
+
SG="$(mktemp -d -t dlc_s.XXXXXX)" || return 10
|
|
659
|
+
( mkdir -p "$SG/wiki/logs" && cd "$SG" && git init -q . \
|
|
660
|
+
&& git config user.email t@t && git config user.name t
|
|
661
|
+
printf '# d\n## 📌 FH Immediate Application Candidates\n\n| # | 티어 | 내용 |\n|---|---|---|\n| **A1** | M | `zzz_tok` 후보 |\n\n## end\n' \
|
|
662
|
+
> wiki/digest.md
|
|
663
|
+
# 🟥 ⓐ(digest 자신) 는 **별도 파일이 아니라 digest 에 «덧붙여야»** 조건이 성립한다.
|
|
664
|
+
# 초판은 `> wiki/digest.md` 로 덮어써서 후보 절을 지웠고, 그러면 필터와 무관하게
|
|
665
|
+
# rc=10 이 나와 **필터를 죽여도 초록**이었다 — 픽스처가 조건 위에 있지 않은 판
|
|
666
|
+
# ([[feedback_anchor_can_be_decorative]] 원인 5). 손으로 재현해서 잡았다.
|
|
667
|
+
if [ "$1" = "digest.md" ]; then
|
|
668
|
+
printf 'zzz_tok 이 여기 있다 · zzz_ctl\n' >> wiki/digest.md
|
|
669
|
+
touch -t 200101010000 wiki/digest.md
|
|
670
|
+
else
|
|
671
|
+
touch -t 200101010000 wiki/digest.md
|
|
672
|
+
mkdir -p "$(dirname "wiki/$1")"
|
|
673
|
+
printf 'zzz_tok 이 여기 있다 · zzz_ctl\n' > "wiki/$1"
|
|
674
|
+
fi
|
|
675
|
+
git add -A && git commit -qm s ) >/dev/null 2>&1
|
|
676
|
+
}
|
|
677
|
+
_run_self() {
|
|
678
|
+
( cd "$SG" && CLAUDE_PROJECT_DIR="$SG" DLC_TRACKED_PATHS="wiki" DLC_IGNORED_DIR="" \
|
|
679
|
+
DLC_CONTROLS="zzz_ctl" \
|
|
680
|
+
bash "$SELF_DIR/$(basename "${BASH_SOURCE[0]}")" "$SG/wiki/digest.md" ) >/dev/null 2>&1
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
# ⓐ digest 자신 — 자기 안에서 후보 토큰이 발견되면 전건이 자동 「착지」가 된다
|
|
684
|
+
_mk_self "digest.md"; _run_self; rc_s=$?
|
|
685
|
+
_t "★N-self a) digest 자신은 타깃이 아니다 → 미측정(10)" 10 "$rc_s"
|
|
686
|
+
rm -rf "$SG"
|
|
687
|
+
# ⓐ-CTRL 같은 내용을 제외되지 않는 이름으로 두면 «10 이 아니게» 된다 = 픽스처가 살아 있다
|
|
688
|
+
_mk_self "plain.md"; _run_self; ctl_s=$?
|
|
689
|
+
_t "★N-self a-CTRL) 제외 안 되는 자리면 10 이 아니다(픽스처 생존 증명)" "not10" "$([ "$ctl_s" -eq 10 ] && echo is10 || echo not10)"
|
|
690
|
+
rm -rf "$SG"
|
|
691
|
+
|
|
692
|
+
# ⓑ 생성 로그 — digest 를 만든 로그는 digest 어휘를 그대로 갖는다
|
|
693
|
+
_mk_self "logs/run.md"; _run_self; rc_s=$?
|
|
694
|
+
_t "★N-self b) 생성 로그(*/logs/*)는 타깃이 아니다 → 미측정(10)" 10 "$rc_s"
|
|
695
|
+
rm -rf "$SG"
|
|
696
|
+
|
|
697
|
+
# ⓓ 비-.md 타깃 + 빈 제외 토큰 — 뮤테이션 측정(2026-08-30)이 드러낸 **미커버 입력**이다.
|
|
698
|
+
# `case "$f" in *.md) ;; *) continue ;;` 와 `[ -n "$_x" ] || continue` 둘 다 되돌려도
|
|
699
|
+
# 초록이었는데, 이유는 「방어가 필요 없다」가 아니라 **픽스처가 그 입력을 한 번도 안 만든다**
|
|
700
|
+
# 였다. equivalent 뮤턴트와 미커버 입력은 다르다 — 전자는 못 죽이고 후자는 픽스처로 죽는다.
|
|
701
|
+
_mk_self "plain.md"
|
|
702
|
+
( cd "$SG" && printf 'zzz_tok · zzz_ctl\n' > wiki/notes.txt && git add -A && git commit -qm t ) >/dev/null 2>&1
|
|
703
|
+
( cd "$SG" && CLAUDE_PROJECT_DIR="$SG" DLC_TRACKED_PATHS="wiki" DLC_IGNORED_DIR="" \
|
|
704
|
+
DLC_CONTROLS="zzz_ctl" DLC_EXCLUDE_TARGETS=" wiki/plain.md " \
|
|
705
|
+
bash "$SELF_DIR/$(basename "${BASH_SOURCE[0]}")" "$SG/wiki/digest.md" ) >/dev/null 2>&1; rc_s=$?
|
|
706
|
+
# plain.md 는 제외되고 notes.txt 는 .md 가 아니라 타깃에서 빠진다 ⇒ 타깃 0건 = 미측정(10).
|
|
707
|
+
# 🟥 `.md` 필터가 죽으면 notes.txt 가 타깃이 되어 「착지」로 렌더된다 = 거짓 양성.
|
|
708
|
+
# 🟥 빈 토큰 가드가 죽으면 공백 분리로 생긴 빈 문자열이 모든 경로에 매칭될 수 있다.
|
|
709
|
+
_t "★N-self d) 비-.md 는 타깃이 아니고 빈 제외 토큰은 무시된다 → 미측정(10)" 10 "$rc_s"
|
|
710
|
+
rm -rf "$SG"
|
|
711
|
+
|
|
712
|
+
# ⓒ 타 digest — 후보는 이월되며 다음 날 digest 에 다시 등장한다. 그걸 착지로 세면
|
|
713
|
+
# 「내일도 후보로 남았다」가 「오늘 착지했다」가 된다.
|
|
714
|
+
_mk_self "frontier_digest_2002_02_02.md"; _run_self; rc_s=$?
|
|
715
|
+
_t "★N-self c) 타 digest(*frontier_digest_*)는 타깃이 아니다 → 미측정(10)" 10 "$rc_s"
|
|
716
|
+
rm -rf "$SG"
|
|
717
|
+
|
|
647
718
|
rm -rf "$EG"
|
|
648
719
|
# ⚠️ **줄 단위로** 본다. `case *"A1"*"미착지"*` 는 마지막 요약줄("N건 중 M건 미착지")까지
|
|
649
720
|
# 삼켜 오매칭한다 — 문자열 위치로 판정하는 prose-grep 함정([[feedback_typed_verdict_channel]]).
|
|
@@ -86,11 +86,38 @@ if [ -d "$BE/.git" ]; then
|
|
|
86
86
|
_deadline() { shift; "$@"; }
|
|
87
87
|
fi
|
|
88
88
|
PULL_NOTE=""
|
|
89
|
+
DIVERGED="" # non-empty ⇒ the local tree is NOT the newest state (see §Diverged below)
|
|
90
|
+
DIVERGE_BEHIND="" # commits the companion remote has that this clone does not
|
|
91
|
+
DIVERGE_AHEAD="" # commits this clone has that the remote does not
|
|
89
92
|
if _deadline "${FH_FETCH_DEADLINE:-8}" git -C "$BE" fetch --quiet >/dev/null 2>&1; then
|
|
90
93
|
if git -C "$BE" merge --ff-only --quiet >/dev/null 2>&1; then
|
|
91
94
|
PULL_NOTE="fetched + fast-forwarded"
|
|
92
95
|
else
|
|
93
|
-
|
|
96
|
+
# §Diverged — WHY THIS IS LOUD AND COUNTED (2026-08-28, measured on this repo).
|
|
97
|
+
# The old line said only "companion diverged — read local + newest remote". A session read it,
|
|
98
|
+
# did NOT read the newest remote, counted the LOCAL tree, and reported an artifact as absent
|
|
99
|
+
# that the remote had had for two days (deck v6.3 vs the actual v12.4; 338 commits behind).
|
|
100
|
+
# Two separate defects, and the second is the dangerous one:
|
|
101
|
+
# 1) the note carried no MAGNITUDE and no COMMAND — "diverged" reads like a footnote
|
|
102
|
+
# 2) every downstream freshness check in this script (§NEWER THAN SESSION CARD, the STATUS
|
|
103
|
+
# map, INDEX head) is computed over the STALE local tree, so it under-reports and an
|
|
104
|
+
# un-pulled file renders as a non-existent one — `not found` ≠ `0`
|
|
105
|
+
# ([[feedback_not_found_is_not_zero_family]]).
|
|
106
|
+
# This is a CHANNEL fix, not a judgment one (§Mechanization Boundary): it reports what the
|
|
107
|
+
# record IS (how far behind, computed) and never decides whether to merge. The hook still
|
|
108
|
+
# does NOT auto-rebase — mutating a diverged tree from SessionStart is exactly the
|
|
109
|
+
# irreversible-shaped act the --ff-only design refuses, and a parallel session may hold it.
|
|
110
|
+
_UP="$(git -C "$BE" rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null)"
|
|
111
|
+
[ -n "$_UP" ] || _UP="origin/$(git -C "$BE" rev-parse --abbrev-ref HEAD 2>/dev/null)"
|
|
112
|
+
# Counts: a failure must leave these EMPTY, never 0 — an unmeasured gap rendered as zero is
|
|
113
|
+
# the same defect this block exists to stop. `git rev-list` prints nothing to stdout on error.
|
|
114
|
+
_CNT="$(git -C "$BE" rev-list --left-right --count "HEAD...$_UP" 2>/dev/null)"
|
|
115
|
+
if [ -n "$_CNT" ]; then
|
|
116
|
+
DIVERGE_AHEAD="$(printf '%s' "$_CNT" | awk '{print $1}')"
|
|
117
|
+
DIVERGE_BEHIND="$(printf '%s' "$_CNT" | awk '{print $2}')"
|
|
118
|
+
fi
|
|
119
|
+
DIVERGED="1"
|
|
120
|
+
PULL_NOTE="fetched but NOT fast-forward (companion DIVERGED — local tree is stale)"
|
|
94
121
|
fi
|
|
95
122
|
else
|
|
96
123
|
PULL_NOTE="fetch skipped (offline or deadline hit — read local state)"
|
|
@@ -501,11 +528,34 @@ fi
|
|
|
501
528
|
# So: no new hook, no new line, no nag — the node name is appended to a banner that already
|
|
502
529
|
# prints every single session. `hostname -s`, the same source fh_node_check.sh uses.
|
|
503
530
|
echo "🔄 [FH SessionStart] companion-store freshness — $PULL_NOTE. · node: $(hostname -s 2>/dev/null || echo unknown)"
|
|
531
|
+
# §Diverged banner. Loud, counted, and it names the ONE command — see the §Diverged comment at the
|
|
532
|
+
# fetch site for the 2026-08-28 measurement that made this necessary. The magnitude line and the
|
|
533
|
+
# "everything below is stale" line are separate on purpose: the first says the tree is behind, the
|
|
534
|
+
# second says this script's OWN downstream findings under-report while it is.
|
|
535
|
+
if [ -n "$DIVERGED" ]; then
|
|
536
|
+
if [ -n "$DIVERGE_BEHIND" ]; then
|
|
537
|
+
echo "🟥 COMPANION DIVERGED — this clone is $DIVERGE_BEHIND commit(s) BEHIND the companion remote (and $DIVERGE_AHEAD ahead)."
|
|
538
|
+
else
|
|
539
|
+
# UNMEASURED, never 0: rev-list failed (no upstream configured, unreadable ref). Say so.
|
|
540
|
+
echo "🟥 COMPANION DIVERGED — magnitude UNMEASURED (could not count against upstream; do NOT read that as 'small')."
|
|
541
|
+
fi
|
|
542
|
+
echo " → PULL BEFORE YOU TRUST ANY FRESHNESS ANSWER: git -C \"$BE\" pull --rebase"
|
|
543
|
+
echo " 🟥 Everything printed BELOW this line is computed over the STALE local tree, so it"
|
|
544
|
+
echo " UNDER-REPORTS. A file the remote already has renders here as absent — \`not found\`"
|
|
545
|
+
echo " is not \`0\`. Answering \"what is the newest X\" from this list while diverged has"
|
|
546
|
+
echo " already produced a wrong answer once (2026-08-28: reported a 2-day-old artifact as"
|
|
547
|
+
echo " the latest). Pull first, or label the answer LOCAL-ONLY."
|
|
548
|
+
fi
|
|
504
549
|
if [ -n "$NEWER" ]; then
|
|
505
550
|
echo "⚠️ NEWER THAN SESSION CARD — READ THESE BEFORE ACTING (card may be stale):"
|
|
506
551
|
printf "%b" "$NEWER"
|
|
507
552
|
else
|
|
508
|
-
|
|
553
|
+
if [ -n "$DIVERGED" ]; then
|
|
554
|
+
echo " (no companion files newer than the session card — 🟥 but the tree is STALE, so this is"
|
|
555
|
+
echo " NOT evidence of 'nothing new'. It is an unmeasured surface. Pull, then re-read.)"
|
|
556
|
+
else
|
|
557
|
+
echo " (no companion files newer than the session card)"
|
|
558
|
+
fi
|
|
509
559
|
fi
|
|
510
560
|
if [ -n "$STATUS_MAP" ]; then
|
|
511
561
|
echo "── handoff/signal STATUS map (mtime-independent — closed items) ──"
|
|
@@ -520,6 +570,25 @@ fi
|
|
|
520
570
|
echo "it fires even when the first user message is a task. Do not treat 'pulled' as 'read'."
|
|
521
571
|
} 2>/dev/null
|
|
522
572
|
|
|
573
|
+
# 5b) Onboarding branch — computed, not eyeballed.
|
|
574
|
+
# WHY IT IS HERE. The greeting branch (new vs returning) was a SENTENCE the session judged from
|
|
575
|
+
# the shape of `tracks/`, and the sentence counted files that SHIP WITH THE REPO. Measured
|
|
576
|
+
# 2026-08-30 with a control: two tracked files satisfied it, so `git clone` alone rendered the
|
|
577
|
+
# RETURNING menu — the new-user branch was unreachable for anyone who clones.
|
|
578
|
+
# 🟥 Surfacing it HERE is the point: the session reads a value instead of deriving one. Two
|
|
579
|
+
# salience-only placements of an onboarding rule were measured at 0/3 and 0/5 the day before,
|
|
580
|
+
# so «write it in the protocol and trust the read» is a shape this repo has already falsified.
|
|
581
|
+
# Silent unless the script answers — and UNKNOWN is printed as UNKNOWN, never as `new`.
|
|
582
|
+
if [ -x "$FH/scripts/mapped_tracks.sh" ]; then
|
|
583
|
+
_MT=$(bash "$FH/scripts/mapped_tracks.sh" 2>/dev/null) || true
|
|
584
|
+
_BR=$(printf '%s' "$_MT" | sed -n 's/^onboarding_branch=//p' | head -1)
|
|
585
|
+
case "$_BR" in
|
|
586
|
+
new) echo "🚪 [FH onboarding] branch=NEW — 2-door starter, «Welcome to FH.» (계산값이다: $(printf '%s' "$_MT" | sed -n 's/^branch_why=//p' | head -1))" ;;
|
|
587
|
+
returning) echo "🚪 [FH onboarding] branch=RETURNING — 고정 4문, «Welcome back to FH.» (계산값: $(printf '%s' "$_MT" | sed -n 's/^branch_why=//p' | head -1))" ;;
|
|
588
|
+
UNKNOWN) echo "🚪 [FH onboarding] branch=UNKNOWN — 🟥 «new» 로 읽지 마라. $(printf '%s' "$_MT" | sed -n 's/^branch_why=//p' | head -1)" ;;
|
|
589
|
+
esac
|
|
590
|
+
fi
|
|
591
|
+
|
|
523
592
|
# 6) Substrate-jump detection (structure-enforcing — version drift lives outside any session's
|
|
524
593
|
# context boundary; silent when nothing changed). Detector, never a gate.
|
|
525
594
|
[ -x "$FH/scripts/substrate_jump_detector.sh" ] && bash "$FH/scripts/substrate_jump_detector.sh" "$FH" 2>/dev/null
|
|
@@ -108,6 +108,50 @@ else
|
|
|
108
108
|
fi
|
|
109
109
|
[ -z "$SENT_DIR" ] || mkdir -p "$SENT_DIR" 2>/dev/null || true
|
|
110
110
|
|
|
111
|
+
# ── 스킬-정본 분기 (2026-08-29 신설) ─────────────────────────────────────────
|
|
112
|
+
# 🟥 왜 «매핑된 프로젝트» 만으로는 부족한가 — 실측이 있다.
|
|
113
|
+
# 덱 세션이 `preprep/presentation_checklist.md`(274줄 · A0~M) 와 레인 L1~L6, 용어 파일을
|
|
114
|
+
# **하나도 열지 않고 44판을 구웠다.** 결과: C1 선 굵기 토큰 위반 388/907 = 43%, 그중
|
|
115
|
+
# ~329곳이 그 세션이 **눈대중으로 «발명한» 값**이었다. 그리고 리뷰가 걷어낸 낱말이
|
|
116
|
+
# 재유입됐는데 **아무 검사도 안 울렸다**(운영자가 잡았다).
|
|
117
|
+
# 🟥 진단이 뒤집힌 자리다: «자산화가 안 됐다» 가 아니라 **«자산은 있는데 안 읽힌다»** 였다.
|
|
118
|
+
# 그리고 그 세션의 처방(«진입 트리거를 새로 짓자»)도 반쯤 틀렸다 — 이 훅이 이미 그 기계다.
|
|
119
|
+
# `grep preprep` → 0 · 컨트롤 `grep qasp` → 2 ⇒ 계기는 살아 있고 **커버리지 경계가 빠뜨렸다.**
|
|
120
|
+
# ⇒ 새 트리거를 짓지 않고 **경계를 넓힌다.** 이게 no-reinvention 이 실제로 값을 내는 형태다.
|
|
121
|
+
#
|
|
122
|
+
# 대상은 «레포» 가 아니라 «허브 안의 스킬»이라 위 해석기(fh_resolve_track_root)를 안 탄다.
|
|
123
|
+
# 공유 해석기는 세 소비자가 문자 그대로 같아야 하므로 **건드리지 않고 분기를 덧붙인다.**
|
|
124
|
+
# 오탐 정책은 위 루프와 같다: 짧은 낱말의 오탐은 감수한다(세션당 1회라 상한이 한 줄이다).
|
|
125
|
+
skill_canon_emit() {
|
|
126
|
+
_sk="$1"; _dir="$HUB/$2"; shift 2
|
|
127
|
+
[ -d "$_dir" ] || return 0
|
|
128
|
+
[ -n "$SENT_DIR" ] && [ -e "$SENT_DIR/skill-$_sk" ] && return 0
|
|
129
|
+
_hit=0
|
|
130
|
+
for _w in "$@"; do
|
|
131
|
+
printf '%s' "$PROMPT" | grep -qiF -- "$_w" && { _hit=1; break; }
|
|
132
|
+
done
|
|
133
|
+
[ "$_hit" -eq 1 ] || return 0
|
|
134
|
+
_lines=""
|
|
135
|
+
for _f in SKILL.md presentation_checklist.md README.md surfaces.example.yaml; do
|
|
136
|
+
[ -f "$_dir/$_f" ] || continue
|
|
137
|
+
_n=$(wc -l < "$_dir/$_f" | tr -d " ")
|
|
138
|
+
_lines="$_lines\n $_f (${_n}줄)"
|
|
139
|
+
done
|
|
140
|
+
[ -n "$_lines" ] || return 0
|
|
141
|
+
echo ""
|
|
142
|
+
echo "📚 [skill-canon] 발표 작업이 언급됐다 — **눈대중으로 값을 발명하기 전에 이 파일들을 열어라.**"
|
|
143
|
+
echo " ▸ $_sk → $_dir"
|
|
144
|
+
printf "%b\n" "$_lines"
|
|
145
|
+
cat <<'SKEOF'
|
|
146
|
+
⚠️ 세션당 1회. 실측(2026-08-28): 어느 세션이 이 파일들을 **하나도 안 열고 44판을 구웠고**,
|
|
147
|
+
선 굵기 토큰 위반이 388/907(43%) 났다 — 그중 ~329곳이 그 세션이 발명한 값이다.
|
|
148
|
+
🟥 «자산이 없다» 가 아니라 «있는데 안 읽힌다» 가 이 안내의 존재 이유다.
|
|
149
|
+
SKEOF
|
|
150
|
+
[ -z "$SENT_DIR" ] || : > "$SENT_DIR/skill-$_sk" 2>/dev/null || true
|
|
151
|
+
}
|
|
152
|
+
skill_canon_emit preprep "plugins/fh-commons/skills/preprep" \
|
|
153
|
+
"발표" "장표" "슬라이드" "덱" "대본" "리허설" "presentation" "keynote"
|
|
154
|
+
|
|
111
155
|
# 매핑된 프로젝트 = tracks/ 하위 디렉토리(언더스코어 접두는 메타라 제외)
|
|
112
156
|
mapped=$(ls -d "$HUB"/tracks/*/ 2>/dev/null | while read -r d; do
|
|
113
157
|
b=$(basename "$d")
|
|
@@ -106,13 +106,19 @@ spec_matches() { # $1 = path
|
|
|
106
106
|
}
|
|
107
107
|
for pair in \
|
|
108
108
|
"plugins/fh-meta/skills/frontier-digest/SKILL_detail.md|tracks/_meta/x.md|PATHSPEC covers SKILL_detail.md" \
|
|
109
|
-
"plugins/fh-meta/skills/frontier-digest/SKILL.md|
|
|
109
|
+
"plugins/fh-meta/skills/frontier-digest/SKILL.md|docs/demo/gate-block.tape|PATHSPEC still covers SKILL.md" \
|
|
110
110
|
"CLAUDE.md|CLAUDE.local.md|PATHSPEC covers CLAUDE.md but not the local override" \
|
|
111
|
-
"scripts/selfcheck.sh|
|
|
112
|
-
"scripts/sub/nested.sh|
|
|
111
|
+
"scripts/selfcheck.sh|scripts/fixtures/data.txt|PATHSPEC covers scripts/*.sh (seam #1 — the HEAVY term already gated it, this array did not)" \
|
|
112
|
+
"scripts/sub/nested.sh|scripts/README.txt|PATHSPEC covers scripts/ recursively (git/bash globs cross '/')" \
|
|
113
113
|
"templates/regression_guard.sh|package-lock.json|PATHSPEC covers templates/*.sh — i.e. the guard can guard ITSELF" \
|
|
114
114
|
"templates/.git-hooks/pre-commit|.gitignore|PATHSPEC covers the git-hook floor (the hook that hard-blocks commits)" \
|
|
115
|
-
"plugins/fh-meta/agents/challenger.md|tracks/_meta/y.md|PATHSPEC covers agent definitions (seam #3)"
|
|
115
|
+
"plugins/fh-meta/agents/challenger.md|tracks/_meta/y.md|PATHSPEC covers agent definitions (seam #3)" \
|
|
116
|
+
"README.ko.md|README.txt|PATHSPEC covers README 4종 — PR #550 이 Axis 1 무검사로 나간 자리 (2026-08-29)" \
|
|
117
|
+
"CHEATSHEET.md|CONTRIBUTING.md|PATHSPEC covers CHEATSHEET (루트 CONTRIBUTING 은 대상 아님)" \
|
|
118
|
+
"CATALOG.md|CHANGELOG.md|PATHSPEC covers CATALOG" \
|
|
119
|
+
".github/workflows/validate.yml|.github/dependabot.yml|PATHSPEC covers workflow 정의 (yml 만)" \
|
|
120
|
+
"scripts/index_sync.py|scripts/notes.txt|PATHSPEC covers scripts/*.py" \
|
|
121
|
+
"package.json|package-lock.json|PATHSPEC covers package.json 이되 «리터럴» — lock 파일까지 삼키지 않는다"
|
|
116
122
|
do
|
|
117
123
|
IFS='|' read -r pos neg label <<< "$pair"
|
|
118
124
|
ok=1
|
|
@@ -864,11 +864,45 @@ TOTAL="${1:-0}"; WIRED="${2:-0}"; N_EXEMPT="${3:-0}"; N_DEBT="${4:-0}"
|
|
|
864
864
|
|
|
865
865
|
UNDECLARED=$(printf '%s\n' "$out" | awk -F'\t' '$1=="UNDECLARED"{print $2}')
|
|
866
866
|
RESOLVED=$(printf '%s\n' "$out" | awk -F'\t' '$1=="RESOLVED"{print $2}')
|
|
867
|
+
# 판정의 «출처»를 한 문장으로. 순수 함수인 이유는 pre-commit 의 형제들과 같다 — 레인이
|
|
868
|
+
# 저장소 상태 없이 모든 모드를 구동할 수 있어야 한다. 입력은 INDEX_MODE, 출력은 한 줄.
|
|
869
|
+
# 🟥 세 갈래를 접지 않는다: 「인덱스를 읽었다」·「디스크를 읽었다」·「못 셌다」는 독자를 서로
|
|
870
|
+
# 다른 곳으로 보낸다. UNMEASURED 를 「인덱스」로 접으면 못 센 것이 센 것으로 렌더된다
|
|
871
|
+
# ([[feedback_not_found_is_not_zero_family]]).
|
|
872
|
+
index_source_note() { # $1 = INDEX_MODE
|
|
873
|
+
case "${1:-}" in
|
|
874
|
+
nongit|outside-index)
|
|
875
|
+
echo " ⓘ 이 판정의 러너 표면은 DISK 에서 셌다 ($1) — 체크아웃 안이라면 인덱스-근거가 아니다." ;;
|
|
876
|
+
UNMEASURED)
|
|
877
|
+
echo " 🟥 이 판정의 러너 표면은 UNMEASURED 다 — 「러너가 없다」가 아니라 「못 셌다」." ;;
|
|
878
|
+
"")
|
|
879
|
+
: ;; # 모드 자체를 모르면 아무 말도 안 한다 — 지어내는 것보다 침묵이 낫다
|
|
880
|
+
*)
|
|
881
|
+
echo " ⓘ 이 판정은 git INDEX 기준이다 — **스테이징하지 않은 배선은 안 보인다.**"
|
|
882
|
+
echo " 방금 배선했다면: git add <경로> 후 재실행." ;;
|
|
883
|
+
esac
|
|
884
|
+
}
|
|
885
|
+
|
|
867
886
|
GONE=$(printf '%s\n' "$out" | awk -F'\t' '$1=="GONE"{print $2}')
|
|
887
|
+
# 🟥 여기서 뽑는다 — 아래 FAIL 분기가 이 값을 쓰기 «전에» 있어야 한다. 처음 붙였을 때는
|
|
888
|
+
# 디스크-모드 경고 블록 옆(한참 아래)에서만 뽑고 있었고, `set -u` 아래에서 FAIL 경로가
|
|
889
|
+
# `INDEX_MODE: unbound variable` 로 죽었다. 🟥 **레인 여섯이 그걸 못 잡았다** — 함수를 직접
|
|
890
|
+
# 호출했지 «호출부를 실행»하지 않았고, 호출 여부는 grep 으로만 단언했다(장식 앵커).
|
|
891
|
+
# 잡은 것은 라이브 첫 실사용이다. 대입은 한 곳뿐이다 — 두 곳이면 관대함이 갈린다.
|
|
892
|
+
INDEX_MODE=$(printf '%s\n' "$out" | awk -F'\t' '$1=="INDEX_MODE"{print $2}')
|
|
868
893
|
|
|
869
894
|
if [ -n "$UNDECLARED" ]; then
|
|
870
895
|
echo "FAIL lane-runner: lane suite(s) with no runner and no declaration:"
|
|
871
896
|
printf '%s\n' "$UNDECLARED" | sed 's/^/ /'
|
|
897
|
+
# 🟥 SAY WHERE THE VERDICT CAME FROM, on the FAIL path only.
|
|
898
|
+
# This check enumerates runners from the git INDEX, and in the normal (index) mode it used to say
|
|
899
|
+
# nothing at all — the disclosure fired only in the anomalous disk modes. So an author who wired a
|
|
900
|
+
# suite but had not staged it got "a suite nothing executes is prose" with no hint that the wiring
|
|
901
|
+
# existed on disk. Measured 2026-08-30: that is exactly what happened, and it was the FIFTH
|
|
902
|
+
# instance of «the tree I verified is not the tree the tool read» in one day.
|
|
903
|
+
# On the FAIL path only, because on a passing run this line is noise, and a noisy disclosure is
|
|
904
|
+
# one people learn to skip.
|
|
905
|
+
index_source_note "$INDEX_MODE"
|
|
872
906
|
echo " A suite nothing executes is prose. Fix by ONE of:"
|
|
873
907
|
echo " · wire it into scripts/selfcheck.sh (the usual answer)"
|
|
874
908
|
echo " · add it to EXEMPT here WITH the reason it must not be auto-run"
|
|
@@ -922,7 +956,6 @@ if [ -n "$SELFTEST_UNDECLARED" ]; then
|
|
|
922
956
|
echo " in it, or exit 0 will certify a suite that ran nothing."
|
|
923
957
|
fi
|
|
924
958
|
|
|
925
|
-
INDEX_MODE=$(printf '%s\n' "$out" | awk -F'\t' '$1=="INDEX_MODE"{print $2}')
|
|
926
959
|
INDEX_WHY=$(printf '%s\n' "$out" | awk -F'\t' '$1=="INDEX_MODE"{print $3}')
|
|
927
960
|
# Labelled, never silent, and the two disk-fallback states are NOT merged. `nongit` is an
|
|
928
961
|
# unpacked tarball; `outside-index` is this tree sitting inside some OTHER repo that ignores it.
|