@chrono-meta/fh-gate 3.16.0 โ†’ 3.18.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 (60) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/AGENTS.md +27 -0
  3. package/CATALOG.md +60 -0
  4. package/CLAUDE.md +6 -1
  5. package/README.ja.md +2 -2
  6. package/README.ko.md +2 -2
  7. package/README.md +2 -2
  8. package/README.zh.md +2 -2
  9. package/docs/OUTPUT_EVIDENCE.md +1 -1
  10. package/docs/codex-compat.md +24 -0
  11. package/knowledge/shared/harness-core/checkout_layer_drift.md +301 -0
  12. package/knowledge/shared/learnings/subagent_invocations_log.yaml +69 -0
  13. package/package.json +11 -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 +57 -0
  17. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  18. package/plugins/fh-preprep/skills/preprep/SKILL.md +5 -0
  19. package/plugins/fh-preprep/skills/preprep/lane_font_embed.py +235 -0
  20. package/plugins/fh-preprep/skills/preprep/ooxml/gate.py +67 -5
  21. package/plugins/fh-preprep/skills/preprep/ooxml/test_gate_exitcodes.py +136 -0
  22. package/plugins/fh-preprep/skills/preprep/preprep.py +16 -1
  23. package/plugins/fh-preprep/skills/preprep/presentation_checklist.md +108 -6
  24. package/plugins/fh-preprep/skills/preprep/safe_install.py +22 -3
  25. package/plugins/fh-preprep/skills/preprep/surfaces.example.yaml +11 -0
  26. package/plugins/fh-preprep/skills/preprep/test_lane_font_embed.py +117 -0
  27. package/plugins/fh-preprep/skills/preprep/test_safe_install_app_xml.py +77 -0
  28. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  29. package/scripts/count_check.sh +46 -14
  30. package/scripts/daily_report.sh +17 -1
  31. package/scripts/env_layer_fingerprint.sh +309 -0
  32. package/scripts/gate_bootstrap_ephemeral.sh +248 -0
  33. package/scripts/governor_board.sh +841 -0
  34. package/scripts/map_postprocess.py +89 -4
  35. package/scripts/multibyte_bracket_lint.sh +135 -0
  36. package/scripts/outbound_pr_gate.sh +12 -0
  37. package/scripts/package_coverage_check.sh +34 -0
  38. package/scripts/selfcheck.sh +245 -0
  39. package/scripts/session_close_check.sh +96 -1
  40. package/scripts/stale_ref_scan.py +2 -1
  41. package/scripts/test_count_check_decl_lanes.sh +176 -0
  42. package/scripts/test_env_layer_fingerprint_lanes.sh +192 -0
  43. package/scripts/test_gate_bootstrap_ephemeral_lanes.sh +262 -0
  44. package/scripts/test_locale_invariance_lanes.sh +581 -0
  45. package/scripts/test_map_postprocess_lanes.sh +84 -4
  46. package/scripts/test_marker_crossfamily_lanes.sh +5 -1
  47. package/scripts/test_marker_defense_lanes.sh +5 -1
  48. package/scripts/test_marker_standpoint_lanes.sh +5 -1
  49. package/scripts/test_marker_thirdparty_lanes.sh +5 -1
  50. package/scripts/test_multibyte_bracket_lint_lanes.sh +107 -0
  51. package/scripts/test_outbound_pr_gate_lanes.sh +133 -0
  52. package/scripts/test_preprep_drift_anchor.sh +34 -9
  53. package/scripts/test_preprep_drift_anchor_lanes.sh +64 -2
  54. package/scripts/test_session_close_chain_lanes.sh +45 -0
  55. package/scripts/test_stale_ref_close_lanes.sh +197 -0
  56. package/scripts/test_stale_ref_scan_lanes.sh +6 -1
  57. package/scripts/test_worktree_reclaim_lanes.sh +267 -1
  58. package/scripts/worktree_reclaim.sh +246 -11
  59. package/templates/.git-hooks/pre-commit +108 -27
  60. package/templates/settings.PreToolUse.snippet.json +54 -1
@@ -90,7 +90,35 @@ if command -v gh >/dev/null 2>&1; then
90
90
  # why an environment with zero open PRs can never surface this, and why the 0-case alone is not a
91
91
  # calibration. Observed live the same day: 2 open PRs reported as 1.
92
92
  # Anchored by scripts/test_session_close_chain_lanes.sh lane โ‘ -b-P3.
93
- PRS=$(gh pr list --author "@me" --state open --json number 2>/dev/null | grep -o '"number"' | wc -l | tr -d ' ' || true)
93
+ # ๐ŸŸฅ `--author "@me"` ALONE counted ZERO for every cloud-session PR. Those are authored by the
94
+ # GitHub App `app/claude`, not by the local user (`chrono-meta`), so the sweep reported 0 while
95
+ # cloud PRs were open and a close passed silently as "no open PRs" โ€” the same class of silence
96
+ # the occurrence-count fix above was written to end, one layer up. Measured 2026-09-21 with a
97
+ # known pair on MERGED PRs (the open set was empty, so the 0-case could not calibrate it):
98
+ # `--author app/claude` -> #785 #784 #783 #782 #781
99
+ # `--author @me` -> #779 #773 #772 ...
100
+ # The two sets are DISJOINT, and the recent merges are almost all bot-authored โ€” so this line had
101
+ # been blind for a long time, not just on the day it was noticed.
102
+ # Union the two authors and dedup by NUMBER (not by line count: the same PR must never be counted
103
+ # twice if the author filters ever overlap). `--author` is deliberately NOT dropped โ€” dropping it
104
+ # counts other contributors' PRs in a shared repo, which over-blocks and trains the override.
105
+ # Anchored by scripts/test_session_close_chain_lanes.sh lane (1)-b-P4.
106
+ # ๐ŸŸฅ The number extractor tolerates whitespace after the colon ON PURPOSE. The line this replaced
107
+ # counted occurrences of the bare token `"number"`, which is spacing-insensitive; a naive
108
+ # `'"number":[0-9]*'` is NOT โ€” on `{"number": 782}` the `[0-9]*` matches ZERO digits, `cut` yields
109
+ # an empty field, and the later `sed '/^$/d'` deletes it, so the sweep silently reports 0 for a
110
+ # pretty-printed body. Measured 2026-09-21 (cross-family codex finding, then hand-verified):
111
+ # spaced JSON -> naive 0 / this 2 <- the silent-wrong-count the fix would have introduced
112
+ # compact JSON -> naive 2 / this 2
113
+ # empty array -> naive 0 / this 0 <- over-fire control, unchanged
114
+ # gh currently emits compact JSON when piped, so this is hardening against a formatting change,
115
+ # not a live break โ€” recorded because a count that degrades toward 0 is the same fail-open
116
+ # direction this whole fix exists to close.
117
+ _open_pr_numbers() {
118
+ gh pr list --author "$1" --state open --json number 2>/dev/null \
119
+ | grep -oE '"number":[[:space:]]*[0-9]+' | grep -oE '[0-9]+$'
120
+ }
121
+ PRS=$( { _open_pr_numbers "@me"; _open_pr_numbers "app/claude"; } | sort -u | sed '/^$/d' | wc -l | tr -d ' ')
94
122
  [ "${PRS:-0}" -gt 0 ] && echo "โš ๏ธ โ‘ -b $PRS open PR(s) by you โ€” classify: self-mergeable vs awaiting-external"
95
123
  fi
96
124
 
@@ -804,5 +832,72 @@ else
804
832
  echo "โญ๏ธ โ‘ -f push-zone UNCALIBRATED โ€” script or owner-account list absent"
805
833
  fi
806
834
 
835
+ # โ”€โ”€ โ‘ -g STALE REF (advisory) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
836
+ # WHY THIS IS HERE AND NOT AT COMMIT TIME. `scripts/stale_ref_scan.py` (#770) exists because the
837
+ # three sibling instruments โ€” halffix_propagation_scan ยท claim_propagation_scan ยท doc_claim_triad_scan
838
+ # โ€” all presuppose that SOMEONE TOUCHED SOMETHING. An aging reference satisfies no such trigger:
839
+ # nobody edits a DOI on the day it stops being the latest version. #773 then shipped the tool with
840
+ # its own residual: ยซ๋ฐฐ์„  ์•ˆ ํ•จ โ€” ์ด ๊ณ„๊ธฐ๋Š” ์ง€๊ธˆ ์•„๋ฌด๋„ ์•ˆ ๋ถ€๋ฅธ๋‹คยป. Measured 2026-09-21: its only
841
+ # call sites were its own lane suite and that suite's selfcheck wiring, BOTH `--offline-fixture`.
842
+ # So nothing had ever asked the question of the real corpus.
843
+ #
844
+ # ๐ŸŸฅ A commit-time trigger would rebuild the exact blind spot โ€” it would fire only when someone
845
+ # touches the file. A close-time sweep has no touch precondition, which is the whole point.
846
+ # ๐ŸŸฅ **advisory โ€” it never blocks.** #773 states the corpus false-positive rate is UNMEASURED and
847
+ # some stale citations are deliberate pins; blocking a reversible surface on an unmeasured
848
+ # instrument trains `--no-verify` and disarms the Destructive-Op gate in the same hook
849
+ # (CLAUDE.md ยงSurface-Class Degrade Invariant, reversible half).
850
+ # ๐ŸŸฅ **๋ชป ์ฝ์Œ โ‰  ๊นจ๋—ํ•จ.** The scanner folds SUPERSEDED and UNRESOLVED into one rc (its own header
851
+ # says so), so this block reads the VERDICT LINE's counters instead of the exit code โ€” the #767
852
+ # lesson about scanners reporting "could not read" as "clean" applies to the caller too.
853
+ # SCOPE: tracked files only, `tracks/**` excluded โ€” those are past local records that must not be
854
+ # edited, and #770 measured most corpus hits landing there. Including them would be pure noise.
855
+ _SR_SCAN="$FH/scripts/stale_ref_scan.py"
856
+ if [ ! -f "$_SR_SCAN" ]; then
857
+ echo "โญ๏ธ โ‘ -g stale-ref: stale_ref_scan.py ์—†์Œ โ€” skipped, not passed (UNMEASURED)"
858
+ elif ! command -v python3 >/dev/null 2>&1; then
859
+ echo "โญ๏ธ โ‘ -g stale-ref: python3 ์—†์Œ โ€” skipped, not passed (UNMEASURED)"
860
+ elif ! command -v git >/dev/null 2>&1 || ! ( cd "$FH" && git rev-parse --git-dir >/dev/null 2>&1 ); then
861
+ # ๐ŸŸฅ ๋Œ€์ƒ ๋ชฉ๋ก์„ `git grep` ์œผ๋กœ ๋งŒ๋“ ๋‹ค. git ์ด ์—†์œผ๋ฉด ๋ชฉ๋ก์ด **๋นˆ๋‹ค** โ€” ๊ทธ๋ฆฌ๊ณ  ๋นˆ ๋ชฉ๋ก์€
862
+ # ์•„๋ž˜์—์„œ ใ€Œ์ฐธ์กฐ ์—†์Œใ€์œผ๋กœ ์ฝํžŒ๋‹ค. ใ€Œ๋ชป ์„ธ์—ˆ๋‹คใ€์™€ ใ€Œ0 ์ด๋‹คใ€๋ฅผ ๊ฐ™์€ ์นจ๋ฌต์œผ๋กœ ๋‘์ง€ ์•Š๋Š”๋‹ค.
863
+ echo "โš ๏ธ โ‘ -g stale-ref: git ์—†์Œ/๋น„-๋ ˆํฌ โ€” ๋Œ€์ƒ ๋ชฉ๋ก์„ ๋ชป ๋งŒ๋“ค์—ˆ๋‹ค. UNMEASURED ์ง€ ใ€Œ์ฐธ์กฐ ์—†์Œใ€์ด ์•„๋‹ˆ๋‹ค"
864
+ else
865
+ _sr_files=$( cd "$FH" && git grep -lI -e 'zenodo' -- '*.md' '*.cff' '*.html' '*.json' 2>/dev/null \
866
+ | grep -v '^tracks/' || true )
867
+ if [ -z "$_sr_files" ]; then
868
+ echo "โญ๏ธ โ‘ -g stale-ref: ์Šค์บ”ํ•  Zenodo ์ฐธ์กฐ๊ฐ€ ์ถ”์  ํŒŒ์ผ์— ์—†๋‹ค โ€” ๋Œ€์ƒ ์—†์Œ"
869
+ else
870
+ # ๐ŸŸฅ ์ „์ฒด ์ƒํ•œ์„ ๊ฑด๋‹ค. per-request 8์ดˆ ร— ์„œ๋กœ ๋‹ค๋ฅธ id ์ˆ˜๊ฐ€ ์ƒํ•œ์ด๋ผ, ๋งค๋‹ฌ๋ฆฌ๋Š” ๋„คํŠธ์›Œํฌ์—์„œ
871
+ # ๋งˆ๊ฐ์ด 1๋ถ„ ๊ฐ€๊นŒ์ด ๋ฉˆ์ถœ ์ˆ˜ ์žˆ๋‹ค โ€” ๊ทธ๊ฒƒ์ด `--no-verify` ๋ฅผ ํ•™์Šต์‹œํ‚ค๋Š” ๋ชจ์–‘์ด๋‹ค. ์ƒํ•œ์—
872
+ # ๊ฑธ๋ฆฌ๋ฉด ํŒ์ • ์ค„์ด ์•ˆ ๋‚˜์˜ค๊ณ , ๊ทธ ๊ฒฝ๋กœ๋Š” ์•„๋ž˜์—์„œ UNMEASURED ๋กœ ๋–จ์–ด์ง„๋‹ค(๋ ˆ์ธ L4).
873
+ # ์‹ค์ธก(๋„คํŠธ์›Œํฌ ์ฐจ๋‹จ, 22ํŒŒ์ผ ยท ์„œ๋กœ ๋‹ค๋ฅธ id 7): 1์ดˆ.
874
+ # shellcheck disable=SC2086
875
+ if command -v timeout >/dev/null 2>&1; then
876
+ _sr_out=$( cd "$FH" && timeout 45 python3 scripts/stale_ref_scan.py --timeout 8 --body $_sr_files 2>&1 )
877
+ else
878
+ _sr_out=$( cd "$FH" && python3 scripts/stale_ref_scan.py --timeout 8 --body $_sr_files 2>&1 )
879
+ fi
880
+ _sr_v=$(printf '%s\n' "$_sr_out" | grep -E '^stale-ref verdict:' | tail -1)
881
+ if [ -z "$_sr_v" ]; then
882
+ echo "โš ๏ธ โ‘ -g stale-ref: UNMEASURED โ€” ์Šค์บ๋„ˆ๊ฐ€ ํŒ์ • ์ค„์„ ์•ˆ ๋ƒˆ๋‹ค (0 ์œผ๋กœ ์ฝ์ง€ ๋งˆ๋ผ)"
883
+ else
884
+ _sr_sup=$(printf '%s' "$_sr_v" | sed -n 's/.*SUPERSEDED=\([0-9]*\).*/\1/p')
885
+ _sr_unr=$(printf '%s' "$_sr_v" | sed -n 's/.*UNRESOLVED=\([0-9]*\).*/\1/p')
886
+ _sr_uns=$(printf '%s' "$_sr_v" | sed -n 's/.*UNSCANNABLE=\([0-9]*\).*/\1/p')
887
+ if [ "${_sr_sup:-0}" -gt 0 ] 2>/dev/null; then
888
+ echo "โš ๏ธ โ‘ -g stale-ref: ${_sr_sup} ๊ฐœ id ๊ฐ€ ํ๊ธฐ๋œ ๋ฒ„์ „์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค โ€” advisory, ๋ง‰์ง€ ์•Š๋Š”๋‹ค."
889
+ echo " ๐ŸŸฅ ์˜๋„ํ•œ pin ์ผ ์ˆ˜ ์žˆ๋‹ค โ€” ๋ˆˆ์œผ๋กœ ํ™•์ธํ•˜๊ณ  ๊ณ ์ณ๋ผ(๊ณ ์ •์ด๋ฉด ํŒŒ์ผ์— 'stale-ref: pinned')."
890
+ printf '%s\n' "$_sr_out" | grep -E '^ +๐ŸŸฅ SUPERSEDED' | sed 's/^/ /'
891
+ fi
892
+ if [ "${_sr_unr:-0}" -gt 0 ] 2>/dev/null || [ "${_sr_uns:-0}" -gt 0 ] 2>/dev/null; then
893
+ echo "โš ๏ธ โ‘ -g stale-ref: UNRESOLVED=${_sr_unr:-?} UNSCANNABLE=${_sr_uns:-?} โ€” ๋ชป ์ฝ์€ ๊ฒƒ์ด ์žˆ๋‹ค. UNMEASURED ์ง€ ๊นจ๋—ํ•จ์ด ์•„๋‹ˆ๋‹ค"
894
+ fi
895
+ if [ "${_sr_sup:-0}" = "0" ] && [ "${_sr_unr:-0}" = "0" ] && [ "${_sr_uns:-0}" = "0" ]; then
896
+ echo "โœ… โ‘ -g stale-ref: ์‚ด์•„์žˆ๋Š” Zenodo ์ธ์šฉ์ด ์ „๋ถ€ ์ตœ์‹ ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค"
897
+ fi
898
+ fi
899
+ fi
900
+ fi
901
+
807
902
  echo "โ”€โ”€ close check: $([ "$FAIL" -eq 0 ] && echo CONSISTENT || echo VIOLATIONS) โ”€โ”€"
808
903
  exit "$FAIL"
@@ -328,7 +328,8 @@ def run_self_check():
328
328
  got = [r for _, r, _, _ in scan_body("x.html", wbr)]
329
329
  lane("extract: <wbr>-split DOI", got == ["20397566"], str(got))
330
330
 
331
- # โ“‘ URL ํ˜•ํƒœ โ€” README.md:418 ์˜ ์‹ค๋ฌผ ํ˜•ํƒœ
331
+ # โ“‘ URL ํ˜•ํƒœ โ€” README.md:418 ์˜ ์‹ค๋ฌผ ํ˜•ํƒœ (as of c4b4ffa; ๊ทธ ์ค„์€ ์ดํ›„ v1.0.2 id
332
+ # 22843702 ๋กœ ์˜ฎ๊ฒจ๊ฐ”๋‹ค. ํ”ฝ์Šค์ฒ˜๋Š” ยซ๋‚ก์€ idยป ๋ฅผ ์ผ๋ถ€๋Ÿฌ ์œ ์ง€ํ•œ๋‹ค โ€” stale-ref ๋ ˆ์ธ์ด๋ผ์„œ๋‹ค)
332
333
  url = ['> **FH papers**: v1.0.1 methodology ยท [Zenodo](https://zenodo.org/records/22542168)']
333
334
  got = [r for _, r, _, _ in scan_body("x.md", url)]
334
335
  lane("extract: zenodo.org/records/<id> URL", got == ["22542168"], str(got))
@@ -0,0 +1,176 @@
1
+ #!/usr/bin/env bash
2
+ # test_count_check_decl_lanes.sh โ€” known pairs + revert probes for the COUNT DECLARATION parser
3
+ # in `scripts/count_check.sh` (the `_DECL_PY` helper and the sweep's AMBIG branches).
4
+ #
5
+ # WHY THIS EXISTS
6
+ # #768 widened the sweep to every plugin on disk and then wrote its own residual down:
7
+ # ยซ์ˆœํšŒ๋Š” description ์˜ **์ฒซ** `N skills` ํŒจํ„ด๋งŒ ์ฝ๋Š”๋‹ค โ€” ๊ณผํƒ/๋ฏธํƒ ๋ฐฉํ–ฅ ๋ฏธ์ธก์ •ยป
8
+ # Both directions were then measured (2026-09-21) and both were real:
9
+ # ยท ๋ฏธํƒ / FALSE PASS โ€” a stale declaration ("3 skills", disk 4) goes GREEN when any earlier
10
+ # prose number ("roughly 4 skills worth of") is picked up instead. The same defect the
11
+ # control arm catches as FAIL. This is the #763/#768 substring-collision class, third time.
12
+ # ยท ๊ณผํƒ / FALSE FAIL โ€” the pattern `(\d+)\s+skills?` matches the "3 skill" inside
13
+ # `M1/M2/M3 skill tier map`, which is live in `.claude-plugin/marketplace.json` today.
14
+ # Fix: count EVERY match, fail on more than one DISTINCT value ("๋ชจํ˜ธโ‰ ํ†ต๊ณผ", one step beyond
15
+ # #768's "๋ถ€์žฌโ‰ ํ†ต๊ณผ"), and require a non-alphanumeric boundary before the digits.
16
+ #
17
+ # SCOPE, stated honestly: these lanes run the REAL `count_check.sh` against a REAL tree
18
+ # (`git archive HEAD` into a temp dir, with the working-tree script copied over), because the
19
+ # sibling README-format suite already recorded what happens when you fixture a skeleton tree:
20
+ # every arm fails for the same unrelated reason ("0 active fh-meta skills") and the suite
21
+ # certifies nothing. L0 is the dead-control guard for exactly that โ€” if the baseline fixture
22
+ # does not come back GREEN, no later verdict in this file means anything.
23
+ #
24
+ # ๐ŸŸฅ The real repository is never mutated. L8 asserts that.
25
+ set -uo pipefail
26
+
27
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
28
+ cd "$REPO_ROOT" || exit 10
29
+ pass=0; fail=0
30
+ ok() { printf ' \342\234\205 %s\n' "$1"; pass=$((pass+1)); }
31
+ bad() { printf ' \342\235\214 %s\n' "$1"; fail=$((fail+1)); }
32
+
33
+ if [ ! -f scripts/count_check.sh ]; then
34
+ printf '\360\237\237\245 HARNESS ERROR โ€” scripts/count_check.sh ๊ฐ€ ์—†๋‹ค. ใ€Œ0 ์‹คํŒจใ€๊ฐ€ ์•„๋‹ˆ๋ผ ๊ณ„๊ธฐ ๋ถ€์žฌ๋‹ค.\n'
35
+ exit 10
36
+ fi
37
+
38
+ TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT
39
+ FX="$TMP/tree"; mkdir -p "$FX"
40
+ # containment baseline (L8) โ€” byte snapshots, NOT `git diff`: a consumer install has no history,
41
+ # and a containment claim that cannot be evaluated there is a containment claim nobody checks.
42
+ mkdir -p "$TMP/base"
43
+ cp "$REPO_ROOT/plugins/fh-qp/.claude-plugin/plugin.json" "$TMP/base/qp.json" 2>/dev/null || true
44
+ cp "$REPO_ROOT/.claude-plugin/marketplace.json" "$TMP/base/mp.json" 2>/dev/null || true
45
+ # ๐ŸŸฅ **git ์— ๊ธฐ๋Œ€์ง€ ์•Š๋Š”๋‹ค.** ์ดˆํŒ์€ `git archive HEAD` ๋กœ ํ”ฝ์Šค์ฒ˜๋ฅผ ๋–ด๋Š”๋ฐ, ์†Œ๋น„์ž install ์˜
46
+ # arm ์—์„œ ์‹ค์ธก์œผ๋กœ ์ฃฝ์—ˆ๋‹ค: npm ์œผ๋กœ ํ‘ผ ํŒจํ‚ค์ง€์—๋Š” ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ์—†์–ด `not a valid object name:
47
+ # HEAD` ๋กœ rc=10 ์ด ๋‚ฌ๋‹ค. ๋ฌด์Œ ์ดˆ๋ก์ด ์•„๋‹ˆ์—ˆ์œผ๋‹ˆ ์ €ํ•˜ ๋ฐฉํ–ฅ์€ ์˜ณ์•˜์ง€๋งŒ, ๋ ˆ์ธ์ด ์†Œ๋น„์ž์—๊ฒŒ
48
+ # **๊ตฌ์กฐ์ ์œผ๋กœ ์‹คํ–‰ ๋ถˆ๊ฐ€**๋ผ๋Š” ๋œป์ด๋‹ค(#770 ์ด ๋„คํŠธ์›Œํฌ๋ฅผ ๋บ€ ๊ฒƒ๊ณผ ๊ฐ™์€ ์ด์œ ). ๊ทธ๋ž˜์„œ ์›Œํ‚น
49
+ # ํŠธ๋ฆฌ๋ฅผ ๊ทธ๋Œ€๋กœ ๋ณต์‚ฌํ•œ๋‹ค โ€” count_check ๋Š” worktree ๋ชจ๋“œ์—์„œ git ์„ ์•ˆ ์“ด๋‹ค(`git ls-files` ๋Š”
50
+ # `--staged` ๋ถ„๊ธฐ ์•ˆ์—๋งŒ ์žˆ๋‹ค).
51
+ if ! ( cd "$REPO_ROOT" && tar cf - --exclude=.git --exclude=node_modules --exclude=tracks . ) \
52
+ | ( cd "$FX" && tar xf - ) 2>/dev/null; then
53
+ printf '\360\237\237\245 HARNESS ERROR โ€” ํ”ฝ์Šค์ฒ˜ ํŠธ๋ฆฌ ๋ณต์‚ฌ ์‹คํŒจ. ใ€Œ0 ์‹คํŒจใ€๊ฐ€ ์•„๋‹ˆ๋ผ ๊ณ„๊ธฐ ๋ถ€์žฌ๋‹ค.\n'
54
+ exit 10
55
+ fi
56
+ if [ ! -f "$FX/scripts/count_check.sh" ]; then
57
+ printf '\360\237\237\245 HARNESS ERROR โ€” ํ”ฝ์Šค์ฒ˜์— count_check.sh ๊ฐ€ ์—†๋‹ค.\n'; exit 10
58
+ fi
59
+
60
+ QP="$FX/plugins/fh-qp/.claude-plugin/plugin.json"
61
+ if [ ! -f "$QP" ]; then
62
+ printf '\360\237\237\245 HARNESS ERROR โ€” ํ”ฝ์Šค์ฒ˜์— fh-qp plugin.json ์ด ์—†๋‹ค.\n'; exit 10
63
+ fi
64
+ cp "$QP" "$TMP/qp.orig.json"
65
+
66
+ # set_desc <description> โ€” rewrite ONLY fh-qp's description in the fixture tree
67
+ set_desc() {
68
+ python3 - "$QP" "$TMP/qp.orig.json" "$1" <<'PY'
69
+ import json,sys
70
+ d=json.load(open(sys.argv[2],encoding="utf-8"))
71
+ d["description"]=sys.argv[3]
72
+ json.dump(d,open(sys.argv[1],"w",encoding="utf-8"),ensure_ascii=False,indent=2)
73
+ PY
74
+ }
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; }
77
+
78
+ DECL_OK="QP (Quality Platform) โ€” 4 skills (qp ยท qp-plan ยท qp-run ยท qp-regress)."
79
+ DECL_STALE="QP (Quality Platform) โ€” 3 skills (qp ยท qp-plan ยท qp-run ยท qp-regress)."
80
+ DECL_STALE_MASKED="QP โ€” replaces roughly 4 skills worth of hand-rolled tooling. 3 skills (qp ยท qp-plan ยท qp-run ยท qp-regress)."
81
+ DECL_TIERMAP="QP (Quality Platform) โ€” 4 skills (qp ยท qp-plan ยท qp-run ยท qp-regress). Reads the M1/M2/M3 skill tier map."
82
+ DECL_REPEAT="QP โ€” a 4 skills bundle. 4 skills (qp ยท qp-plan ยท qp-run ยท qp-regress)."
83
+
84
+ # โ”€โ”€ L0 dead-control: the untouched fixture must be GREEN โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
85
+ base=$( ( cd "$FX" && bash scripts/count_check.sh 2>&1 ) | tail -1 )
86
+ case "$base" in
87
+ *"COUNT-CHECK: PASS"*) ok "L0 dead-control โ€” ํ”ฝ์Šค์ฒ˜ ๊ธฐ์ค€์„ ์ด ์ดˆ๋ก ($base)" ;;
88
+ *) bad "L0 dead-control โ€” ๊ธฐ์ค€์„ ์ด ์ด๋ฏธ ๋นจ๊ฐ›๋‹ค ($base). ์ด ์•„๋ž˜ ํŒ์ •์€ ์ „๋ถ€ ๋ฌด์˜๋ฏธํ•˜๋‹ค"
89
+ echo "----"; echo "count_check declaration lanes: $pass passed, $fail failed"; exit 1 ;;
90
+ esac
91
+
92
+ # โ”€โ”€ L1 known-NEG: stale declaration, nothing masking it โ†’ FAIL โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
93
+ set_desc "$DECL_STALE"; v=$(verdict)
94
+ case "$v" in
95
+ FAIL*"์„ ์–ธ 3 โ‰  ๋””์Šคํฌ 4"*) ok "L1 known-NEG ๋‚ก์€ ์„ ์–ธ์„ ์žก๋Š”๋‹ค โ€” ๊ณ„๊ธฐ๊ฐ€ ์‚ด์•„ ์žˆ๋‹ค" ;;
96
+ *) bad "L1 known-NEG ๋‚ก์€ ์„ ์–ธ(3 vs 4)์„ ๋ชป ์žก์•˜๋‹ค: $v" ;;
97
+ esac
98
+
99
+ # โ”€โ”€ L2 known-POS: same stale declaration, masked by earlier prose โ†’ ๋ชจํ˜ธ FAIL โ”€
100
+ set_desc "$DECL_STALE_MASKED"; v=$(verdict)
101
+ case "$v" in
102
+ FAIL*"๋ชจํ˜ธ"*) ok "L2 known-POS ์‚ฐ๋ฌธ ์ˆซ์ž์— ๊ฐ€๋ ค์ง„ ๋‚ก์€ ์„ ์–ธ โ€” ๋ชจํ˜ธ๋กœ ์žก๋Š”๋‹ค (์ˆ˜๋ฆฌ ์ „์—” PASS)" ;;
103
+ PASS*) bad "L2 known-POS ๊ฑฐ์ง“ PASS ๊ฐ€ ์‚ด์•„ ์žˆ๋‹ค โ€” ์ด ๋ ˆ์ธ์ด ์กด์žฌํ•˜๋Š” ์ด์œ ๋‹ค: $v" ;;
104
+ *) bad "L2 known-POS ์˜ˆ์ƒ ๋ฐ– ํŒ์ •: $v" ;;
105
+ esac
106
+
107
+ # โ”€โ”€ L3 ๊ณผํƒ control: a correct declaration beside `M3 skill` prose โ†’ PASS โ”€โ”€โ”€โ”€โ”€
108
+ set_desc "$DECL_TIERMAP"; v=$(verdict)
109
+ case "$v" in
110
+ PASS*) ok "L3 ๊ณผํƒ control โ€” M3 skill tier map ์˜ \"3 skill\" ์€ ์„ ์–ธ์ด ์•„๋‹ˆ๋‹ค, ๋ง‰์ง€ ์•Š๋Š”๋‹ค" ;;
111
+ *) bad "L3 ๊ณผํƒ โ€” ์ •์ƒ ์„ ์–ธ์„ ๋ง‰์•˜๋‹ค. ๊ณผ์ฐจ๋‹จ์€ --no-verify ๋ฅผ ํ•™์Šต์‹œํ‚จ๋‹ค: $v" ;;
112
+ esac
113
+
114
+ # โ”€โ”€ L4 ๊ฐ™์€ ๊ฐ’ ๋ฐ˜๋ณต์€ ๋ชจํ˜ธ๊ฐ€ ์•„๋‹ˆ๋‹ค โ†’ PASS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
115
+ set_desc "$DECL_REPEAT"; v=$(verdict)
116
+ case "$v" in
117
+ PASS*) ok "L4 ๊ฐ™์€ ๊ฐ’ ๋ฐ˜๋ณต(4 ยท 4)์€ ๋ชจํ˜ธ๊ฐ€ ์•„๋‹ˆ๋‹ค โ€” ํ†ต๊ณผ" ;;
118
+ *) bad "L4 ๊ฐ™์€ ๊ฐ’ ๋ฐ˜๋ณต์„ ๋ชจํ˜ธ๋กœ ๋ง‰์•˜๋‹ค: $v" ;;
119
+ esac
120
+
121
+ # โ”€โ”€ L5 ๋ถ€์žฌโ‰ ํ†ต๊ณผ ํšŒ๊ท€ (#768 ์ด ์„ธ์šด ๊ทœ์น™์ด ์‚ด์•„ ์žˆ๋‚˜) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
122
+ set_desc "QP (Quality Platform) โ€” plan, automate, regress. No count declared here."; v=$(verdict)
123
+ case "$v" in
124
+ FAIL*"๋ถ€์žฌโ‰ ํ†ต๊ณผ"*) ok "L5 ์„ ์–ธ ๋ถ€์žฌ๋Š” ์—ฌ์ „ํžˆ FAIL โ€” #768 ์˜ ๊ทœ์น™์ด ์‚ด์•„ ์žˆ๋‹ค" ;;
125
+ *) bad "L5 ์„ ์–ธ ๋ถ€์žฌ๋ฅผ ๋†“์ณค๋‹ค: $v" ;;
126
+ esac
127
+
128
+ # โ”€โ”€ L6 revert probe: AMBIG ๋ถ„๊ธฐ๋ฅผ ์ฃฝ์ด๋ฉด L2 ๊ฐ€ ์ดˆ๋ก์œผ๋กœ ๋Œ์•„๊ฐ€์•ผ ํ•œ๋‹ค โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
129
+ cp "$FX/scripts/count_check.sh" "$TMP/mut6.sh"
130
+ # ๐ŸŸฅ ์ถฉ์‹คํ•œ ๋˜๋Œ๋ฆผ์€ ยซ์ฒซ ๋งค์น˜๋ฅผ ํ…์ŠคํŠธ ์ˆœ์„œ๋กœยป ๋‹ค โ€” ์ •๋ ฌ ์ตœ์†Ÿ๊ฐ’์ด ์•„๋‹ˆ๋‹ค.
131
+ # sorted(set(...)) ๋ฅผ vals[:1] ๋กœ ๋ฐ”๊พธ๋ฉด ์ˆ˜๋ฆฌ ์ „ `re.search` ์˜๋ฏธ๊ฐ€ ๊ทธ๋Œ€๋กœ ๋ณต์›๋œ๋‹ค.
132
+ if ! sed -i.bak 's/uniq=sorted(set(vals), key=int)/uniq=vals[:1]/' "$TMP/mut6.sh"; then
133
+ bad "L6 HARNESS ERROR โ€” ๋ฎคํ„ดํŠธ ์ƒ์„ฑ ์‹คํŒจ (์น˜ํ™˜ ๋Œ€์ƒ ์—†์Œ). ใ€Œ์•ˆ ๋นจ๊ฐœ์กŒ๋‹คใ€์™€ ๊ตฌ๋ณ„์ด ์•ˆ ๋œ๋‹ค"
134
+ elif ! grep -q 'uniq=vals\[:1\]' "$TMP/mut6.sh"; then
135
+ bad "L6 HARNESS ERROR โ€” ๋ฎคํ„ดํŠธ์— ์น˜ํ™˜์ด ๋ฐ˜์˜๋˜์ง€ ์•Š์•˜๋‹ค"
136
+ else
137
+ cp "$TMP/mut6.sh" "$FX/scripts/count_check.sh"
138
+ set_desc "$DECL_STALE_MASKED"; v=$(verdict)
139
+ case "$v" in
140
+ PASS*) ok "L6 ๋˜๋Œ๋ฆผ โ€” AMBIG ๋ถ„๊ธฐ๋ฅผ ์ฃฝ์ด์ž L2 ๊ฐ€ ๊ฑฐ์ง“ PASS ๋กœ ๋˜๋Œ์•„๊ฐ”๋‹ค (์•ต์ปค๊ฐ€ ์žฅ์‹์ด ์•„๋‹ˆ๋‹ค)" ;;
141
+ *) bad "L6 ๋˜๋Œ๋ฆผ โ€” ๋ฎคํ„ดํŠธ๊ฐ€ ๋นจ๊ฐ„ ์ฑ„๋‹ค. L2 ๋Š” AMBIG ๋ถ„๊ธฐ ๋•๋ถ„์ด ์•„๋‹ ์ˆ˜ ์žˆ๋‹ค: $v" ;;
142
+ esac
143
+ cp scripts/count_check.sh "$FX/scripts/count_check.sh"
144
+ fi
145
+ rm -f "$TMP/mut6.sh.bak"
146
+
147
+ # โ”€โ”€ L7 revert probe: ๊ฒฝ๊ณ„๋ฅผ ๋นผ๋ฉด L3 ์ด ๋นจ๊ฐœ์ ธ์•ผ ํ•œ๋‹ค โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
148
+ cp "$FX/scripts/count_check.sh" "$TMP/mut7.sh"
149
+ if ! sed -i.bak 's/(?<!\[A-Za-z0-9_\/.-\])//' "$TMP/mut7.sh"; then
150
+ bad "L7 HARNESS ERROR โ€” ๋ฎคํ„ดํŠธ ์ƒ์„ฑ ์‹คํŒจ (์น˜ํ™˜ ๋Œ€์ƒ ์—†์Œ)"
151
+ elif grep -q '(?<!' "$TMP/mut7.sh"; then
152
+ bad "L7 HARNESS ERROR โ€” ๊ฒฝ๊ณ„๊ฐ€ ๋ฎคํ„ดํŠธ์— ๊ทธ๋Œ€๋กœ ๋‚จ์•„ ์žˆ๋‹ค"
153
+ else
154
+ cp "$TMP/mut7.sh" "$FX/scripts/count_check.sh"
155
+ set_desc "$DECL_TIERMAP"; v=$(verdict)
156
+ case "$v" in
157
+ FAIL*) ok "L7 ๋˜๋Œ๋ฆผ โ€” ๊ฒฝ๊ณ„๋ฅผ ๋นผ์ž M3 ์˜ \"3 skill\" ์ด ๋‹ค์‹œ ์„ ์–ธ์œผ๋กœ ์ฝํžŒ๋‹ค (๊ณผํƒ ์‹ค์žฌ ํ™•์ธ)" ;;
158
+ *) bad "L7 ๋˜๋Œ๋ฆผ โ€” ๋ฎคํ„ดํŠธ๊ฐ€ ์ดˆ๋ก์ด๋‹ค. L3 ์€ ๊ฒฝ๊ณ„ ๋•๋ถ„์ด ์•„๋‹ ์ˆ˜ ์žˆ๋‹ค: $v" ;;
159
+ esac
160
+ cp scripts/count_check.sh "$FX/scripts/count_check.sh"
161
+ fi
162
+ rm -f "$TMP/mut7.sh.bak"
163
+
164
+ # โ”€โ”€ L8 containment: ์‹ค์ œ ๋ ˆํฌ๋Š” ๊ฑด๋“œ๋ฆฌ์ง€ ์•Š์•˜๋‹ค โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
165
+ if [ ! -s "$TMP/base/qp.json" ] || [ ! -s "$TMP/base/mp.json" ]; then
166
+ bad "L8 containment โ€” ๊ธฐ์ค€ ์Šค๋ƒ…์ƒท์„ ๋ชป ๋–ด๋‹ค. ๊ฒฉ๋ฆฌ๋ฅผ ยซ์žฐ ์ ์ด ์—†๋‹คยป (UNMEASURED, ํ†ต๊ณผ ์•„๋‹˜)"
167
+ elif cmp -s "$TMP/base/qp.json" "$REPO_ROOT/plugins/fh-qp/.claude-plugin/plugin.json" \
168
+ && cmp -s "$TMP/base/mp.json" "$REPO_ROOT/.claude-plugin/marketplace.json"; then
169
+ ok "L8 containment โ€” ์‹ค์ œ ํŠธ๋ฆฌ์˜ plugin/marketplace ์„ ์–ธ byte-identical (์‚ฌ๋ณธ๋งŒ ๊ฑด๋“œ๋ ธ๋‹ค)"
170
+ else
171
+ bad "L8 containment โ€” ์‹ค์ œ ํŠธ๋ฆฌ๊ฐ€ ๋ฐ”๋€Œ์—ˆ๋‹ค. ์ด ๋Ÿฐ์˜ ๊ฒฉ๋ฆฌ ์ฃผ์žฅ์€ ๋ฌดํšจ๋‹ค"
172
+ fi
173
+
174
+ echo "----"
175
+ echo "count_check declaration lanes: $pass passed, $fail failed"
176
+ [ "$fail" -eq 0 ]
@@ -0,0 +1,192 @@
1
+ #!/usr/bin/env bash
2
+ # test_env_layer_fingerprint_lanes.sh โ€” scripts/env_layer_fingerprint.sh ์˜ ์•ต์ปค.
3
+ #
4
+ # ์ด ๊ณ„๊ธฐ๊ฐ€ ์ฃผ์žฅํ•˜๋Š” ๊ฒƒ์€ ยซ๋‘ ์ฒดํฌ์•„์›ƒ์„ ๋Œ€์กฐํ•  ์ˆ˜ ์žˆ๋‹คยป ํ•˜๋‚˜๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ ๋ ˆ์ธ์ด ๋ฐ•์•„์•ผ ํ•˜๋Š” ๊ฒƒ๋„
5
+ # ๊ทธ ํ•˜๋‚˜๋‹ค: **์ธต์ด ์žˆ๊ณ  ์—†์Œ์— ๋”ฐ๋ผ ํŒ์ •๊ณผ ์ง€๋ฌธ์ด ์‹ค์ œ๋กœ ๊ฐˆ๋ฆฌ๋Š”๊ฐ€.** ใ€Œ๋Œ๊ธด ๋ˆ๋‹คใ€๋Š” ์•ต์ปค๊ฐ€ ์•„๋‹ˆ๋‹ค.
6
+ #
7
+ # ๐ŸŸฅ ๊ณ„๊ธฐ-์˜ค๋ฅ˜ ํŒ”(L6)์ด ์ด ๋ฌถ์Œ์˜ ํ•ต์‹ฌ์ด๋‹ค โ€” ํ—ˆ๋ธŒ๊ฐ€ ์•„๋‹Œ ๊ณณ์„ ๊ฒจ๋ˆ„๋ฉด ยซ๋“œ๋ฆฌํ”„ํŠธ 11๊ฑดยป์ด ์•„๋‹ˆ๋ผ
8
+ # rc=2 ๊ฐ€ ๋‚˜์™€์•ผ ํ•œ๋‹ค. ๊ทธ ํŒ”์ด ์—†์œผ๋ฉด ์ด ๊ณ„๊ธฐ์˜ ๊ฐ€์žฅ ๊ทธ๋Ÿด๋“ฏํ•œ ์‹คํŒจ(์—‰๋šฑํ•œ cwd ์—์„œ ์ „๋ถ€
9
+ # ABSENT ๋ฅผ ์ฐ๊ณ  ๋ณด๊ณ )๊ฐ€ ์ดˆ๋ก์œผ๋กœ ์ง€๋‚˜๊ฐ„๋‹ค.
10
+ set -uo pipefail
11
+ cd "$(dirname "$0")/.." || exit 2
12
+ S=scripts/env_layer_fingerprint.sh
13
+ fail=0
14
+ _t() { printf ' %-58s' "$1"; }
15
+ _ok() { echo "ok"; }
16
+ _no() { echo "FAIL โ€” $1"; fail=1; }
17
+
18
+ echo "โ”€โ”€ env-layer-fingerprint lanes โ”€โ”€"
19
+
20
+ [ -x "$S" ] || { echo "FAIL $S ๊ฐ€ ์—†๊ฑฐ๋‚˜ ์‹คํ–‰ ๋ถˆ๊ฐ€"; exit 1; }
21
+
22
+ TMP="$(mktemp -d)" || exit 2
23
+ trap 'rm -rf "$TMP"' EXIT
24
+
25
+ mk_hub() { # mk_hub DIR [full] โ€” READ ์ธต๋งŒ(=์ƒˆ ํด๋ก ) ๋˜๋Š” ๋กœ์ปฌ ์ธต๊นŒ์ง€ ์ฑ„์šด ํ—ˆ๋ธŒ
26
+ local d="$1"
27
+ mkdir -p "$d/.claude/rules" "$d/.claude/registry" "$d/templates/.git-hooks" "$d/scripts" "$d/tracks/_meta"
28
+ : > "$d/CLAUDE.md"; : > "$d/.claude/rules/fh_4axis_gate.md"
29
+ : > "$d/templates/.git-hooks/pre-commit"; : > "$d/scripts/x.sh"
30
+ git -C "$d" init -q 2>/dev/null
31
+ if [ "${2:-}" = full ]; then
32
+ : > "$d/.claude/rules/.public-surface-patterns"
33
+ : > "$d/.claude/rules/.residency-patterns"
34
+ : > "$d/.claude/registry/LOCAL_SKILL_REGISTRY.md"
35
+ : > "$d/CLAUDE.local.md"
36
+ : > "$d/tracks/_meta/edit_manifest.yaml"
37
+ : > "$d/tracks/_meta/.axes_23_passed_fixture.marker"
38
+ : > "$d/tracks/_meta/reference_next_session_starter.md"
39
+ : > "$d/tracks/_meta/session_fixture.md"
40
+ fi
41
+ }
42
+
43
+ # L1 โ€” ์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์ž๊ธฐ known-pair ๋ฅผ ํ†ต๊ณผํ•œ๋‹ค (๊ณ„๊ธฐ๊ฐ€ ๊ต์ •๋ผ ์žˆ๋‚˜)
44
+ _t "L1 selftest (known-pair ๋ถ„๋ฆฌ๋Šฅ)"
45
+ if bash "$S" --selftest >/dev/null 2>&1; then _ok; else _no "selftest ์‹คํŒจ โ€” ๊ณ„๊ธฐ๊ฐ€ ๊ต์ • ์•ˆ ๋จ"; fi
46
+
47
+ # L2 โ€” known-negative: ์ƒˆ ํด๋ก  ๋ชจ์–‘์ด๋ฉด ENFORCEยทPATTERN ์ด ABSENT ์ด๊ณ  rc=1
48
+ mk_hub "$TMP/bare"
49
+ _t "L2 ์ƒˆ ํด๋ก  โ†’ ๋กœ์ปฌ ์ธต ABSENT, rc=1"
50
+ out="$(FH_HUB="$TMP/bare" bash "$S" --tsv 2>/dev/null)"; rc=$?
51
+ if [ "$rc" -eq 1 ] \
52
+ && printf '%s' "$out" | grep -q '^pattern.psa PATTERN ABSENT' \
53
+ && printf '%s' "$out" | grep -q '^hook.pre-commit ENFORCE ABSENT'; then _ok
54
+ else _no "rc=$rc ์ด๊ฑฐ๋‚˜ ABSENT ํŒ์ •์ด ์•ˆ ๋‚˜์˜ด"; fi
55
+
56
+ # L3 โ€” known-positive: ๋กœ์ปฌ ์ธต์„ ์ฑ„์šฐ๋ฉด ๊ทธ ์นธ๋“ค์ด PRESENT ๋กœ ๋’ค์ง‘ํžŒ๋‹ค
57
+ mk_hub "$TMP/full" full
58
+ _t "L3 ๋กœ์ปฌ ์ธต ์ฑ„์›€ โ†’ ๊ฐ™์€ ์นธ์ด PRESENT ๋กœ ๋’ค์ง‘ํž˜"
59
+ out="$(FH_HUB="$TMP/full" bash "$S" --tsv 2>/dev/null)"
60
+ if printf '%s' "$out" | grep -q '^pattern.psa PATTERN PRESENT' \
61
+ && printf '%s' "$out" | grep -q '^evidence.marker EVIDENCE PRESENT' \
62
+ && printf '%s' "$out" | grep -q '^evidence.card EVIDENCE PRESENT'; then _ok
63
+ else _no "์ธต์„ ๋งŒ๋“ค์—ˆ๋Š”๋ฐ PRESENT ๋กœ ์•ˆ ๋ฐ”๋€œ โ€” ๋ถ„๋ฆฌ ์•ˆ ๋จ"; fi
64
+
65
+ # L4 โ€” ์ง€๋ฌธ์ด ์ƒํƒœ๋ฅผ ๋‚˜๋ฅธ๋‹ค: ๋‘ ํ”ฝ์Šค์ฒ˜์˜ digest ๊ฐ€ ๋‹ฌ๋ผ์•ผ ํ•œ๋‹ค
66
+ _t "L4 digest ๊ฐ€ ๋‘ ์ƒํƒœ๋ฅผ ๊ตฌ๋ถ„ํ•œ๋‹ค"
67
+ d1="$(FH_HUB="$TMP/bare" bash "$S" --digest 2>/dev/null)"
68
+ d2="$(FH_HUB="$TMP/full" bash "$S" --digest 2>/dev/null)"
69
+ if [ -n "$d1" ] && [ -n "$d2" ] && [ "$d1" != "$d2" ]; then _ok
70
+ else _no "digest ๊ฐ€ ๊ฐ™๊ฑฐ๋‚˜ ๋น„์—ˆ๋‹ค โ€” ๋Œ€์กฐ์— ๋ชป ์“ด๋‹ค"; fi
71
+
72
+ # L5 โ€” ๊ฐ’ ์œ ์ถœ ๊ธˆ์ง€: ์ถœ๋ ฅ์— ํŒŒ์ผ ยซ๋‚ด์šฉยป์ด ์‹ค๋ฆฌ๋ฉด ์•ˆ ๋œ๋‹ค (PRยท์Šค๋ ˆ๋“œ์— ๋ถ™์ด๋Š” ์‚ฐ์ถœ๋ฌผ์ด๋‹ค)
73
+ _t "L5 ์ถœ๋ ฅ์— ํŒŒ์ผ ๋‚ด์šฉ์ด ์•ˆ ์‹ค๋ฆฐ๋‹ค"
74
+ printf 'SECRET_TOKEN_DO_NOT_LEAK\n' > "$TMP/full/.claude/rules/.public-surface-patterns"
75
+ printf 'ANOTHER_SECRET_LITERAL\n' > "$TMP/full/CLAUDE.local.md"
76
+ out="$(FH_HUB="$TMP/full" bash "$S" 2>&1; FH_HUB="$TMP/full" bash "$S" --digest 2>&1; FH_HUB="$TMP/full" bash "$S" --tsv 2>&1)"
77
+ if printf '%s' "$out" | grep -q 'SECRET_TOKEN_DO_NOT_LEAK\|ANOTHER_SECRET_LITERAL'; then
78
+ _no "gitignored ํŒŒ์ผ์˜ ๋‚ด์šฉ์ด ์ถœ๋ ฅ์— ์‹ค๋ ธ๋‹ค โ€” ์œ ์ถœ"
79
+ else _ok; fi
80
+
81
+ # L6 โ€” ๊ณ„๊ธฐ-์˜ค๋ฅ˜ ํŒ”: ํ—ˆ๋ธŒ๊ฐ€ ์•„๋‹Œ ๊ณณ์„ ๊ฒจ๋ˆ„๋ฉด rc=2 (๋“œ๋ฆฌํ”„ํŠธ๋กœ ๋ณด๊ณ ํ•˜๋ฉด ์•ˆ ๋œ๋‹ค)
82
+ _t "L6 ํ—ˆ๋ธŒ ์•„๋‹Œ ๊ณณ โ†’ rc=2 (๋“œ๋ฆฌํ”„ํŠธ ์•„๋‹˜)"
83
+ mkdir -p "$TMP/nothub"
84
+ FH_HUB="$TMP/nothub" bash "$S" >/dev/null 2>&1; rc=$?
85
+ if [ "$rc" -eq 2 ]; then _ok; else _no "rc=$rc โ€” ์—‰๋šฑํ•œ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ๋“œ๋ฆฌํ”„ํŠธ๋กœ ๋ณด๊ณ ํ•œ๋‹ค"; fi
86
+
87
+ # L7 โ€” ๋˜๋Œ๋ฆผ ํ”„๋กœ๋ธŒ: READ ํ–‰ ํ•˜๋‚˜๋ฅผ ์ง€์šฐ๋ฉด L6 ๊ณผ ๊ฐ™์€ ๊ณ„๊ธฐ-์˜ค๋ฅ˜๋กœ ๋–จ์–ด์ ธ์•ผ ํ•œ๋‹ค
88
+ # (ยซ์ด ํŒ์ •์ด ์ •๋ง READ ์ธต์„ ๋ณด๊ณ  ๋‚˜์˜ค๋‚˜ยป๋ฅผ ๋ณด์ด๋Š” ํŒ” โ€” ์—†์œผ๋ฉด L6 ์ด ์šฐ์—ฐํžˆ ๋งž์„ ์ˆ˜ ์žˆ๋‹ค)
89
+ _t "L7 ๋˜๋Œ๋ฆผ โ€” READ ์ž์‚ฐ ์‚ญ์ œ ์‹œ rc=2 ๋กœ ์ „ํ™˜"
90
+ rm -f "$TMP/full/CLAUDE.md"
91
+ FH_HUB="$TMP/full" bash "$S" >/dev/null 2>&1; rc=$?
92
+ if [ "$rc" -eq 2 ]; then _ok; else _no "rc=$rc โ€” READ ์ธต ๋ฌด๊ฒฐ์„ฑ์ด ํŒ์ •์— ์•ˆ ๊ฑธ๋ ค ์žˆ๋‹ค"; fi
93
+
94
+ # L8 โ€” tracked ํŒŒ์ผ FP ์•ต์ปค: tracks/ ์— **tracked** ํŒŒ์ผ๋งŒ ์žˆ์œผ๋ฉด evidence.tracks ๋Š” ABSENT.
95
+ # (2026-08-30 ์˜จ๋ณด๋”ฉ ๋ถ„๊ธฐ FP ์™€ ๊ฐ™์€ ํด๋ž˜์Šค โ€” ๋™๋ด‰ ํŒŒ์ผ์„ ยซ๊ธฐ๋ก ์žˆ์Œยป์œผ๋กœ ์ฝ์œผ๋ฉด ์•ˆ ๋œ๋‹ค)
96
+ _t "L8 tracked-only tracks/ โ†’ evidence.tracks ABSENT"
97
+ mk_hub "$TMP/tracked"
98
+ mkdir -p "$TMP/tracked/tracks/_contrib"
99
+ : > "$TMP/tracked/tracks/_contrib/shipped.md"
100
+ git -C "$TMP/tracked" add -A >/dev/null 2>&1
101
+ out="$(FH_HUB="$TMP/tracked" bash "$S" --tsv 2>/dev/null)"
102
+ if printf '%s' "$out" | grep -q '^evidence.tracks EVIDENCE ABSENT'; then _ok
103
+ else _no "๋™๋ด‰๋œ tracked ํŒŒ์ผ์„ ์„ธ์…˜ ๊ธฐ๋ก์œผ๋กœ ์ฝ๋Š”๋‹ค โ€” FP"; fi
104
+
105
+ # โ”€โ”€ L9 โ€” ์ง€๋ฌธ์€ ์…ธ ์†Œ์Šค๋ฅผ ๋‹ด์ง€ ์•Š๋Š”๋‹ค. **์„ค์น˜๋œ ๋ชจ๋“  bash ์—์„œ** โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
106
+ # ์‹ค์‚ฌ๊ณ  2026-09-21: `$(case โ€ฆ esac)` ๊ฐ€ bash 3.2(macOS ๊ธฐ๋ณธ /bin/bash)์—์„œ ๋Ÿฐํƒ€์ž„์— ๊นจ์ ธ
107
+ # ๊ฐ’ ์ž๋ฆฌ๋กœ ์…ธ ์†Œ์Šค๊ฐ€ ์ƒˆ์–ด ๋“ค์–ด๊ฐ”๊ณ , **rc=0 ์œผ๋กœ ๋๋‚ฌ๋‹ค.** ๊ฐ™์€ ์ปค๋ฐ‹์ด ๋งฅ์—์„œ fa28bfdfb139,
108
+ # ์ปจํ…Œ์ด๋„ˆ(5.3)์—์„œ ab16518d1dc4 โ€” ์ฆ‰ ์ด ๊ณ„๊ธฐ๊ฐ€ ์กด์žฌ ์ด์œ ์ธ ์ง€๋ฌธ ๋Œ€์กฐ์—์„œ **์—†๋Š” ๋“œ๋ฆฌํ”„ํŠธ๋ฅผ
109
+ # ๋งŒ๋“ ๋‹ค.** ์ข…๋ฃŒ์ฝ”๋“œ๋กœ๋Š” ์•ˆ ์žกํžˆ๋ฏ€๋กœ **๋‚ด์šฉ**์„ ๋ณธ๋‹ค. bash ํŒ๋ณธ๋งˆ๋‹ค ๋”ฐ๋กœ ๋ˆ๋‹ค: ํ•œ ํŒ๋ณธ๋งŒ
110
+ # ๋Œ๋ฆฌ๋ฉด ๊ทธ ํŒ๋ณธ์—์„œ๋งŒ ๋‚˜๋Š” ๊ฒฐํ•จ์ด ๊ตฌ์กฐ์ ์œผ๋กœ ์•ˆ ๋ณด์ธ๋‹ค(๊ทธ๊ฒŒ ์ด ์‚ฌ๊ณ ์˜ ํ˜•ํƒœ์˜€๋‹ค).
111
+ for _b in /bin/bash /opt/homebrew/bin/bash /usr/local/bin/bash; do
112
+ [ -x "$_b" ] || continue
113
+ _bv="$("$_b" -c 'echo "${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}"' 2>/dev/null)"
114
+ _t "L9 ๋ชจ๋“  ์ธต ์ƒํƒœ๊ฐ€ ๋‹ซํžŒ ์ง‘ํ•ฉ ์•ˆ (bash $_bv)"
115
+ # ๐ŸŸฅ ยซ์…ธ ์†Œ์Šค์ฒ˜๋Ÿผ ๋ณด์ด๋Š” ๋‚ฑ๋งยป์„ ๊ธˆ์ง€์–ด๋กœ ์„ธ์ง€ ์•Š๋Š”๋‹ค โ€” ๊ธˆ์ง€์–ด ๋ชฉ๋ก์€ ๋ฏธ๋ž˜์˜ ์ •๋‹นํ•œ ๋ฌธ๊ตฌ์—
116
+ # ์˜คํƒํ•˜๊ณ , ์ƒˆ์–ด ๋‚˜์˜ค๋Š” ํ˜•ํƒœ๊ฐ€ ๋ฐ”๋€Œ๋ฉด ์กฐ์šฉํžˆ ๋†“์นœ๋‹ค. ๋Œ€์‹  **๊ธ์ • ๋‹จ์–ธ**์„ ํ•œ๋‹ค:
117
+ # ๋ชจ๋“  ํ–‰์˜ ์ƒํƒœ ์นธ์€ PRESENTยทABSENTยทUNMEASURED ์…‹ ์ค‘ ํ•˜๋‚˜์—ฌ์•ผ ํ•œ๋‹ค. ์…ธ ์†Œ์Šค๊ฐ€ ๊ฐ’ ์ž๋ฆฌ๋กœ
118
+ # ๋“ค์–ด์˜ค๋ฉด ๊ทธ ์ง‘ํ•ฉ ๋ฐ–์ด๋ผ ๋ฐ˜๋“œ์‹œ ๊ฑธ๋ฆฐ๋‹ค.
119
+ _tsv="$("$_b" "$S" --tsv 2>/dev/null)"
120
+ if [ -z "$_tsv" ]; then
121
+ _no "bash $_bv ์—์„œ --tsv ๊ฐ€ ๋น„์—ˆ๋‹ค โ€” ํŒ์ • ๋ถˆ๊ฐ€(๊ณ„๊ธฐ ์˜ค๋ฅ˜)"
122
+ else
123
+ # ์ฒซ ํ–‰์€ ํ—ค๋”(`id / layer / verdict`)๋‹ค โ€” ์ƒํƒœ ์นธ์ด ์•„๋‹ˆ๋ฏ€๋กœ ์ œ์™ธํ•œ๋‹ค. ์•ˆ ๋นผ๋ฉด
124
+ # ๊นจ๋—ํ•œ ํŠธ๋ฆฌ๊ฐ€ ์˜์›ํžˆ ๋นจ๊ฐ„, ๊ทธ๋ƒฅ ๊ณผ์ฐจ๋‹จ์ด๋‹ค(์ดˆํŒ์ด ๊ทธ๋ ‡๊ฒŒ ํ‹€๋ ธ๋‹ค).
125
+ _bad="$(printf '%s\n' "$_tsv" | awk -F'\t' 'NR>1 && NF>=3 && $3!="PRESENT" && $3!="ABSENT" && $3!="UNMEASURED" {print $1"="$3}')"
126
+ _rows="$(printf '%s\n' "$_tsv" | awk -F'\t' 'NR>1 && NF>=3' | grep -c . || true)"
127
+ if [ "${_rows:-0}" -lt 10 ]; then
128
+ _no "bash $_bv ์—์„œ ํ–‰์ด $_rows ๊ฐœ๋ฟ โ€” ์ธต ํ‘œ๊ฐ€ ๊นจ์กŒ๋‹ค(๊ณ„๊ธฐ ์˜ค๋ฅ˜)"
129
+ elif [ -n "$_bad" ]; then
130
+ _no "bash $_bv ์ƒํƒœ ์นธ์ด ๋‹ซํžŒ ์ง‘ํ•ฉ ๋ฐ–: $(printf '%s' "$_bad" | head -2 | tr '\n' ' ')"
131
+ else
132
+ _ok
133
+ fi
134
+ fi
135
+ done
136
+
137
+ # โ”€โ”€ L9b โ€” ๋˜๋Œ๋ฆผ ํ”„๋กœ๋ธŒ: ๊นจ์ง€๋Š” ํ˜•ํƒœ๋ฅผ ๋˜๋Œ๋ฆฌ๋ฉด L9 ์ด ์‹ค์ œ๋กœ ๋นจ๊ฐœ์ง€๋‚˜ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
138
+ # L9 ์ด ยซ์–ด๋–ค ์ด์œ ๋กœ๋“  ์ดˆ๋กยป์ด ๋˜๋Š” ๊ฒƒ์„ ๋ง‰๋Š” ํŒ”์ด๋‹ค. bash 3.x ๊ฐ€ ์—†๋Š” ํ™˜๊ฒฝ(๋ฆฌ๋ˆ…์Šค CI)์—์„œ๋Š”
139
+ # ์ด ๊ฒฐํ•จ์„ ์žฌํ˜„ํ•  ์ˆ˜ ์—†์œผ๋ฏ€๋กœ **UNMEASURED ๋กœ ๋งํ•˜๊ณ  ํ†ต๊ณผ์‹œํ‚จ๋‹ค** โ€” ใ€Œ๋ชป ์Ÿ€๋‹คใ€๋ฅผ ใ€Œ๊นจ๋—ํ•˜๋‹คใ€๋กœ
140
+ # ์ ‘์ง€ ์•Š๋Š”๋‹ค(๋ถ€์žฌโ‰ 0). 3.x ๊ฐ€ ์žˆ์œผ๋ฉด ๋ฐ˜๋“œ์‹œ ์ ์ƒ‰์ด์–ด์•ผ ํ•œ๋‹ค.
141
+ # ๐ŸŸฅ **์ด๋ฆ„์œผ๋กœ ๋‚จ๊ธฐ๋Š” ์ž”์—ฌ (cross-family ์ง€์ , 2026-09-21)**: ๊ทธ๋ž˜์„œ ์ด ํšŒ๊ท€ ํŒ”์˜ ๊ฐ•์ œ๋ ฅ์€
142
+ # **bash 3.x ๊ฐ€ ์žˆ๋Š” ํ˜ธ์ŠคํŠธ์—๋งŒ** ์žˆ๋‹ค. CI ๋Š” ๋ฆฌ๋ˆ…์Šค/bash 5 ๋ผ L9b ๊ฐ€ ๊ฑฐ๊ธฐ์„œ ์˜์›ํžˆ
143
+ # UNMEASURED ์ด๊ณ , L9 ๋„ ๊ทธ ํ˜ธ์ŠคํŠธ์—์„œ๋Š” ์• ์ดˆ์— ์•ˆ ๊นจ์ง€๋Š” ํŒ๋ณธ๋งŒ ์žฐ๋‹ค. ์ฆ‰ ์ด ๊ฒฐํ•จ ํด๋ž˜์Šค์˜
144
+ # ์‹ค์งˆ ๊ฒŒ์ดํŠธ๋Š” **์šด์˜์ž ๋งฅ์˜ ๋กœ์ปฌ ์‹คํ–‰**์ด์ง€ CI ๊ฐ€ ์•„๋‹ˆ๋‹ค. ๋‹ซ์œผ๋ ค๋ฉด CI ์— macOS ์žก์ด๋‚˜
145
+ # bash-3 ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ํ•„์š”ํ•˜๊ณ , ๊ทธ๊ฑด ์ด PR ๋ฒ”์œ„ ๋ฐ–์ด๋ผ ์•ˆ ํ–ˆ๋‹ค.
146
+ _t "L9b ๋˜๋Œ๋ฆผ โ€” \$(case) ๋ณต์› ์‹œ bash 3.x ์—์„œ ์ ์ƒ‰"
147
+ _B3=""
148
+ for _b in /bin/bash /usr/bin/bash; do
149
+ [ -x "$_b" ] || continue
150
+ [ "$("$_b" -c 'echo ${BASH_VERSINFO[0]}' 2>/dev/null)" = "3" ] && { _B3="$_b"; break; }
151
+ done
152
+ if [ -z "$_B3" ]; then
153
+ echo "UNMEASURED โ€” bash 3.x ์—†์Œ(์ด ๊ฒฐํ•จ์€ ์—ฌ๊ธฐ์„œ ์žฌํ˜„ ๋ถˆ๊ฐ€). PASS ์•„๋‹˜"
154
+ else
155
+ MUT="$TMP/mutant.sh"
156
+ python3 - "$S" "$MUT" <<'PY'
157
+ import io,sys,re
158
+ src=io.open(sys.argv[1],encoding='utf-8').read()
159
+ new,_n=re.subn(
160
+ r' local _tracks_state\n case "\$untracked_tracks" in\n.*?\n esac\n'
161
+ r' add_row evidence\.tracks EVIDENCE "\$_tracks_state" \\\n',
162
+ ' add_row evidence.tracks EVIDENCE \\\\\n'
163
+ ' "$(case "$untracked_tracks" in\n'
164
+ " UNMEASURABLE) printf 'UNMEASURED' ;;\n"
165
+ " 0) printf 'ABSENT' ;;\n"
166
+ " *) printf 'PRESENT' ;;\n"
167
+ ' esac)" \\\n',
168
+ src, flags=re.S)
169
+ # ๐ŸŸฅ ์น˜ํ™˜์ด ยซ์ •ํ™•ํžˆ ํ•œ ๋ฒˆยป ์ผ์–ด๋‚ฌ๋Š”์ง€ ๋ชป๋ฐ•๋Š”๋‹ค. ํšŸ์ˆ˜๋ฅผ ์•ˆ ๋ณด๋ฉด, ํ˜•์‹์ด ์กฐ๊ธˆ ๋ฐ”๋€Œ์–ด ์ •๊ทœ์‹์ด
170
+ # ๋น—๋‚˜๊ฐ€๋„ ์›๋ณธ์ด ๊ทธ๋Œ€๋กœ ๋ฎคํ„ดํŠธ๋กœ ๋ณต์‚ฌ๋˜๊ณ  ๋ ˆ์ธ์€ ์—‰๋šฑํ•œ ์‚ฐ์ถœ๋ฌผ์„ ์žฐ๋‹ค.
171
+ if _n != 1:
172
+ sys.stderr.write("SUBN=%d\n" % _n); sys.exit(3)
173
+ io.open(sys.argv[2],'w',encoding='utf-8').write(new)
174
+ PY
175
+ _mutrc=$?
176
+ if [ "$_mutrc" -ne 0 ]; then
177
+ _no "๊ณ„๊ธฐ ์˜ค๋ฅ˜ โ€” ๋ฎคํ„ดํŠธ ์น˜ํ™˜์ด ์ •ํ™•ํžˆ 1ํšŒ๊ฐ€ ์•„๋‹ˆ์—ˆ๋‹ค(rc=$_mutrc). ์ด ํŒ”์€ ๊ณตํ—ˆํ–ˆ์„ ๊ฒƒ"
178
+ elif ! grep -q '\$(case' "$MUT" 2>/dev/null; then
179
+ _no "๊ณ„๊ธฐ ์˜ค๋ฅ˜ โ€” ๋ฎคํ„ดํŠธ์— \$(case) ๊ฐ€ ์•ˆ ๋“ค์–ด๊ฐ”๋‹ค. ์ด ํŒ”์€ ๊ณตํ—ˆํ•˜๊ฒŒ ํ†ต๊ณผํ–ˆ์„ ๊ฒƒ"
180
+ elif ! "$_B3" -n "$MUT" 2>/dev/null; then
181
+ _no "๊ณ„๊ธฐ ์˜ค๋ฅ˜ โ€” ๋ฎคํ„ดํŠธ๊ฐ€ ํŒŒ์‹ฑ์กฐ์ฐจ ์•ˆ ๋œ๋‹ค. ๊ทธ ์นจ๋ฌต์€ ์•„๋ฌด ๋œป์ด ์—†๋‹ค"
182
+ else
183
+ # L9 ๊ณผ **๊ฐ™์€ ํŒ์ •์‹**์„ ์“ด๋‹ค โ€” ํ”„๋กœ๋ธŒ๊ฐ€ ๋‹ค๋ฅธ ์žฃ๋Œ€๋กœ ์žฌ๋ฉด L9 ์„ ์•ต์ปคํ•œ ๊ฒŒ ์•„๋‹ˆ๋‹ค.
184
+ _tm="$("$_B3" "$MUT" --tsv 2>/dev/null)"
185
+ _badm="$(printf '%s\n' "$_tm" | awk -F'\t' 'NR>1 && NF>=3 && $3!="PRESENT" && $3!="ABSENT" && $3!="UNMEASURED" {print $1}')"
186
+ if [ -n "$_badm" ]; then _ok
187
+ else _no "๋ฎคํ„ดํŠธ๊ฐ€ ๋‹ซํžŒ ์ง‘ํ•ฉ ์•ˆ์˜ ์ƒํƒœ๋งŒ ๋ƒˆ๋‹ค โ€” L9 ์ด ์ด ๊ฒฐํ•จ์— ๊ฒฐ๋ฐ•๋ผ ์žˆ์ง€ ์•Š๋‹ค"; fi
188
+ fi
189
+ fi
190
+
191
+ echo "โ”€โ”€ $([ "$fail" -eq 0 ] && echo 'all lanes ok' || echo 'FAILURES above') โ”€โ”€"
192
+ exit "$fail"