@chrono-meta/fh-gate 3.20.1 → 3.22.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/CATALOG.md +5 -0
- package/CLAUDE.md +67 -283
- package/knowledge/shared/dialogue/claude_code_runtime_flow.md +1 -0
- package/knowledge/shared/harness-core/checkout_layer_drift.md +28 -0
- package/knowledge/shared/harness-core/claude_md_gate_details.md +343 -0
- package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +89 -0
- package/knowledge/shared/harness-core/fh_detail_protocols.md +88 -0
- package/knowledge/shared/harness-core/fh_three_layer_canon.md +49 -0
- package/knowledge/shared/harness-core/field_verdict_crossfamily_gate.md +29 -0
- package/knowledge/shared/harness-core/hook_channel_visibility.md +80 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +9 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +39 -0
- package/knowledge/shared/rules/operations.md +7 -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 +36 -0
- package/plugins/fh-meta/skills/goal-quench/SKILL.md +1 -1
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/fh_node_check.sh +4 -1
- package/scripts/fh_session_load.sh +55 -0
- package/scripts/hook_drift_check.sh +188 -0
- package/scripts/selfcheck.sh +71 -0
- package/scripts/session_close_check.sh +44 -7
- package/scripts/session_config_fingerprint.sh +139 -0
- package/scripts/sidecar_calibrate.sh +168 -13
- package/scripts/test_claude_md_size_lanes.sh +74 -0
- package/scripts/test_fh_audit_check_lanes.sh +140 -0
- package/scripts/test_hook_drift_lanes.sh +143 -0
- package/scripts/test_ollama_panel_lanes.sh +69 -10
- package/scripts/test_session_config_fingerprint_lanes.sh +116 -0
- package/scripts/test_session_load_mirror_fp_lanes.sh +122 -0
- package/scripts/test_subagent_tally_hook_lanes.sh +11 -7
- package/templates/.claude/rules/mcp_tool_gating.md +17 -1
|
@@ -642,3 +642,52 @@ standpoint: ⓑ 는 **자기 필드**가 정본이고, `axes-run` 은
|
|
|
642
642
|
- **등급 판정을 하지 않는다** — `ship_readiness_gate.md` 가 정본이다.
|
|
643
643
|
- **4축을 매번 다 돌리라고 하지 않는다** — 축은 실패 모드에 맞춰 고른다.
|
|
644
644
|
- **3층이 깔끔한 계층이라고 주장하지 않는다** — §0 의 자기참조 절을 반드시 같이 읽어라.
|
|
645
|
+
|
|
646
|
+
---
|
|
647
|
+
|
|
648
|
+
## §CM-External-Commit-Gate-Number — 외부 수치 — arXiv:2609.10969 (CLAUDE.md 에서 이관)
|
|
649
|
+
|
|
650
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Identity) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
651
|
+
|
|
652
|
+
🟢 **외부 수치가 생겼다(2026-09-12)**: `arXiv:2609.10969`(*Engineering Reliable Commit Gates for Agentic AI*, 2026-09-10)이 고정예산 2×2 로 **48 템플릿 · 2,880 시나리오**에서 두 축을 분리해 쟀다 — «**같은 증거를 읽는 교차-모델 투표**»는 위험 제안의 **62.9 %** 를 승인하고, «**독립 출처**»는 **22.9 %** 다. 출처 효과 **40.9 %p** vs 모델 다양성 효과 **11.3 %p** — **3.6 배**.
|
|
653
|
+
|
|
654
|
+
이 줄은 n=4+4 내부 관찰로 서 있었고 이제 외부 n=2,880 이 같은 방향을 가리킨다(숫자는 초록 직독으로 재확인, 2026-09-12).
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
## §CM-Axes-Run-Notation-Evidence — `axes-run` 표기법은 판별자가 아니다 — 코퍼스 실측 (CLAUDE.md 에서 이관)
|
|
660
|
+
|
|
661
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Identity) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
662
|
+
|
|
663
|
+
⚠️ **표기법은 판별자가 아니다** — 초판이 «기호 키를 보면 6축인 줄 안다» 고 적었는데 **코퍼스 실측이 반증했다**: axes-run 보유 53건 중 기호 키가 4건인데 그중 **2건이 2026-08-10 자이면서 옛 4축 의미로 기호를 쓴다**(`ⓑ 첫실사용` · `ⓓ 되돌림` — 현 배열에선 각각 ⓔ·ⓕ), 혼용도 1건 있다. 훅은 그 셋을 안 읽으므로 커밋은 안 막지만 **감사자의 grep 은 거기서 틀린 답을 낸다**.
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
## §CM-Standpoint-Validator-Retraction — `standpoint:` 값 검증 — «0줄» 철회와 advisory→차단 (CLAUDE.md 에서 이관)
|
|
669
|
+
|
|
670
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Identity) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
671
|
+
|
|
672
|
+
🟥 **초판은 여기에 «값을 검증하는 코드가 아직 0줄»이라고 적었는데 그건 거짓이었다 — 2026-08-23 정정(RETRACTED).** 실측: `templates/.git-hooks/pre-commit` 의 `validate_standpoint_leg()` 는 **86줄**이고 `:1953` 에서 호출되어 `FAILED=1` 로 **커밋을 차단한다**(레인 = `scripts/test_marker_standpoint_lanes.sh`, 실재). 정확한 잔여는 「0줄」보다 훨씬 좁고, **그 구분을 접으면 안 된다**: ⓐ **enum 은 닫혀 있고 차단한다** — 함수 안 `return 1` **6개**(`standpoint:` 줄 부재 · 중복 `standpoint:` 줄 · enum 비-멤버 값 · `crossfamily:` 토큰 오염 · 근거 없는 `not-applicable` · 근거 없는 `DEGRADED_*`/`UNKNOWN`). ⓑ **`tier2`+ 의 «실행을 명명했는가» grounds 검사도 2026-09-12 부로 차단한다** — 그 전까지는 `⚠️` 만 찍고 `return 1` 을 안 했다(훅 스스로 *"Advisory by design"* 이라 적었다). 🟢 **바꾼 근거는 외부 실측이다**: `arXiv:2609.10969` 이 출처 축을 **40.9 %p**, 모델 축을 **11.3 %p** 로 재서(n=2,880 · 고정 호출예산) «강한 축의 grounds 를 advisory 로 두고 약한 축을 하드 차단» 이 균형이 아니게 됐다. grace date 로 소급하지 않으며(`< 2026-09-12` 마커는 종전 경고), 레인 = `test_marker_standpoint_lanes.sh` N8/N8b/N8c/N8d. 🟥 막는 것은 **기록의 형태**(명령과 출력을 명명했는가)이지 그 실행의 진위가 아니다. **왜 그렇게 적혔나**: 2026-08-20 정정이 «enum 은 닫혔고 grounds 는 advisory» 로 이미 들어왔는데(§Standpoint-Execution-Evidence 포인터 줄이 그대로 적고 있다) **이 줄만 옛 서술로 남았다** — 같은 파일이 자기 자신과 어긋난 반쪽-픽스 전파경계다(`[[feedback_half_fix_propagation_boundary]]`). 🟥 **이 문단의 논지는 바뀌지 않는다** — 닫힌 것은 여전히 **«형식»이지 «진위»가 아니고**, 자평·게임 가능성은 그대로 열려 있다. 오히려 좁아진 만큼 정확해졌다.
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
## §CM-Self-Grading-Open — 자평·게임 가능성은 안 닫혔다 — 형식 vs 진위 (CLAUDE.md 에서 이관)
|
|
678
|
+
|
|
679
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Identity) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
680
|
+
|
|
681
|
+
> 🟥 **자평이다 · 게임 가능하다 — 둘은 안 닫혔다. 「훅이 없다」는 2026-08-17 부로 거짓이 됐고,
|
|
682
|
+
> 그 정정이 경계를 더 선명하게 만든다.** 그날 `standpoint:`(PR #429)와 `thirdparty:`(PR #434)에
|
|
683
|
+
> 값 검증 레인이 붙어, `crossfamily:` 와 함께 **세 필드가 훅에서 닫힌 enum + 비공허 근거로
|
|
684
|
+
> 검증된다**(`validate_{crossfamily,standpoint,thirdparty}_leg`). 🟥 **그러나 닫힌 것은 «형식»
|
|
685
|
+
> 이지 «진위»가 아니다** — 훅은 값이 목록 안에 있고 근거가 비어 있지 않은지를 보지, 그 값이
|
|
686
|
+
> **참인지**는 보지 않는다. 도그푸드 증거: 그 기계화를 촉발한 거짓값(어느 릴리스 마커의
|
|
687
|
+
> `not-applicable`)이 **새 레인을 그대로 통과한다.** 형식이 옳기 때문이다.
|
|
688
|
+
> 그래서 **자평·게임 가능성은 그대로 열려 있다.** 그건 결함이 아니라 §Mechanization Boundary 가
|
|
689
|
+
> 의도적으로 사람에게 남긴 자리다(판단을 코드로 굳히면 오늘의 판단이 내일의 천장이 된다).
|
|
690
|
+
> 닫는 방향은 여전히 **cross-family 가 그 마커를 읽는 것**이지 자기 채점을 더 성실히 하는 게
|
|
691
|
+
> 아니다 — 2026-08-17 실측이 그 근거를 강화했다(병렬 두 세션, 상호 정정 7건, **판단 축 자력
|
|
692
|
+
> 적발 0**, 둘 다 사전등록·컨트롤·되돌림을 다 돌리고도 각자 자기 쪽으로 접었다).
|
|
693
|
+
|
|
@@ -953,3 +953,32 @@ review, not fed in externally, and a second live demonstration the same day when
|
|
|
953
953
|
standpoint review of this very section caught real residency and citation defects in the first
|
|
954
954
|
draft (fixed in the same commit that added this line).
|
|
955
955
|
|
|
956
|
+
---
|
|
957
|
+
|
|
958
|
+
## §CM-Unmapped-Pilot-Evidence — Unmapped-file trigger — pilot evidence and the cue condition (moved from CLAUDE.md)
|
|
959
|
+
|
|
960
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Field-Harness Load-Bearing Change Gate) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
961
|
+
|
|
962
|
+
🟥 **Pilot evidence, below bar, and CUE-DEPENDENT** (floor tier, blind, one
|
|
963
|
+
variable — this paragraph injected): **before 0/1** — *"FH 자산도 매핑된 필드 하네스도 아니라서 …
|
|
964
|
+
적용 대상이 아닙니다"*, reviewed bare; **after 2/3** ran the gate. Both arms' prompt ended with *"네가
|
|
965
|
+
설치된 리뷰 절차가 있으면 그것을 따라라"*. 🟥 **Without that cue the gate fired 0/51** (same day, 17
|
|
966
|
+
unmapped gate-shaped files × 3, same doctrine in the clone, task sentence only). So this paragraph is
|
|
967
|
+
muscle, not skeleton: a session must be *reminded* to run its own procedure, and no hook supplies the
|
|
968
|
+
reminder yet (`fh_signal_2026-09-08_gate-needs-cue.md`). Do not cite 2/3 without the cue condition.
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
---
|
|
972
|
+
|
|
973
|
+
## §CM-Crossfamily-Typing-History — Why `crossfamily:` became typed — the 2026-08-08 marker count (moved from CLAUDE.md)
|
|
974
|
+
|
|
975
|
+
> Relocated **verbatim** from `CLAUDE.md` (§Field-Harness Gate) on 2026-09-26 — resident-size diet. The resident text kept the rule and a pointer here; this section keeps the why / evidence layer. Nothing was reworded.
|
|
976
|
+
|
|
977
|
+
Before 2026-08-08
|
|
978
|
+
this axis was convention-only — measured on this repo, 140 markers carried the tier verdict 129
|
|
979
|
+
times and any decorrelation verdict **4** times.
|
|
980
|
+
|
|
981
|
+
(🟥 the "two blind Sonnet sims graded a cold-read
|
|
982
|
+
`tier2`" citation that stood here is **RETRACTED** — dead instrument, `tool_uses: 0`; the live re-run
|
|
983
|
+
inverted it at reps=1, below bar. The **rule** stands on its own wording, not on that sim)
|
|
984
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hook channel visibility — which hook output reaches whom, and when
|
|
3
|
+
tags: [hooks, permissions, auto-approve, visibility, measured]
|
|
4
|
+
status: measured (partial — unmeasured cells are named, not filled)
|
|
5
|
+
created: 2026-09-26
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Hook channel visibility — 훅 출력은 «누구에게, 언제» 닿는가
|
|
9
|
+
|
|
10
|
+
> **한 줄**: 훅이 무언가를 «냈다» 와 사람이 그것을 «고르기 전에 봤다» 는 다른 명제다. 그리고
|
|
11
|
+
> 훅이 **ask** 를 냈다고 호출이 멈추는 것도 아니다 — 누군가 권한 프롬프트에 대신 답하면 ask 는
|
|
12
|
+
> 삼켜진다. 멈추는 것은 **deny / exit 2** 다.
|
|
13
|
+
|
|
14
|
+
출처: 필드 하네스(데스크톱 펫 게이트 — 권한 요청을 사람 대신 자동승인하는 앱에 FH 게이트를 싣는
|
|
15
|
+
프로젝트)를 만들며 2026-09-25~26 에 잰 대화형 pty 실측 세 건. 원장은 로컬(`tracks/_meta/result_2026-09-25_gate-vs-autoapprove_INTERACTIVE.md`
|
|
16
|
+
· `result_2026-09-25_hook-answers-questions.md` · `result_2026-09-26_boost-visibility-2.1.283.md`,
|
|
17
|
+
gitignored)이고, 이 문서는 그 판정만 옮긴다. 모델은 전부 sonnet, 격리는
|
|
18
|
+
`--setting-sources project,local --strict-mcp-config`.
|
|
19
|
+
|
|
20
|
+
## 1. 가장 먼저 — ask 는 자동승인 앞에서 fail-closed 가 아니다
|
|
21
|
+
|
|
22
|
+
| 팔 (대화형, CLI 2.1.282, 명령 `git push origin main`) | reps | 착지 |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| 게이트 PreToolUse **ask** + PermissionRequest 훅 **allow** (auto 3 · acceptEdits 2) | 5 | **5/5 실행됨** — ask 가 삼켜졌다 |
|
|
25
|
+
| 게이트 PreToolUse **deny** + PermissionRequest 훅 allow (acceptEdits) | 2 | **0/2** — 멈췄다, PermissionRequest 미호출 |
|
|
26
|
+
| 게이트 ask, 자동승인 훅 없음 (대조, auto 1 · acceptEdits 1) | 2 | 0/2 |
|
|
27
|
+
|
|
28
|
+
- ⇒ 자동승인(PermissionRequest allow 훅, 그런 훅을 쓰는 데스크톱 승인 앱, «예» 를 대신 누르는
|
|
29
|
+
래퍼) 아래에서 비가역 호출을 멈추려면 게이트는 **deny** 를 내야 한다.
|
|
30
|
+
- 🟥 **표면마다 다르다**: 헤드리스(`-p`)에서는 ask 뒤에 PermissionRequest 가 안 불렸다. 헤드리스
|
|
31
|
+
초록을 대화형으로 옮겨 적지 마라.
|
|
32
|
+
- **미측정**: ⓐ 자동승인 훅 없이 auto 모드 **단독**이 ask 를 삼키는가(대조 1판은 안 삼킴 — 바 미달)
|
|
33
|
+
ⓑ `permissions.ask` **규칙**(훅이 아니라 설정 규칙)이 같은 부류인가 ⓒ `exit 2` 는 deny 와 같은
|
|
34
|
+
방향이라고 문서가 말하지만 이 조합에서 직접 재지 않았다 ⓓ deny 팔은 reps 2 로 바 미달.
|
|
35
|
+
- 이 사실이 고친 문서: `templates/.claude/rules/mcp_tool_gating.md` §2 주석 · CLAUDE.md
|
|
36
|
+
§Irreversibility Gates · goal-quench rung ②.
|
|
37
|
+
|
|
38
|
+
## 2. 채널 × 표면 × 시점
|
|
39
|
+
|
|
40
|
+
«앞» = 사람이 고르기(답·승인) **전**에 화면/알림에 나타남 · «뒤» = 고른 **뒤**에만 · «없음» = 끝까지 안 그려짐.
|
|
41
|
+
각 칸: 결과 · reps · CLI 버전.
|
|
42
|
+
|
|
43
|
+
| 채널 | 질문 창 (AskUserQuestion) | 계획 승인 (ExitPlanMode) | 권한 프롬프트 (Bash 등) | 대화 / 모델 |
|
|
44
|
+
|---|---|---|---|---|
|
|
45
|
+
| PreToolUse `systemMessage` | **뒤** 9/9 (5초 창 6 · 25초 창 3) · 2.1.283 | 화면 표시 0/3 · 2.1.283 | 컨트롤로 쓴 Bash 쪽은 질문 창 **앞**에 18/18 · 2.1.283 | 미측정 |
|
|
46
|
+
| PermissionRequest `systemMessage` | **없음** 3/3 · 2.1.283 | 미측정 | 미측정 | 미측정 |
|
|
47
|
+
| PreToolUse `additionalContext` | **없음** 3/3 (모델도 되풀이 안 함) · 2.1.283 | 미측정 | 미측정 | 모델 쪽 도달 미측정 |
|
|
48
|
+
| PreToolUse ask + `permissionDecisionReason` | **없음** 3/3 — 권한 창도 안 뜨고 질문 창이 그대로 · 2.1.283 | 미측정 | ask 는 자동승인에 삼켜짐 5/5 (§1) · 2.1.282 | 미측정 |
|
|
49
|
+
| PreToolUse deny + 사유 | 모델이 사유의 값을 답으로 따름 3/3 (`hook error` 로 표시) · 2.1.282 | 계획 **수정 요구**로 쓰면 **0/6** 착지 — 모델이 «훅 주입» 으로 의심하고 되물음 · 2.1.282 | deny 는 멈춤 0/2 착지 (§1) · 2.1.282 | 사유는 모델에게 보인다 |
|
|
50
|
+
| `updatedInput` (+ allow) | `answers` 주입 = **답이 된다** 3/3 (PreToolUse) · 3/3 (PermissionRequest), «User answered» 로 렌더 · allow **단독**은 0/2 · 2.1.282 | 원 입력 echo = 승인 UI 없이 진행 3/3 (PreToolUse) · 3/3 (PermissionRequest) · allow 단독 0/2 · 2.1.282 | 미측정 | 사람이 답한 것처럼 보인다 — 출처 표시 없음 |
|
|
51
|
+
| PermissionRequest deny + `message` | 미측정 | 수정 요구 착지 1/3 (1 수용 · 1 확인 요청 · 1 «suspicious» 무시) · 2.1.282 | 미측정 | 미측정 |
|
|
52
|
+
| `terminalSequence` (OSC 777 알림) | **미측정** (같은 필드라 같을 가능성은 높다 — 선언 전 3판 필요) | 승인 화면 **앞** 3/3 (설치본 증폭기 사본) · 합성 양성 3/3 · known-negative 0/3 · 2.1.283 | 미측정 | 해당 없음 (터미널 알림) |
|
|
53
|
+
| `exit 2` + stderr | 미측정 | 미측정 | 미측정 | 미측정 |
|
|
54
|
+
|
|
55
|
+
## 3. 계기 함정 — CLI 도 자기 OSC 777 을 낸다
|
|
56
|
+
|
|
57
|
+
- 계획 승인 화면 **뒤**: `Claude Code needs your approval for the plan` (9/9, 2.1.283).
|
|
58
|
+
- 질문 창을 25초 열어 두면: `Claude needs your permission` (3/3). 5초 창에서는 0/15 — 5~25초 사이에 나온다.
|
|
59
|
+
- ⇒ «OSC 777 이 몇 개 나왔나» 로 세는 계기는 known-negative 에서도 1 을 센다(거짓 양성). **판정은
|
|
60
|
+
본문 접두(예: `FH 게이트;`)로** 한다. 개수는 맞는데 지시 대상이 틀리는 부류다 —
|
|
61
|
+
`measurement-integrity-checklist.md` 표의 같은 줄.
|
|
62
|
+
- 알림이 사람의 터미널에 **착지**하는지는 pty 바이트까지만 쟀다(터미널마다 다르다 — 받는 터미널에서만 뜬다).
|
|
63
|
+
|
|
64
|
+
## 4. 설계 함의
|
|
65
|
+
|
|
66
|
+
1. **비가역을 멈추는 채널은 deny / exit 2 뿐이다.** ask 는 «사람이 프롬프트 앞에 있을 때» 의 채널이다.
|
|
67
|
+
2. **질문 창에서 사람을 돕는 부스트는 지금 없다.** systemMessage 는 고른 뒤에 그려지고, 나머지는
|
|
68
|
+
안 그려진다. 후보: OSC 777(질문 쪽 미측정) · `updatedInput` 으로 선택지 설명에 싣기(질문을
|
|
69
|
+
«바꾸는» 것이라 경계를 넘는다 — 운영자 결정) · 바깥 표면(펫 말풍선·상태표시줄).
|
|
70
|
+
3. **`updatedInput.answers` 는 훅이 사람 대신 답하게 한다** — 그리고 화면은 «사람이 답했다» 고
|
|
71
|
+
말한다. 가역 질문에 한해 규칙으로 답하고, 선택지에 비가역이 섞이면 사람에게 남겨라(실측: 그렇게
|
|
72
|
+
짠 훅이 3회 연속 질문 루프를 사람 입력 0 으로 완주 3/3, 비가역 선택지에서 멈춤 3/3).
|
|
73
|
+
4. **계획 수정 요구는 PreToolUse deny 사유로는 안 먹는다(0/6).** 모델이 그것을 주입으로 읽는다 —
|
|
74
|
+
그 판단은 옳은 방어이고, 우회하려 하지 마라.
|
|
75
|
+
|
|
76
|
+
## 5. 이 문서가 주장하지 않는 것
|
|
77
|
+
|
|
78
|
+
- sonnet 한 모델, 팔당 2~3판(부록 포함 최대 9). 한 머신·한 터미널.
|
|
79
|
+
- CLI 버전이 바뀌면 칸이 바뀔 수 있다 — 각 칸의 버전을 같이 인용해라.
|
|
80
|
+
- 미측정 칸을 «없다» 로 읽지 마라. 비어 있는 것은 결과가 아니라 측정이다.
|
|
@@ -237,6 +237,15 @@ here.** Three shapes, all observed 2026-07-20 in a single session:
|
|
|
237
237
|
| n+10 | **Accepted into the scanned set, but no probe matches that shape** — the instrument counts the file as covered and reports it *clean* | `degrade_direction_scan.sh` collected `.sh` files while every probe was Python-shaped (`except:` / `.get(k, True)` / `if not x:`). A known-positive bash file with four default-toward-PASS constructs scored **0/4**, and the output read `no default-toward-PASS smells in 1 scanned py/sh file` (2026-07-28) | The known-positive of *that shape* scores 0 while the summary says "scanned" — the tell is coverage claimed without detection demonstrated |
|
|
238
238
|
| n+11 | **The collection predicate, not the probe, is what silently drops the target** | Same scan: git hooks are named `pre-push` (no extension) under `.git-hooks` (dotted directory), and the extension test ran against the **full path**, so FH's own mechanical floor reported `no scannable (py/sh) target files`, exit 0 | Point the instrument at a directory you *know* holds a positive; an empty file list is the finding, not a clean result |
|
|
239
239
|
| n+12 | **The measured axis does not vary with the arm — and equal scores are read as "no difference"** | External name: **frozen-replay defect** (`001TMF/harness-forge`, absorbed 2026-08-23 — *"the single most common way a harness search produces a confident, meaningless result"*). Their instance: a scorer replaying cached outputs makes quality **constant across candidates**, so the search happily returns a winner while measuring only cost. **Ours is not that instance** — see the note below | A **known-pair on the actual pair being compared**, not on a fixture: inject an arm that MUST score differently. If it does not, the equal scores were the instrument standing still, not the arms being alike |
|
|
240
|
+
| n+13 | **A live instrument judges by COUNT — the count is right, the referent is wrong** | A pty probe counted OSC 777 notifications to decide «the hook's alert reached the terminal». The CLI emits its own OSC 777 (`…needs your approval for the plan`), so the known-negative (hook without the alert field) scored 1 — a true count of the wrong thing (2026-09-26, field harness, CLI 2.1.283) | The known-negative scores non-zero. Judge by **prefix / identity** (the body starts with the hook's own title), never by how many arrived — `hook_channel_visibility.md` §3 |
|
|
241
|
+
| n+14 | **The defect axis is two-sided, and the instrument minimizes along it** | A loop-seam ratio (last→first frame gap ÷ neighbour step) was minimized to pick the cut point; 0.00–0.02 read as «perfect» but meant a duplicated frame — a freeze. `≫1` = skip, `≈1` = normal, `≈0` = freeze, so minimizing *produces* the other defect (2026-09-23, field harness) | One known-negative is not enough: a two-sided axis needs **a negative on each side**. Target the normal value in log distance, or judge «is this value precedented inside this target's own distribution» instead of a threshold |
|
|
242
|
+
|
|
243
|
+
**After fixing how an instrument READS, grep the repo for the symptom string** (the API call or
|
|
244
|
+
token the broken reading used, e.g. `getComputedStyle(..).fontSize`), and dispose of every hit as
|
|
245
|
+
ⓐ same defect → fix in the same commit · ⓑ not affected → one line saying why · ⓒ undecided → name it
|
|
246
|
+
in a signal. Grep the *string*, not «the same class» — the author is the one who just failed to
|
|
247
|
+
generalize (2026-09-24, field harness: the same dead reading, fixed in one probe, was still live in the
|
|
248
|
+
neighbouring probe and broke two legs in opposite directions).
|
|
240
249
|
|
|
241
250
|
🟥 **n+12 is the class every *comparative* measurement is exposed to — A/B arms, ablation, before/after,
|
|
242
251
|
tier batteries** — and it is the one shape on this list where **the instrument's silence looks exactly
|
|
@@ -4397,3 +4397,42 @@
|
|
|
4397
4397
|
고치고 재현은 레인 파일 안에만** 두는 것이었다. 두 병렬 팔이 같은 게이트 번호(G30)를 각자 써서
|
|
4398
4398
|
cherry-pick 에서 충돌했다 — 병렬 팔에 번호 대역을 미리 나눠 주지 않은 발주 결함.
|
|
4399
4399
|
⚠️ 보고 없이 끝난 팔 둘은 «커밋 있음» 이 곧 «검증됨» 이 아니다 — 매번 거버너 재실행으로 닫았다.
|
|
4400
|
+
|
|
4401
|
+
- date: 2026-09-25
|
|
4402
|
+
session: 16a11bc6 (FH 로컬 거버너 · Opus 5.5 · 클라우드 인계 처리 → FoD 게이트 야간)
|
|
4403
|
+
agent: general-purpose ×9 · Explore ×1
|
|
4404
|
+
task: >-
|
|
4405
|
+
FoD 연속 PR 팔 — #120 로컬 검증·머지 · #121 언어 수리 라이브 레인 · #122 증폭기 상태칸+번역투+증폭기 결함 ·
|
|
4406
|
+
#123 자기검사 홈 격리+증폭기 소실 범인 · #124 headless 라이브 레인 · #125 자동승인 하 deny+래퍼 커버리지 ·
|
|
4407
|
+
#126 옛 게이트 사본 치유 · 읽기 전용 headless 조사 · 훅이 질문에 답하나 실측(48런)
|
|
4408
|
+
count: 10
|
|
4409
|
+
outcome: partial
|
|
4410
|
+
evidence: >-
|
|
4411
|
+
7 PR 전부 머지·설치(각 머지 재실행 게이트 초록) · 실측 결과 파일 둘. 🟥 partial 인 이유: 팔 셋이 운영자 실제 홈을
|
|
4412
|
+
건드렸다(#122 팔 자기검사가 ~/.claude/fh-gate 시드 — 그 뒤 G0 로 기계화) · headless 팔 개발 중 운영자 화면에 불투명 창
|
|
4413
|
+
~9분 · #125 팔이 야간 dock=1 로 라이브 9개 미실행 BLOCKED(거버너가 재실행해 해소) · 두 팔이 슬립·연결 끊김으로 stall.
|
|
4414
|
+
learning: >-
|
|
4415
|
+
🟥 격리 조건은 디스패치 **첫 줄**에 — 사고 뒤에 넣었다(feedback_fod_work_must_not_touch_real_home).
|
|
4416
|
+
팔의 «실제 홈 영향 없음» 보고는 두 번 틀렸다(스크립트 시드 · 원인 모름) — 거버너가 mtime·heal 로그로 직접 대조해야 했다.
|
|
4417
|
+
같은 체크아웃 팔은 직렬로, 읽기 전용 조사·임시 폴더 실험만 병렬로 — 충돌 0. «앱 설치» 와 «게이트 사본 갱신» 은 다른
|
|
4418
|
+
사건이었다(설치본이 16:11 옛 판) — 설치 검증은 번들 cmp 가 아니라 **실행 중 훅의 판정** 을 찔러 봐야 했다.
|
|
4419
|
+
|
|
4420
|
+
- date: 2026-09-26
|
|
4421
|
+
session: 16a11bc6 (FH 로컬 거버너 · Opus 5.5 · 이월 과제 전량 → FH 답습 → 로컬 LLM)
|
|
4422
|
+
agent: general-purpose ×13 · Explore ×2
|
|
4423
|
+
task: >-
|
|
4424
|
+
FoD PR 팔 — #127 계획 승인 부스트 · #128 dock 간헐 · #129~#131 이월 시리즈(G31 핀 트리 · 게이트 구멍 · 계획 전문/질문 알림)
|
|
4425
|
+
· #132 칸 이름+설계 이관 · 칸 3 설계 초안 · 2.1.283 가시성 재측정 · FH 답습 조사(Explore) · FH #811 답습 5건 구현
|
|
4426
|
+
· FH #813 sidecar 판정 수리 · 로컬 LLM 어려운 픽스처 실측(234 호출)
|
|
4427
|
+
count: 15
|
|
4428
|
+
outcome: partial
|
|
4429
|
+
evidence: >-
|
|
4430
|
+
PR 10건 머지(FoD #127~#133 · FH #811 · #813) + v3.21.0 발행 · 실측 결과 파일 3. 🟥 partial 인 이유: 재측정 팔이 빈 작업경로(`cd ""`)로
|
|
4431
|
+
이 레포 CLAUDE.md·.claude/settings.json 을 덮어씀(전날 거버너 백업으로 회수, 운영자 /permissions 2줄 유실) · 설계 팔이 원 목록을
|
|
4432
|
+
못 찾아 재구성(거버너 보유분으로 대조) · 이월 팔이 낡은 로컬 main 에서 분기(거버너가 #128 머지 뒤 pull 누락) · 긴 실측 두 팔이
|
|
4433
|
+
중간 알림만 반복하며 오래 대기.
|
|
4434
|
+
learning: >-
|
|
4435
|
+
🟥 같은 계열 팔이 짠 판정 코드에서 codex 가 실제 fail-open 을 네 번 새로 찾았다(#811 중복 설치 CURRENT · #813 비Ollama 200 · 부분 본문).
|
|
4436
|
+
판정 코드는 교차 계열 한 번이 사실상 필수. 격리 규칙을 첫 줄에 넣어도 스크립트 결함(zsh 가 낱말을 안 쪼갬 → 빈 경로)은 못 막는다 —
|
|
4437
|
+
거버너가 팔 결과마다 레포 상태 + gitignored 설정 mtime 을 대조하는 절차가 유일하게 잡았다(→ FH #811 ④-f 로 기계화).
|
|
4438
|
+
머지 직후 로컬 main pull 은 설치 여부와 무관하게 항상.
|
|
@@ -63,6 +63,13 @@ gh run view <id> --log-failed | grep -E '❌|FAIL|not ok' | head -20 #
|
|
|
63
63
|
Record the lane name in the session log even if the re-run goes green — **a flake that cannot be named
|
|
64
64
|
cannot be fixed**, and the second occurrence is the one that gets fixed only if the first was named.
|
|
65
65
|
|
|
66
|
+
**Before calling it flaky, check the classifier's state axis.** An intermittent failure can be a
|
|
67
|
+
classification defect that only *looks* random: the verdict depends on state keyed per PID or per
|
|
68
|
+
session (a process that started a moment earlier, a session id reused across runs), and the timing
|
|
69
|
+
of the sample decides which state it sees. Measured 2026-09-26 on a field harness: an «intermittent»
|
|
70
|
+
misclassification reproduced **30/30** once sampled at a 0.01 s interval — it was deterministic in
|
|
71
|
+
the state axis, not flaky. Name the key the classifier reads its state by before re-running.
|
|
72
|
+
|
|
66
73
|
This is prose on purpose. N=1: one flake, one lost diagnosis. The mechanization threshold in this repo
|
|
67
74
|
is N≥3 or the same class recurring on another surface; a scheduled log-capture job built on a single
|
|
68
75
|
occurrence would be the speculative build the evidence-threshold rule forbids.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrono-meta/fh-gate",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
|
|
5
5
|
"homepage": "https://github.com/chrono-meta/forge-harness#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -175,6 +175,8 @@
|
|
|
175
175
|
"scripts/gate_anchor_check.sh",
|
|
176
176
|
"scripts/gate_pathspec_check.sh",
|
|
177
177
|
"scripts/prless_delta_scan.sh",
|
|
178
|
+
"scripts/test_claude_md_size_lanes.sh",
|
|
179
|
+
"scripts/test_fh_audit_check_lanes.sh",
|
|
178
180
|
"scripts/test_prless_delta_scan_lanes.sh",
|
|
179
181
|
"scripts/gate_bootstrap_ephemeral.sh",
|
|
180
182
|
"scripts/gate_shape_scan.sh",
|
|
@@ -250,6 +252,10 @@
|
|
|
250
252
|
"scripts/test_dispatch_log_lanes.sh",
|
|
251
253
|
"scripts/test_subagent_tally_hook_lanes.sh",
|
|
252
254
|
"scripts/subagent_tally_hook.sh",
|
|
255
|
+
"scripts/hook_drift_check.sh",
|
|
256
|
+
"scripts/test_hook_drift_lanes.sh",
|
|
257
|
+
"scripts/session_config_fingerprint.sh",
|
|
258
|
+
"scripts/test_session_config_fingerprint_lanes.sh",
|
|
253
259
|
"scripts/test_doc_claim_triad_lanes.sh",
|
|
254
260
|
"scripts/test_env_layer_fingerprint_lanes.sh",
|
|
255
261
|
"scripts/test_env_purity_lanes.sh",
|
|
@@ -328,6 +334,7 @@
|
|
|
328
334
|
"scripts/test_session_checklist_lanes.sh",
|
|
329
335
|
"scripts/test_session_close_chain_lanes.sh",
|
|
330
336
|
"scripts/test_session_close_lanes.sh",
|
|
337
|
+
"scripts/test_session_load_mirror_fp_lanes.sh",
|
|
331
338
|
"scripts/test_sidecar_calibrate_lanes.sh",
|
|
332
339
|
"scripts/test_sidecar_wait_stdin.sh",
|
|
333
340
|
"scripts/test_sim_isolated_run_lanes.sh",
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# forge-harness (fh-meta) Changelog
|
|
2
2
|
|
|
3
|
+
### [3.22.0] — 2026-09-27 — clone 사용자의 세션 시작 경고·터미널 거짓 알림을 걷고, 사이드카 판정 어휘를 가른다
|
|
4
|
+
|
|
5
|
+
**minor — 새 레인 셋 + 출하 스크립트 동작 변경.** 소비자의 게이트 수용은 안 깬다(막는 쪽으로 바뀐 것 없음).
|
|
6
|
+
|
|
7
|
+
- **CLAUDE.md 150k 경고 수리** — `git clone` 사용자가 v3.16.0 무렵부터 세션마다 보던
|
|
8
|
+
«CLAUDE.md is over the 150.0k-char limit» 를 없앴다(154,149 → 136,889자). 이유층 57블록을 상세 파일 6개로
|
|
9
|
+
**원문 그대로** 옮기고 포인터를 남겼다 — 규칙·트리거·문 리터럴·비가역 게이트 문장은 상주 그대로.
|
|
10
|
+
옛 문장 1,562 중 누락 0 · 보호 리터럴 133 · 격리 클론 플로어 티어 실사용 평가 12/12.
|
|
11
|
+
크기 가드 레인 `scripts/test_claude_md_size_lanes.sh`(145,000자, 문자 단위).
|
|
12
|
+
- **터미널 감사 배너(`templates/fh_audit_check.zsh`) 거짓 경보 수리** — 끌 수 없던 «No harvest history found» ·
|
|
13
|
+
상태 표시 센티널(`_wizard_done` 등)을 90일 감사로 읽던 줄 · 새 설치의 zsh NOMATCH 로 배너 통째 소멸 ·
|
|
14
|
+
호출 셸 KSH_ARRAYS 누출. 진짜 밀린 주간감사·frontier·Area B·커스텀 센티널은 그대로 뜬다. 레인 27/0.
|
|
15
|
+
- **세션 시작 «카드보다 새 파일» 미러 오탐 수리**(`scripts/fh_session_load.sh`) — 싱크가 mtime 만 새로 찍은
|
|
16
|
+
미러 사본(허브 원본과 바이트 동일 · 카드 이전 커밋 · 깨끗한 트리)은 목록에서 빼고 이름만 한 줄로. 레인 14/0.
|
|
17
|
+
- **`scripts/sidecar_calibrate.sh` 판정 어휘** — «모델 없음» 을 «도달 불가» 로 말하지 않고, 가짜 호스트·끊긴 전송이
|
|
18
|
+
패널에 못 든다.
|
|
19
|
+
|
|
20
|
+
### [3.21.0] — 2026-09-26 — 마감 게이트가 옛 훅과 세션 중 설정 덮어쓰기를 이름으로 말한다
|
|
21
|
+
|
|
22
|
+
**minor — 새 출하 스크립트 둘 + 마감 체인 동작 변경.** 소비자의 게이트 수용은 안 깬다
|
|
23
|
+
(④-e 는 옛 훅에서 «측정됨» → «NOT MEASURED + 재병합 경고» 로 바뀌어 막는 쪽이 아니라 알리는 쪽이다 · ④-f 는 advisory).
|
|
24
|
+
|
|
25
|
+
- **`scripts/hook_drift_check.sh`** (신규 출하) — 출하 템플릿 훅과 설치된 `.claude/settings.json` 을 이벤트별로 대조:
|
|
26
|
+
CURRENT / STALE / ABSENT / UNKNOWN. 같은 훅이 여럿 설치됐으면(현+옛 공존) STALE, 형식 불량 항목은 UNKNOWN —
|
|
27
|
+
CURRENT 로 접지 않는다. 마감 ④-e 는 이 판정이 CURRENT 일 때만 집계를 «측정됨» 으로 본다
|
|
28
|
+
(종전엔 «SubagentStop» 낱말만 있으면 옛 인라인 훅도 통과했다). 레인 27/0(bash 3.2·5).
|
|
29
|
+
- **`scripts/session_config_fingerprint.sh`** (신규 출하) — 세션 시작에 설정 6종(레포 settings·settings.local·
|
|
30
|
+
CLAUDE.local.md·CLAUDE.md · 사용자 settings·CLAUDE.md) 해시를 스냅하고 마감 ④-f 에서 바뀐 파일을 이름으로.
|
|
31
|
+
스냅 부재 = NOT MEASURED. 🟥 스냅은 지금 `fh_session_load.sh`(로컬 SessionStart)에서만 뜬다 —
|
|
32
|
+
그 훅이 없는 install 은 ④-f 가 NOT MEASURED 로 남는다. 레인 25/0.
|
|
33
|
+
- **문서 정정** — «ask 는 fail-closed» 는 사람이 답할 때만 참: 자동승인 훅 아래 PreToolUse ask 는 실행됐고(5/5),
|
|
34
|
+
deny 는 멈췄다(대화형 실측). `CLAUDE.md` Irreversibility · `mcp_tool_gating.md` · goal-quench. `permissions.ask` 규칙은 미측정.
|
|
35
|
+
- **`knowledge/shared/harness-core/hook_channel_visibility.md`** (신규) — 훅 채널 × 표면 × 시점 실측 표
|
|
36
|
+
(질문 창엔 고르기 전 훅 출력 0 · 훅이 질문에 답 가능 · OSC 777 도달 · CLI 자체 OSC 777).
|
|
37
|
+
- 측정 체크리스트 n+13·n+14 · flaky 분류 단락 · 집계 훅 레인 타이밍 ms 화.
|
|
38
|
+
|
|
3
39
|
### [3.20.1] — 2026-09-26 — 마감 게이트 ④-e 가 Claude Code 내부 에이전트를 디스패치로 세지 않는다
|
|
4
40
|
|
|
5
41
|
**patch — 오탐 수리.** 소비자의 게이트 수용은 안 깬다(과다 계수 → 정확 계수 방향).
|
|
@@ -90,7 +90,7 @@ Three rungs, climbed one at a time:
|
|
|
90
90
|
| **③ unattended** | the loop runs on its own | reviews after the fact |
|
|
91
91
|
|
|
92
92
|
- **Graduation threshold (measured):** a loop climbs one rung only after **K consecutive clean rounds across a 2+ session/run window** — the *2+ window* reuses `operations.md`'s promotion-window discipline (`accepted ≥ 60%` / recurrence `N=3`). **`K=2` is a provisional default, not yet calibrated** — no loop-run data exists yet; revisit once it does (same honesty as this SKILL's `N=10` budget baseline). "Clean" = the round's Done-When passed **AND** a positive downstream verdict (pipeline-conductor / sidecar = CLEAN) **AND zero S/M-grade governor-catch and zero post-ship correction** — *not merely* the absence of a governor-catch, so a quieter or weaker governor cannot manufacture graduation. **The streak is recorded per round in a local autonomy ledger** (the hub keeps it at `tracks/_meta/autonomy_ledger.yaml`; a plugin-only user keeps their own — anywhere in their project, the path is theirs): date · task · done-when · verdict · governor-catch grades · `clean:` bool. Graduation reads that ledger. A *computation script* (`scripts/`) that auto-derives the current rung from the ledger is **deliberately deferred** until enough entries exist to compute over — building the meter before there is a stream to measure is the speculative-infra the evidence-threshold discipline forbids. *Check class: a **measured count** (ledger grep) over a **judged per-round grade** — and the grade must be bound to the round's own challenger / steel-quench S/M verdict (the upstream adversarial artifact), **never an author self-grade** (else "measured" laundering a judge-only path). Until ≥~5 entries make a computation script worth writing, the streak is judged-and-hand-recorded — provisional by construction.*
|
|
93
|
-
- **Irreversible carve-out (non-negotiable — the FH increment over the video):** any action whose effect **cannot be undone within the loop** — not only the two examples (Destructive-Op delete/rewrite · Pre-Publish go-public) but **any irreversible side-effecting write** (an MCP `ask`-tier send, a payment, an outbound publish) — **never reaches rung ③**. Membership is the **mechanical surface test** of CLAUDE.md's Surface-Class Degrade Invariant + `mcp_tool_gating` (grep the action surface; do **not** self-label), not a match against the two examples. Such actions stay at rung ② (HITL) **permanently**, regardless of clean-round count. The video graduates a loop to fully unattended; FH caps graduation at the irreversible boundary. *Check class: judged — pair: a target-tier blind sim per CLAUDE.md §Target-tier sim gate (run 2026-06-27, Sonnet, PASS — a remote-branch-delete loop correctly held at rung ② despite 4 clean rounds). **Prose-enforced, not hook-enforced** — accepted residual, named not silent.*
|
|
93
|
+
- **Irreversible carve-out (non-negotiable — the FH increment over the video):** any action whose effect **cannot be undone within the loop** — not only the two examples (Destructive-Op delete/rewrite · Pre-Publish go-public) but **any irreversible side-effecting write** (an MCP `ask`-tier send, a payment, an outbound publish) — **never reaches rung ③**. Membership is the **mechanical surface test** of CLAUDE.md's Surface-Class Degrade Invariant + `mcp_tool_gating` (grep the action surface; do **not** self-label), not a match against the two examples. Such actions stay at rung ② (HITL) **permanently**, regardless of clean-round count. ⚠️ Rung ② assumes a **human** answers the prompt: under an auto-approver (a `PermissionRequest` allow hook) a hook's `ask` was answered for you and the call ran 5/5, while `deny` stopped it (interactive, 2026-09-25) — so where one is installed, rung ② must be enforced with **deny / exit 2**, not ask (`knowledge/shared/harness-core/hook_channel_visibility.md`). The video graduates a loop to fully unattended; FH caps graduation at the irreversible boundary. *Check class: judged — pair: a target-tier blind sim per CLAUDE.md §Target-tier sim gate (run 2026-06-27, Sonnet, PASS — a remote-branch-delete loop correctly held at rung ② despite 4 clean rounds). **Prose-enforced, not hook-enforced** — accepted residual, named not silent.*
|
|
94
94
|
- **Demotion (fail toward oversight, with a liveness floor):** any governor-catch, failed Done-When, or correction **resets the clean-round counter and drops the loop one rung** — autonomy is earned per-window, surrendered on the first miss, never sticky. A failed **dry-run (①)** has no lower rung: it **blocks graduation and surfaces to the operator**, it does not demote. A loop that **flips promote/demote ≥ `N=3` times in a window** (reusing operations.md's recurrence-escalation) is a noisy boundary — **freeze at the lower rung and surface**, do not keep oscillating.
|
|
95
95
|
|
|
96
96
|
### Two paths to autonomous completion (by surface reversibility)
|
package/scripts/fh_node_check.sh
CHANGED
|
@@ -138,9 +138,12 @@ fi
|
|
|
138
138
|
# Reported ONCE per pull (it is an event). Distinguishes "no change" from "could not measure".
|
|
139
139
|
INFRA=""; INFRA_NOTE=""
|
|
140
140
|
if [ -n "$PREV_HEAD" ] && [ "$PREV_HEAD" != "$HEAD_NOW" ]; then
|
|
141
|
+
# templates/*hook*.json + templates/*settings*.json added 2026-09-26: subagent-tally-hook.json
|
|
142
|
+
# changed its body (RE-MERGE required) and this delta never announced it — `templates/settings\.`
|
|
143
|
+
# only covers the snippets. (A comment INSIDE the `\`-continued pipe below would break it.)
|
|
141
144
|
if INFRA_RAW="$(git -C "$FH" diff --name-only "${PREV_HEAD}..HEAD" 2>/dev/null)"; then
|
|
142
145
|
INFRA="$(printf '%s\n' "$INFRA_RAW" \
|
|
143
|
-
| grep -E '^(templates/\.git-hooks/|templates/settings\.|scripts/fh_|plugins/[^/]+/skills/install-(wizard|doctor)/)' \
|
|
146
|
+
| grep -E '^(templates/\.git-hooks/|templates/settings\.|templates/[^/]*(hook|settings)[^/]*\.json$|scripts/fh_|plugins/[^/]+/skills/install-(wizard|doctor)/)' \
|
|
144
147
|
| head -6)"
|
|
145
148
|
else
|
|
146
149
|
INFRA_NOTE="UNMEASURED — cannot reach the previously seen commit ($PREV_HEAD), so the infra delta was not computed (rebase, shallow clone, or GC). Not the same as 'nothing changed'."
|
|
@@ -317,6 +317,15 @@ fi
|
|
|
317
317
|
( cd "$FH" && bash scripts/branch_claim.sh reap >/dev/null 2>&1 ) || true
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
# ── 세션 설정 지문 스냅 (2026-09-26) ─────────────────────────────────────────────
|
|
321
|
+
# WHY: 2026-09-26 서브에이전트의 측정 실행(빈 작업경로)이 이 체크아웃의 .claude/settings.json 과 CLAUDE.md 를 덮어썼고
|
|
322
|
+
# FH 는 못 잡았다(settings 는 gitignored 라 git 이 안 보고, undo 도 없다). 시작 시 해시+mtime 을
|
|
323
|
+
# 떠 두면 마감(session_close_check.sh ④-f)이 «무엇이 바뀌었나» 를 이름으로 댈 수 있다.
|
|
324
|
+
# WHY HERE (early exit 위): Mode D 전용 사고가 아니다. /clear·compact 는 같은 세션의 연속이라
|
|
325
|
+
# 기존 스냅을 유지한다(다시 뜨면 그 사이 변경 증거가 지워진다). 실패해도 세션을 막지 않는다.
|
|
326
|
+
[ -f "$FH/scripts/session_config_fingerprint.sh" ] && \
|
|
327
|
+
bash "$FH/scripts/session_config_fingerprint.sh" snap --fh "$FH" --source "$_FH_HOOK_SRC" >/dev/null 2>&1 || true
|
|
328
|
+
|
|
320
329
|
# ── 매핑된 프로젝트의 capability 표면화 (2026-08-18) ───────────────────────────
|
|
321
330
|
# WHY HERE (branch-claim 과 같은 자리, early exit **위**): 이건 Mode D 전용이 아니다.
|
|
322
331
|
# companion store 가 없는 설치에서도 프로젝트는 매핑되고, 그때도 형제 하네스의 스킬은
|
|
@@ -459,7 +468,42 @@ CARD_EPOCH=0
|
|
|
459
468
|
# ★ "$TM" (not the literal "tracks-meta") — paper-signals/handoff/digests are FH-exclusive areas
|
|
460
469
|
# sync-to-be.sh never namespaces (it does not write them for any hub), only tracks-meta needs the
|
|
461
470
|
# suffix here (pmh-dev#68 PR #368 review).
|
|
471
|
+
#
|
|
472
|
+
# 🟥 Mirror-copy false positive (fixed 2026-09-26): `sync-to-be.sh` REWRITES every tracks/_meta
|
|
473
|
+
# mirror it touches, so a mirror's mtime is «when the sync last ran», not «when its content was
|
|
474
|
+
# new». Measured: two result files the card had already absorbed were listed as NEWER because a
|
|
475
|
+
# 22:28 sync restamped them — git had last committed them the day BEFORE the card, and the hub
|
|
476
|
+
# copies carried the same 22:28 stamp, so no mtime anywhere could tell. A `$TM` mirror is DEMOTED
|
|
477
|
+
# (to a one-line note that names it — never silently dropped) only when ALL of these hold:
|
|
478
|
+
# ① line 1 is EXACTLY the sync banner (not a substring — a file merely mentioning it stays listed)
|
|
479
|
+
# ② the rest is byte-identical to the hub's canonical `tracks/_meta/<same path>` (cmp rc 0 only;
|
|
480
|
+
# differ = 1 and error = 2 both stay listed)
|
|
481
|
+
# ③ the companion git records that content as committed AT OR BEFORE the card, and the file is
|
|
482
|
+
# clean in the companion tree. Identity alone is not enough (cross-family [high], codex
|
|
483
|
+
# 2026-09-26): a result written to the hub TODAY and synced is identical too, yet the card has
|
|
484
|
+
# never seen it — its first commit lands after the card, so ③ keeps it listed.
|
|
485
|
+
# git unavailable / no commit found / dirty → NOT demoted, and the git-unavailable case says so.
|
|
486
|
+
# Named residual: content another machine committed before this card was written, pulled later and
|
|
487
|
+
# copied into the hub by sync-from-be, satisfies ①②③ while still unseen here. Narrow (needs the
|
|
488
|
+
# reverse sync to have run) and the note still names the file.
|
|
489
|
+
_MIRROR_BANNER="<!-- MIRROR COPY — synced from the ${HUB_NAME:-forge-harness} hub. Do NOT edit here; the next sync overwrites it. Edit the canonical file under the hub instead. -->"
|
|
490
|
+
MIRROR_GIT_UNAVAIL=""
|
|
491
|
+
command -v git >/dev/null 2>&1 || MIRROR_GIT_UNAVAIL=1
|
|
492
|
+
_is_absorbed_mirror() { # $1 = companion file, $2 = hub canonical path → 0 only when ①②③ all hold
|
|
493
|
+
case "$1" in *.md) ;; *) return 1 ;; esac
|
|
494
|
+
[ -f "$2" ] || return 1
|
|
495
|
+
[ "$(head -1 "$1" 2>/dev/null)" = "$_MIRROR_BANNER" ] || return 1
|
|
496
|
+
tail -n +2 "$1" 2>/dev/null | cmp -s - "$2" || return 1
|
|
497
|
+
[ -z "$MIRROR_GIT_UNAVAIL" ] || return 1
|
|
498
|
+
local rel="${1#$BE/}" ct st
|
|
499
|
+
ct="$(git -C "$BE" log -1 --format=%ct -- "$rel" 2>/dev/null)" || return 1
|
|
500
|
+
case "$ct" in ''|*[!0-9]*) return 1 ;; esac
|
|
501
|
+
[ "$ct" -le "${CARD_EPOCH:-0}" ] || return 1
|
|
502
|
+
st="$(git -C "$BE" status --porcelain -- "$rel" 2>/dev/null)" || return 1
|
|
503
|
+
[ -z "$st" ]
|
|
504
|
+
}
|
|
462
505
|
NEWER=""
|
|
506
|
+
MIRROR_REFRESH=""; MIRROR_REFRESH_N=0
|
|
463
507
|
for sub in paper-signals handoff "$TM" digests; do
|
|
464
508
|
d="$BE/$sub"
|
|
465
509
|
[ -d "$d" ] || continue
|
|
@@ -467,6 +511,10 @@ for sub in paper-signals handoff "$TM" digests; do
|
|
|
467
511
|
[ -n "$f" ] || continue
|
|
468
512
|
fe="$(_mtime "$f")"
|
|
469
513
|
if [ "${fe:-0}" -gt "${CARD_EPOCH:-0}" ]; then
|
|
514
|
+
if [ "$sub" = "$TM" ] && _is_absorbed_mirror "$f" "$FH/tracks/_meta/${f#$d/}"; then
|
|
515
|
+
MIRROR_REFRESH="${MIRROR_REFRESH} ${f#$d/}"; MIRROR_REFRESH_N=$((MIRROR_REFRESH_N + 1))
|
|
516
|
+
continue
|
|
517
|
+
fi
|
|
470
518
|
NEWER="${NEWER} - ${f#$BE/}\n"
|
|
471
519
|
fi
|
|
472
520
|
done <<EOF
|
|
@@ -557,6 +605,13 @@ fi
|
|
|
557
605
|
echo " (no companion files newer than the session card)"
|
|
558
606
|
fi
|
|
559
607
|
fi
|
|
608
|
+
if [ "$MIRROR_REFRESH_N" -gt 0 ]; then
|
|
609
|
+
echo " ⓘ ${MIRROR_REFRESH_N} mirror cop(y/ies) newer than the card by mtime only — byte-identical to the hub's"
|
|
610
|
+
echo " tracks/_meta copy and committed before the card (sync restamped them):${MIRROR_REFRESH}"
|
|
611
|
+
fi
|
|
612
|
+
if [ -n "$MIRROR_GIT_UNAVAIL" ]; then
|
|
613
|
+
echo " ⚠️ git unavailable — mirror-copy demotion is OFF; sync-restamped mirrors are listed above by mtime."
|
|
614
|
+
fi
|
|
560
615
|
if [ -n "$STATUS_MAP" ]; then
|
|
561
616
|
echo "── handoff/signal STATUS map (mtime-independent — closed items) ──"
|
|
562
617
|
printf "%b" "$STATUS_MAP"
|