@chrono-meta/fh-gate 3.39.1 → 3.41.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 (65) hide show
  1. package/.claude/regression/probes_live.yaml +9 -2
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/CLAUDE.md +2 -2
  4. package/README.ja.md +20 -18
  5. package/README.zh.md +20 -18
  6. package/knowledge/shared/harness-core/claude_md_full_reference.md +8 -1
  7. package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +9 -0
  8. package/knowledge/shared/harness-core/fh_module_contract.md +55 -1
  9. package/knowledge/shared/harness-core/lease_record_channel.md +26 -2
  10. package/knowledge/shared/harness-core/onboarding_acceleration_autopilot.md +7 -0
  11. package/knowledge/shared/learnings/subagent_invocations_log.yaml +36 -0
  12. package/knowledge/shared/rules/operations.md +1 -0
  13. package/package.json +14 -1
  14. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  15. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  16. package/plugins/fh-meta/CHANGELOG.md +52 -0
  17. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  18. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  19. package/scripts/adapters/gstack_content_safety.sh +2 -2
  20. package/scripts/adapters/mate_agent_boundary.sh +2 -2
  21. package/scripts/adapters/qasp_new_code_anchor.sh +2 -2
  22. package/scripts/adapters/qasp_web_rules.sh +2 -2
  23. package/scripts/agent_tools_pin.txt +16 -0
  24. package/scripts/catch_tally.py +216 -0
  25. package/scripts/claim_precision_report.py +138 -0
  26. package/scripts/fh_module_check.py +182 -1
  27. package/scripts/fh_session_load.sh +3 -1
  28. package/scripts/fixture_guard_lib.sh +38 -0
  29. package/scripts/generated_harness_check.py +4 -0
  30. package/scripts/lane_identity_tripwire.sh +35 -0
  31. package/scripts/package_coverage_check.sh +6 -2
  32. package/scripts/post_squash_verify.sh +53 -1
  33. package/scripts/pr_merge_verified.sh +57 -1
  34. package/scripts/probe_live_eval.sh +61 -0
  35. package/scripts/probe_live_eval_lib.py +47 -4
  36. package/scripts/selfcheck.sh +17 -0
  37. package/scripts/selfdev_merge_tier.sh +153 -0
  38. package/scripts/session_checklist.py +38 -1
  39. package/scripts/session_close_check.sh +79 -1
  40. package/scripts/shell_name_boundary_scan.sh +11 -3
  41. package/scripts/sim_isolated_run.sh +62 -1
  42. package/scripts/test_adapter_lanes.sh +3 -3
  43. package/scripts/test_agent_tools_pin_lanes.sh +73 -0
  44. package/scripts/test_catch_tally_lanes.sh +10 -0
  45. package/scripts/test_claim_precision_report_lanes.sh +77 -0
  46. package/scripts/test_doc_claims_1113_lanes.sh +36 -0
  47. package/scripts/test_fh_module_check_lanes.sh +106 -1
  48. package/scripts/test_fh_run_resolver_lanes.sh +1 -1
  49. package/scripts/test_fixture_git_env_lanes.sh +87 -0
  50. package/scripts/test_generated_harness_check_lanes.sh +8 -0
  51. package/scripts/test_lane_gap_hint_lanes.sh +2 -2
  52. package/scripts/test_locale_invariance_lanes.sh +3 -3
  53. package/scripts/test_name_boundary_locale_lanes.sh +66 -0
  54. package/scripts/test_package_coverage_lanes.sh +10 -0
  55. package/scripts/test_post_squash_verify_lanes.sh +23 -2
  56. package/scripts/test_pr_merge_verified_lanes.sh +62 -3
  57. package/scripts/test_probe_live_eval_lanes.sh +160 -5
  58. package/scripts/test_selfdev_merge_tier_lanes.sh +128 -0
  59. package/scripts/test_session_checklist_lanes.sh +57 -0
  60. package/scripts/test_session_close_chain_lanes.sh +93 -0
  61. package/scripts/test_session_close_lanes.sh +11 -0
  62. package/scripts/test_sim_isolated_run_lanes.sh +67 -0
  63. package/scripts/test_temper_check_lanes.sh +1 -1
  64. package/scripts/test_verdict_watermark_lanes.sh +1 -1
  65. package/templates/harness_birth_core.md +57 -0
@@ -484,6 +484,99 @@ T=$(_hookfx hook_ok2 0); _hookrun "$T" ""
484
484
  _rc "PP-4 ordinary push + CLEAN → exit 0" "$RC" 0
485
485
  _line "PP-4 → no advisory noise on a healthy push" 'close invariant(s) violated' 0 "$OUT"
486
486
 
487
+ echo
488
+ echo "══ ①-r merge receipts (2026-11-08 harvest H2 — report only) ══"
489
+ # FH #1057 merged with a `verify-incomplete` receipt and nothing at close read the file. The flagged set is «last
490
+ # outcome != verified» in FILE order, this repo's file only; absent/empty = UNMEASURED; malformed lines are counted.
491
+ unset PMV_RECEIPTS
492
+ _rcpt() { # $1=file $2..=pr:outcome[:at] — one JSON line each, appended in argument order
493
+ local f="$1"; shift
494
+ local a pr out at
495
+ for a in "$@"; do
496
+ pr=${a%%:*}; out=${a#*:}; at="$(date +%Y-%m-%d)T10:00:00+0900" # today: the 7-day window must not age the fixtures out
497
+ case "$out" in *:*) at=${out#*:}; out=${out%%:*} ;; esac
498
+ printf '{"at": "%s", "pr": %s, "head": "h", "merge": "m", "outcome": "%s", "actor": "a", "lease": "l", "rerun": "r"}\n' "$at" "$pr" "$out" >> "$f"
499
+ done
500
+ }
501
+
502
+ T=$(_repo r_absent); _artifacts "$T"; _run "$T"
503
+ _line "①-r-U1 no receipts file → none/UNMEASURED" '①-r receipts: none/UNMEASURED' 1 "$OUT"
504
+ _line "①-r-U1 no receipts file → no ✅ (absence ≠ verified)" '✅ ①-r' 0 "$OUT"
505
+ _rc "①-r-U1 → exit unchanged (0)" "$RC" 0
506
+
507
+ T=$(_repo r_empty); _artifacts "$T"; : > "$T/.git/fh-merge-receipts.jsonl"; _run "$T"
508
+ _line "①-r-U2 empty receipts file → none/UNMEASURED" '①-r receipts: none/UNMEASURED' 1 "$OUT"
509
+
510
+ T=$(_repo r_incomplete); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 12:verified 34:verify-incomplete; _run "$T"
511
+ _line "①-r-P1 one verify-incomplete → named" '①-r 1 PR(s) whose last merge receipt is not «verified»: #34 verify-incomplete' 1 "$OUT"
512
+ _line "①-r-P1 → the verified PR is not named" '#12 ' 0 "$OUT"
513
+ _line "①-r-P1 → says advisory" 'advisory, does not block' 1 "$OUT"
514
+ _rc "①-r-P1 → exit unchanged (advisory, 0)" "$RC" 0
515
+
516
+ T=$(_repo r_cleared); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verify-incomplete 34:verified; _run "$T"
517
+ _line "①-r-C1 a later verified for the SAME PR clears it" '⚠️ ①-r' 0 "$OUT"
518
+ _line "①-r-C1 → ✅ all verified" '✅ ①-r merge receipts: last outcome «verified» for all 1 PR' 1 "$OUT"
519
+
520
+ T=$(_repo r_otherpr); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verify-incomplete 35:verified; _run "$T"
521
+ _line "①-r-C2 a verified for a DIFFERENT PR does not clear" '#34 verify-incomplete' 1 "$OUT"
522
+ _line "①-r-C2 → the other PR is not named" '#35 ' 0 "$OUT"
523
+
524
+ T=$(_repo r_reflag); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verified 34:verify-failed; _run "$T"
525
+ _line "①-r-C3 verify-failed after verified re-flags" '#34 verify-failed' 1 "$OUT"
526
+
527
+ T=$(_repo r_newout); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:accepted-not-completed; _run "$T"
528
+ _line "①-r-N1 an outcome name no list knows is still flagged" '#34 accepted-not-completed' 1 "$OUT"
529
+
530
+ # file order, not the `at` string: the later LINE carries the EARLIER timestamp
531
+ T=$(_repo r_order); _artifacts "$T"
532
+ _rcpt "$T/.git/fh-merge-receipts.jsonl" "34:verified:2026-11-09T10:00:00+0900" "34:verify-incomplete:2026-11-01T10:00:00+0900"
533
+ OUT=$(FH_RECEIPT_WINDOW_DAYS=0 PATH="$T/bin:$PATH" bash "$CHECK" "$T" 2>/dev/null); RC=$? # window off: this lane is about order, not age
534
+ _line "①-r-O1 last = file order (later line, earlier at) → flagged" '#34 verify-incomplete' 1 "$OUT"
535
+
536
+ T=$(_repo r_bad); _artifacts "$T"
537
+ { echo '{"pr": 34, "outcome": "verif'; echo '{"pr": "35", "outcome": "verified"}'; } > "$T/.git/fh-merge-receipts.jsonl"
538
+ _rcpt "$T/.git/fh-merge-receipts.jsonl" 36:verified; _run "$T"
539
+ _line "①-r-B1 malformed lines are counted" '①-r 2 malformed receipt line(s) of 3' 1 "$OUT"
540
+ _line "①-r-B1 → no ✅ while lines are unreadable" '✅ ①-r' 0 "$OUT"
541
+
542
+ T=$(_repo r_ws); _artifacts "$T"; printf '\n \t\n' > "$T/.git/fh-merge-receipts.jsonl"; _run "$T"
543
+ _line "①-r-U3 whitespace-only receipts file → UNMEASURED (codex R1)" '①-r receipts: none/UNMEASURED' 1 "$OUT"
544
+ _line "①-r-U3 → no ✅ for zero PRs" '✅ ①-r' 0 "$OUT"
545
+
546
+ T=$(_repo r_atnum); _artifacts "$T"; echo '{"pr": 34, "outcome": "verify-failed", "at": 123}' > "$T/.git/fh-merge-receipts.jsonl"; _run "$T"
547
+ _line "①-r-B2 a non-string at does not crash the reader (codex R1)" '#34 verify-failed' 1 "$OUT"
548
+ _line "①-r-B2 → no reader-failed line" 'reader failed' 0 "$OUT"
549
+
550
+ # 7-day window (operator 2026-11-08 «판단후추천대로»): an old non-verified receipt is COUNTED, not named, never dropped
551
+ T=$(_repo r_window); _artifacts "$T"
552
+ _rcpt "$T/.git/fh-merge-receipts.jsonl" "40:verify-incomplete:2020-01-01T10:00:00+0900" 41:verify-incomplete "42:verify-failed:not-a-date"; _run "$T"
553
+ _line "①-r-T1 a recent non-verified PR is named" '#41 verify-incomplete' 1 "$OUT"
554
+ _line "①-r-T1 an old one is not named" '#40 ' 0 "$OUT"
555
+ _line "①-r-T1 → but it is counted (not silently dropped)" '①-r 1 older PR(s) (> 7 days)' 1 "$OUT"
556
+ _line "①-r-T1 an unreadable at is treated as recent (shown)" '#42 verify-failed' 1 "$OUT"
557
+ _line "①-r-T1 → no ✅ while an old one is open" '✅ ①-r' 0 "$OUT"
558
+ OUT=$(FH_RECEIPT_WINDOW_DAYS=0 PATH="$T/bin:$PATH" bash "$CHECK" "$T" 2>/dev/null); RC=$?
559
+ _line "①-r-T2 FH_RECEIPT_WINDOW_DAYS=0 names the old one too" '#40 verify-incomplete' 1 "$OUT"
560
+ _line "①-r-T2 → no older line" '①-r .* older PR' 0 "$OUT"
561
+
562
+ # PMV_RECEIPTS wins over <git-common-dir> — the writer honours it, so the reader must too
563
+ T=$(_repo r_env); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verified
564
+ _rcpt "$TMPROOT/r_env_receipts.jsonl" 77:verify-incomplete
565
+ OUT=$(PMV_RECEIPTS="$TMPROOT/r_env_receipts.jsonl" PATH="$T/bin:$PATH" bash "$CHECK" "$T" 2>/dev/null); RC=$?
566
+ _line "①-r-E1 PMV_RECEIPTS is read instead of the repo file" '#77 verify-incomplete' 1 "$OUT"
567
+
568
+ # an inherited GIT_COMMON_DIR must not redirect the reader to another repo's receipts (codex R2)
569
+ T=$(_repo r_gcd_a); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verify-failed
570
+ T2=$(_repo r_gcd_b); _rcpt "$T2/.git/fh-merge-receipts.jsonl" 34:verified
571
+ OUT=$(GIT_COMMON_DIR="$T2/.git" PATH="$T/bin:$PATH" bash "$CHECK" "$T" 2>/dev/null); RC=$?
572
+ _line "①-r-E2 inherited GIT_COMMON_DIR → still this repo's receipts" '#34 verify-failed' 1 "$OUT"
573
+
574
+ # worktree: <git-common-dir> is the MAIN repo's .git, not the worktree's .git file
575
+ T=$(_repo r_wt); _artifacts "$T"; _rcpt "$T/.git/fh-merge-receipts.jsonl" 34:verify-incomplete
576
+ git -C "$T" worktree add -q "$TMPROOT/r_wt_tree" >/dev/null 2>&1; mkdir -p "$TMPROOT/r_wt_tree/tracks/_meta"; _artifacts "$TMPROOT/r_wt_tree"
577
+ _run "$TMPROOT/r_wt_tree"
578
+ _line "①-r-W1 from a worktree, the common-dir file is read" '#34 verify-incomplete' 1 "$OUT"
579
+
487
580
  echo
488
581
  echo "──────────────────────────────────────────────"
489
582
  if [ "$FAILED" -ne 0 ]; then
@@ -88,6 +88,17 @@ _lane "②-P2 explicit skip note → silent" "$WARN2" 0 "$(_fixtur
88
88
  _lane "②-P1 run recorded → prints the ✅ form" "$OK2" 1 "$(_fixture 1 '- harvest-loop 실행 완료')"
89
89
  _lane "②-C no FH asset touched → no ② line at all" ' ② ' 0 "$(_fixture 0 '- 항목 하나')"
90
90
 
91
+ # ⑤-catches record-only line (2026-11-13): known-pair + English heading + near-miss heading + no file
92
+ CA='ⓘ ⑤-catches'; CP='✅ ⑤-catches'
93
+ _lane "⑤c-N no catches section → record-only line" "$CA" 1 "$(_fixture 0 '- 항목 하나')"
94
+ _lane "⑤c-P «## 잡은 것» present → no absent line" "$CA" 0 "$(_fixture 0 '## 잡은 것
95
+ 0건 — fixture')"
96
+ _lane "⑤c-P2 «## Catches» present → ✅ form" "$CP" 1 "$(_fixture 0 '## Catches
97
+ 0건 — fixture')"
98
+ _lane "⑤c-M «## 🟥 이 새벽이 잡은 것» is not the section" "$CA" 1 "$(_fixture 0 '## 🟥 이 새벽이 잡은 것
99
+ - x')"
100
+ _lane "⑤c-C no fh_completed file → no ⑤-catches line" '⑤-catches' 0 "$(_fixture 0 '')"
101
+
91
102
  # ⑤ card-last fixture premise — the two ⑤ lanes are ORDERING lanes: each asserts what the subject
92
103
  # does when one file is strictly newer than another. Establishing that ordering by writing one file
93
104
  # after the other is not establishing it — it is hoping for it.
@@ -547,6 +547,14 @@ M="$(bud_meta b29b say --timeout 60)"
547
547
  { [ "$(meta_get "$M" ended_at_cap)" = no ] && [ "$(meta_get "$M" max_turns)" = unset ] && [ "$(meta_get "$M" timeout_s)" = 60 ]; } \
548
548
  && ok "L29b KNOWN-NEGATIVE — normal answer: ended_at_cap=no, max_turns=unset, timeout_s=60" \
549
549
  || no "L29b normal answer mis-recorded ($(meta_get "$M" ended_at_cap))"
550
+ # L29w cost axis (2026-11-12): every episode's meta carries wall_s as whole seconds; the hang under
551
+ # --timeout 1 must read >=1 (a constant 0 would be a dead clock).
552
+ # --timeout 2 so a constant 1 (or 0) producer is red (codex R1 B).
553
+ M="$(bud_meta b29w hang --timeout 2)"
554
+ _w="$(meta_get "$M" wall_s)"
555
+ { [[ "$_w" =~ ^[0-9]+$ ]] && [ "$_w" -ge 2 ] && [ "$_w" -le 30 ]; } \
556
+ && ok "L29w wall_s recorded as whole seconds (hang under --timeout 2 -> 2 <= $_w <= 30)" \
557
+ || no "L29w wall_s missing or dead clock («${_w}»)"
550
558
  M="$(bud_meta b29c die --timeout 60)"
551
559
  [ "$(meta_get "$M" ended_at_cap)" = UNKNOWN ] \
552
560
  && ok "L29c a crash (rc=7) is UNKNOWN, not no and not yes" \
@@ -662,5 +670,64 @@ mkdir -p "$WORKROOT/inh2"; printf 'x\n' > "$WORKROOT/inh2/CLAUDE.md"
662
670
  || no "L30l inherit warning count=$(grep -c 'arms WILL inherit' "$WORKROOT/o30l.log")"
663
671
  rm -rf "$WORKROOT/inh2"
664
672
 
673
+ # ── L31 §CONSUMER SURFACE (2026-11-10, AQ-20261110-6) — opt-in flags reach the CLI, defaults do not move
674
+ # L31a default: none of the four flags in argv (byte-identical default is the whole promise)
675
+ # L31b all four given: each reaches argv, --add-dir is THIS rep's wrapper (w_a_r1), settings path absolute
676
+ # L31c --permission-mode bypassPermissions → rc 2 and NO arm invoked (known-negative)
677
+ # L31d bad --setting-sources token → rc 2 · L31e missing --settings file → rc 2
678
+ # L31f --turns path carries the same flags on every turn call (two call sites, one promise)
679
+ SURFS="$WORKROOT/surf_settings.json"; printf '{"permissions":{"allow":["Write"]}}' > "$SURFS"
680
+ LOG31a="$WORKROOT/argv31a.log"; : > "$LOG31a"
681
+ ( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31a" \
682
+ bash "$SUT" --arm a --reps 1 --prompt p --out "$WORKROOT/o31a" ) >/dev/null 2>&1
683
+ { [ -s "$LOG31a" ] && cmp -s "$LOG31a" "$LOG"; } \
684
+ && ok "L31a default argv is byte-identical to the L8a default run (no consumer-surface flag)" \
685
+ || no "L31a default argv changed (or arm not run): $(cat "$LOG31a")"
686
+ LOG31b="$WORKROOT/argv31b.log"; : > "$LOG31b"
687
+ ( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31b" \
688
+ bash "$SUT" --arm a --reps 1 --prompt p --mode act --setting-sources project,local --settings "$SURFS" \
689
+ --permission-mode acceptEdits --add-wrapper-dir --out "$WORKROOT/o31b" ) >/dev/null 2>&1
690
+ { grep -q -- '--setting-sources project,local' "$LOG31b" && grep -q -- "--settings /" "$LOG31b" \
691
+ && grep -q -- '--permission-mode acceptEdits' "$LOG31b" && grep -qE -- "--add-dir [^ ]*/o31b/w_a_r1( |$)" "$LOG31b"; } \
692
+ && ok "L31b all four flags reach argv; --add-dir = this rep's wrapper; --settings absolute" \
693
+ || no "L31b flags missing from argv: $(cat "$LOG31b")"
694
+ LOG31c="$WORKROOT/argv31c.log"; : > "$LOG31c"
695
+ ( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31c" \
696
+ bash "$SUT" --arm a --reps 1 --prompt p --permission-mode bypassPermissions --out "$WORKROOT/o31c" ) >/dev/null 2>&1; RC31c=$?
697
+ { [ "$RC31c" = 2 ] && [ ! -s "$LOG31c" ]; } \
698
+ && ok "L31c bypassPermissions → rc 2, no arm invoked" \
699
+ || no "L31c bypassPermissions slipped (rc=$RC31c · argv lines=$(wc -l < "$LOG31c" | tr -d ' '))"
700
+ run_sut --arm a --reps 1 --prompt p --setting-sources user,global --out "$WORKROOT/o31d"
701
+ [ "$RC" = 2 ] && ok "L31d bad --setting-sources token → rc 2" || no "L31d bad token accepted (rc=$RC)"
702
+ run_sut --arm a --reps 1 --prompt p --settings "$WORKROOT/nope.json" --out "$WORKROOT/o31e"
703
+ [ "$RC" = 2 ] && ok "L31e missing --settings file → rc 2" || no "L31e missing settings file accepted (rc=$RC)"
704
+ printf 'one\ntwo\n' > "$WORKROOT/t31f.txt"; LOG31f="$WORKROOT/argv31f.log"; : > "$LOG31f"
705
+ ( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31f" \
706
+ bash "$SUT" --arm a --reps 1 --turns "$WORKROOT/t31f.txt" --setting-sources project,local --add-wrapper-dir --out "$WORKROOT/o31f" ) >/dev/null 2>&1
707
+ _n31f=$(grep -c . "$LOG31f")
708
+ [ "$_n31f" -ge 1 ] && [ "$(grep -c -- '--setting-sources project,local' "$LOG31f")" = "$_n31f" ] \
709
+ && [ "$(grep -cE -- "--add-dir [^ ]*/o31f/w_a_r1( |$)" "$LOG31f")" = "$_n31f" ] \
710
+ && ok "L31f --turns: every turn call ($_n31f) carries the consumer-surface flags" \
711
+ || no "L31f turns path dropped flags: $(cat "$LOG31f")"
712
+
713
+ # L31g env inheritance (codex R1): ADDWRAP/SETSRC/SETFILE/PERMMODE in the env must not switch anything on
714
+ LOG31g="$WORKROOT/argv31g.log"; : > "$LOG31g"
715
+ ( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31g" \
716
+ ADDWRAP=1 SETSRC=project SETFILE="$SURFS" PERMMODE=plan bash "$SUT" --arm a --reps 1 --prompt p --out "$WORKROOT/o31g" ) >/dev/null 2>&1
717
+ { [ -s "$LOG31g" ] && cmp -s "$LOG31g" "$LOG"; } && ok "L31g inherited env vars do not enable consumer-surface flags" \
718
+ || no "L31g env leaked into argv: $(cat "$LOG31g")"
719
+ # L31h empty --permission-mode → rc 2 (codex R1) · L31i trailing value flag → rc 2, no hang (codex R1)
720
+ run_sut --arm a --reps 1 --prompt p --permission-mode '' --out "$WORKROOT/o31h"
721
+ [ "$RC" = 2 ] && ok "L31h empty --permission-mode → rc 2" || no "L31h empty mode accepted (rc=$RC)"
722
+ _t0=$(date +%s); run_sut --arm a --reps 1 --prompt p --out "$WORKROOT/o31i" --settings; _el=$(( $(date +%s) - _t0 ))
723
+ { [ "$RC" = 2 ] && [ "$_el" -lt 20 ]; } && ok "L31i trailing --settings with no value → rc 2 in ${_el}s" || no "L31i trailing flag rc=$RC elapsed=${_el}s"
724
+ # L31j a source list without `local` drops the isolation deny file → rc 2 (codex R2)
725
+ run_sut --arm a --reps 1 --prompt p --setting-sources project --out "$WORKROOT/o31j"
726
+ [ "$RC" = 2 ] && ok "L31j --setting-sources without local → rc 2" || no "L31j source list without local accepted (rc=$RC)"
727
+ # L31k the forwarded string itself is validated: space-separated and empty-token lists → rc 2 (codex R2)
728
+ run_sut --arm a --reps 1 --prompt p --setting-sources 'project local' --out "$WORKROOT/o31k"; _rk1=$RC
729
+ run_sut --arm a --reps 1 --prompt p --setting-sources ',,,' --out "$WORKROOT/o31k2"; _rk2=$RC
730
+ { [ "$_rk1" = 2 ] && [ "$_rk2" = 2 ]; } && ok "L31k 'project local' and ',,,' → rc 2" || no "L31k malformed source list accepted (rc=$_rk1/$_rk2)"
731
+
665
732
  echo "sim_isolated_run lanes: $pass passed, $fail failed"
666
733
  [ "$fail" -eq 0 ] || exit 1
@@ -89,7 +89,7 @@ awk -v A="$FENCE_ANCHOR" '
89
89
  }
90
90
  inb { buf = buf $0 "\n"; if (index($0, A)) hit=1 }
91
91
  ' "$FENCE_SRC" > "$WORK/fence.md"
92
- [ -s "$WORK/fence.md" ] || _die "앵커 «$FENCE_ANCHOR» 를 담은 펜스 블록을 $FENCE_SRC 에서 못 찾았다"
92
+ [ -s "$WORK/fence.md" ] || _die "앵커 «${FENCE_ANCHOR}» 를 담은 펜스 블록을 $FENCE_SRC 에서 못 찾았다"
93
93
 
94
94
  # 픽스처 «potency» — 뚫리는 표기인지 먼저 증명한다. 이게 0 이면 P2 는 아무 분기도 안 지나간다
95
95
  # ([[feedback_fixture_must_use_the_breaking_spelling]] · [[feedback_three_reasons_a_lane_is_green]]).
@@ -304,7 +304,7 @@ fi
304
304
  rm -rf "$_FX"
305
305
 
306
306
  # ── L24 🟥 셸 이름-경계 스캐너를 «회귀에» 배선한다 ────────────────────────────────
307
- # 이 스캐너를 짓고도 «안 돌려서» 같은 날 같은 결함을 다시 넣었다(`«$_rel»`).
307
+ # 이 스캐너를 짓고도 «안 돌려서» 같은 날 같은 결함을 다시 넣었다(`« $_rel »` 를 붙여 쓴 꼴).
308
308
  # 도구를 만드는 것과 «부르는 것»은 다른 일이다 — 그래서 레인이 부른다.
309
309
  if [ -x "$ROOT/scripts/shell_name_boundary_scan.sh" ]; then
310
310
  bash "$ROOT/scripts/shell_name_boundary_scan.sh" "$S" >/dev/null 2>&1 \
@@ -0,0 +1,57 @@
1
+ # Harness birth core — the five parts every new harness carries
2
+
3
+ **Read this before writing the first file of a new harness** — a CLAUDE.md, rules, a checklist or a
4
+ skill for a domain or a new/empty project ("X 용 하네스 세팅해 줘", "set up a harness for X").
5
+ It matters most where **no script can decide right from wrong** (reviewing prose, plans, designs,
6
+ copy): there the harness's only defence against confident wrong verdicts is what is written below.
7
+
8
+ Write the five parts **into the new harness itself, in the domain's own words**. Do not copy FH
9
+ paths, FH vocabulary or a pointer back to this file — the new harness must stand without FH.
10
+
11
+ ## 1. Purpose (one paragraph, first thing in its CLAUDE.md)
12
+ Why this harness exists, for whom, what a *good* result is — and what it must never do. A role
13
+ name alone ("you are a reviewer") is not a purpose.
14
+
15
+ ## 2. When unsure
16
+ One explicit rule: when evidence is missing, **mark it** (e.g. `확인 필요` / `UNVERIFIED`) and say
17
+ what would settle it. Never guess, never round toward "looks fine", never state an unchecked fact
18
+ as true or false.
19
+
20
+ ## 3. Calibration without a script — create `calibration/`
21
+ - **Inputs and answers live apart.** `calibration/inputs/` holds one small, realistic good example
22
+ and one bad example (the bad one carries the domain's typical defects), named neutrally
23
+ (`sample_a`, `sample_b`). `calibration/expected.md` holds the verdict each must get, why, and
24
+ **where that expectation comes from**: the user's own stated criteria, a cited domain standard,
25
+ or an example the user confirmed. An expectation the builder made up alone is
26
+ `unconfirmed` — it does not calibrate anything until the user confirms it.
27
+ - **The check**: review each input as a normal task **without opening `expected.md`**, write the
28
+ result to `calibration/runs/<date>.md`, then compare with `expected.md` and note match / mismatch.
29
+ Run it once right after the harness is built, again after the rules change, and before trusting
30
+ the harness on a new kind of input. A mismatch means fix the rules, not the expected answer.
31
+ - `calibration/verdict_log.md` — one line per finding in real use: accepted / rejected / unclear by
32
+ the author. When the same kind of finding keeps being rejected, revisit that rule.
33
+ - Until the **current** rules have been run on a confirmed pair and matched, the top of the
34
+ CLAUDE.md says `UNCALIBRATED — <what is missing>`. A rule change or a new kind of input puts that
35
+ line back until the check passes again — an old match does not carry over.
36
+
37
+ ## 4. Irreversible edges
38
+ List the actions in this domain that cannot be taken back (publish, send, share, post, delete,
39
+ overwriting the only copy). The harness takes one only on the human's **explicit go-ahead for that
40
+ concrete action**. A condition the harness itself would have to judge ("publish it if it looks
41
+ fine") is not a go-ahead — report the findings and ask. Edits the user asks for are fine; keep the
42
+ original recoverable (a copy or version) and say where it is.
43
+
44
+ ## 5. Typed verdict
45
+ Every finding: severity (e.g. blocking / should-fix / optional) and confidence, quoting the source
46
+ passage. The overall verdict comes from a small fixed set (e.g. go / fix-then-go / rework). A bare
47
+ "OK" is not a verdict. **While the harness is `UNCALIBRATED`, it gives findings but no overall
48
+ verdict** in real use — it says "findings only — not calibrated yet" instead. The calibration run
49
+ itself is the one place a provisional overall verdict is written, so it can be compared.
50
+
51
+ ## Done when (check before reporting the harness as built)
52
+ - [ ] all five parts are in the files (not only described in the reply)
53
+ - [ ] `calibration/` holds the two inputs and `expected.md` with each expectation's source, and a
54
+ first run is recorded in `calibration/runs/` — or the CLAUDE.md says `UNCALIBRATED` and why
55
+ - [ ] the reply says plainly whether the harness is calibrated or not
56
+ - [ ] if `.claude/` cannot be written (headless runs need a human for it), the rules live in a root
57
+ folder and CLAUDE.md imports them — no pointer to a file that does not exist