@chrono-meta/fh-gate 3.40.0 → 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 (37) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/knowledge/shared/harness-core/fh_module_contract.md +2 -2
  3. package/package.json +5 -1
  4. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  5. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  6. package/plugins/fh-meta/CHANGELOG.md +17 -0
  7. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  8. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  9. package/scripts/adapters/gstack_content_safety.sh +2 -2
  10. package/scripts/adapters/mate_agent_boundary.sh +2 -2
  11. package/scripts/adapters/qasp_new_code_anchor.sh +2 -2
  12. package/scripts/adapters/qasp_web_rules.sh +2 -2
  13. package/scripts/catch_tally.py +2 -1
  14. package/scripts/fh_session_load.sh +3 -1
  15. package/scripts/fixture_guard_lib.sh +38 -0
  16. package/scripts/lane_identity_tripwire.sh +35 -0
  17. package/scripts/package_coverage_check.sh +1 -2
  18. package/scripts/pr_merge_verified.sh +4 -4
  19. package/scripts/selfcheck.sh +12 -0
  20. package/scripts/selfdev_merge_tier.sh +1 -1
  21. package/scripts/session_close_check.sh +12 -0
  22. package/scripts/shell_name_boundary_scan.sh +11 -3
  23. package/scripts/test_adapter_lanes.sh +3 -3
  24. package/scripts/test_agent_tools_pin_lanes.sh +1 -1
  25. package/scripts/test_doc_claims_1113_lanes.sh +36 -0
  26. package/scripts/test_fh_run_resolver_lanes.sh +1 -1
  27. package/scripts/test_fixture_git_env_lanes.sh +87 -0
  28. package/scripts/test_lane_gap_hint_lanes.sh +2 -2
  29. package/scripts/test_locale_invariance_lanes.sh +3 -3
  30. package/scripts/test_name_boundary_locale_lanes.sh +66 -0
  31. package/scripts/test_package_coverage_lanes.sh +10 -0
  32. package/scripts/test_pr_merge_verified_lanes.sh +8 -1
  33. package/scripts/test_selfdev_merge_tier_lanes.sh +1 -1
  34. package/scripts/test_session_close_lanes.sh +11 -0
  35. package/scripts/test_sim_isolated_run_lanes.sh +1 -1
  36. package/scripts/test_temper_check_lanes.sh +1 -1
  37. package/scripts/test_verdict_watermark_lanes.sh +1 -1
@@ -11,25 +11,25 @@
11
11
  "plugins": [
12
12
  {
13
13
  "name": "fh-meta",
14
- "version": "3.40.0",
14
+ "version": "3.41.0",
15
15
  "description": "New in 2.2.0: BREAKING (gate): chamber step 6 now reads ACTUAL.md, not BUDGET.md — an in-flight chamber run whose actual cost sits in BUDGET.md blocks until the ACTUAL: line moves to tracks/_chamber/<slug>/ACTUAL.md (the runner prints the path). Why: BUDGET.md's pre-verdict hash IS the ordering witness, and step 6 hard-blocked until that same file changed, so every run that reached COMPLETE necessarily mutated a witnessed artifact and verify returned TAMPERED — the chamber's promotion condition was unsatisfiable by construction, not by strictness. Two roles (immutable witness / post-verdict calibration sink) had collided in one file; each was correct alone, so neither side's code showed the conflict. Also: ko-tech-writer Step 2/4-b scans are now calibration-backed (known-pair fixtures + reproducible command, shipped) — discrimination is proven, 'zero residue' is explicitly NOT; chamber lane suite 12 -> 33 including the runner x witness seam no test covered; chamber_run.sh now teaches the two-commit discipline (gate hashes and verdict hash must land in separate commits/PRs — it previously advised the opposite). New in 2.1.0: BREAKING (gate): `crossfamily: declined` in an Axes 2-3 marker now requires grounds naming a record path that RESOLVES on disk — bare `declined`, and `declined` justified by author judgment, are blocked at commit. Remedy: cite where the operator decision lives (e.g. `.. — operator declined sidecars, per knowledge/shared/rules/operational_adaptation.md`), or use `DEGRADED_PANEL_UNUSED` if a panel was reachable and you chose not to recruit it — which is what author judgment actually is. `declined` was the only enum value with no grounds requirement; a cross-family review then broke the first (vocabulary-grep) fix three ways — self-validating on the value's own token, vacuous keyword passes, and over-blocking real declinations in natural prose — so the check asserts a resolvable record instead of words. Also: standpoint axis gains `tier1b` (a STATIC read of a target repo, executed nothing) plus a decide-in-order procedure, after blind floor-tier sims graded pure cold-reads as `tier2` three rounds running; steel-quench Wave 1's sixth angle (gate-locality) gains the output-template row it never had, so a mandatory angle stops being structurally unreportable; verify-bidirectional gains category 5 (prescriptive doctrine statement); Sister Asset Protocol gains an active-adoption trigger; new resident doctrine — Mechanization Boundary, Local Execution First, Skeleton-not-Muscle, Expedition track, and this package's versioning policy. Hub meta-operations toolkit — 35 skills + 7 agents. New in 2.0.1: harness-doctor cadence hook, portability lint wired into pre-commit, branch_claim.sh claim-count-vs-tree-count warning, louder confidentiality-scan fail-open notice, fh-gate.sh missing-package.json survival, identity ① reclassified 🟢 (cross-harness adapters + relay argument channel). New in 1.4.53: `fh-codex-doctor` (npm bin) — Codex adapter drift scanner; reads the documented M1/M2/M3 skill tier map + skill/agent source and reports codex-native/adapter-required/claude-native/unclassified per unit, wired into `npm test`/`prepublishOnly` (fail-closed on unclassified Claude-native primitives). New in 1.4.49: steel-quench gains Step 0.6 Verdict-Invariance Probe (groundedness axis — a load-bearing judged gate's verdict must track behavior, not rubric phrasing; measured flip-count over cross-family paraphrases; arXiv:2605.06161 Policy Invariance anchor); multi_model_sidecar_strategy §Vendor-native harness (a model is strongest in its own vendor CLI — Claude/CC, GPT/codex, Gemini/Antigravity; a universal router degrades all of them, so it stays an autocomplete/QA sidecar, never orchestration); predelete_check.sh fail-closed rewrite; memory-hygiene A-TMA anchor. New in 1.4.48: phantom-quench + steel-quench gain external frontier anchors (arXiv:2607.02052 package-hallucination; arXiv:2607.02057 prompt-coverage-adequacy); README model-flat claim reframed from a per-release point-curve to structural invariants (operation flattens across tiers; depth tier-order fixed within a generation). New in 1.4.47: onboarding step ① surfaces the Mode D companion-store session-start load in the auto-read salience anchor (previously only in the local binding + rules, so a greeting could skip the load). New in 1.4.46: context-doctor command-output axis (route to rtk/proxy for verbose CLI stdout, complementing .claudeignore; risk-gated to token-scarce envs). New in 1.4.41: context-doctor 2026 trigger vocab (context engineering/rot/collapse) + phantom-citation hardening; hub measurement-integrity-checklist (cross-model measurement pre-flight: display-name pin/reps≥3/discriminating probe). New in 1.4.40: install-wizard queryable-wiki scaffold (INDEX + session-start read + R/W/C ingest). New in 1.4.39: auto-decorrelation (cross-family verifier sidecar recruitment) + video-ingest (capability-routed video ingestion). New in 1.4.x: verify-axis check-class taxonomy (mandatory-pass/measured/judged), no-reinvention Tier-0 inventory, 7-class failure taxonomy, Destructive-Op Gate, Wave-T (Temper), tier-floor governance, Mode D Model Notice, FC consent lane, default-Sonnet guidance. New in 1.3.0: public-surface-audit, field-harvest Mode B auto-trigger, 4-axis gate scope ext. Validated cross-CLI: Claude Code, Codex, Gemini.",
16
16
  "source": "./plugins/fh-meta"
17
17
  },
18
18
  {
19
19
  "name": "fh-commons",
20
- "version": "3.40.0",
20
+ "version": "3.41.0",
21
21
  "description": "Project-agnostic utility skills — 7 skills (convergence-loop · deliberation · mcp-circuit-breaker · token-budget-gate · ko-tech-writer · persona-cast · standpoint-review) + 7 agents (quench-challenger + the web-review cast: designer · ux-writer · fe-dev · be-dev · qa · a11y). Domain-independent utilities transplantable into any project.",
22
22
  "source": "./plugins/fh-commons"
23
23
  },
24
24
  {
25
25
  "name": "fh-qp",
26
- "version": "3.40.0",
26
+ "version": "3.41.0",
27
27
  "description": "QP (Quality Platform) — the generic edition of a field QA harness's Prepare→Automation→Regression loop as an FH plugin: 4 skills (qp router · qp-plan · qp-run · qp-regress) + qp_tools.sh (target-class · adapter-probe · mask · surface-reach · mtm-check · run-verbs, typed exit codes) + a zero-domain-constant profile slot + 29 known-pair lanes. Drives web targets through the session's Playwright MCP and desktop targets through computer-use MCP (mobile deferred); calls a registered qasp typed capability when one exists (strictest-wins) — none is registered today, so the MCP fallback is the first edition. Verdict contract: a MACHINE closure requires a recorded assertion; a failed first step is attributed BLOCKED, not FAIL; surface_reach counts every TC in the denominator. Born as chamber run #18 (EMIT, 2026-09-05).",
28
28
  "source": "./plugins/fh-qp"
29
29
  },
30
30
  {
31
31
  "name": "fh-preprep",
32
- "version": "3.40.0",
32
+ "version": "3.41.0",
33
33
  "description": "preprep — a presentation-preparation harness. 1 skill. One CLI over 17 lanes (7 built-in + 10 module) that reads a declared surface manifest and checks a talk's assets against each other: canonical terms, jargon glosses, retired vocabulary, inter-slide dependencies, pacing, get/put round-trips, adjacent duplication, slide relations, geometry, attribute consistency, fonts, diagrams, slide refs, and screen-parity between manuscript and deck. Verdict contract: exit 0 pass / 1 findings / 2 cannot-judge — a surface that could not be read is UNMEASURED, never 0. Promoted out of fh-commons 2026-09-13 after the skill grew past one role (routing / lane modules / fixtures).",
34
34
  "source": "./plugins/fh-preprep"
35
35
  }
@@ -79,7 +79,7 @@ A module's Python runs wherever the module is loaded — including a floor envir
79
79
  cart runs got rc 2. In the inline arm the no-guess contract turned that into no answer (2/6 against bare 6/6); the cart
80
80
  runs fell back to reading by hand. A guarded dependency is a
81
81
  typed failure, not a working module. That is why the guarded case is a NOTE the installer must read, and why the fix
82
- proposed there is stdlib-only (fh-cartridges PR #19, open on 2026-11-09: a built-in reader for the YAML subset
82
+ proposed there is stdlib-only (fh-cartridges PR #19, merged 2026-11-09: a built-in reader for the YAML subset
83
83
  workflows use; script output byte-identical on 224 local workflow files).
84
84
  - **Named residual — passes unseen**: shell scripts calling `jq`, `yq`, `node` and the like are not read, and a
85
85
  computed import name (`import_module(name)`) is not followed. **Errs toward BLOCK**: an aliased exception
@@ -104,7 +104,7 @@ migration wipe data?») called it **1/9, 0/9, 0/9** — answered directly, the l
104
104
  - `scripts/generated_harness_check.py` reports **W8 (info)** for a skill description with no question example
105
105
  (`?`). Info only: it never changes a verdict, because a question mark is a proxy for the shape, not proof of routing.
106
106
  - **Not proven yet**: a no-token proxy (subagents shown the listing and asked which skill they would call) was at
107
- ceiling before and after (9/9 targets, 0/8 false triggers; fh-cartridges PR #20, open on 2026-11-09) — it does not
107
+ ceiling before and after (9/9 targets, 0/8 false triggers; fh-cartridges PR #20, merged 2026-11-09) — it does not
108
108
  reproduce the live failure. The live effect is measured only by runs that install the module and do not hint it; the
109
109
  next such run is pre-registered (fh-cartridges `evidence/AB_PREREG_HAIKU_C7-C12.md`) and has no results yet.
110
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
5
5
  "homepage": "https://github.com/chrono-meta/forge-harness#readme",
6
6
  "bugs": {
@@ -126,6 +126,7 @@
126
126
  "scripts/lane_stub_env.allow",
127
127
  "scripts/lane_onoff_compare.py",
128
128
  "scripts/test_lane_stub_env_lanes.sh",
129
+ "scripts/test_fixture_git_env_lanes.sh",
129
130
  "scripts/test_post_squash_verify_lanes.sh",
130
131
  "scripts/test_frontier_digest_recall.sh",
131
132
  "scripts/fh_module_check.py",
@@ -178,6 +179,8 @@
178
179
  "scripts/test_absorption_queue_lanes.sh",
179
180
  "scripts/catch_tally.py",
180
181
  "scripts/test_catch_tally_lanes.sh",
182
+ "scripts/test_name_boundary_locale_lanes.sh",
183
+ "scripts/test_doc_claims_1113_lanes.sh",
181
184
  "scripts/digest_slow_leg.py",
182
185
  "scripts/test_digest_slow_leg_lanes.sh",
183
186
  "scripts/directional_diff_gate.sh",
@@ -202,6 +205,7 @@
202
205
  "scripts/finding_verify.py",
203
206
  "scripts/fixtures/generated_harness",
204
207
  "scripts/fixture_guard_lib.sh",
208
+ "scripts/lane_identity_tripwire.sh",
205
209
  "scripts/frontier_digest_autopilot.sh",
206
210
  "scripts/gate_anchor_check.sh",
207
211
  "scripts/gate_pathspec_check.sh",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-commons",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-meta",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -2,6 +2,23 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### [3.41.0] — 2026-11-13
6
+
7
+ Minor by the version policy: a new shipped tool and three new shipped lanes, a new session-start tripwire line, and a selfcheck that now scrubs inherited git env before lanes run. Nothing here makes an existing gate refuse more, so no `BREAKING (gate)` line applies.
8
+
9
+ ### Added
10
+ - `scripts/lane_identity_tripwire.sh`: a record-only report of reachable commits made by the lane fixture identity — fixture commits that leaked into a real repo. `--strict` exits 1. It runs at the end of `selfcheck.sh` and at session start; the session-start banner prints its line only when it finds something (#1088).
11
+ - New lanes: `test_fixture_git_env_lanes.sh` (#1088), `test_name_boundary_locale_lanes.sh` (#1089), `test_doc_claims_1113_lanes.sh` (#1086).
12
+ - `scripts/session_close_check.sh` prints a record-only line when the day's completed-work file has no `## 잡은 것` section. The close check's exit code does not change (#1087).
13
+
14
+ ### Fixed
15
+ - Shell scripts no longer die with rc 127 (`unbound variable`) on macOS under a UTF-8 locale when a variable sits right before a non-ASCII character. 37 code lines in 19 files are braced, including `pr_merge_verified.sh --lease`. `shell_name_boundary_scan.sh` gains `--nonascii-only` (#1089).
16
+ - An exported `GIT_DIR`, `GIT_INDEX_FILE` or `GIT_COMMON_DIR` no longer lets test lanes commit into a real repo. `selfcheck.sh` unsets them before any lane runs. `fixture_guard_lib.sh` unsets them when sourced, and `fh_fixture_root` returns HARNESS-ERROR if one is set again or git resolves the root outside the fixture. Lanes run directly, outside selfcheck, that do not source the guard are not yet covered (#1088).
17
+ - `package-coverage`: two stale ACCEPTED_ABSENT entries removed (#1084).
18
+
19
+ ### Changed
20
+ - Docs: `pr_merge_verified.sh` header no longer says the lease is recorded but not enforced (#1085). - Docs: in 3.40.0, with a `--lease` label other than `NONE` or `operator…`, `pr_merge_verified.sh` fetches `origin main` and diffs the PR head against its merge-base for the tier; if that fetch, merge-base, diff or tier run fails (for example a repository with no `main` branch on `origin`), it exits 7 like a `HOLD` and merges nothing. Drop `--lease` there, or pass a per-PR `operator: …` label. `catch_tally.py` accepts `## Catches` as well as `## 잡은 것` as the section heading. The module contract's two fh-cartridges PR references now say merged. (#1086)
21
+
5
22
  ### [3.40.0] — 2026-11-13
6
23
 
7
24
  New scripts and lanes ship, and three checks that were already in the package now refuse more, so this is a minor by the version policy. Three `BREAKING (gate)` lines are below; each applies only if you call the named script yourself. The self-dev loop and its candidate auto-merge change (#1079, #1071) are not in the npm package: `scripts/selfdev_loop.sh`, `scripts/selfdev_queue.py` and its launchd plist stay in the hub clone. The new session-ledger scripts (#1076) are also not shipped. The new read-only reports (`catch_tally.py`, `claim_precision_report.py`) and the new live-eval and sim-runner options run only when you invoke them; no hook or setting is added or wired by default.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-qp",
3
- "version": "3.40.0",
3
+ "version": "3.41.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -74,8 +74,8 @@ _LIB="$(cd -P "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/peer_resolve.sh"
74
74
  PEER_ROOT="$(fh_peer_resolve "$PEER_NAME")"; _rrc=$?
75
75
  case "$_rrc" in
76
76
  0) ;;
77
- 1) _peer_absent "peer «$PEER_NAME» 가 이 머신에 없다 — 안 쟀다(깨끗한 게 아니다)" ;;
78
- 2) _harness_error "peer «$PEER_NAME» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
77
+ 1) _peer_absent "peer «${PEER_NAME}» 가 이 머신에 없다 — 안 쟀다(깨끗한 게 아니다)" ;;
78
+ 2) _harness_error "peer «${PEER_NAME}» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
79
79
  *) _harness_error "peer 루트 목록 자체가 없다 — 전제 파손" ;;
80
80
  esac
81
81
 
@@ -74,8 +74,8 @@ _LIB="$SELF_DIR/peer_resolve.sh"
74
74
  PEER_ROOT="$(fh_peer_resolve "$PEER_NAME")"; _rrc=$?
75
75
  case "$_rrc" in
76
76
  0) ;;
77
- 1) _peer_absent "peer «$PEER_NAME» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
78
- 2) _harness_error "peer «$PEER_NAME» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
77
+ 1) _peer_absent "peer «${PEER_NAME}» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
78
+ 2) _harness_error "peer «${PEER_NAME}» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
79
79
  *) _harness_error "peer 루트 목록 자체가 없다 — 전제 파손" ;;
80
80
  esac
81
81
 
@@ -81,8 +81,8 @@ _LIB="$SELF_DIR/peer_resolve.sh"
81
81
  PEER_ROOT="$(fh_peer_resolve "$PEER_NAME")"; _rrc=$?
82
82
  case "$_rrc" in
83
83
  0) ;;
84
- 1) _peer_absent "peer «$PEER_NAME» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
85
- 2) _harness_error "peer «$PEER_NAME» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
84
+ 1) _peer_absent "peer «${PEER_NAME}» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
85
+ 2) _harness_error "peer «${PEER_NAME}» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
86
86
  *) _harness_error "peer 루트 목록 자체가 없다 — 전제 파손" ;;
87
87
  esac
88
88
 
@@ -140,8 +140,8 @@ esac
140
140
  PEER_ROOT="$(fh_peer_resolve "$PEER_NAME")"; _rrc=$?
141
141
  case "$_rrc" in
142
142
  0) ;;
143
- 1) _peer_absent "peer «$PEER_NAME» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
144
- 2) _harness_error "peer «$PEER_NAME» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
143
+ 1) _peer_absent "peer «${PEER_NAME}» 가 이 머신에 없다 — 안 쟀다(통과가 아니다)" ;;
144
+ 2) _harness_error "peer «${PEER_NAME}» 해석이 모호하다 — 어느 트리를 쟀는지 말할 수 없으므로 판정하지 않는다" ;;
145
145
  *) _harness_error "peer 루트 목록 자체가 없다 — 전제 파손" ;;
146
146
  esac
147
147
 
@@ -6,7 +6,8 @@
6
6
  결함이 쉬워 일반 검토가 87~100% 를 잡았고(천장), 방법 차이를 잴 힘이 없었다. 방법의 값은
7
7
  실작업에서 «일반 검토·저자가 놓친 것을 무엇이 잡았나» 로 드러나므로 그 기록을 센다.
8
8
 
9
- 기록 자리: Session Wrap-up ⑤(a) 가 `tracks/_meta/fh_completed_{date}.md` 에 쓰는 `## 잡은 것` 절.
9
+ 기록 자리: Session Wrap-up ⑤(a) 가 `tracks/_meta/fh_completed_{date}.md` 에 쓰는 `## 잡은 것` 절
10
+ (Record location: the `## 잡은 것` section; the English heading `## Catches` is accepted as the same section.)
10
11
 
11
12
  ## 잡은 것
12
13
  | 결함 | 잡은 방법 | 놓친 쪽 | 근거 |
@@ -405,7 +405,7 @@ if [ -d "$FH/tracks" ]; then
405
405
  UNRESOLVED) continue ;;
406
406
  # 🟥 ARGS = 전제 파손(빈 이름·경로 탈출·알 수 없는 술어)이지 «못 찾음» 이 아니다.
407
407
  # 미해소로 접으면 그것도 미측정을 0 으로 렌더하는 형태다 — 따로 말한다.
408
- ARGS:*) printf '%s' "⚠️ [track-resolve] 트랙 이름 «$_n» 이 거부됐다(${_note#ARGS:}) — 이건 «레포 없음» 이 아니라 **전제 파손**이다.
408
+ ARGS:*) printf '%s' "⚠️ [track-resolve] 트랙 이름 «${_n}» 이 거부됐다(${_note#ARGS:}) — 이건 «레포 없음» 이 아니라 **전제 파손**이다.
409
409
  "; continue ;;
410
410
  esac
411
411
  _resolved=$((_resolved + 1))
@@ -588,6 +588,8 @@ fi
588
588
  # So: no new hook, no new line, no nag — the node name is appended to a banner that already
589
589
  # prints every single session. `hostname -s`, the same source fh_node_check.sh uses.
590
590
  echo "🔄 [FH SessionStart] companion-store freshness — $PULL_NOTE. · node: $(hostname -s 2>/dev/null || echo unknown)"
591
+ # lane-identity tripwire (record-only): fixture commits that leaked into the hub repo
592
+ [ -f "$FH/scripts/lane_identity_tripwire.sh" ] && bash "$FH/scripts/lane_identity_tripwire.sh" "$FH" 2>/dev/null | grep -v '^LANE-TRIPWIRE ok' || true
591
593
  # §Diverged banner. Loud, counted, and it names the ONE command — see the §Diverged comment at the
592
594
  # fetch site for the 2026-08-28 measurement that made this necessary. The magnitude line and the
593
595
  # "everything below is stale" line are separate on purpose: the first says the tree is behind, the
@@ -34,6 +34,19 @@
34
34
  # 거부**했고, `scripts/` 밑에 두면 통과했다. 방향은 **fail-closed(과차단)** 라 안전하지만,
35
35
  # 벤더링하면 모든 소비처가 시끄럽게 죽는다 — 옮길 거면 레포 루트 계산을 인자로 받게 바꿔라.
36
36
 
37
+ # 🟥 상속된 git 환경을 끊는다 (2026-11-13). `git -C <fixture>` 는 GIT_DIR / GIT_INDEX_FILE /
38
+ # GIT_COMMON_DIR 를 **못 이긴다** — 경로 가드가 통과해도 커밋·인덱스·객체는 export 된 레포로 간다.
39
+ # 실측(미끼 레포, test_script_caller_ratchet_lanes.sh): GIT_DIR → «base» 커밋 7개 + 브랜치 이동 +
40
+ # 인덱스 교체 · GIT_INDEX_FILE → 미끼의 스테이징 인덱스 덮어씀 · GIT_COMMON_DIR → 객체 39개 기록.
41
+ # 목록 = `git rev-parse --local-env-vars` (git 2.50) + GIT_NAMESPACE, **설정 3종(GIT_CONFIG ·
42
+ # GIT_CONFIG_PARAMETERS · GIT_CONFIG_COUNT)은 뺐다** — 어느 레포에 쓰는지를 안 바꾸고, CI 가 `-c safe.directory`
43
+ # 같은 걸 거기 싣는다(cross-family codex R1). GIT_CEILING_DIRECTORIES 도 그대로 둔다.
44
+ # 🟥 알려진 과차단(의도): TMPDIR 가 어떤 레포의 작업트리 안이면 아직 init 전인 픽스처도 아래 git 확인에서
45
+ # 거부된다. init 을 빼먹은 레인이 그 레포에 커밋하는 길이 바로 그것이라 fail-closed 쪽을 택했다.
46
+ # 🟥 source 시점에 끊는다: fh_fixture_root 는 `$(…)` 서브셸에서 돌아서 거기서 unset 해도 호출 레인엔 안 남는다.
47
+ FH_FIXTURE_GIT_ENV="GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_OBJECT_DIRECTORY GIT_DIR GIT_WORK_TREE GIT_IMPLICIT_WORK_TREE GIT_GRAFT_FILE GIT_INDEX_FILE GIT_NO_REPLACE_OBJECTS GIT_REPLACE_REF_BASE GIT_PREFIX GIT_SHALLOW_FILE GIT_COMMON_DIR GIT_NAMESPACE"
48
+ for _fg_v in $FH_FIXTURE_GIT_ENV; do unset "$_fg_v"; done; unset _fg_v
49
+
37
50
  fh_fixture_root() { # $1 = 후보 픽스처 루트 → stdout: 해석된 절대경로. 위반이면 exit 1.
38
51
  [ -n "${1:-}" ] || { echo "FIXTURE-GUARD: empty root — refusing (git -C \"\" would target cwd)" >&2; exit 1; }
39
52
  [ -d "$1" ] || { echo "FIXTURE-GUARD: root does not exist: $1" >&2; exit 1; }
@@ -51,5 +64,30 @@ fh_fixture_root() { # $1 = 후보 픽스처 루트 → stdout: 해석된 절
51
64
  "$_fg_repo"/*) echo "FIXTURE-GUARD: root is inside the live repo ($_fg_real) — refusing" >&2; exit 1 ;;
52
65
  esac
53
66
  fi
67
+ # 🟥 fail-closed 확인: source 시점 scrub 이 되돌려졌거나 뒤에서 다시 export 됐으면 커밋하지 않는다.
68
+ for _fg_v in $FH_FIXTURE_GIT_ENV; do
69
+ if [ -n "$(eval "printf '%s' \"\${$_fg_v+x}\"")" ]; then
70
+ echo "FIXTURE-GUARD: HARNESS-ERROR inherited $_fg_v is set — git -C would write to that repo, not the fixture; refusing" >&2; exit 1
71
+ fi
72
+ done
73
+ # 🟥 git 자신의 답으로 확인: 루트가 이미 git 안이면 그 git dir 은 루트 안에 있어야 한다
74
+ # (mktemp 디렉터리가 어떤 레포의 작업트리 밑에 있으면 `git -C` 는 그 레포로 간다).
75
+ if _fg_gd="$(git -C "$_fg_real" rev-parse --absolute-git-dir 2>/dev/null)"; then
76
+ _fg_gdr="$(cd "$_fg_gd" 2>/dev/null && pwd -P)" || _fg_gdr="$_fg_gd"
77
+ case "$_fg_gdr" in
78
+ "$_fg_real"/*) ;;
79
+ *) echo "FIXTURE-GUARD: HARNESS-ERROR git resolves $_fg_real to repo $_fg_gdr outside the fixture — refusing" >&2; exit 1 ;;
80
+ esac
81
+ fi
54
82
  printf '%s\n' "$_fg_real"
55
83
  }
84
+
85
+ # fh_fixture_git_check <dir> — 커밋 직전 확인용. git 이 <dir> 을 어느 레포로 보는지 묻고,
86
+ # 그 git dir 이 <dir> 안이 아니면 HARNESS-ERROR(exit 1). 이미 init 된 픽스처에서 쓴다.
87
+ fh_fixture_git_check() {
88
+ _fc_real="$(cd "${1:?}" 2>/dev/null && pwd -P)" || { echo "FIXTURE-GUARD: cannot resolve $1" >&2; exit 1; }
89
+ _fc_gd="$(git -C "$_fc_real" rev-parse --absolute-git-dir 2>/dev/null)" || { echo "FIXTURE-GUARD: HARNESS-ERROR $1 is not a git repo" >&2; exit 1; }
90
+ _fc_gdr="$(cd "$_fc_gd" && pwd -P)"
91
+ case "$_fc_gdr" in "$_fc_real"/*) return 0 ;; esac
92
+ echo "FIXTURE-GUARD: HARNESS-ERROR git resolves $1 to $_fc_gdr — not inside the fixture; refusing" >&2; exit 1
93
+ }
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ # lane_identity_tripwire.sh — report commits authored by the lane fixture identity that are reachable
3
+ # in a real repository.
4
+ #
5
+ # tenet: FH-T02 (machinery at the irreversible edge: a fixture commit in a real repo is the edge)
6
+ #
7
+ # WHY: test lanes commit inside throwaway repos as `lane <lane@example.invalid>`. When the caller's shell
8
+ # exports GIT_DIR / GIT_INDEX_FILE, `git -C <fixture> commit` writes into the exported repo instead
9
+ # (measured 2026-11-13 on a decoy repo). A downstream harness found such «base» commits in its own repo
10
+ # three times, the last one swallowing a staged intake. The env scrub in fixture_guard_lib.sh /
11
+ # selfcheck.sh closes the cause; this is the detector for anything that slips past it.
12
+ #
13
+ # Usage: lane_identity_tripwire.sh [repo-dir] [--strict]
14
+ # default: record-only — prints a WARN line per hit, exit 0 (also when nothing is found).
15
+ # --strict: exit 1 when any hit is found.
16
+ # exit 2 = could not read the repo (HARNESS-ERROR — not «no hits»).
17
+ set -u
18
+ # same repo-targeting list as fixture_guard_lib.sh — GIT_SHALLOW_FILE / GIT_GRAFT_FILE / GIT_REPLACE_REF_BASE
19
+ # would otherwise hide reachable lane commits and print «ok» (cross-family codex R1)
20
+ for v in GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_OBJECT_DIRECTORY GIT_DIR GIT_WORK_TREE GIT_IMPLICIT_WORK_TREE GIT_GRAFT_FILE GIT_INDEX_FILE GIT_NO_REPLACE_OBJECTS GIT_REPLACE_REF_BASE GIT_PREFIX GIT_SHALLOW_FILE GIT_COMMON_DIR GIT_NAMESPACE; do unset "$v"; done
21
+ REPO="."; STRICT=0
22
+ for a in "$@"; do case "$a" in --strict) STRICT=1 ;; *) REPO="$a" ;; esac; done
23
+ IDENT="lane@example.invalid"
24
+ if ! git -C "$REPO" rev-parse --git-dir >/dev/null 2>&1; then
25
+ echo "LANE-TRIPWIRE HARNESS-ERROR: $REPO is not a readable git repo (not «no hits»)"; exit 2
26
+ fi
27
+ hits="$(git -C "$REPO" log --all --format='%h %ad %s' --date=short --author="$IDENT" 2>/dev/null)"; rc=$?
28
+ [ "$rc" -eq 0 ] || { echo "LANE-TRIPWIRE HARNESS-ERROR: git log failed (rc=$rc)"; exit 2; }
29
+ if [ -z "$hits" ]; then echo "LANE-TRIPWIRE ok: 0 commits by $IDENT reachable from any ref"; exit 0; fi
30
+ n="$(printf '%s\n' "$hits" | wc -l | tr -d ' ')"
31
+ echo "LANE-TRIPWIRE WARN: $n commit(s) by the test-lane identity $IDENT are reachable in $(cd "$REPO" && pwd -P):"
32
+ printf '%s\n' "$hits" | sed 's/^/ /'
33
+ echo " → a lane committed into this repo (inherited GIT_DIR / GIT_INDEX_FILE?). Check the branch and index before anything else."
34
+ [ "$STRICT" = 1 ] && exit 1
35
+ exit 0
@@ -46,10 +46,9 @@ ACCEPTED_ABSENT=(
46
46
  # (CLAUDE.local.md §FH 자체개발 자율화: «일반 사용자는 이슈/PR 제안»): shipping it would put an
47
47
  # auto-merging loop into every consumer install. self_evolution_routine.md §3b names these files to
48
48
  # say exactly that; selfcheck resolves their rows as SKIP on a consumer tree.
49
+ # (selfdev_merge_tier.sh and its lane DO ship since #1068 — pr_merge_verified.sh --lease reads the tier.)
49
50
  "scripts/selfdev_loop.sh"
50
- "scripts/selfdev_merge_tier.sh"
51
51
  "scripts/selfdev_queue.py"
52
- "scripts/test_selfdev_merge_tier_lanes.sh"
53
52
  "scripts/test_selfdev_queue_lanes.sh"
54
53
  "scripts/test_selfdev_loop_lanes.sh"
55
54
  # 2026-11-07 — the self-dev loop's ablation nominator and its lanes. Same loop, same scope as above; whether the
@@ -21,7 +21,7 @@
21
21
  # merged from another head · not fetchable — never for a refusal or a merge GitHub did not take) one JSON line goes to
22
22
  # ${PMV_RECEIPTS:-<git common dir>/fh-merge-receipts.jsonl} — local, never pushed: pr · head · merge · outcome ·
23
23
  # actor (agent-session:claude-code when CLAUDECODE is set, else human-or-unknown — a human cannot be proven) ·
24
- # lease (the --lease label of the standing approval the caller merges under, else NONE — recorded, not enforced) · rerun.
24
+ # lease (the --lease label of the standing approval the caller merges under, else NONE — recorded; any label other than NONE or a case-insensitive «operator…» prefix is also enforced: the merge needs selfdev_merge_tier.sh TIER=AUTO, see EXIT 7) · rerun.
25
25
  # Why: arXiv:2610.28683 — 27% of merges that passed a «non-author review» gate rested on an agent approving under a
26
26
  # human account; who decided must be on the record, not inferred later (frontier digest 2026-10-23).
27
27
  # EXIT 0 merged + verified · 1 merged but verify FAILED (the merge stands — act on it)
@@ -147,18 +147,18 @@ case "$_lease_lc" in
147
147
  fi
148
148
  if [ "$_tok" -ne 1 ]; then
149
149
  [ -n "$_tw" ] && rm -rf "$_tw"
150
- echo "🟥 lease «$LEASE»: the merge tier could not be read for head $HEAD_OID (tier script, merge-base or diff) — not merging" >&2
150
+ echo "🟥 lease «${LEASE}»: the merge tier could not be read for head $HEAD_OID (tier script, merge-base or diff) — not merging" >&2
151
151
  exit 7
152
152
  fi
153
153
  _tout=$(bash "$_tier" --files "$_tw/files" --diff "$_tw/diff" < /dev/null 2>&1); _trc=$?
154
154
  rm -rf "$_tw"
155
155
  if [ "$_trc" -ne 0 ] || [ "$(printf '%s\n' "$_tout" | tail -1)" != "TIER=AUTO" ]; then
156
156
  printf '%s\n' "$_tout" | sed 's/^/ /' >&2
157
- echo "🟥 lease «$LEASE» is not the operator's answer for this PR, and selfdev_merge_tier.sh did not say AUTO (rc=$_trc) — not merging." >&2
157
+ echo "🟥 lease «${LEASE}» is not the operator's answer for this PR, and selfdev_merge_tier.sh did not say AUTO (rc=$_trc) — not merging." >&2
158
158
  echo " Ask the operator for THIS PR, then merge with --lease 'operator: «<their words>» <date>'." >&2
159
159
  exit 7
160
160
  fi
161
- echo "── lease «$LEASE»: selfdev_merge_tier.sh says TIER=AUTO for head $HEAD_OID" ;;
161
+ echo "── lease «${LEASE}»: selfdev_merge_tier.sh says TIER=AUTO for head $HEAD_OID" ;;
162
162
  esac
163
163
 
164
164
  # 1b. coverage advisory — WARNING ONLY (never changes rc, never merges or refuses). post_squash_verify's precheck rejects a
@@ -12,6 +12,11 @@
12
12
  # Wiring: `npm test` for any session; `prepublishOnly` so a publish cannot ship a
13
13
  # syntactically broken executable.
14
14
  set -u
15
+ # Inherited git environment reaches every lane: an exported GIT_DIR / GIT_INDEX_FILE makes a lane's
16
+ # `git -C <fixture> commit` write into THAT repo (measured 2026-11-13 on a decoy: 70 of 90 git-using lanes do not
17
+ # source fixture_guard_lib.sh). Same list as fixture_guard_lib.sh (repo-targeting vars only; GIT_CONFIG_* stay —
18
+ # CI carries -c safe.directory there); precedent sync-to-be.sh / session_close_check.sh.
19
+ unset GIT_ALTERNATE_OBJECT_DIRECTORIES GIT_OBJECT_DIRECTORY GIT_DIR GIT_WORK_TREE GIT_IMPLICIT_WORK_TREE GIT_GRAFT_FILE GIT_INDEX_FILE GIT_NO_REPLACE_OBJECTS GIT_REPLACE_REF_BASE GIT_PREFIX GIT_SHALLOW_FILE GIT_COMMON_DIR GIT_NAMESPACE 2>/dev/null || true
15
20
  cd "$(dirname "${BASH_SOURCE[0]}")/.."
16
21
  fail=0
17
22
 
@@ -1244,6 +1249,8 @@ for _pair in \
1244
1249
  "scripts/probe_live_eval_lib.py|scripts/test_probe_live_eval_lanes.sh" \
1245
1250
  "templates/.git-hooks/pre-commit|scripts/test_marker_first_use_lanes.sh" \
1246
1251
  "scripts/fixture_guard_lib.sh|scripts/test_fixture_guard_lanes.sh" \
1252
+ "scripts/fixture_guard_lib.sh|scripts/test_fixture_git_env_lanes.sh" \
1253
+ "scripts/lane_identity_tripwire.sh|scripts/test_fixture_git_env_lanes.sh" \
1247
1254
  "scripts/stray_path_scan.sh|scripts/test_stray_path_lanes.sh" \
1248
1255
  "scripts/session_close_check.sh|scripts/test_stray_path_lanes.sh" \
1249
1256
  `# ── ①-g stale-ref (2026-09-21 신설) — #773 이 「배선 안 함」이라 적은 자리의 호출부. SUBJECT 는 스캐너가 아니라 «마감 블록»이다: 스캐너 자체는 test_stale_ref_scan_lanes.sh 가 이미 앵커한다 ──` \
@@ -1287,6 +1294,8 @@ for _pair in \
1287
1294
  "plugins/fh-commons/skills/ko-tech-writer/SKILL.md|scripts/test_ko_tech_writer_lanes.sh" \
1288
1295
  "scripts/absorption_queue.py|scripts/test_absorption_queue_lanes.sh" \
1289
1296
  "scripts/catch_tally.py|scripts/test_catch_tally_lanes.sh" \
1297
+ "scripts/shell_name_boundary_scan.sh|scripts/test_name_boundary_locale_lanes.sh" \
1298
+ "scripts/catch_tally.py|scripts/test_doc_claims_1113_lanes.sh" \
1290
1299
  "scripts/digest_slow_leg.py|scripts/test_digest_slow_leg_lanes.sh" \
1291
1300
  "scripts/script_caller_ratchet.sh|scripts/test_script_caller_ratchet_lanes.sh" \
1292
1301
  "scripts/script_caller_ratchet.sh|scripts/test_runner_surface_index_lanes.sh" \
@@ -3057,6 +3066,9 @@ else
3057
3066
  echo "SKIP rules-dotfile (package mode: .git 없음 — 소스 트리 전용 검사)"
3058
3067
  fi
3059
3068
 
3069
+ # Lane-identity tripwire — record-only: a WARN line, never a FAIL (a hit is a past event in the
3070
+ # repo, not this run's verdict). Runs AFTER the lanes, which is when a leaked commit would have just landed.
3071
+ if [ -f scripts/lane_identity_tripwire.sh ]; then bash scripts/lane_identity_tripwire.sh . | grep -v '^LANE-TRIPWIRE ok' ; fi
3060
3072
  if [ "$_CONSUMER" -eq 1 ]; then
3061
3073
  _n=$(printf '%s\n' $CONSUMER_SKIPPED | grep -c .)
3062
3074
  echo "CONSUMER PROFILE — $_n checkout-only suite(s) NOT measured here (not a pass):$CONSUMER_SKIPPED"
@@ -49,7 +49,7 @@
49
49
  set -u
50
50
  # the ceiling may be LOWERED by env, never raised, and a non-number is HARNESS-ERROR (codex R1 #6)
51
51
  MAX_LINES="${SELFDEV_MAX_LINES:-300}"
52
- case "$MAX_LINES" in ''|*[!0-9]*) echo "reason: SELFDEV_MAX_LINES=«$MAX_LINES» is not a number"; echo "TIER=HARNESS-ERROR"; exit 2 ;; esac
52
+ case "$MAX_LINES" in ''|*[!0-9]*) echo "reason: SELFDEV_MAX_LINES=«${MAX_LINES}» is not a number"; echo "TIER=HARNESS-ERROR"; exit 2 ;; esac
53
53
  [ "${#MAX_LINES}" -gt 4 ] || [ "$((10#$MAX_LINES))" -gt 300 ] && MAX_LINES=300
54
54
  MAX_LINES=$((10#$MAX_LINES))
55
55
  FILES=""; PR=""; DIFF=""; REPO="chrono-meta/forge-harness"
@@ -516,6 +516,18 @@ if [ "$COMMITS_TODAY" -gt 0 ] && [ ! -f "$FC" ]; then
516
516
  FAIL=1
517
517
  fi
518
518
 
519
+ # ⑤-catches (RECORD-ONLY — never sets FAIL). Wrap-up ⑤(a) asks every close for a «## 잡은 것» section
520
+ # (or «## Catches»), which scripts/catch_tally.py counts. Measured 2026-11-13: 0 of 69 daily files
521
+ # (2026-09-01..11-13) carried it, 6 of them after the step shipped (#1058) — nothing reported the absence.
522
+ # This line states a property of today's record (present / absent), not a verdict on the session.
523
+ if [ -f "$FC" ]; then
524
+ if grep -qE '^##[[:space:]]+(잡은 것|Catches)[[:space:]]*$' "$FC"; then
525
+ echo "✅ ⑤-catches fh_completed_${TODAY}.md has a «## 잡은 것» section"
526
+ else
527
+ echo "ⓘ ⑤-catches fh_completed_${TODAY}.md has no «## 잡은 것» section (record only) — add the table, or «0건 — <what you looked at>»"
528
+ fi
529
+ fi
530
+
519
531
  # ④-b npm freshness — files[] assets changed since last version tag → republish owed.
520
532
  # Patterns are NARROWED to the actually-shipped subpaths (package.json files[]): knowledge/ ships only
521
533
  # shared/{harness-core,dialogue,rules}; docs/ ships only {codex-compat,CONTRIBUTING,pillars}. A broad
@@ -4,16 +4,24 @@
4
4
  # 🟥 왜 있나. 2026-08-31 하루에 **세 번** 나왔고 셋 다 자력 적발이 아니었다:
5
5
  # ① zsh "$ref:scripts/x" 콜론 뒤를 «modifier» 로 먹는다 — 에러가 아니라 «다른 유효 문자열»
6
6
  # ② zsh set -- $pair 인용 없는 전개가 리스트가 안 된다 — 여러 낱말이 한 낱말로
7
- # ③ bash "$V»" 다국어 문자가 «변수명»에 붙는다 — 이름 `V»` → unbound variable
7
+ # ③ bash "$V" 바로 뒤 » 꼴 다국어 문자가 «변수명»에 붙는다 — 이름 `V»` → unbound variable
8
8
  # 공통형: **셸이 이름 경계를 다르게 읽는데 그게 조용하다**(①은 완전 무음, ③만 시끄럽다).
9
9
  #
10
10
  # ⚠️ **이 스캐너는 셋 중 «둘»만 덮는다** — ①과 ③. ②(단어분할)는 문법이 아니라 «의도»라
11
11
  # 정적으로 못 가른다. 안 덮는 것을 덮는 척하지 않는다.
12
12
  # ⚠️ 주석 안의 히트도 «보고한다» — 제외하면 진짜를 놓치는 쪽으로 기운다. 사람이 판정해라.
13
+ #
14
+ # --nonascii-only : ③ 만 본다(주석 줄도 본다 — 여러 줄 문자열·heredoc 안의 «#» 줄은 실행되는 글이라
15
+ # «주석처럼 보이는 줄» 을 빼면 진짜를 놓친다, 2026-11-13 교차 계열 지적) — selfcheck 레인(test_name_boundary_locale_lanes.sh)이
16
+ # 출하 셸 전체에 거는 모드. ③ 은 맥 기본 UTF-8 로캘(ko_KR · en_US)에서 bash 3.2 와 bash 5 둘 다
17
+ # rc 127 로 죽인다(2026-11-13 실측, LC_ALL=C 만 무사) — 리눅스 CI 는 이 얼굴을 못 본다.
13
18
  set -uo pipefail
14
- [ $# -gt 0 ] || { echo "usage: shell_name_boundary_scan.sh <file...>"; exit 2; }
19
+ [ $# -gt 0 ] || { echo "usage: shell_name_boundary_scan.sh [--nonascii-only] <file...>"; exit 2; }
15
20
  python3 - "$@" <<'PY'
16
21
  import re,sys,io
22
+ CODE_ONLY = len(sys.argv)>1 and sys.argv[1]=='--nonascii-only'
23
+ if CODE_ONLY: del sys.argv[1]
24
+ if len(sys.argv)<2: print("usage: shell_name_boundary_scan.sh [--nonascii-only] <file...> — no files given (nothing scanned)"); sys.exit(2)
17
25
  NONASCII=re.compile(r'\$[A-Za-z_][A-Za-z0-9_]*(?=[^\x00-\x7F])') # ③
18
26
  MODIFIER=re.compile(r'"\$[A-Za-z_][A-Za-z0-9_]*:') # ① (중괄호 없는 "$V:...")
19
27
  hits=0
@@ -23,7 +31,7 @@ for f in sys.argv[1:]:
23
31
  for i,l in enumerate(s.split('\n'),1):
24
32
  for m in NONASCII.finditer(l):
25
33
  print(" 🟥 %s:%d [비-ASCII가 이름에 붙음] %s → %s"%(f,i,m.group(0),l.strip()[:64])); hits+=1
26
- for m in MODIFIER.finditer(l):
34
+ for m in ([] if CODE_ONLY else MODIFIER.finditer(l)):
27
35
  print(" 🟥 %s:%d [zsh modifier 로 먹힐 수 있음] %s → %s"%(f,i,m.group(0),l.strip()[:64])); hits+=1
28
36
  print(" 히트 %d 건 (0 이면 이 두 얼굴은 없다 — 나머지 하나는 이 계기가 «안 본다»)"%hits)
29
37
  sys.exit(1 if hits else 0)
@@ -389,14 +389,14 @@ _revert_probe() {
389
389
  # «레인이 튼튼하다» 고 읽는 것이 이 프로브의 최대 실패모드다.
390
390
  sed -i.bak "$sedexpr" "$C/peer_resolve.sh" && rm -f "$C/peer_resolve.sh.bak"
391
391
  if ! grep -q "$applied_marker" "$C/peer_resolve.sh"; then
392
- echo " ❌ $name — 중화가 적용되지 않았다(마커 «$applied_marker» 부재). 프로브를 신뢰할 수 없다"
392
+ echo " ❌ $name — 중화가 적용되지 않았다(마커 «${applied_marker}» 부재). 프로브를 신뢰할 수 없다"
393
393
  return 1
394
394
  fi
395
395
  # 중화한 파일 말고는 사본이 실물과 동일해야 한다(다른 변수를 안 건드렸다는 확인).
396
396
  local other_diff
397
397
  other_diff="$(diff -rq "$REPO_ROOT/scripts/adapters" "$C" 2>/dev/null | grep -v 'peer_resolve.sh' | wc -l | tr -d ' ')"
398
398
  if [ "$other_diff" != "0" ]; then
399
- echo " ❌ $name — 사본이 peer_resolve.sh 외에도 다르다($other_diff건). 프로브 격리 실패"
399
+ echo " ❌ $name — 사본이 peer_resolve.sh 외에도 다르다(${other_diff}건). 프로브 격리 실패"
400
400
  return 1
401
401
  fi
402
402
  # ── 2단 실행: 사본을 대상으로 레인을 통째로 다시 돌린다.
@@ -445,7 +445,7 @@ esac
445
445
 
446
446
  echo
447
447
  if [ "$FAIL" -eq 0 ]; then
448
- # ★`${N}` 로 감싼다 — 한글이 바로 뒤에 오면 bash 가 `$N개` 를 **변수명 `N개`** 로 읽어
448
+ # ★`${N}` 로 감싼다 — 한글이 바로 뒤에 오면 bash 가 `$N` 바로 뒤 `개` 를 **변수명 `N개`** 로 읽어
449
449
  # `unbound variable` 로 죽는다(실측 2026-08-16: 레인 23개 전부 초록인데 마지막 요약
450
450
  # 줄에서 rc=1). 계기가 자기 보고 줄에서 죽으면 초록이 빨강으로 렌더된다.
451
451
  echo "✅ 레인 ${N}개 전부 기대대로"
@@ -23,7 +23,7 @@ check() { # $1 = repo root; prints problems, returns count via rc (capped)
23
23
  if [ ! -f "$root/$f" ]; then echo " declared but missing: $f"; n=$((n+1)); continue; fi
24
24
  got="$(fm_tools "$root/$f")"
25
25
  if [ -z "$got" ]; then echo " tools: line deleted: $f (declared: $want)"; n=$((n+1))
26
- elif [ "$got" != "$want" ]; then echo " tools: changed: $f «$got» (declared: «$want»)"; n=$((n+1)); fi
26
+ elif [ "$got" != "$want" ]; then echo " tools: changed: $f «${got}» (declared: «${want}»)"; n=$((n+1)); fi
27
27
  done < "$pin"
28
28
  local found frc d dirs=()
29
29
  # .claude/agents may legitimately not exist — only existing roots go to find, so any find error
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env bash
2
+ # test_doc_claims_1113_lanes.sh — pins three doc claims a 3.40.0 reader review (2026-11-13) found stale or missing.
3
+ # Each lane reads the shipped text, not a copy. Exit 0 = all pass, 1 = a lane failed, 2 = a subject file is missing.
4
+ set -u
5
+ cd "$(dirname "$0")/.." || exit 2
6
+ PASS=0; FAIL=0
7
+ ok() { PASS=$((PASS+1)); printf ' ✅ %s\n' "$1"; }
8
+ bad() { FAIL=$((FAIL+1)); printf ' ❌ %s\n' "$1"; }
9
+ C=knowledge/shared/harness-core/fh_module_contract.md; T=scripts/catch_tally.py; L=plugins/fh-meta/CHANGELOG.md
10
+ for f in "$C" "$T" "$L"; do [ -f "$f" ] || { echo "HARNESS-ERROR: $f missing"; exit 2; }; done
11
+
12
+ # D1 the module contract no longer calls the merged fh-cartridges PRs «open»
13
+ if grep -qE 'fh-cartridges PR #(19|20), open' "$C"; then bad "D1 contract still calls fh-cartridges #19/#20 open"
14
+ elif grep -qE 'fh-cartridges PR #19, merged' "$C" && grep -qE 'fh-cartridges PR #20, merged' "$C"; then ok "D1 contract: #19 and #20 marked merged"
15
+ else bad "D1 contract: #19/#20 references not found"; fi
16
+
17
+ # D2 catch_tally's docstring discloses the «## Catches» heading its regex accepts
18
+ if grep -q 'English heading `## Catches` is accepted' <(python3 - "$T" <<'PY'
19
+ import ast,sys; print(ast.get_docstring(ast.parse(open(sys.argv[1]).read())) or "")
20
+ PY
21
+ ); then ok "D2 catch_tally docstring says «## Catches» is accepted"; else bad "D2 catch_tally accepts «## Catches» but its docstring does not say so"; fi
22
+ if python3 - "$T" <<'PY'
23
+ import importlib.util,sys
24
+ s=importlib.util.spec_from_file_location("ct",sys.argv[1]); m=importlib.util.module_from_spec(s); s.loader.exec_module(m)
25
+ r=m.HEAD_RE
26
+ sys.exit(0 if r.match("## Catches") and r.match("## 잡은 것") and not r.match("## Catch") else 1)
27
+ PY
28
+ then ok "D2b control: HEAD_RE accepts «## Catches» and «## 잡은 것», rejects «## Catch»"
29
+ else bad "D2b HEAD_RE behaviour changed — D2's documented claim may be wrong"; fi
30
+
31
+ # D3 the changelog tells a --lease caller what happens when the tier cannot be read
32
+ if sed -n '/### \[Unreleased\]/,/### \[3.40.0\]/p' "$L" | grep -q 'other than `NONE` or `operator…`.*fetch, merge-base, diff or tier run fails.*exits 7 like a `HOLD` and merges nothing. Drop `--lease`'; then ok "D3 changelog notes --lease scope, exit 7, merges nothing, and the remedy"
33
+ else bad "D3 changelog silent on --lease without origin/main"; fi
34
+
35
+ printf 'PASS %d · FAIL %d\n' "$PASS" "$FAIL"
36
+ [ "$FAIL" -eq 0 ]
@@ -14,7 +14,7 @@
14
14
  # 첫 검증에서 그걸 겪었다.)
15
15
  #
16
16
  # 실행: bash scripts/test_fh_run_resolver_lanes.sh
17
- # 🟥 이 파일의 모든 «$VAR» 는 `${VAR}` 로 쓴다 — 변수 뒤에 ASCII 가 아닌 글자(» 등)가 바로
17
+ # 🟥 이 파일의 모든 « $VAR » 꼴(붙여 쓴 것)은 `${VAR}` 로 쓴다 — 변수 뒤에 ASCII 가 아닌 글자(» 등)가 바로
18
18
  # 붙으면 셸이 그 바이트를 **변수 이름에 먹어** `VAR?: unbound variable` 로 죽는다.
19
19
  # 이 세션에 같은 결함을 두 번 냈다(한 번 고치고 새 파일에 또 썼다). 중괄호가 그 경계다.
20
20
  set -uo pipefail
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env bash
2
+ # test_fixture_git_env_lanes.sh — a fixture commit must never land in the repo named by an inherited
3
+ # GIT_DIR / GIT_INDEX_FILE / GIT_COMMON_DIR. SUBJECT: scripts/fixture_guard_lib.sh (+ the selfcheck.sh
4
+ # scrub line and scripts/lane_identity_tripwire.sh).
5
+ #
6
+ # Every case uses a DECOY «victim» repo under a temp dir — never a real repo. The victim gets a
7
+ # base commit and three staged files; its fingerprint (refs · local config · index · object count ·
8
+ # authors) must be identical before and after.
9
+ #
10
+ # Revert probe: delete the `for _fg_v in $FH_FIXTURE_GIT_ENV; do unset …` line in the lib → L1-L3 go red.
11
+ set -u
12
+ cd "$(dirname "${BASH_SOURCE[0]}")/.."
13
+ LIB="$PWD/scripts/fixture_guard_lib.sh"; TRIP="$PWD/scripts/lane_identity_tripwire.sh"
14
+ pass=0; fail=0
15
+ chk() { if [ "$1" -eq 0 ]; then pass=$((pass+1)); echo " PASS $2"; else fail=$((fail+1)); echo " FAIL $2"; fi; }
16
+ for f in "$LIB" "$TRIP"; do [ -f "$f" ] || { echo "HARNESS-ERROR missing $f"; exit 2; }; done
17
+
18
+ T="$(mktemp -d "${TMPDIR:-/tmp}/fgenv.XXXXXX")"; trap 'rm -rf "$T"' EXIT
19
+ clean() { env -u GIT_DIR -u GIT_INDEX_FILE -u GIT_WORK_TREE -u GIT_COMMON_DIR -u GIT_OBJECT_DIRECTORY "$@"; }
20
+ mkvictim() { rm -rf "$1"; mkdir -p "$1"; ( cd "$1" && clean git init -q && clean git -c user.name=v -c user.email=v@v commit -q --allow-empty -m root \
21
+ && for i in 1 2 3; do echo "s$i" > "s$i.txt"; done && clean git add s1.txt s2.txt s3.txt ); }
22
+ snap() { ( cd "$1" && clean bash -c 'git for-each-ref --format="%(refname) %(objectname)"; git config --local --list | sort; git ls-files -s; git count-objects -v | grep -E "^(count|in-pack)"; git log --all --format="%ae %s"' ); }
23
+
24
+ # a lane-shaped body: source the lib, make a fixture, init + commit as the lane identity
25
+ LANE='. "$LIB"; d="$(fh_fixture_root "$(mktemp -d "$T/fx.XXXXXX")")" || exit 3
26
+ git -C "$d" init -q && echo a > "$d/a" && git -C "$d" add a && git -C "$d" -c core.hooksPath=/nonexistent -c user.name=lane -c user.email=lane@example.invalid commit -q --no-verify -m base || exit 4
27
+ git -C "$d" log --format=%s | grep -qx base || exit 5'
28
+
29
+ # ── C0 control: no inherited env → lane commits in its fixture, victim untouched ──
30
+ V="$T/v0"; mkvictim "$V"; b="$(snap "$V")"
31
+ clean env LIB="$LIB" T="$T" bash -c "$LANE"; rc=$?
32
+ [ "$rc" -eq 0 ] && [ "$b" = "$(snap "$V")" ]; chk $? "C0 control: no env → fixture commit ok (rc=$rc), victim unchanged"
33
+
34
+ # ── C0b control: the leak is real — without the lib, exported GIT_DIR lands the commit in the victim ──
35
+ V="$T/vc"; mkvictim "$V"; b="$(snap "$V")"
36
+ d="$(mktemp -d "$T/raw.XXXXXX")"
37
+ GIT_DIR="$V/.git" bash -c 'git -C "$1" init -q; git -C "$1" -c user.name=lane -c user.email=lane@example.invalid commit -q --allow-empty -m base' _ "$d" >/dev/null 2>&1
38
+ [ "$b" != "$(snap "$V")" ]; chk $? "C0b control: unguarded git -C under GIT_DIR DOES write the victim (leak reproduced)"
39
+
40
+ # ── L1-L3: inherited env, guarded lane → victim untouched ──
41
+ for spec in "GIT_DIR=.git" "GIT_INDEX_FILE=.git/index" "GIT_COMMON_DIR=.git"; do
42
+ var="${spec%%=*}"; V="$T/v_$var"; mkvictim "$V"; b="$(snap "$V")"
43
+ env "$var=$V/${spec#*=}" LIB="$LIB" T="$T" bash -c "$LANE" >/dev/null 2>&1; rc=$?
44
+ [ "$rc" -eq 0 ] && [ "$b" = "$(snap "$V")" ]; chk $? "L $var exported at victim → lane rc=$rc, victim unchanged"
45
+ done
46
+ V="$T/v_dw"; mkvictim "$V"; b="$(snap "$V")"
47
+ GIT_DIR="$V/.git" GIT_WORK_TREE="$V" LIB="$LIB" T="$T" bash -c "$LANE" >/dev/null 2>&1; rc=$?
48
+ [ "$rc" -eq 0 ] && [ "$b" = "$(snap "$V")" ]; chk $? "L GIT_DIR+GIT_WORK_TREE → lane rc=$rc, victim unchanged"
49
+
50
+ # ── L4: env re-exported AFTER sourcing → fh_fixture_root refuses (fail-closed, HARNESS-ERROR) ──
51
+ V="$T/v4"; mkvictim "$V"; b="$(snap "$V")"
52
+ out="$(LIB="$LIB" T="$T" V="$V" bash -c '. "$LIB"; export GIT_DIR="$V/.git"; fh_fixture_root "$(mktemp -d "$T/fx.XXXXXX")"' 2>&1)"; rc=$?
53
+ [ "$rc" -ne 0 ] && printf '%s' "$out" | grep -q 'HARNESS-ERROR inherited GIT_DIR' && [ "$b" = "$(snap "$V")" ]; chk $? "L4 GIT_DIR re-exported after source → refused (rc=$rc)"
54
+
55
+ # ── L5: fixture root inside a repo's work tree → git resolves it outside → refused ──
56
+ V="$T/v5"; mkvictim "$V"; mkdir -p "$V/sub"
57
+ out="$(LIB="$LIB" V="$V" bash -c '. "$LIB"; fh_fixture_root "$V/sub"' 2>&1)"; rc=$?
58
+ [ "$rc" -ne 0 ] && printf '%s' "$out" | grep -q 'outside the fixture'; chk $? "L5 root inside another repo's work tree → refused (rc=$rc)"
59
+
60
+ # ── L6: fh_fixture_git_check — own repo passes, foreign git dir refuses ──
61
+ d="$(mktemp -d "$T/gc.XXXXXX")"; clean git -C "$d" init -q
62
+ LIB="$LIB" bash -c '. "$LIB"; fh_fixture_git_check "$1"' _ "$d" >/dev/null 2>&1; chk $? "L6a git_check on the fixture's own repo → ok"
63
+ d2="$(mktemp -d "$T/gc2.XXXXXX")"
64
+ LIB="$LIB" V="$T/v5" bash -c '. "$LIB"; mkdir -p "$V/x"; fh_fixture_git_check "$V/x"' >/dev/null 2>&1; rc=$?
65
+ [ "$rc" -ne 0 ]; chk $? "L6b git_check on a dir that git resolves to another repo → refused (rc=$rc)"
66
+
67
+ # ── L7: selfcheck.sh scrubs the same list before any lane runs ──
68
+ line="$(grep -m1 '^unset GIT_ALTERNATE_OBJECT_DIRECTORIES' scripts/selfcheck.sh)"; miss=0
69
+ list="$(LIB="$LIB" bash -c '. "$LIB"; echo $FH_FIXTURE_GIT_ENV')"
70
+ for v in $list; do case " $line " in *" $v "*) ;; *) miss=$((miss+1)); echo " missing in selfcheck: $v" ;; esac; done
71
+ [ -n "$line" ] && [ "$miss" -eq 0 ] && [ "$(grep -n '^unset GIT_ALTERNATE' scripts/selfcheck.sh | cut -d: -f1)" -lt "$(grep -n '^cd "\$(dirname' scripts/selfcheck.sh | head -1 | cut -d: -f1)" ]
72
+ chk $? "L7 selfcheck.sh unsets all $(echo $list | wc -w | tr -d ' ') vars before cd/lanes"
73
+
74
+ # ── L8: tripwire known pair + harness error ──
75
+ V="$T/v8"; mkvictim "$V"; out="$(bash "$TRIP" "$V")"; rc=$?
76
+ [ "$rc" -eq 0 ] && printf '%s' "$out" | grep -q '^LANE-TRIPWIRE ok: 0'; chk $? "L8a tripwire clean repo → ok, rc=0"
77
+ ( cd "$V" && clean git -c user.name=lane -c user.email=lane@example.invalid commit -q --allow-empty -m base )
78
+ out="$(bash "$TRIP" "$V")"; rc=$?
79
+ [ "$rc" -eq 0 ] && printf '%s' "$out" | grep -q 'WARN: 1 commit'; chk $? "L8b tripwire lane commit → WARN, record-only rc=0"
80
+ bash "$TRIP" "$V" --strict >/dev/null; rc=$?; [ "$rc" -eq 1 ]; chk $? "L8c tripwire --strict → rc=1 (got $rc)"
81
+ ( cd "$V" && clean git -c user.name=v -c user.email=v@v commit -q --allow-empty -m tip && clean git rev-parse HEAD > "$T/shallow" )
82
+ out="$(GIT_SHALLOW_FILE="$T/shallow" bash "$TRIP" "$V")"; rc=$?
83
+ printf '%s' "$out" | grep -q 'WARN: 1 commit'; chk $? "L8e inherited GIT_SHALLOW_FILE cutting history at the tip → lane commit still found (codex R1)"
84
+ bash "$TRIP" "$T/nope" >/dev/null; rc=$?; [ "$rc" -eq 2 ]; chk $? "L8d tripwire on non-repo → HARNESS-ERROR rc=2, not «ok» (got $rc)"
85
+
86
+ echo "fixture-git-env lanes: $pass passed, $fail failed"
87
+ [ "$fail" -eq 0 ]
@@ -76,7 +76,7 @@ run "$W/cut.jsonl"
76
76
  SNIP="$HERE/../templates/settings.LaneGap.snippet.json"
77
77
  CMD=$(python3 -c "import json,sys;print(json.load(open(sys.argv[1]))['project_settings_json']['hooks']['UserPromptSubmit'][0]['hooks'][0]['command'])" "$SNIP")
78
78
  O1=$(cd "$W" && env CLAUDE_PROJECT_DIR="$W" FH_LANE_GAP_HINT=0 sh -c "$CMD" 2>&1 </dev/null); O2=$(cd "$W" && env CLAUDE_PROJECT_DIR="$W" sh -c "$CMD" 2>&1 </dev/null)
79
- [ -z "$O1" ] && printf '%s' "$O2" | grep -q 'lane-gap' && ok "G14 the wrapper honours FH_LANE_GAP_HINT=0 even when the script is missing (control: without it, it warns)" || bad "G14 (off=«$O1» on=«$O2»)"
79
+ [ -z "$O1" ] && printf '%s' "$O2" | grep -q 'lane-gap' && ok "G14 the wrapper honours FH_LANE_GAP_HINT=0 even when the script is missing (control: without it, it warns)" || bad "G14 (off=«${O1}» on=«${O2}»)"
80
80
  mk cm "Edit|/r/scripts/a.sh" "Bash|echo done # note; pytest -q" "Bash|cat <<EOF
81
81
  pytest -q
82
82
  EOF"; run "$W/cm.jsonl"
@@ -85,7 +85,7 @@ say && ok "G15 a test named inside a comment or a heredoc body is text, not a ru
85
85
  O3=$(printf '{"transcript_path":"%s"}' "$W/gap.jsonl" | bash "$HERE/lane_gap_hint.sh"); R3=$?
86
86
  O4=$(printf '{"transcript_path":"%s"}' "$W/gap.jsonl" | FH_LANE_GAP_HINT=0 bash "$HERE/lane_gap_hint.sh")
87
87
  [ "$R3" = 0 ] && printf '%s' "$O3" | grep -q 'lane-gap' && [ -z "$O4" ] && grep -q 'scripts/lane_gap_hint.sh' "$HERE/../templates/settings.LaneGap.snippet.json" \
88
- && ok "G16 the snippet calls the .sh wrapper, which passes stdin to the hint and honours the opt-out" || bad "G16 (rc=$R3 · on=«$O3» · off=«$O4»)"
88
+ && ok "G16 the snippet calls the .sh wrapper, which passes stdin to the hint and honours the opt-out" || bad "G16 (rc=$R3 · on=«${O3}» · off=«${O4}»)"
89
89
  [ $((pass+fail)) -eq 16 ] || { echo "HARNESS-ERROR: counted $((pass+fail)) lanes, expected 16"; exit 2; }
90
90
  echo "lane_gap_hint lanes: $pass passed · $fail failed"
91
91
  [ "$fail" -eq 0 ]
@@ -162,7 +162,7 @@ while IFS='|' read -r _exp _s; do
162
162
  [ -n "$_exp" ] || continue
163
163
  _r=$(_ref_words "$_s")
164
164
  if [ "$_r" != "$_exp" ]; then
165
- echo "❌ HARNESS-ERROR — 코퍼스 기대값이 대조군과 어긋난다: «$_s» exp=$_exp ref=$_r"; exit 2
165
+ echo "❌ HARNESS-ERROR — 코퍼스 기대값이 대조군과 어긋난다: «${_s}» exp=$_exp ref=$_r"; exit 2
166
166
  fi
167
167
  for _L in POSIX "$UTF8"; do
168
168
  _h=$(LC_ALL="$_L" bash -c "printf '%s\n' \"\$1\" | $EXPR" _ "$_s")
@@ -281,7 +281,7 @@ _t "L7 되돌림 — 옛 셈법은 판정을 로케일에 따라 갈리게 만
281
281
  m_p=0; _run_aff POSIX "$T/fn_wc.sh" || m_p=1
282
282
  m_u=0; _run_aff "$UTF8" "$T/fn_wc.sh" || m_u=1
283
283
  if [ "$m_p" -ne "$m_u" ]; then _ok
284
- else _no "변이체가 두 로케일에서 같은 판정(rc=$m_p) — 이 팔은 셈법을 안 보고 있다(이빨 없음). 실측 옛 wc -w: POSIX=$s_p $UTF8=$s_u · 문턱=$AFF_THR · 픽스처=«$STRADDLE»"; fi
284
+ else _no "변이체가 두 로케일에서 같은 판정(rc=$m_p) — 이 팔은 셈법을 안 보고 있다(이빨 없음). 실측 옛 wc -w: POSIX=$s_p $UTF8=$s_u · 문턱=$AFF_THR · 픽스처=«${STRADDLE}»"; fi
285
285
 
286
286
  # ── L8 컨트롤: **같은 픽스처·같은 러너**로 지금의 훅은 두 로케일 판정이 같다 ────
287
287
  # L7 과 L8 이 known-pair 를 이룬다 — 바뀐 것은 셈법 하나뿐이므로, L7 이 갈리고 L8 이
@@ -542,7 +542,7 @@ else
542
542
  '동일한 스테이지드 diff 를 둘 다에게' 'ran bash x.sh, 30/30 PASS' ''; do
543
543
  _n1=$(LC_ALL="$UTF8" bash -c 'printf "%s" "${#1}"' _ "$_sv")
544
544
  _n2=$(LC_ALL="$UTF8" bash -c '. "$1"; _charlen "$2"' _ "$T/fn_cl_now.sh" "$_sv")
545
- [ "$_n1" = "$_n2" ] || _cl_bad="$_cl_bad '$_sv'($_n1≠$_n2)"
545
+ [ "$_n1" = "$_n2" ] || _cl_bad="$_cl_bad '$_sv'(${_n1}≠$_n2)"
546
546
  done
547
547
  if [ -z "$_cl_bad" ]; then _ok
548
548
  else _no "UTF-8 기계에서 수가 움직인다 —$_cl_bad. 기존 문턱값이 재교정 없이 못 쓴다"; fi
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env bash
2
+ # test_name_boundary_locale_lanes.sh — "$NAME" directly followed by a non-ASCII character.
3
+ #
4
+ # Under a UTF-8 locale on macOS (ko_KR.UTF-8 and en_US.UTF-8 both; measured 2026-11-13 with
5
+ # /bin/bash 3.2 and Homebrew bash 5), bash reads the following multibyte character's bytes as part
6
+ # of the variable name: "lease «$LEASE" + "»" written together → `LEASE<bytes>: unbound variable`, rc 127. Only LC_ALL=C
7
+ # is safe. Linux CI never shows it, so the static lane (B1–B3) is what keeps it fixed there.
8
+ #
9
+ # B1 scanner red on a planted "$V" + "»" written together (known-positive)
10
+ # B2 scanner green on "${V}»" (known-negative)
11
+ # B3 every tracked shell file (*.sh + shebang shell files) has 0 code-line hits
12
+ # B4 behaviour: /bin/bash + ko_KR.UTF-8 runs the pr_merge_verified lanes (lease path S1–S3)
13
+ # to rc 0 with no "unbound variable" — only where that locale exists, else a named SKIP
14
+ # (a SKIP is not a pass). B4c checks the locale really triggers the defect (control).
15
+ set -uo pipefail
16
+ cd "$(dirname "$0")/.." || exit 2
17
+ SCAN=scripts/shell_name_boundary_scan.sh
18
+ P=0; F=0; K=0
19
+ ok() { echo " ✅ $*"; P=$((P+1)); }
20
+ bad() { echo " ❌ $*"; F=$((F+1)); }
21
+ skip(){ echo " ⏭️ SKIP $* (not a pass)"; K=$((K+1)); }
22
+ T=$(mktemp -d); trap 'rm -rf "$T"' EXIT
23
+
24
+ printf '#!/usr/bin/env bash\necho "lease \302\253$LEASE\302\273"\n' > "$T/pos.sh"
25
+ printf '#!/usr/bin/env bash\necho "lease \302\253${LEASE}\302\273"\n' > "$T/neg.sh"
26
+ printf '#!/usr/bin/env bash\necho "start\n# $C\302\273 inside a string\n"\n' > "$T/hash.sh"
27
+
28
+ out=$(bash "$SCAN" --nonascii-only "$T/pos.sh"); rc=$?
29
+ { [ "$rc" -eq 1 ] && printf '%s' "$out" | grep -q 'pos.sh:2'; } && ok "B1 planted unbraced V + » → hit at pos.sh:2, rc 1" || bad "B1 rc=$rc out=$out"
30
+
31
+ out=$(bash "$SCAN" --nonascii-only "$T/neg.sh"); rc=$?
32
+ [ "$rc" -eq 0 ] && ok "B2 \"\${V}»\" → 0 hits, rc 0" || bad "B2 rc=$rc out=$out"
33
+ out=$(bash "$SCAN" --nonascii-only "$T/hash.sh"); rc=$?
34
+ [ "$rc" -eq 1 ] && ok "B2h a «#» line inside a multi-line string is still scanned (it runs) → hit" || bad "B2h rc=$rc out=$out"
35
+ out=$(bash "$SCAN" --nonascii-only 2>&1); rc=$?
36
+ [ "$rc" -eq 2 ] && ok "B2e the mode flag with no files → rc 2, never «0 hits»" || bad "B2e rc=$rc out=$out"
37
+
38
+ sh_files=$(git ls-files '*.sh') || bad "B3 git ls-files '*.sh' failed — file list incomplete"
39
+ all_files=$(git ls-files) || bad "B3 git ls-files failed — file list incomplete"
40
+ files=$(printf '%s\n' "$sh_files"; printf '%s\n' "$all_files" | grep -v '\.sh$' | while IFS= read -r f; do
41
+ [ -f "$f" ] && head -1 "$f" | grep -qE '^#!.*(bash|/sh)( |$)' && printf '%s\n' "$f"; done)
42
+ n=$(printf '%s\n' "$files" | grep -c .)
43
+ out=$(printf '%s\n' "$files" | tr '\n' '\0' | xargs -0 bash "$SCAN" --nonascii-only); rc=$?
44
+ { [ "$rc" -eq 0 ] && [ "$n" -gt 100 ]; } && ok "B3 $n tracked shell files → 0 code-line hits" \
45
+ || bad "B3 files=$n rc=$rc — brace them as \${NAME}:"$'\n'"$(printf '%s' "$out" | grep '🟥' | head -20)"
46
+
47
+ LOCALES=$(locale -a 2>/dev/null) # captured first: grep -q under pipefail would SIGPIPE locale -a into a false SKIP
48
+ if [ -x /bin/bash ] && printf "%s\n" "$LOCALES" | grep -iE '^ko_KR\.utf-?8$' >/dev/null; then
49
+ shape=$(printf 'set -u; V=ok; echo "$V\302\273"') # built from bytes so B3 does not flag this file
50
+ c=$(env LANG=ko_KR.UTF-8 LC_ALL=ko_KR.UTF-8 /bin/bash -c "$shape" 2>&1); crc=$?
51
+ if [ "$crc" -ne 0 ]; then
52
+ ok "B4c control: the unbraced shape dies under /bin/bash + ko_KR.UTF-8 (rc $crc)"
53
+ mkdir -p "$T/pin" && ln -s /bin/bash "$T/pin/bash" # the lanes call PATH «bash» — pin it to /bin/bash too
54
+ o=$(env PATH="$T/pin:$PATH" LANG=ko_KR.UTF-8 LC_ALL=ko_KR.UTF-8 /bin/bash scripts/test_pr_merge_verified_lanes.sh 2>&1); r=$?
55
+ { [ "$r" -eq 0 ] && ! grep -qE 'unbound variable|바인딩 해제' <<<"$o"; } \
56
+ && ok "B4 pr_merge_verified lanes under /bin/bash + ko_KR.UTF-8 → rc 0, no unbound variable" \
57
+ || bad "B4 rc=$r"$'\n'"$(printf '%s' "$o" | grep -E 'unbound|바인딩|❌' | head -5)"
58
+ else
59
+ skip "B4 — this /bin/bash does not show the defect under ko_KR.UTF-8 (control rc 0), so B4 would prove nothing"
60
+ fi
61
+ else
62
+ skip "B4 — no /bin/bash or no ko_KR.UTF-8 locale here"
63
+ fi
64
+
65
+ echo "PASS $P · FAIL $F · SKIP $K"
66
+ [ "$F" -eq 0 ]
@@ -286,6 +286,16 @@ else
286
286
  else bad "L8c named+present: expected rc=0 and $ACC_ONE not STALE (rc=$_LAST_RC)" "$_LAST_OUT"; fi
287
287
  fi
288
288
 
289
+ # ── lane L9: this repo's own ACCEPTED_ABSENT list carries no stale entry (2026-11-13) ──
290
+ # The check only WARNS on a stale exception (rc stays 0), so nothing turned red when
291
+ # selfdev_merge_tier.sh and its lane started shipping (#1068) while still listed as accepted-absent.
292
+ # A stale exception is where a later real omission lands silently; pin the live list here.
293
+ cd "$REPO_ROOT" || exit 10
294
+ o=$(bash "$SUBJECT" 2>&1); rc=$?
295
+ if [ "$rc" = 0 ] && ! printf '%s' "$o" | grep -q "no longer exercised"; then
296
+ ok "L9 live ACCEPTED_ABSENT list has no stale entry"
297
+ else bad "L9 live list: stale ACCEPTED_ABSENT entries (rc=$rc)" "$(printf '%s' "$o" | grep -A4 'no longer exercised')"; fi
298
+
289
299
  echo
290
300
  if [ "$skipped" -gt 0 ]; then
291
301
  echo "package-coverage lanes: ${pass} passed, ${fail} failed, ${skipped} UNCALIBRATED (not verified here)"
@@ -194,7 +194,7 @@ setup sh; mkgh "$T/sh"; run "$T/sh" 7 --rerun "$GOOD" --lease 'selfdev standing
194
194
  # S3 spellings a substring list missed (codex R1): upper case · self-dev · session lease → all checked, all refused
195
195
  for _l in 'STANDING' 'self-dev lease' 'session lease 2026-11-09'; do
196
196
  setup sv; mkgh "$T/sv"; run "$T/sv" 7 --rerun "$GOOD" --lease "$_l"
197
- { [ "$RC" -eq 7 ] && ! merged "$T/sv"; } && ok "S3 lease «$_l» → tier checked, rc 7" || bad "S3 lease «$_l» rc=$RC"
197
+ { [ "$RC" -eq 7 ] && ! merged "$T/sv"; } && ok "S3 lease «${_l}» → tier checked, rc 7" || bad "S3 lease «${_l}» rc=$RC"
198
198
  rm -rf "$T/sv"
199
199
  done
200
200
  # S4 control: the operator's answer for this PR is not checked — even when it mentions selfdev (codex R1 #4)
@@ -287,5 +287,12 @@ setup eh; mkgh "$T/eh"; run "$T/eh" 7 --rerun "$GOOD" --expect-head 000000000000
287
287
  setup eh2; mkgh "$T/eh2"; run "$T/eh2" 7 --rerun "$GOOD" --expect-head "$(cat "$T/eh2/head.oid")"
288
288
  { [ "$RC" -eq 0 ] && merged "$T/eh2"; } && ok "L32b --expect-head matching → merged and verified" || { bad "L32b rc=$RC"; printf '%s\n' "$OUT" | tail -3; }
289
289
 
290
+ # L33 header honesty (2026-11-13, Area B S1): the RECEIPT note must not say the lease is «not enforced» —
291
+ # --lease has gated the merge through the tier (rc 7) since 3.40.0, and the EXIT block says so.
292
+ if [ ! -f "$SC" ]; then bad "L33 subject missing: $SC"
293
+ elif grep -q 'recorded, not enforced' "$SC"; then bad "L33 header still says the lease is «recorded, not enforced»"
294
+ elif ! grep -q '^#.*lease (.*TIER=AUTO, see EXIT 7)' "$SC"; then bad "L33 RECEIPT lease note no longer points at the TIER=AUTO / EXIT 7 enforcement"
295
+ else ok "L33 header does not contradict EXIT 7 (lease is enforced)"; fi
296
+
290
297
  printf 'PASS %d · FAIL %d\n' "$PASS" "$FAIL"
291
298
  [ "$FAIL" -eq 0 ]
@@ -19,7 +19,7 @@ lane() { # id expected_tier expected_rc (rows on stdin, «st<TAB>path<TAB>add<T
19
19
  else out="$(SELFDEV_MAX_LINES="${MAXL:-300}" bash "$TIER" --files "$f" 2>&1)"; rc=$?; fi
20
20
  got="$(printf '%s\n' "$out" | tail -1)"
21
21
  if [ "$got" = "TIER=$want" ] && [ "$rc" -eq "$wrc" ]; then pass=$((pass+1)); echo " ✅ $id $got rc=$rc"
22
- else fail=$((fail+1)); echo " ❌ $id want TIER=$want rc=$wrc · got «$got» rc=$rc"; printf '%s\n' "$out" | sed 's/^/ /'; fi
22
+ else fail=$((fail+1)); echo " ❌ $id want TIER=$want rc=$wrc · got «${got}» rc=$rc"; printf '%s\n' "$out" | sed 's/^/ /'; fi
23
23
  }
24
24
  T=$'\t'
25
25
  lane T1-doc AUTO 0 < <(printf 'M%sdocs/USER_GUIDE.md%s4%s1\n' "$T" "$T" "$T")
@@ -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.
@@ -554,7 +554,7 @@ M="$(bud_meta b29w hang --timeout 2)"
554
554
  _w="$(meta_get "$M" wall_s)"
555
555
  { [[ "$_w" =~ ^[0-9]+$ ]] && [ "$_w" -ge 2 ] && [ "$_w" -le 30 ]; } \
556
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»)"
557
+ || no "L29w wall_s missing or dead clock («${_w}»)"
558
558
  M="$(bud_meta b29c die --timeout 60)"
559
559
  [ "$(meta_get "$M" ended_at_cap)" = UNKNOWN ] \
560
560
  && ok "L29c a crash (rc=7) is UNKNOWN, not no and not yes" \
@@ -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 \