@chrono-meta/fh-gate 3.36.1 → 3.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/knowledge/shared/harness-core/builtin_capability_map.md +23 -2
  3. package/knowledge/shared/harness-core/claude_md_full_reference.md +7 -0
  4. package/knowledge/shared/harness-core/self_evolution_routine.md +22 -0
  5. package/knowledge/shared/learnings/subagent_invocations_log.yaml +84 -0
  6. package/package.json +9 -1
  7. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  8. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  9. package/plugins/fh-meta/CHANGELOG.md +30 -0
  10. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +2 -0
  11. package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +7 -3
  12. package/plugins/fh-meta/skills/harness-doctor/SKILL.md +1 -0
  13. package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -0
  14. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  15. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  16. package/scripts/adapters/gstack_content_safety.sh +1 -1
  17. package/scripts/capability_effect_probe.sh +2 -2
  18. package/scripts/card_status_tags.sh +47 -0
  19. package/scripts/chamber_run.sh +2 -2
  20. package/scripts/compaction_probe.sh +14 -14
  21. package/scripts/correction_moments.py +116 -0
  22. package/scripts/destructive_pre_gate.sh +25 -2
  23. package/scripts/env_layer_fingerprint.sh +44 -3
  24. package/scripts/fh_session_load.sh +2 -2
  25. package/scripts/frontier_digest_autopilot.sh +10 -0
  26. package/scripts/gate_shape_scan.sh +1 -1
  27. package/scripts/governor_board.sh +2 -2
  28. package/scripts/outbound_pr_gate.sh +1 -1
  29. package/scripts/package_coverage_check.sh +10 -0
  30. package/scripts/pr_merge_verified.sh +8 -1
  31. package/scripts/probe_live_eval.sh +9 -0
  32. package/scripts/probe_live_eval_lib.py +89 -2
  33. package/scripts/residency_admission_check.sh +1 -1
  34. package/scripts/selfcheck.sh +8 -0
  35. package/scripts/selfcheck_shard_weights.txt +184 -0
  36. package/scripts/session_close_check.sh +13 -2
  37. package/scripts/sim_isolated_run.sh +2 -2
  38. package/scripts/test_card_status_tags_lanes.sh +58 -0
  39. package/scripts/test_correction_moments_lanes.sh +42 -0
  40. package/scripts/test_count_check_decl_lanes.sh +1 -1
  41. package/scripts/test_degrade_scan_shell_probes.sh +1 -1
  42. package/scripts/test_destructive_pre_gate_lanes.sh +36 -0
  43. package/scripts/test_dispatch_log_lanes.sh +3 -3
  44. package/scripts/test_env_layer_fingerprint_lanes.sh +6 -1
  45. package/scripts/test_fh_detach_lanes.sh +27 -4
  46. package/scripts/test_fh_qp_lanes.sh +1 -1
  47. package/scripts/test_fh_run_resolver_lanes.sh +4 -4
  48. package/scripts/test_finding_pipeline_lanes.sh +7 -7
  49. package/scripts/test_gate_two_verdicts_lanes.sh +1 -1
  50. package/scripts/test_lane_runner_lanes.sh +1 -1
  51. package/scripts/test_lane_stub_env_lanes.sh +2 -2
  52. package/scripts/test_live_eval_transitions_lanes.sh +32 -0
  53. package/scripts/test_map_postprocess_lanes.sh +1 -1
  54. package/scripts/test_marker_address_lanes.sh +1 -1
  55. package/scripts/test_marker_defense_lanes.sh +1 -1
  56. package/scripts/test_marker_oracle_lanes.sh +1 -1
  57. package/scripts/test_outbound_pr_gate_lanes.sh +1 -1
  58. package/scripts/test_peer_worktree_detect_lanes.sh +1 -1
  59. package/scripts/test_pr_merge_verified_lanes.sh +8 -0
  60. package/scripts/test_precommit_staged_drift_lanes.sh +1 -1
  61. package/scripts/test_preprep_adjacent_dup_lanes.sh +1 -1
  62. package/scripts/test_prepush_destructive_lanes.sh +1 -1
  63. package/scripts/test_probe_live_eval_lanes.sh +68 -1
  64. package/scripts/test_regression_guard_ci_lanes.sh +8 -8
  65. package/scripts/test_regression_guard_codecomment_lanes.sh +140 -0
  66. package/scripts/test_revert_probe_lanes.sh +1 -1
  67. package/scripts/test_selfcheck_shard_lanes.sh +44 -0
  68. package/scripts/test_selfcheck_state_lanes.sh +1 -1
  69. package/scripts/test_stale_ref_close_lanes.sh +1 -1
  70. package/scripts/test_temper_check_lanes.sh +1 -1
  71. package/scripts/test_utterance_intake_lanes.sh +9 -9
  72. package/scripts/test_verdict_watermark_lanes.sh +3 -3
  73. package/scripts/test_worktree_reclaim_lanes.sh +1 -1
  74. package/templates/.git-hooks/pre-commit +2 -2
  75. package/templates/fh_audit_check.zsh +140 -0
  76. package/templates/regression_guard.sh +32 -2
  77. package/templates/settings.PreToolUse.snippet.json +2 -1
@@ -16,6 +16,7 @@ import re
16
16
  import sys
17
17
  import os
18
18
  import glob
19
+ import hashlib
19
20
  from datetime import date
20
21
 
21
22
  ID_RE = re.compile(r'^[A-Z][A-Z0-9]*-[A-Z0-9]+-[0-9]+$')
@@ -675,6 +676,30 @@ def split_by_target(rows, target, before=None):
675
676
  return res
676
677
 
677
678
 
679
+ def transitions(rows, before):
680
+ """Every probe's verdict now vs the previous nightly report (2026-11-03, frontier digest: arXiv:2610.41130 — a flat pass rate
681
+ can hide many per-probe flips). Record only: no verdict, no exit code reads this.
682
+ status: 'moved' (some id changed) · 'none' (every current id is in before and none changed) · 'not-comparable' (nothing moved
683
+ among the comparable ids but some current ids are absent from before — «none» would overclaim) · 'not-supplied'."""
684
+ if before is None:
685
+ return {'status': 'not-supplied', 'moved': [], 'missing': []}
686
+ ids = [r['id'] for r in rows]
687
+ missing = [i for i in ids if i not in before]
688
+ moved = ['%s %s->%s' % (r['id'], before[r['id']], r['verdict']) for r in rows
689
+ if r['id'] in before and before[r['id']] != r['verdict']]
690
+ status = 'moved' if moved else ('not-comparable' if missing else 'none')
691
+ return {'status': status, 'moved': moved, 'missing': missing}
692
+
693
+
694
+ def render_transitions_line(tr, prev_name):
695
+ if tr['status'] == 'not-supplied':
696
+ return 'moved since previous: not supplied (%s)' % (prev_name or 'no prior report found')
697
+ body = ', '.join(tr['moved']) if tr['moved'] else ('not comparable (%d probes absent from previous)' % len(tr['missing'])
698
+ if tr['status'] == 'not-comparable' else 'none')
699
+ extra = (' (absent from previous: %s)' % ','.join(tr['missing'])) if tr['moved'] and tr['missing'] else ''
700
+ return 'moved since previous (%s): %s%s' % (prev_name, body, extra)
701
+
702
+
678
703
  def _fmt_pr(g):
679
704
  return ('%d/%d pass_rate=%s failed_to_run=%d uncalibrated=%d' % (
680
705
  g['passed'], g['ran'], ('%.2f' % g['pass_rate']) if g['pass_rate'] is not None else 'n/a',
@@ -720,7 +745,50 @@ def render_target_md(t):
720
745
  return out
721
746
 
722
747
 
723
- def render_report_md(select_result, score_result, run_date):
748
+ def _git_blob_sha(path):
749
+ """git's blob id for the file's CURRENT bytes (identical to `git hash-object <path>`), computed
750
+ in-process: no git binary needed, and an uncommitted edit still gets its own id. A commit SHA
751
+ would say nothing about a dirty tree, which is exactly the run this line must not mislabel.
752
+ A symlink is FOLLOWED (the bytes that ran are hashed, not the link path git would hash for a
753
+ mode-120000 entry) — none of the four instrument files is a symlink today. None when unreadable."""
754
+ try:
755
+ with open(path, 'rb') as f:
756
+ data = f.read()
757
+ except (OSError, TypeError):
758
+ return None
759
+ return hashlib.sha1(b'blob %d\0' % len(data) + data).hexdigest()
760
+
761
+
762
+ def instrument_fingerprint(probes_live_path):
763
+ """[(name, blob_sha_or_None)] for the four files that make up the INSTRUMENT of a live run:
764
+ the runner, this scorer, the probe definitions (their expect patterns are scoring rules) and
765
+ the sim runner that produced the response bodies — `FH_SIM_RUNNER_BIN` when set (the same
766
+ override probe_live_eval.sh reads; a stub-driven run must not print a live run's fingerprint),
767
+ named `sim_runner(override)` so the swap is visible, else scripts/sim_isolated_run.sh.
768
+ The target — CLAUDE.md, rules, skills — is deliberately not here: two reports with the same
769
+ fingerprint and a different verdict moved because of the target or the model, not the scorer."""
770
+ me = os.path.realpath(__file__) # realpath, not abspath: a symlinked import must still find
771
+ here = os.path.dirname(me) # the runner beside the REAL scorer file
772
+ return [('runner', _git_blob_sha(os.path.join(here, 'probe_live_eval.sh'))),
773
+ ('scorer', _git_blob_sha(me)),
774
+ ('probes', _git_blob_sha(probes_live_path)),
775
+ ('sim_runner(override)' if os.environ.get('FH_SIM_RUNNER_BIN') else 'sim_runner',
776
+ _git_blob_sha(os.environ.get('FH_SIM_RUNNER_BIN')
777
+ or os.path.join(here, 'sim_isolated_run.sh')))]
778
+
779
+
780
+ def render_instrument_line(fp):
781
+ """Record only — no verdict reads it. Unreadable files are written UNKNOWN, never dropped."""
782
+ if fp is None:
783
+ return "- Instrument: not supplied by the caller"
784
+ return ("- Instrument (git blob ids, `git hash-object --no-filters <file>`, SHA-1 object format): "
785
+ + " · ".join("%s=%s" % (n, s if s else 'UNKNOWN(unreadable)') for n, s in fp)
786
+ + " — the same id in two reports = the same bytes; UNKNOWN on either side = not "
787
+ "comparable, never «same». NOT covered: the `claude` CLI version and the model "
788
+ "(the Run heading names the model)")
789
+
790
+
791
+ def render_report_md(select_result, score_result, run_date, instrument=None):
724
792
  lines = []
725
793
  lines.append("# live_eval — %s" % run_date)
726
794
  lines.append("")
@@ -728,6 +796,8 @@ def render_report_md(select_result, score_result, run_date):
728
796
  "each probe checks and why. Static-only coverage lives in `/prompt-regression`; "
729
797
  "this file is its live twin's record.")
730
798
  lines.append("")
799
+ lines.append(render_instrument_line(instrument))
800
+ lines.append("")
731
801
  lines.append("## Selection")
732
802
  lines.append("- Selected: %d" % len(select_result['selected']))
733
803
  lines.append("- Excluded: %d" % len(select_result['excluded']))
@@ -772,6 +842,11 @@ def render_report_md(select_result, score_result, run_date):
772
842
  lines.append("")
773
843
  if score_result is not None and score_result.get('target'):
774
844
  lines.extend(render_target_md(score_result['target']))
845
+ if score_result is not None and score_result.get('transitions'):
846
+ tr = score_result['transitions']
847
+ lines.extend(['## Moved since previous', '',
848
+ 'Record only (no verdict depends on this): per-probe verdict changes against the previous nightly report.',
849
+ '', '- ' + render_transitions_line(tr, tr.get('prev')), ''])
775
850
  lines.append("## Excluded (from probes.md, 32-row snapshot)")
776
851
  lines.append("")
777
852
  lines.append("| Probe | Reason |")
@@ -874,6 +949,16 @@ def _cmd_score(args):
874
949
  for l in render_target_lines(t):
875
950
  print(l)
876
951
  print("")
952
+ prev_arg = getattr(args, 'prev', None)
953
+ if prev_arg is not None:
954
+ prev = parse_prev_report(prev_arg) if prev_arg else None
955
+ tr = transitions(score_result['rows'], prev)
956
+ name = os.path.basename(prev_arg) if prev_arg else ''
957
+ if prev_arg and prev is None:
958
+ name += ' — unreadable or no run table'
959
+ score_result['transitions'] = dict(tr, prev=name)
960
+ print(render_transitions_line(tr, name))
961
+ print("")
877
962
  pr = score_result['pass_rate']
878
963
  pr_s = ("%.2f" % pr) if pr is not None else "n/a"
879
964
  print("total=%d ran=%d failed_to_run=%d uncalibrated=%d passed=%d pass_rate=%s threshold=%.2f"
@@ -893,7 +978,8 @@ def _cmd_score(args):
893
978
  print("OVERALL: %s (rc=%d)" % (score_result['overall'], score_result['rc']))
894
979
 
895
980
  if args.report_out:
896
- md = render_report_md(select_result, score_result, args.run_date or str(date.today()))
981
+ md = render_report_md(select_result, score_result, args.run_date or str(date.today()),
982
+ instrument=instrument_fingerprint(args.probes_live))
897
983
  os.makedirs(os.path.dirname(args.report_out), exist_ok=True)
898
984
  with open(args.report_out, 'w', encoding='utf-8') as f:
899
985
  f.write(md)
@@ -927,6 +1013,7 @@ def main():
927
1013
  sc.add_argument('--reps', type=int, default=1)
928
1014
  sc.add_argument('--target')
929
1015
  sc.add_argument('--before')
1016
+ sc.add_argument('--prev') # previous nightly report for the «moved since previous» record ('' = none found)
930
1017
 
931
1018
  args = ap.parse_args()
932
1019
  if args.cmd == 'select':
@@ -113,7 +113,7 @@ if [ ! -d "$ROOT/tracks/_meta" ]; then
113
113
  fi
114
114
 
115
115
  today=$(date +%Y-%m-%d)
116
- marker=$(ls -t "$ROOT"/tracks/_meta/.axes_23_passed_*_"$today".marker 2>/dev/null | head -1)
116
+ marker=$(ls -t "$ROOT"/tracks/_meta/.axes_23_passed_*_"$today".marker 2>/dev/null | sed -n 1p)
117
117
  if [ -z "$marker" ]; then
118
118
  cat >&2 <<MSG
119
119
  ❌ 상주 순증(+$net 줄)인데 오늘자 마커가 없다.
@@ -1175,6 +1175,13 @@ 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
+ `# 무인 자체개발 루프(2026-11-04, 운영자 상시 요청). 자동 머지 등급은 모델이 아니라 경로 허용 목록이 정한다 — 빈 목록은 AUTO 가 아니라 HARNESS-ERROR(실측: 가드를 지우면 빈 목록이 AUTO 로 통과).` \
1181
+ "scripts/selfdev_merge_tier.sh|scripts/test_selfdev_merge_tier_lanes.sh" \
1182
+ "scripts/selfdev_queue.py|scripts/test_selfdev_queue_lanes.sh" \
1183
+ "scripts/selfdev_loop.sh|scripts/test_selfdev_loop_lanes.sh" \
1184
+ "scripts/card_status_tags.sh|scripts/test_card_status_tags_lanes.sh" \
1178
1185
  "templates/.git-hooks/pre-push|scripts/test_prepush_destructive_lanes.sh" \
1179
1186
  "templates/.git-hooks/pre-push|scripts/test_prepush_destructive_liveness.sh" \
1180
1187
  `# 실제 git push 발화 레인 (2026-10-24, 형제 하네스 회신). 합성 stdin 레인은 «판정» 만 잰다 — 이 레인은 git 이 그 동작에서 훅을 «부르는가 · 그 줄을 넘기는가» 를 잰다. --mirror 는 삭제 줄을 안 넘긴다(실측).` \
@@ -1195,6 +1202,7 @@ for _pair in \
1195
1202
  "templates/.git-hooks/pre-commit|scripts/test_marker_floor_lanes.sh" \
1196
1203
  ".github/workflows/regression-guard.yml|scripts/test_regression_guard_ci_lanes.sh" \
1197
1204
  "templates/regression_guard.sh|scripts/test_regression_guard_sibling_lanes.sh" \
1205
+ "templates/regression_guard.sh|scripts/test_regression_guard_codecomment_lanes.sh" \
1198
1206
  ".github/workflows/validate.yml|scripts/test_leak_scan_control_lanes.sh" \
1199
1207
  "templates/.git-hooks/pre-commit|scripts/test_marker_standpoint_lanes.sh" \
1200
1208
  "templates/.git-hooks/pre-commit|scripts/test_marker_thirdparty_lanes.sh" \
@@ -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
@@ -187,7 +187,7 @@ done
187
187
  _peer_cwd() { # $1=pid → cwd on stdout, empty if unresolvable
188
188
  if [ -r "/proc/$1/cwd" ]; then readlink "/proc/$1/cwd" 2>/dev/null; return; fi
189
189
  command -v lsof >/dev/null 2>&1 || return 0
190
- lsof -a -p "$1" -d cwd -Fn 2>/dev/null | sed -n 's/^n//p' | head -1
190
+ lsof -a -p "$1" -d cwd -Fn 2>/dev/null | sed -n 's/^n//p' | sed -n 1p
191
191
  }
192
192
  # Repo identity, NOT directory prefix. Measured 2026-08-22 (probe_2026-08-22_A2_replication.md):
193
193
  # `--show-toplevel` yields the WORKTREE's own path, and a worktree by definition lives outside the
@@ -321,7 +321,7 @@ if [ -f "$_UI_SUT" ]; then
321
321
  _UI_SID=""
322
322
  if [ -f "$FH/scripts/branch_claim.sh" ]; then
323
323
  _UI_SID=$(LC_ALL=C bash "$FH/scripts/branch_claim.sh" show 2>/dev/null \
324
- | LC_ALL=C sed -n 's/^세션ID[[:space:]][[:space:]]*//p' | head -1)
324
+ | LC_ALL=C sed -n 's/^세션ID[[:space:]][[:space:]]*//p' | sed -n 1p)
325
325
  fi
326
326
  case "$_UI_SID" in pid-*|'') _UI_SID="" ;; esac
327
327
  # 전사본 slug = 프로젝트 절대경로에서 `/` `.` `_` 를 `-` 로 (실측 2026-09-05, ~/.claude/projects 대조)
@@ -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 측정,
@@ -563,7 +563,7 @@ fh_sim_instr_hits() { # $1=absolute dir → prints instruction sources in $1 and
563
563
  case "$n" in .claude/*) [ "$skipclaude" = 1 ] && continue ;; esac
564
564
  [ -e "$d/$n" ] && hits="$hits $d/$n"
565
565
  done
566
- if [ "$skipclaude" = 0 ] && [ -d "$d/.claude/rules" ] && [ -n "$(find -L "$d/.claude/rules" -name '*.md' -print 2>/dev/null | head -1)" ]; then # -L: symlinked rules dirs load too (codex R2)
566
+ if [ "$skipclaude" = 0 ] && [ -d "$d/.claude/rules" ] && [ -n "$(find -L "$d/.claude/rules" -name '*.md' -print 2>/dev/null | sed -n 1p)" ]; then # -L: symlinked rules dirs load too (codex R2)
567
567
  hits="$hits $d/.claude/rules/"
568
568
  fi
569
569
  [ "$d" = "/" ] && break
@@ -590,7 +590,7 @@ fh_sim_refuse_inherit "$OUTDIR" "--out"
590
590
  # but printed so a reader of the run knows they were there (codex R1).
591
591
  _user_instr=""
592
592
  [ -e "$_user_cfg/CLAUDE.md" ] && _user_instr="$_user_instr $_user_cfg/CLAUDE.md"
593
- [ -d "$_user_cfg/rules" ] && [ -n "$(find -L "$_user_cfg/rules" -name '*.md' -print 2>/dev/null | head -1)" ] && _user_instr="$_user_instr $_user_cfg/rules/"
593
+ [ -d "$_user_cfg/rules" ] && [ -n "$(find -L "$_user_cfg/rules" -name '*.md' -print 2>/dev/null | sed -n 1p)" ] && _user_instr="$_user_instr $_user_cfg/rules/"
594
594
  [ -n "$_user_instr" ] && echo "ℹ️ user-level instructions load in every arm (same for all, not refused):$_user_instr" >&2
595
595
 
596
596
  # ── machine-surface snapshot ──────────────────────────────────────────────────────────────────
@@ -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 ]
@@ -73,7 +73,7 @@ json.dump(d,open(sys.argv[1],"w",encoding="utf-8"),ensure_ascii=False,indent=2)
73
73
  PY
74
74
  }
75
75
  # verdict — echoes the single fh-qp skills sweep line from a real count_check run
76
- verdict() { ( cd "$FX" && bash scripts/count_check.sh 2>&1 ) | grep -E "sweep: fh-qp skills" | head -1; }
76
+ verdict() { ( cd "$FX" && bash scripts/count_check.sh 2>&1 ) | grep -E "sweep: fh-qp skills" | sed -n 1p; }
77
77
 
78
78
  DECL_OK="QP (Quality Platform) — 4 skills (qp · qp-plan · qp-run · qp-regress)."
79
79
  DECL_STALE="QP (Quality Platform) — 3 skills (qp · qp-plan · qp-run · qp-regress)."
@@ -688,7 +688,7 @@ fi
688
688
  # flips to a hit — proves the exclusion is load-bearing for this specific fixture, not just
689
689
  # present somewhere in the file.
690
690
  _scan_reverted="$TMP/scan_reverted.sh"
691
- _excl_line=$(grep -n "grep -vE 'in \[A-Z_\]" "$SCAN" | head -1 | cut -d: -f1) # portability-noqa: this file has no `set -e` (top line 22 is `set -uo pipefail` only) and the next line already guards empty via -z
691
+ _excl_line=$(grep -n "grep -vE 'in \[A-Z_\]" "$SCAN" | sed -n 1p | cut -d: -f1) # portability-noqa: this file has no `set -e` (top line 22 is `set -uo pipefail` only) and the next line already guards empty via -z
692
692
  if [ -z "$_excl_line" ]; then
693
693
  bad "C2-REVERT could not locate the exclusion line by its known text — fixture cannot run"
694
694
  else
@@ -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"
@@ -153,7 +153,7 @@ new_form=$(bash -c 'set -uo pipefail; _int() { case "${1:-}" in (""|*[!0-9]*) ec
153
153
  # "needle matching unrelated text"). Extract the subject's OWN assignment lines and evaluate them.
154
154
  _eval_subject_assign() { # $1 = variable name; echoes what the SUBJECT computes for a zero match
155
155
  local var="$1" line
156
- line=$(grep -E "^${var}=" "$CHECK" | head -1)
156
+ line=$(grep -E "^${var}=" "$CHECK" | sed -n 1p)
157
157
  [ -n "$line" ] || { echo "NOLINE"; return; }
158
158
  bash -c "set -uo pipefail
159
159
  _int() { case \"\${1:-}\" in (''|*[!0-9]*) echo 0 ;; (*) echo \"\$1\" ;; esac; }
@@ -173,7 +173,7 @@ done
173
173
  echo ""
174
174
  echo "── 전환 설계 레인: 레거시 단일 파일 ∪ 세션별 디렉터리 ──"
175
175
  # 주어의 _cat_logs + LOGGED 를 그대로 들어와 4가지 상태에서 센다.
176
- LOGGED_LINE=$(grep -E "^LOGGED=" "$CHECK" | head -1)
176
+ LOGGED_LINE=$(grep -E "^LOGGED=" "$CHECK" | sed -n 1p)
177
177
  _count_in() { # $1=LOG 경로(없으면 빈문자) $2=LOGDIR 경로(없으면 빈문자)
178
178
  bash -c "set -uo pipefail
179
179
  _int() { case \"\${1:-}\" in (''|*[!0-9]*) echo 0 ;; (*) echo \"\$1\" ;; esac; }
@@ -198,7 +198,7 @@ echo ""
198
198
  echo "── read-error ≠ zero 레인 (2026-08-26, cross-family/codex) ──"
199
199
  # 주어가 «0건» 과 «못 읽었다» 를 가르는가. 가르기 전에는 읽기 실패가 0 으로 접혀
200
200
  # "✅ ④-e no sub-agent dispatches tallied today" 라는 **안 잰 초록**이 나갔다.
201
- DISP_LINE=$(grep -E "^DISPATCHED=" "$CHECK" | head -1)
201
+ DISP_LINE=$(grep -E "^DISPATCHED=" "$CHECK" | sed -n 1p)
202
202
  _disp_with() { # $1 = TALLY 로 쓸 경로
203
203
  bash -c "set -uo pipefail
204
204
  _int() { case \"\${1:-}\" in (''|*[!0-9]*) echo 0 ;; (*) echo \"\$1\" ;; esac; }
@@ -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/.axes_23_passed_fixture.marker"
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