@chrono-meta/fh-gate 3.36.0 → 3.37.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-plugin/marketplace.json +4 -4
- package/knowledge/shared/harness-core/builtin_capability_map.md +50 -0
- package/knowledge/shared/harness-core/claude_md_full_reference.md +17 -1
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +78 -0
- package/package.json +8 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +30 -0
- package/plugins/fh-meta/skills/frontier-digest/SKILL.md +2 -0
- package/plugins/fh-meta/skills/harness-doctor/SKILL.md +1 -0
- package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -0
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/card_status_tags.sh +47 -0
- package/scripts/correction_moments.py +116 -0
- package/scripts/destructive_pre_gate.sh +25 -2
- package/scripts/env_layer_fingerprint.sh +44 -3
- package/scripts/package_coverage_check.sh +13 -5
- package/scripts/probe_live_eval.sh +9 -0
- package/scripts/probe_live_eval_lib.py +40 -0
- package/scripts/selfcheck.sh +3 -0
- package/scripts/selfcheck_shard_weights.txt +184 -0
- package/scripts/session_close_check.sh +11 -0
- package/scripts/test_card_status_tags_lanes.sh +58 -0
- package/scripts/test_correction_moments_lanes.sh +42 -0
- package/scripts/test_destructive_pre_gate_lanes.sh +36 -0
- package/scripts/test_env_layer_fingerprint_lanes.sh +6 -1
- package/scripts/test_fh_detach_lanes.sh +27 -4
- package/scripts/test_live_eval_transitions_lanes.sh +32 -0
- package/scripts/test_package_coverage_lanes.sh +31 -0
- package/scripts/test_selfcheck_shard_lanes.sh +44 -0
- package/scripts/test_utterance_checklist_hook_lanes.sh +9 -0
- package/scripts/utterance_checklist_hook.py +14 -5
- package/templates/fh_audit_check.zsh +140 -0
- package/templates/settings.PreToolUse.snippet.json +2 -1
|
@@ -68,6 +68,9 @@ add_row() { ROWS="${ROWS}${1} ${2} ${3} ${4}
|
|
|
68
68
|
|
|
69
69
|
# _exists PATH → PRESENT|ABSENT (파일이든 디렉터리든)
|
|
70
70
|
_exists() { [ -e "$1" ] && printf 'PRESENT' || printf 'ABSENT'; }
|
|
71
|
+
# 날짜 키 (evidence.marker). `FH_FP_TODAY` 는 레인이 날짜를 고정하기 위한 이음새다 —
|
|
72
|
+
# 안 주면 실제 오늘이고, 운영 경로에서는 아무것도 바꾸지 않는다.
|
|
73
|
+
_FP_TODAY="${FH_FP_TODAY:-$(date +%F)}"
|
|
71
74
|
|
|
72
75
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
73
76
|
# probe_hub HUB — 모든 행을 ROWS 에 채운다. 인자를 받으므로 selftest 가 픽스처에 겨눌 수 있다.
|
|
@@ -136,9 +139,25 @@ PY
|
|
|
136
139
|
# ── EVIDENCE 층 — gitignored 기록. 게이트가 **읽는** 입력이다 ──────────────────
|
|
137
140
|
add_row evidence.manifest EVIDENCE "$(_exists "$H/tracks/_meta/edit_manifest.yaml")" \
|
|
138
141
|
"Axis 4 입력 — 없으면 훅이 배선된 쪽에서만 FAIL 이 뜬다"
|
|
142
|
+
# 🟥 **오늘 날짜로 키를 건다 (2026-11-02 실측).** 이 칸은 「마커 파일이 하나라도 있나」를 묻고
|
|
143
|
+
# 있었는데, 소비자는 그걸 안 읽는다: `templates/.git-hooks/pre-commit` 은
|
|
144
|
+
# `.axes_23_passed_<브랜치슬러그>_<오늘>.marker` **하나만** 읽고(그 훅 자신의 주석이 2786
|
|
145
|
+
# 줄에서 그렇게 적는다), 이름이 다른 마커는 없는 것과 같이 취급한다. 그래서 지난 회차 마커가
|
|
146
|
+
# 디스크에 남은 체크아웃에서 이 칸이 `PRESENT` 를 찍었고, ① 판을 읽은 세션은 EVIDENCE 층이
|
|
147
|
+
# 충족됐다고 결론한 다음 **같은 변경이 커밋 게이트에서 막혔다**(같은 날 두 팔로 실측:
|
|
148
|
+
# 배선 없음 → rc=0 무음 통과 / 배선 → rc=1, Axis 2+3 NOT CONFIRMED). 즉 이 칸은 **쓸 수 없는
|
|
149
|
+
# 기록을 충족으로 접고 있었다** — 이 레포가 「미측정을 통과로 접는 채널」로 부르는 그 부류다.
|
|
150
|
+
# 날짜만으로 키를 건다(브랜치까지 거는 것은 아래 잔여). 훅 자신도 2794 줄에서 날짜만으로
|
|
151
|
+
# 목록을 뽑아 「오늘 썼는데 주소가 틀렸다」를 말하므로, 날짜 키는 그 훅의 어휘 안에 있다.
|
|
152
|
+
# ⚠️ **남은 것, 고치지 않았다**: 오늘 날짜에 **다른 브랜치**의 마커만 있으면 이 칸은 여전히
|
|
153
|
+
# PRESENT 다. 브랜치 슬러그를 키에 넣으려면 이 계기가 git 을 요구하게 되고, 그러면 비-깃
|
|
154
|
+
# 픽스처(아래 --selftest)와 깃 없는 소비자 트리에서 판정이 UNMEASURED 로 떨어진다 — 세 값
|
|
155
|
+
# 어휘에서 그건 드리프트로 집계되므로, 더 작은 수리를 택하고 이 잔여를 이름으로 남긴다.
|
|
156
|
+
# ⚠️ 이 변경은 `--digest` 를 바꾼다. 이 줄 이전 회차의 지문과 이후 지문은 **비교 대상이
|
|
157
|
+
# 아니다**(회차 간 분리자로 지문을 쓰는 쪽은 그 경계를 알고 써야 한다).
|
|
139
158
|
add_row evidence.marker EVIDENCE \
|
|
140
|
-
"$([ "$(find "$H/tracks/_meta" -maxdepth 1 -name
|
|
141
|
-
"Axis 2+3 입력 — 마커는
|
|
159
|
+
"$([ "$(find "$H/tracks/_meta" -maxdepth 1 -name ".axes_23_passed_*${_FP_TODAY}.marker" 2>/dev/null | wc -l | tr -d ' ')" -gt 0 ] && printf 'PRESENT' || printf 'ABSENT')" \
|
|
160
|
+
"Axis 2+3 입력 — 훅은 <브랜치>_<오늘> 한 이름만 읽는다. 어제 마커는 있어도 이 세션의 입력이 아니다"
|
|
142
161
|
add_row evidence.card EVIDENCE "$(_exists "$H/tracks/_meta/reference_next_session_starter.md")" \
|
|
143
162
|
"세션 카드 — 없으면 마감 ⑤ 와 온보딩 «returning» 판정의 입력이 없다"
|
|
144
163
|
# 🟥 «tracks 에 파일이 있나» 로 세면 안 된다 — **두 방향으로** 틀린다.
|
|
@@ -283,7 +302,7 @@ if [ "$MODE" = "selftest" ]; then
|
|
|
283
302
|
: > "$POS/.claude/registry/LOCAL_SKILL_REGISTRY.md"
|
|
284
303
|
: > "$POS/CLAUDE.local.md"
|
|
285
304
|
: > "$POS/tracks/_meta/edit_manifest.yaml"
|
|
286
|
-
: > "$POS/tracks/_meta/.
|
|
305
|
+
: > "$POS/tracks/_meta/.axes_23_passed_fixture_${_FP_TODAY}.marker"
|
|
287
306
|
: > "$POS/tracks/_meta/reference_next_session_starter.md"
|
|
288
307
|
probe_hub "$POS"
|
|
289
308
|
pos_absent="$(count_of ABSENT)"
|
|
@@ -296,6 +315,28 @@ if [ "$MODE" = "selftest" ]; then
|
|
|
296
315
|
pos_digest="$(digest_line)"
|
|
297
316
|
[ "$neg_digest" = "$pos_digest" ] && { echo "FAIL selftest: 두 픽스처의 digest 가 같다 — 지문이 상태를 안 나른다"; rc=1; }
|
|
298
317
|
|
|
318
|
+
# ── 묵은 마커 팔 (2026-11-02). 이 팔이 없으면 위의 known-positive 는 「마커 파일이 있다」만
|
|
319
|
+
# 보이고, 이 계기가 고치려는 바로 그 혼동(있다 ≠ 이 세션의 입력이다)을 못 가른다.
|
|
320
|
+
# 수리 전에 돌리면 이 팔이 PRESENT 를 받아 **빨강**이 된다 — 그래서 컨트롤이다.
|
|
321
|
+
STALE="$TMP/stale"
|
|
322
|
+
cp -R "$POS" "$STALE"
|
|
323
|
+
rm -f "$STALE"/tracks/_meta/.axes_23_passed_*.marker
|
|
324
|
+
# 묵은 날짜는 「오늘」과 반드시 달라야 한다 — `FH_FP_TODAY` 로 오늘을 고정한 호출자가
|
|
325
|
+
# 하필 이 날짜를 집으면 이 팔이 자기 주제를 잃는다. 겹치면 하루 뒤로 비킨다.
|
|
326
|
+
_FP_STALE=2000-01-01
|
|
327
|
+
[ "$_FP_STALE" = "$_FP_TODAY" ] && _FP_STALE=1999-01-01
|
|
328
|
+
: > "$STALE/tracks/_meta/.axes_23_passed_fixture_${_FP_STALE}.marker"
|
|
329
|
+
probe_hub "$STALE"
|
|
330
|
+
if [ "$(verdict_of evidence.marker)" = "PRESENT" ]; then
|
|
331
|
+
echo "FAIL selftest: $_FP_STALE 마커 하나뿐인 허브가 evidence.marker=PRESENT — 훅은 그 이름을 안 읽는다"; rc=1
|
|
332
|
+
fi
|
|
333
|
+
# 같은 허브, 날짜만 오늘로 → PRESENT 로 돌아와야 한다(음성 팔이 늘 ABSENT 를 내는 계기와 구분)
|
|
334
|
+
: > "$STALE/tracks/_meta/.axes_23_passed_fixture_${_FP_TODAY}.marker"
|
|
335
|
+
probe_hub "$STALE"
|
|
336
|
+
if [ "$(verdict_of evidence.marker)" != "PRESENT" ]; then
|
|
337
|
+
echo "FAIL selftest: 오늘 날짜 마커를 넣었는데 evidence.marker 가 PRESENT 가 아니다 — 과차단"; rc=1
|
|
338
|
+
fi
|
|
339
|
+
|
|
299
340
|
# 계기-오류 팔: READ 층이 없는 디렉터리를 겨누면 rc=2 여야 한다
|
|
300
341
|
probe_hub "$TMP/nonexistent-hub"
|
|
301
342
|
read_layer_broken || { echo "FAIL selftest: 빈 디렉터리를 겨눴는데 READ 층이 깨진 것으로 안 잡힌다"; rc=1; }
|
|
@@ -573,11 +573,19 @@ for s in shipped:
|
|
|
573
573
|
# HONEST STATE: fix the `js|json` alternation first, re-measure, then decide. Until then
|
|
574
574
|
# this check's true coverage is UNQUANTIFIED — treat a PASS as "no defect of the narrow
|
|
575
575
|
# exists-and-uncovered kind", not as "every shipped reference is sound".
|
|
576
|
-
if
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
576
|
+
if covered(m):
|
|
577
|
+
continue
|
|
578
|
+
# An accepted entry is exercised when a shipped doc still NAMES it — existence plays no
|
|
579
|
+
# part. The exception records a decision about a reference, and the reference is the same
|
|
580
|
+
# on every machine; the file is not. Gating this on `exists` made the three entries whose
|
|
581
|
+
# files are not in the repo (.claude/registry/LOCAL_SKILL_REGISTRY.md, .claude/settings.json,
|
|
582
|
+
# .claude/settings.local.json — present only on a configured machine) read STALE
|
|
583
|
+
# in every clean clone, i.e. in CI and the release chain (measured 2026-11-02: live 65/65,
|
|
584
|
+
# clean clone 62/65), and the advisory told the reader to delete exceptions that were in use.
|
|
585
|
+
if m in accepted:
|
|
586
|
+
exercised.add(m)
|
|
587
|
+
elif os.path.exists(m):
|
|
588
|
+
phantom.setdefault(m, set()).add(s)
|
|
581
589
|
|
|
582
590
|
# Impossible-zero guard: this repo always has shipped docs. Zero scanned means the extractor
|
|
583
591
|
# broke — report that as a failure rather than letting a dead check print a pass
|
|
@@ -354,6 +354,15 @@ REPORT_PATH="${REPORT_OUT:-$REPO_ROOT/tracks/_meta/live_eval_${RUN_DATE}.md}"
|
|
|
354
354
|
SCORE_EXTRA=()
|
|
355
355
|
[ -n "$TARGET" ] && SCORE_EXTRA+=(--target "$TARGET")
|
|
356
356
|
[ -n "$BEFORE" ] && SCORE_EXTRA+=(--before "$BEFORE")
|
|
357
|
+
# «Moved since previous» (2026-11-03, record only): the newest live_eval_<date>.md dated before this run. None found -> "" and
|
|
358
|
+
# the report says «not supplied», never «none». FH_LIVE_EVAL_PREV_DIR lets lanes point at a fixture folder.
|
|
359
|
+
PREV=""
|
|
360
|
+
for f in "${FH_LIVE_EVAL_PREV_DIR:-$REPO_ROOT/tracks/_meta}"/live_eval_[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].md; do
|
|
361
|
+
[ -e "$f" ] || continue
|
|
362
|
+
b=$(basename "$f" .md); d=${b#live_eval_}
|
|
363
|
+
[[ "$d" < "$RUN_DATE" ]] && PREV="$f"
|
|
364
|
+
done
|
|
365
|
+
SCORE_EXTRA+=(--prev "$PREV")
|
|
357
366
|
python3 "$LIB" score ${SCORE_EXTRA[@]+"${SCORE_EXTRA[@]}"} \
|
|
358
367
|
--probes-live "$PROBES_LIVE" \
|
|
359
368
|
--select-json "$SELECT_JSON" \
|
|
@@ -675,6 +675,30 @@ def split_by_target(rows, target, before=None):
|
|
|
675
675
|
return res
|
|
676
676
|
|
|
677
677
|
|
|
678
|
+
def transitions(rows, before):
|
|
679
|
+
"""Every probe's verdict now vs the previous nightly report (2026-11-03, frontier digest: arXiv:2610.41130 — a flat pass rate
|
|
680
|
+
can hide many per-probe flips). Record only: no verdict, no exit code reads this.
|
|
681
|
+
status: 'moved' (some id changed) · 'none' (every current id is in before and none changed) · 'not-comparable' (nothing moved
|
|
682
|
+
among the comparable ids but some current ids are absent from before — «none» would overclaim) · 'not-supplied'."""
|
|
683
|
+
if before is None:
|
|
684
|
+
return {'status': 'not-supplied', 'moved': [], 'missing': []}
|
|
685
|
+
ids = [r['id'] for r in rows]
|
|
686
|
+
missing = [i for i in ids if i not in before]
|
|
687
|
+
moved = ['%s %s->%s' % (r['id'], before[r['id']], r['verdict']) for r in rows
|
|
688
|
+
if r['id'] in before and before[r['id']] != r['verdict']]
|
|
689
|
+
status = 'moved' if moved else ('not-comparable' if missing else 'none')
|
|
690
|
+
return {'status': status, 'moved': moved, 'missing': missing}
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
def render_transitions_line(tr, prev_name):
|
|
694
|
+
if tr['status'] == 'not-supplied':
|
|
695
|
+
return 'moved since previous: not supplied (%s)' % (prev_name or 'no prior report found')
|
|
696
|
+
body = ', '.join(tr['moved']) if tr['moved'] else ('not comparable (%d probes absent from previous)' % len(tr['missing'])
|
|
697
|
+
if tr['status'] == 'not-comparable' else 'none')
|
|
698
|
+
extra = (' (absent from previous: %s)' % ','.join(tr['missing'])) if tr['moved'] and tr['missing'] else ''
|
|
699
|
+
return 'moved since previous (%s): %s%s' % (prev_name, body, extra)
|
|
700
|
+
|
|
701
|
+
|
|
678
702
|
def _fmt_pr(g):
|
|
679
703
|
return ('%d/%d pass_rate=%s failed_to_run=%d uncalibrated=%d' % (
|
|
680
704
|
g['passed'], g['ran'], ('%.2f' % g['pass_rate']) if g['pass_rate'] is not None else 'n/a',
|
|
@@ -772,6 +796,11 @@ def render_report_md(select_result, score_result, run_date):
|
|
|
772
796
|
lines.append("")
|
|
773
797
|
if score_result is not None and score_result.get('target'):
|
|
774
798
|
lines.extend(render_target_md(score_result['target']))
|
|
799
|
+
if score_result is not None and score_result.get('transitions'):
|
|
800
|
+
tr = score_result['transitions']
|
|
801
|
+
lines.extend(['## Moved since previous', '',
|
|
802
|
+
'Record only (no verdict depends on this): per-probe verdict changes against the previous nightly report.',
|
|
803
|
+
'', '- ' + render_transitions_line(tr, tr.get('prev')), ''])
|
|
775
804
|
lines.append("## Excluded (from probes.md, 32-row snapshot)")
|
|
776
805
|
lines.append("")
|
|
777
806
|
lines.append("| Probe | Reason |")
|
|
@@ -874,6 +903,16 @@ def _cmd_score(args):
|
|
|
874
903
|
for l in render_target_lines(t):
|
|
875
904
|
print(l)
|
|
876
905
|
print("")
|
|
906
|
+
prev_arg = getattr(args, 'prev', None)
|
|
907
|
+
if prev_arg is not None:
|
|
908
|
+
prev = parse_prev_report(prev_arg) if prev_arg else None
|
|
909
|
+
tr = transitions(score_result['rows'], prev)
|
|
910
|
+
name = os.path.basename(prev_arg) if prev_arg else ''
|
|
911
|
+
if prev_arg and prev is None:
|
|
912
|
+
name += ' — unreadable or no run table'
|
|
913
|
+
score_result['transitions'] = dict(tr, prev=name)
|
|
914
|
+
print(render_transitions_line(tr, name))
|
|
915
|
+
print("")
|
|
877
916
|
pr = score_result['pass_rate']
|
|
878
917
|
pr_s = ("%.2f" % pr) if pr is not None else "n/a"
|
|
879
918
|
print("total=%d ran=%d failed_to_run=%d uncalibrated=%d passed=%d pass_rate=%s threshold=%.2f"
|
|
@@ -927,6 +966,7 @@ def main():
|
|
|
927
966
|
sc.add_argument('--reps', type=int, default=1)
|
|
928
967
|
sc.add_argument('--target')
|
|
929
968
|
sc.add_argument('--before')
|
|
969
|
+
sc.add_argument('--prev') # previous nightly report for the «moved since previous» record ('' = none found)
|
|
930
970
|
|
|
931
971
|
args = ap.parse_args()
|
|
932
972
|
if args.cmd == 'select':
|
package/scripts/selfcheck.sh
CHANGED
|
@@ -1175,6 +1175,9 @@ for _pair in \
|
|
|
1175
1175
|
"scripts/chamber_run.sh|scripts/test_chamber_run_lanes.sh" \
|
|
1176
1176
|
"scripts/chamber_candidate_collect.sh|scripts/test_chamber_sig_lanes.sh" \
|
|
1177
1177
|
"scripts/destructive_pre_gate.sh|scripts/test_destructive_pre_gate_lanes.sh" \
|
|
1178
|
+
"scripts/probe_live_eval_lib.py|scripts/test_live_eval_transitions_lanes.sh" \
|
|
1179
|
+
"scripts/correction_moments.py|scripts/test_correction_moments_lanes.sh" \
|
|
1180
|
+
"scripts/card_status_tags.sh|scripts/test_card_status_tags_lanes.sh" \
|
|
1178
1181
|
"templates/.git-hooks/pre-push|scripts/test_prepush_destructive_lanes.sh" \
|
|
1179
1182
|
"templates/.git-hooks/pre-push|scripts/test_prepush_destructive_liveness.sh" \
|
|
1180
1183
|
`# 실제 git push 발화 레인 (2026-10-24, 형제 하네스 회신). 합성 stdin 레인은 «판정» 만 잰다 — 이 레인은 git 이 그 동작에서 훅을 «부르는가 · 그 줄을 넘기는가» 를 잰다. --mirror 는 삭제 줄을 안 넘긴다(실측).` \
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# selfcheck_shard_weights.txt — measured seconds per lane suite, input to the --shard plan in selfcheck.sh.
|
|
2
|
+
# Format: <seconds> <suite basename>. '@inline' = the non-suite checks that run in shard 1 only (syntax checks, checkers,
|
|
3
|
+
# --self-test entry points); it pre-loads shard 1. Re-measured 2026-10-31 on the CI runner itself (GitHub ubuntu-latest,
|
|
4
|
+
# validate.yml 4-leg matrix): mean of main runs 41199297108 (4af173b7) and 41200169039 (19d5596f). Per-suite seconds were
|
|
5
|
+
# attributed from the gaps between consecutive SHARD-SKIP timestamps in each leg's log, aligned by name to a
|
|
6
|
+
# FH_SHARD_DRY=1 trace of the same plan; when several suites ran between two skips the gap was split evenly among them,
|
|
7
|
+
# so small rows are approximate. Before this the rows came from a 16-core local box and shard 1 ran 333-360 s against
|
|
8
|
+
# 224-282 s for shard 4. Re-measure after a suite changes cost a lot; a stale or missing row only unbalances the plan
|
|
9
|
+
# (a missing suite is placed by hash) — it never drops a suite.
|
|
10
|
+
# One suite is deliberately NOT listed (about 3 s): its own leak scan flags any scripts/ file that names it. It is placed by hash.
|
|
11
|
+
152 @inline
|
|
12
|
+
279 test_mutation_probe_lanes.sh
|
|
13
|
+
54 test_sidecar_wait_stdin.sh
|
|
14
|
+
28 test_abstract_consult_check_lanes.sh
|
|
15
|
+
28 test_outbound_query_lanes.sh
|
|
16
|
+
28 test_prior_art_prompt_lanes.sh
|
|
17
|
+
25 test_frontier_digest_retry.sh
|
|
18
|
+
25 test_pr_merge_verified_lanes.sh
|
|
19
|
+
25 test_sim_isolated_run_lanes.sh
|
|
20
|
+
24 test_round_instruments_lanes.sh
|
|
21
|
+
20 test_script_caller_ratchet_lanes.sh
|
|
22
|
+
19 test_utterance_intake_lanes.sh
|
|
23
|
+
18 test_outbound_pr_gate_lanes.sh
|
|
24
|
+
18 test_push_zone_lanes.sh
|
|
25
|
+
17 sync_to_be_lanes.sh
|
|
26
|
+
17 test_hook_templates_copilot_compat_lanes.sh
|
|
27
|
+
17 test_selfcheck_shard_lanes.sh
|
|
28
|
+
17 test_selfcheck_state_lanes.sh
|
|
29
|
+
17 test_subagent_tally_hook_lanes.sh
|
|
30
|
+
13 test_preprep_speech_coach_lanes.sh
|
|
31
|
+
12 test_cartridge_admit_lanes.sh
|
|
32
|
+
9 test_fh_audit_check_lanes.sh
|
|
33
|
+
9 test_finding_pipeline_lanes.sh
|
|
34
|
+
8 test_probe_live_eval_lanes.sh
|
|
35
|
+
7 test_generated_harness_check_lanes.sh
|
|
36
|
+
7 test_runner_surface_index_lanes.sh
|
|
37
|
+
6 test_fh_detach_lanes.sh
|
|
38
|
+
6 test_gate_bootstrap_ephemeral_lanes.sh
|
|
39
|
+
6 test_liveness_echo_token_lanes.sh
|
|
40
|
+
6 test_main_commit_guard_lanes.sh
|
|
41
|
+
6 test_ollama_panel_lanes.sh
|
|
42
|
+
6 test_outbound_query_hook_lanes.sh
|
|
43
|
+
6 test_peer_worktree_detect_lanes.sh
|
|
44
|
+
6 test_preprep_drift_anchor_lanes.sh
|
|
45
|
+
6 test_prepush_destructive_liveness.sh
|
|
46
|
+
6 test_prepush_real_fire_lanes.sh
|
|
47
|
+
6 test_wizard_snippet_merge_lanes.sh
|
|
48
|
+
5 test_env_layer_fingerprint_lanes.sh
|
|
49
|
+
5 test_multibyte_bracket_lint_lanes.sh
|
|
50
|
+
5 test_paper_integrity_lanes.sh
|
|
51
|
+
5 test_pipefail_class_lock_lanes.sh
|
|
52
|
+
5 test_verdict_watermark_lanes.sh
|
|
53
|
+
4 test_consent_registry.sh
|
|
54
|
+
4 test_count_check_all_plugins_lanes.sh
|
|
55
|
+
4 test_count_check_decl_lanes.sh
|
|
56
|
+
4 test_count_check_readme_format_lanes.sh
|
|
57
|
+
4 test_degrade_scan_shell_probes.sh
|
|
58
|
+
4 test_destructive_pre_gate_lanes.sh
|
|
59
|
+
4 test_fh_module_check_lanes.sh
|
|
60
|
+
4 test_heavy_classifier_lanes.sh
|
|
61
|
+
4 test_marker_first_use_lanes.sh
|
|
62
|
+
4 test_memory_link_check.sh
|
|
63
|
+
4 test_prepush_destructive_lanes.sh
|
|
64
|
+
4 test_psa_singlefile_lanes.sh
|
|
65
|
+
4 test_satellite_profile_schema_lanes.sh
|
|
66
|
+
4 test_skill_canon_preload_lanes.sh
|
|
67
|
+
4 test_utterance_checklist_hook_lanes.sh
|
|
68
|
+
3 sync_from_be_lanes.sh
|
|
69
|
+
3 test_dispatch_log_lanes.sh
|
|
70
|
+
3 test_hook_drift_lanes.sh
|
|
71
|
+
3 test_marker_floor_lanes.sh
|
|
72
|
+
3 test_regression_guard_ci_lanes.sh
|
|
73
|
+
3 test_regression_guard_sibling_lanes.sh
|
|
74
|
+
3 test_tag_version_lanes.sh
|
|
75
|
+
2 test_ablation_calibrate_lanes.sh
|
|
76
|
+
2 test_adapter_lanes.sh
|
|
77
|
+
2 test_backtick_guard_lanes.sh
|
|
78
|
+
2 test_branch_claim_lanes.sh
|
|
79
|
+
2 test_claim_propagation_lanes.sh
|
|
80
|
+
2 test_claude_md_size_lanes.sh
|
|
81
|
+
2 test_codex_doctor_root_lanes.sh
|
|
82
|
+
2 test_dispatch_receipt_lanes.sh
|
|
83
|
+
2 test_fh_gate_regressions.sh
|
|
84
|
+
2 test_field_canon_lanes.sh
|
|
85
|
+
2 test_files_manifest_shipping_lanes.sh
|
|
86
|
+
2 test_hook_leg_wiring_lanes.sh
|
|
87
|
+
2 test_locale_invariance_lanes.sh
|
|
88
|
+
2 test_mapped_tracks_lanes.sh
|
|
89
|
+
2 test_marker_axes_run_lanes.sh
|
|
90
|
+
2 test_marker_crossfamily_lanes.sh
|
|
91
|
+
2 test_marker_defense_lanes.sh
|
|
92
|
+
2 test_marker_soul_tenet_lanes.sh
|
|
93
|
+
2 test_node_check_lanes.sh
|
|
94
|
+
2 test_node_infra_delta_lanes.sh
|
|
95
|
+
2 test_package_coverage_lanes.sh
|
|
96
|
+
2 test_pipe_verdict_guard_lanes.sh
|
|
97
|
+
2 test_policy_lens_scorer_lanes.sh
|
|
98
|
+
2 test_post_squash_verify_lanes.sh
|
|
99
|
+
2 test_precommit_pointer_index_lanes.sh
|
|
100
|
+
2 test_prless_delta_scan_lanes.sh
|
|
101
|
+
2 test_probe_scope_lanes.sh
|
|
102
|
+
2 test_publish_verify_poll_lanes.sh
|
|
103
|
+
2 test_resident_cost_lanes.sh
|
|
104
|
+
2 test_revert_probe_lanes.sh
|
|
105
|
+
2 test_satellite_publish_gate_lanes.sh
|
|
106
|
+
2 test_session_checklist_lanes.sh
|
|
107
|
+
2 test_session_close_chain_lanes.sh
|
|
108
|
+
2 test_session_close_lanes.sh
|
|
109
|
+
2 test_session_config_fingerprint_lanes.sh
|
|
110
|
+
2 test_session_load_mirror_fp_lanes.sh
|
|
111
|
+
2 test_stale_clone_guard_lanes.sh
|
|
112
|
+
2 test_target_freeze_lanes.sh
|
|
113
|
+
2 test_track_resolve_lanes.sh
|
|
114
|
+
2 test_usage_ledger_lanes.sh
|
|
115
|
+
2 test_worktree_reclaim_lanes.sh
|
|
116
|
+
1 test_absorption_queue_lanes.sh
|
|
117
|
+
1 test_action_yml_lanes.sh
|
|
118
|
+
1 test_axis23_skip_reason_lanes.sh
|
|
119
|
+
1 test_axis4_lane_substitute_lanes.sh
|
|
120
|
+
1 test_capability_entrypoint_shipping.sh
|
|
121
|
+
1 test_card_drift_probe.sh
|
|
122
|
+
1 test_chamber_run_lanes.sh
|
|
123
|
+
1 test_chamber_sig_lanes.sh
|
|
124
|
+
1 test_channel_inventory_lanes.sh
|
|
125
|
+
1 test_checklist_unblocked_lanes.sh
|
|
126
|
+
1 test_digest_slow_leg_lanes.sh
|
|
127
|
+
1 test_doc_claim_triad_lanes.sh
|
|
128
|
+
1 test_env_delta_worktree_lanes.sh
|
|
129
|
+
1 test_env_purity_lanes.sh
|
|
130
|
+
1 test_evidence_root_psa_lanes.sh
|
|
131
|
+
1 test_fh_goal_change_detection_lanes.sh
|
|
132
|
+
1 test_fh_map_paths_lanes.sh
|
|
133
|
+
1 test_fh_qp_lanes.sh
|
|
134
|
+
1 test_fh_run_resolver_lanes.sh
|
|
135
|
+
1 test_fixture_guard_lanes.sh
|
|
136
|
+
1 test_frontier_digest_recall.sh
|
|
137
|
+
1 test_frontier_digest_recall_negctl.sh
|
|
138
|
+
1 test_gate_shape_scan_lanes.sh
|
|
139
|
+
1 test_gate_two_verdicts_lanes.sh
|
|
140
|
+
1 test_halffix_lanes.sh
|
|
141
|
+
1 test_hook_source_gate_lanes.sh
|
|
142
|
+
1 test_knowledge_seam_lanes.sh
|
|
143
|
+
1 test_ko_tech_writer_lanes.sh
|
|
144
|
+
1 test_lane_runner_lanes.sh
|
|
145
|
+
1 test_leak_scan_control_lanes.sh
|
|
146
|
+
1 test_listing_watch_lanes.sh
|
|
147
|
+
1 test_map_flash_render_lanes.sh
|
|
148
|
+
1 test_map_postprocess_lanes.sh
|
|
149
|
+
1 test_marker_address_lanes.sh
|
|
150
|
+
1 test_marker_affected_lanes.sh
|
|
151
|
+
1 test_marker_diff_sha_lanes.sh
|
|
152
|
+
1 test_marker_oracle_lanes.sh
|
|
153
|
+
1 test_marker_soul_check_lanes.sh
|
|
154
|
+
1 test_marker_standpoint_lanes.sh
|
|
155
|
+
1 test_marker_thirdparty_lanes.sh
|
|
156
|
+
1 test_memory_gc_report_lanes.sh
|
|
157
|
+
1 test_pipefail_sigpipe_lanes.sh
|
|
158
|
+
1 test_png_luma_lanes.sh
|
|
159
|
+
1 test_precommit_gitlink_lanes.sh
|
|
160
|
+
1 test_precommit_staged_drift_lanes.sh
|
|
161
|
+
1 test_preprep_adjacent_dup_lanes.sh
|
|
162
|
+
1 test_preprep_diagram_lanes.sh
|
|
163
|
+
1 test_preprep_drift_anchor.sh
|
|
164
|
+
1 test_preprep_font_lanes.sh
|
|
165
|
+
1 test_preprep_progression_lanes.sh
|
|
166
|
+
1 test_preprep_promise_lanes.sh
|
|
167
|
+
1 test_preprep_retired_lanes.sh
|
|
168
|
+
1 test_preprep_slide_refs_lanes.sh
|
|
169
|
+
1 test_prepush_stdin_integrity.sh
|
|
170
|
+
1 test_proposal_hook_lanes.sh
|
|
171
|
+
1 test_remote_marker_gate_lanes.sh
|
|
172
|
+
1 test_residency_admission_lanes.sh
|
|
173
|
+
1 test_residency_closure_lanes.sh
|
|
174
|
+
1 test_reviewer_capability_conformance.sh
|
|
175
|
+
1 test_sessionstart_multihook_lanes.sh
|
|
176
|
+
1 test_sidecar_calibrate_lanes.sh
|
|
177
|
+
1 test_sim_path_isolation_lanes.sh
|
|
178
|
+
1 test_stale_ref_close_lanes.sh
|
|
179
|
+
1 test_stale_ref_scan_lanes.sh
|
|
180
|
+
1 test_stray_path_lanes.sh
|
|
181
|
+
1 test_temper_check_lanes.sh
|
|
182
|
+
1 test_tikitaka_score_lanes.sh
|
|
183
|
+
1 test_utterance_skill_probe_lanes.sh
|
|
184
|
+
1 test_version_lockstep_lanes.sh
|
|
@@ -775,6 +775,17 @@ CARD_LINE_EOF
|
|
|
775
775
|
[ "$DRIFT_HITS" -eq 0 ] && echo "✅ ⑤-b no card absence-claim contradicted by on-disk artifacts"
|
|
776
776
|
fi
|
|
777
777
|
|
|
778
|
+
# ⑤-S STATUS-TAG probe (ADVISORY — never sets FAIL). Each «🌅 다음에 볼 것» item in the newest card
|
|
779
|
+
# block should open with one tag from a closed set, so the next session reads state instead of
|
|
780
|
+
# re-deriving it. Presence/type only; whether the tag is true stays judgment. Anchor: card_status_tags.sh.
|
|
781
|
+
if [ -f "$FH/scripts/card_status_tags.sh" ]; then
|
|
782
|
+
bash "$FH/scripts/card_status_tags.sh" "$CARD"
|
|
783
|
+
_ST_RC=$?
|
|
784
|
+
[ "$_ST_RC" = 0 ] || [ "$_ST_RC" = 3 ] || echo "⚠️ ⑤-S status tags NOT MEASURED — checker exited $_ST_RC (instrument error)"
|
|
785
|
+
else
|
|
786
|
+
echo "⚠️ ⑤-S status tags NOT MEASURED — scripts/card_status_tags.sh missing"
|
|
787
|
+
fi
|
|
788
|
+
|
|
778
789
|
# ⑤-C CARRY-OVER probe — 카드 재작성이 «아직 안 온 기한» 을 날렸는가.
|
|
779
790
|
# WHY (2026-08-24, 실측 손실 1건): ⑤ 재작성이 delta update 가 아니라 새로 쓰기가 되어 미완·
|
|
780
791
|
# 시각박힌 항목이 통째로 사라졌다 — 그날 저녁 19:00 게시, 다음날 GeekNews, 14일 referrer 측정,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lanes for scripts/card_status_tags.sh (⑤-S). Known pair + the two NOT-MEASURED shapes + the
|
|
3
|
+
# empty set (which must not read as a pass). Each lane prints the line it judged.
|
|
4
|
+
set -u
|
|
5
|
+
FH="$(cd "$(dirname "$0")/.." && pwd)"
|
|
6
|
+
S="$FH/scripts/card_status_tags.sh"
|
|
7
|
+
T=$(mktemp -d "${TMPDIR:-/tmp}/cst.XXXXXX")
|
|
8
|
+
pass=0; fail=0
|
|
9
|
+
lane() { # name, card body, expected exit, expected pattern
|
|
10
|
+
printf '%s' "$2" > "$T/card.md"
|
|
11
|
+
out=$(bash "$S" "$T/card.md" 2>&1); rc=$?
|
|
12
|
+
if [ "$rc" = "$3" ] && printf '%s' "$out" | grep -q -E "$4"; then
|
|
13
|
+
echo "PASS $1 — $(printf '%s' "$out" | head -1)"; pass=$((pass + 1))
|
|
14
|
+
else
|
|
15
|
+
echo "FAIL $1 — rc=$rc out=$(printf '%s' "$out" | head -2 | tr '\n' ' ')"; fail=$((fail + 1))
|
|
16
|
+
fi
|
|
17
|
+
}
|
|
18
|
+
HEAD='# 🗓️ 2026-11-03 마감
|
|
19
|
+
|
|
20
|
+
> 완료 = x
|
|
21
|
+
|
|
22
|
+
## 🌅 다음에 볼 것
|
|
23
|
+
'
|
|
24
|
+
TAIL='
|
|
25
|
+
## ↩️ 닫힌 것
|
|
26
|
+
- 1. not an item of this section
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# 🗓️ older block
|
|
31
|
+
## 🌅 다음에 볼 것
|
|
32
|
+
1. untagged item in an OLDER block (must not count)
|
|
33
|
+
'
|
|
34
|
+
lane S1-all-tagged "$HEAD"'1. [merged] #1008 머지
|
|
35
|
+
2. [open-pr] FoD #203
|
|
36
|
+
3. [operator] 임시 폴더 정리
|
|
37
|
+
'"$TAIL" 0 '^✅ ⑤-S status tags: 3/3'
|
|
38
|
+
lane S2-untagged "$HEAD"'1. [merged] #1008 머지
|
|
39
|
+
2. FoD #203 열림
|
|
40
|
+
3. **임시 폴더** 정리
|
|
41
|
+
'"$TAIL" 0 '^⚠️ ⑤-S status tags: 2/3'
|
|
42
|
+
lane S3-unknown-tag "$HEAD"'1. [done] 끝
|
|
43
|
+
2. [planned] 다음
|
|
44
|
+
'"$TAIL" 0 '1/2 .*lack a tag'
|
|
45
|
+
lane S4-tag-not-first "$HEAD"'1. FoD #203 [open-pr]
|
|
46
|
+
'"$TAIL" 0 '1/1 .*lack a tag'
|
|
47
|
+
lane S5-empty-set "$HEAD"'(없음)
|
|
48
|
+
'"$TAIL" 0 '^⬜ ⑤-S status tags: 0 items'
|
|
49
|
+
lane S6-no-section '# 🗓️ block
|
|
50
|
+
## 🧵 이어가려면
|
|
51
|
+
1. [merged] x
|
|
52
|
+
' 3 'NOT MEASURED — newest card block has no'
|
|
53
|
+
# S7: card path that does not exist (the lane() helper always writes a file, so run it directly)
|
|
54
|
+
out=$(bash "$S" "$T/missing.md" 2>&1); rc=$?
|
|
55
|
+
if [ "$rc" = 3 ] && printf '%s' "$out" | grep -q 'card not found'; then echo "PASS S7-missing-card — $out"; pass=$((pass + 1)); else echo "FAIL S7-missing-card — rc=$rc $out"; fail=$((fail + 1)); fi
|
|
56
|
+
rm -rf "$T"
|
|
57
|
+
echo "card_status_tags lanes: $pass pass · $fail fail"
|
|
58
|
+
[ "$fail" -eq 0 ]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Lanes for scripts/correction_moments.py — fixture ledgers only (never the real ones, which can hold
|
|
3
|
+
# in-house context). Known pair: the same correction phrased differently on two days must pair;
|
|
4
|
+
# an approval must not be a hit. Plus the exclusions, each of which must be COUNTED, not dropped.
|
|
5
|
+
set -u
|
|
6
|
+
FH="$(cd "$(dirname "$0")/.." && pwd)"
|
|
7
|
+
S="$FH/scripts/correction_moments.py"
|
|
8
|
+
T=$(mktemp -d "${TMPDIR:-/tmp}/cmt.XXXXXX")
|
|
9
|
+
pass=0; fail=0
|
|
10
|
+
check() { # name, expected rc, pattern, [dir]
|
|
11
|
+
out=$(python3 "$S" "${4:-$T/led}" 2>&1); rc=$?
|
|
12
|
+
if [ "$rc" = "$2" ] && printf '%s' "$out" | grep -q -E "$3"; then echo "PASS $1"; pass=$((pass + 1))
|
|
13
|
+
else echo "FAIL $1 — rc=$rc"; printf '%s\n' "$out" | head -4 | sed 's/^/ /'; fail=$((fail + 1)); fi
|
|
14
|
+
}
|
|
15
|
+
mkdir -p "$T/led" "$T/empty"
|
|
16
|
+
cat > "$T/led/aaaa1111.jsonl" <<'EOF'
|
|
17
|
+
{"ts": "2026-10-01T10:00:00", "n": 1, "text": "ㅇㅇ 머지하자 초록이면"}
|
|
18
|
+
{"ts": "2026-10-01T10:05:00", "n": 2, "text": "아니 보고서는 영어 말고 한글 반말로 써줘"}
|
|
19
|
+
{"ts": "2026-10-01T10:06:00", "n": 3, "text": "<agent-message from=\"x\"> 아니 이건 서브에이전트 보고다 보고서 한글 반말</agent-message>"}
|
|
20
|
+
{"ts": "2026-10-01T10:07:00", "n": 4, "text": "응"}
|
|
21
|
+
not json at all
|
|
22
|
+
EOF
|
|
23
|
+
cat > "$T/led/bbbb2222.jsonl" <<'EOF'
|
|
24
|
+
{"ts": "2026-10-04T09:00:00", "n": 1, "text": "또 보고서를 영어로 썼네. 한글 반말로 다시 해줘"}
|
|
25
|
+
{"ts": "2026-10-04T09:10:00", "n": 2, "text": "아니 머지 순서가 틀렸어 태그 먼저"}
|
|
26
|
+
EOF
|
|
27
|
+
listing=$(python3 "$S" "$T/led" --all) # own variable: check() overwrites $out. --all: L3/L4 must see unpaired hits, or they pass on an empty listing
|
|
28
|
+
check L1-cross-day-pair 0 '^## R1 — shared: .*반말'
|
|
29
|
+
check L2-counts-exclusions 0 'envelope=1 short\(<6 chars\)=1 long\(>600 chars\)=0 malformed=1'
|
|
30
|
+
if printf '%s' "$listing" | grep -q '머지하자 초록이면'; then echo "FAIL L3-approval-not-a-hit"; fail=$((fail + 1)); else echo "PASS L3-approval-not-a-hit"; pass=$((pass + 1)); fi
|
|
31
|
+
if printf '%s' "$listing" | grep -q '서브에이전트 보고다'; then echo "FAIL L4-envelope-not-a-hit"; fail=$((fail + 1)); else echo "PASS L4-envelope-not-a-hit"; pass=$((pass + 1)); fi
|
|
32
|
+
if printf '%s' "$listing" | grep -q '머지 순서가 틀렸어'; then echo "PASS L3c-listing-alive"; pass=$((pass + 1)); else echo "FAIL L3c-listing-alive (L3/L4 would pass on an empty listing)"; fail=$((fail + 1)); fi
|
|
33
|
+
check L5-cue-hits 0 'cue hits=3 '
|
|
34
|
+
# L6: the same text re-pasted on another day is dropped as a re-paste, not reported as recurrence
|
|
35
|
+
mkdir -p "$T/rep"
|
|
36
|
+
printf '%s\n' '{"ts": "2026-10-01T10:00:00", "n": 1, "text": "아니 이 표의 분모가 틀렸어 재현율 다시 계산"}' > "$T/rep/c1.jsonl"
|
|
37
|
+
printf '%s\n' '{"ts": "2026-10-03T10:00:00", "n": 1, "text": "아니 이 표의 분모가 틀렸어 재현율 다시 계산"}' > "$T/rep/c2.jsonl"
|
|
38
|
+
check L6-repaste-dropped 0 'recurring pairs .*=0 · re-pasted pairs dropped=1' "$T/rep"
|
|
39
|
+
check L7-empty-not-zero 2 'NOT MEASURED' "$T/empty"
|
|
40
|
+
rm -rf "$T"
|
|
41
|
+
echo "correction_moments lanes: $pass pass · $fail fail"
|
|
42
|
+
[ "$fail" -eq 0 ]
|
|
@@ -208,6 +208,42 @@ else
|
|
|
208
208
|
printf ' ❌ %-52s rc=%s out=%s err=%s\n' "C2 block: exit 2, stderr carries the reason" "$c_rc" "$c_out" "$c_err"; fail=$((fail+1))
|
|
209
209
|
fi
|
|
210
210
|
|
|
211
|
+
# B — permission_mode default (2026-11-03): unset + bypassPermissions blocks; explicit 0 restores
|
|
212
|
+
# advisory; every other mode keeps advisory. The decision reads the payload field, so each lane
|
|
213
|
+
# sends a full payload with permission_mode set.
|
|
214
|
+
payload_mode() { python3 -c 'import json,sys; print(json.dumps({"tool_name":"Bash","permission_mode":sys.argv[2],"tool_input":{"command":sys.argv[1]}}))' "$1" "$2"; }
|
|
215
|
+
b_lane() { # name, expected rc, command, mode, env-assignment-or-empty, stderr needle (block) or "-"
|
|
216
|
+
local name=$1 want=$2 cmd=$3 mode=$4 envv=$5 needle=$6 o e r
|
|
217
|
+
if [ -n "$envv" ]; then
|
|
218
|
+
o=$(payload_mode "$cmd" "$mode" | env "$envv" bash "$G" 2>"$c_errf"); r=$?
|
|
219
|
+
else
|
|
220
|
+
o=$(payload_mode "$cmd" "$mode" | env -u FH_DESTRUCTIVE_BLOCK bash "$G" 2>"$c_errf"); r=$?
|
|
221
|
+
fi
|
|
222
|
+
e=$(cat "$c_errf")
|
|
223
|
+
if [ "$r" -eq "$want" ] && { [ "$needle" = "-" ] || printf '%s' "$e" | grep -q "$needle"; }; then
|
|
224
|
+
printf ' ✅ %-52s %s\n' "$name" OK; pass=$((pass+1))
|
|
225
|
+
else
|
|
226
|
+
printf ' ❌ %-52s rc=%s out=%s err=%s\n' "$name" "$r" "$o" "$e"; fail=$((fail+1))
|
|
227
|
+
fi
|
|
228
|
+
}
|
|
229
|
+
b_lane "B1 bypass + unset: blocks (exit 2)" 2 "$HIT_CMD" bypassPermissions "" "permission_mode=bypassPermissions"
|
|
230
|
+
b_lane "B2 bypass + BLOCK=0: advisory (exit 0)" 0 "$HIT_CMD" bypassPermissions "FH_DESTRUCTIVE_BLOCK=0" "-"
|
|
231
|
+
b_lane "B3 default + unset: advisory (exit 0)" 0 "$HIT_CMD" default "" "-"
|
|
232
|
+
b_lane "B4 auto + unset: advisory (exit 0)" 0 "$HIT_CMD" auto "" "-"
|
|
233
|
+
b_lane "B5 bypass + clean cmd: silent (exit 0)" 0 "git status" bypassPermissions "" "-"
|
|
234
|
+
b_lane "B6 bypass + noqa: exempt (exit 0)" 0 "$HIT_CMD # noqa: destructive-op" bypassPermissions "" "-"
|
|
235
|
+
b_lane "B7 default + BLOCK=1: still blocks" 2 "$HIT_CMD" default "FH_DESTRUCTIVE_BLOCK=1" "FH_DESTRUCTIVE_BLOCK=1"
|
|
236
|
+
b_lane "B8 bypass + BLOCK=2: advisory as before" 0 "$HIT_CMD" bypassPermissions "FH_DESTRUCTIVE_BLOCK=2" "-"
|
|
237
|
+
b_lane "B9 bypass + BLOCK= (empty): blocks" 2 "$HIT_CMD" bypassPermissions "FH_DESTRUCTIVE_BLOCK=" "permission_mode=bypassPermissions"
|
|
238
|
+
b_lane "B10 BLOCK=1 message no longer says unset" 2 "$HIT_CMD" bypassPermissions "FH_DESTRUCTIVE_BLOCK=1" "set FH_DESTRUCTIVE_BLOCK=0"
|
|
239
|
+
# B2 must also deliver the advisory, not just exit 0 silently.
|
|
240
|
+
o=$(payload_mode "$HIT_CMD" bypassPermissions | FH_DESTRUCTIVE_BLOCK=0 bash "$G" 2>/dev/null)
|
|
241
|
+
if printf '%s' "$o" | grep -q 'DESTRUCTIVE-OP'; then
|
|
242
|
+
printf ' ✅ %-52s %s\n' "B2b bypass + BLOCK=0 still emits the advisory" OK; pass=$((pass+1))
|
|
243
|
+
else
|
|
244
|
+
printf ' ❌ %-52s out=%s\n' "B2b bypass + BLOCK=0 still emits the advisory" "$o"; fail=$((fail+1))
|
|
245
|
+
fi
|
|
246
|
+
|
|
211
247
|
# C3 — clean command: NO emission at all (silence must stay silent).
|
|
212
248
|
c_out=$(payload 'git status' | bash "$G" 2>"$c_errf"); c_rc=$?
|
|
213
249
|
rm -f "$c_errf"
|
|
@@ -19,6 +19,11 @@ echo "── env-layer-fingerprint lanes ──"
|
|
|
19
19
|
|
|
20
20
|
[ -x "$S" ] || { echo "FAIL $S 가 없거나 실행 불가"; exit 1; }
|
|
21
21
|
|
|
22
|
+
# evidence.marker 는 훅과 같은 `<브랜치>_<오늘>` 주소 하나만 읽는다. 그러니 픽스처도 그
|
|
23
|
+
# 주소로 만들어야 하고, 25분짜리 selfcheck 안에서 자정을 넘겨도 흔들리지 않게 「오늘」을 여기서
|
|
24
|
+
# 고정한다(계기가 그 목적으로 내놓은 이음새). 고정을 지우면 L3 은 적색이 된다 — 초록이 아니다.
|
|
25
|
+
export FH_FP_TODAY=2026-01-02
|
|
26
|
+
|
|
22
27
|
TMP="$(mktemp -d)" || exit 2
|
|
23
28
|
trap 'rm -rf "$TMP"' EXIT
|
|
24
29
|
|
|
@@ -34,7 +39,7 @@ mk_hub() { # mk_hub DIR [full] — READ 층만(=새 클론) 또는 로컬 층
|
|
|
34
39
|
: > "$d/.claude/registry/LOCAL_SKILL_REGISTRY.md"
|
|
35
40
|
: > "$d/CLAUDE.local.md"
|
|
36
41
|
: > "$d/tracks/_meta/edit_manifest.yaml"
|
|
37
|
-
: > "$d/tracks/_meta/.
|
|
42
|
+
: > "$d/tracks/_meta/.axes_23_passed_fixture_${FH_FP_TODAY}.marker"
|
|
38
43
|
: > "$d/tracks/_meta/reference_next_session_starter.md"
|
|
39
44
|
: > "$d/tracks/_meta/session_fixture.md"
|
|
40
45
|
fi
|
|
@@ -15,7 +15,12 @@ DETACH="$HERE/fh_detach.py"
|
|
|
15
15
|
DETAIL="$ROOT/plugins/fh-meta/skills/install-wizard/SKILL_detail.md"
|
|
16
16
|
T="$(mktemp -d)"
|
|
17
17
|
trap 'rm -rf "$T"' EXIT
|
|
18
|
-
pass=0; fail=0
|
|
18
|
+
pass=0; fail=0; unmeas=0
|
|
19
|
+
# 🟥 미측정은 통과도 실패도 아니다. 전제를 못 만든 레인을 ❌ 로 찍으면 주체를 의심하게
|
|
20
|
+
# 만들고(실측: M5d, 아래), ✅ 로 찍으면 공허한 초록이 된다. 세 번째 칸을 둔다.
|
|
21
|
+
unmeasured() { # unmeasured <name> <why>
|
|
22
|
+
unmeas=$((unmeas+1)); printf ' ⬜ %-58s %s\n' "$1" "$2 — 미측정, 통과 아님"
|
|
23
|
+
}
|
|
19
24
|
chk() { # chk <name> <got> <want>
|
|
20
25
|
if [ "$2" = "$3" ]; then pass=$((pass+1)); printf ' ✅ %-58s %s\n' "$1" "$2"
|
|
21
26
|
else fail=$((fail+1)); printf ' ❌ %-58s got=%s want=%s\n' "$1" "$2" "$3"; fi
|
|
@@ -274,7 +279,21 @@ chk "M5c … with --machine the same file is an error (rc 10)" "$(detach_p "$W"
|
|
|
274
279
|
W="$T/w17"; mkworld "$W"; install "$W"
|
|
275
280
|
mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/.claude/settings.json" "$W/proj/.claude/settings.json"
|
|
276
281
|
chmod 000 "$W/hub/.claude/settings.json"
|
|
277
|
-
|
|
282
|
+
# 🟥 `chmod 000` 은 root 를 묶지 않는다 — **이 파일 자신이 그것을 이미 적는다**(아래 M6 줄의
|
|
283
|
+
# «chmod 000 does not bind root — codex»). 그 지적이 이웃 레인에만 반영되고 이 레인에는
|
|
284
|
+
# 안 반영된 절반 수리였다. 전제가 안 걸리면 파일이 그냥 읽히고, 주체는 올바르게 rc 0 을
|
|
285
|
+
# 내는데 레인은 `got=0/0 want=0/10` 을 찍는다 — 읽는 사람을 `fh_detach.py` 로 보낸다.
|
|
286
|
+
# 실측 2026-11-02, 같은 트리·같은 스위트·uid 만 바꿈: root → 61 passed · 1 failed(M5d ❌)
|
|
287
|
+
# / `setpriv --reuid=65534` → **62 passed · 0 failed**(M5d ✅ `0/10`). 즉 주체는 성하다.
|
|
288
|
+
# 그러니 이 자리는 수리할 결함이 아니라 **못 쟀다고 말해야 하는 칸**이다. CI 는 비-root 라
|
|
289
|
+
# 거기서는 그대로 측정된다. ⚠️ 전제를 «얻는» 길(이 두 호출만 권한 내려 돌리기)은 택하지
|
|
290
|
+
# 않았다 — `$T` 는 mktemp 의 0700 이라 통과 자체가 안 되고, 통과시키면 주체 프로세스의 uid
|
|
291
|
+
# 가 바뀌어 레인이 재는 것이 달라진다. 이름으로 남기고 고치지 않는다.
|
|
292
|
+
if cat "$W/hub/.claude/settings.json" >/dev/null 2>&1; then
|
|
293
|
+
unmeasured "M5d an unreadable FH-clone settings file" "chmod 000 이 이 uid($(id -u)) 를 묶지 않았다"
|
|
294
|
+
else
|
|
295
|
+
chk "M5d an unreadable FH-clone settings file: project detach rc 0 · --machine rc 10" "$(detach_p "$W" "$W/proj" --apply)/$(detach_p "$W" "$W/proj" --machine)" "0/10"
|
|
296
|
+
fi
|
|
278
297
|
chmod 644 "$W/hub/.claude/settings.json"
|
|
279
298
|
W="$T/w18"; mkworld "$W"; install "$W"
|
|
280
299
|
mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/CLAUDE.local.md" "$W/proj/CLAUDE.local.md"
|
|
@@ -298,5 +317,9 @@ chk "W3 install-wizard SKILL.md names --machine" "$(grep -c 'fh_detach.py" --pr
|
|
|
298
317
|
chk "W2 install-wizard SKILL.md points at the detach command" "$(grep -q 'scripts/fh_detach.py" --project . --apply' "$ROOT/plugins/fh-meta/skills/install-wizard/SKILL.md" && echo yes)" yes
|
|
299
318
|
|
|
300
319
|
echo
|
|
301
|
-
echo "fh_detach lanes: $pass passed · $fail failed"
|
|
302
|
-
[ "$fail" -eq 0 ]
|
|
320
|
+
echo "fh_detach lanes: $pass passed · $fail failed · $unmeas unmeasured"
|
|
321
|
+
if [ "$unmeas" -gt 0 ] && [ "$fail" -eq 0 ]; then
|
|
322
|
+
# 통과로 접지 않는다. 같은 판정을 test_mutation_probe_lanes.sh 가 쓰는 문구로 낸다.
|
|
323
|
+
echo "INCOMPLETE fh_detach: $unmeas 레인이 전제를 못 만들어 안 돌았다 — 통과 아님"
|
|
324
|
+
fi
|
|
325
|
+
[ "$fail" -eq 0 ] && [ "$unmeas" -eq 0 ]
|