@chrono-meta/fh-gate 3.41.0 β†’ 3.43.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 (108) hide show
  1. package/.claude/regression/probes_live.yaml +16 -8
  2. package/.claude/rules/fh_4axis_gate.md +8 -0
  3. package/.claude-plugin/marketplace.json +4 -4
  4. package/AGENTS.md +5 -0
  5. package/README.ja.md +2 -0
  6. package/README.ko.md +2 -0
  7. package/README.md +2 -0
  8. package/README.zh.md +2 -0
  9. package/docs/HOW_FH_DIFFERS.en.md +37 -0
  10. package/docs/HOW_FH_DIFFERS.md +39 -0
  11. package/docs/USER_GUIDE.md +113 -2
  12. package/docs/model_tier_expectations.md +8 -4
  13. package/knowledge/shared/harness-core/claude_md_full_reference.md +10 -0
  14. package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +18 -0
  15. package/knowledge/shared/harness-core/fh_module_contract.md +19 -0
  16. package/knowledge/shared/harness-core/measurement-integrity-checklist.md +24 -0
  17. package/knowledge/shared/learnings/subagent_invocations_log.yaml +30 -0
  18. package/package.json +7 -1
  19. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  20. package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +12 -5
  21. package/plugins/fh-commons/skills/ko-tech-writer/SKILL_detail.md +17 -0
  22. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  23. package/plugins/fh-meta/CHANGELOG.md +49 -3
  24. package/plugins/fh-meta/skills/edit-manifest/SKILL.md +14 -1
  25. package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -1
  26. package/plugins/fh-meta/skills/meta-prompt-builder/SKILL.md +19 -0
  27. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  28. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  29. package/scripts/capability_registry_check.sh +15 -2
  30. package/scripts/fh_session_load.sh +3 -1
  31. package/scripts/live_eval_trace.py +122 -0
  32. package/scripts/package_coverage_check.sh +7 -0
  33. package/scripts/pr_merge_verified.sh +7 -0
  34. package/scripts/probe_live_eval.sh +6 -3
  35. package/scripts/probe_live_eval_lib.py +89 -1
  36. package/scripts/remote_marker_gate.sh +56 -0
  37. package/scripts/selfcheck.sh +9 -1
  38. package/scripts/session_close_check.sh +16 -0
  39. package/scripts/sim_isolated_run.sh +17 -2
  40. package/scripts/test_abstract_consult_check_lanes.sh +1 -0
  41. package/scripts/test_adapter_lanes.sh +1 -0
  42. package/scripts/test_axis23_skip_reason_lanes.sh +1 -0
  43. package/scripts/test_backtick_guard_lanes.sh +1 -0
  44. package/scripts/test_claim_propagation_lanes.sh +1 -0
  45. package/scripts/test_claude_md_size_lanes.sh +1 -0
  46. package/scripts/test_consent_registry.sh +1 -0
  47. package/scripts/test_count_check_all_plugins_lanes.sh +1 -0
  48. package/scripts/test_count_check_decl_lanes.sh +1 -0
  49. package/scripts/test_count_check_readme_format_lanes.sh +1 -0
  50. package/scripts/test_degrade_scan_shell_probes.sh +1 -0
  51. package/scripts/test_destructive_pre_gate_lanes.sh +1 -0
  52. package/scripts/test_dispatch_receipt_lanes.sh +1 -0
  53. package/scripts/test_doc_claim_triad_lanes.sh +1 -0
  54. package/scripts/test_env_delta_worktree_lanes.sh +1 -0
  55. package/scripts/test_env_layer_fingerprint_lanes.sh +1 -0
  56. package/scripts/test_evidence_root_psa_lanes.sh +1 -0
  57. package/scripts/test_fh_detach_lanes.sh +1 -0
  58. package/scripts/test_fh_goal_change_detection_lanes.sh +1 -0
  59. package/scripts/test_fh_module_check_lanes.sh +1 -0
  60. package/scripts/test_fh_qp_lanes.sh +1 -0
  61. package/scripts/test_files_manifest_shipping_lanes.sh +1 -0
  62. package/scripts/test_fixture_git_env_lanes.sh +15 -0
  63. package/scripts/test_fixture_guard_coverage_lanes.sh +141 -0
  64. package/scripts/test_gate_bootstrap_ephemeral_lanes.sh +1 -0
  65. package/scripts/test_halffix_lanes.sh +1 -0
  66. package/scripts/test_hook_drift_lanes.sh +1 -0
  67. package/scripts/test_hook_templates_copilot_compat_lanes.sh +1 -0
  68. package/scripts/test_lane_gap_hint_lanes.sh +1 -0
  69. package/scripts/test_lane_runner_lanes.sh +1 -0
  70. package/scripts/test_live_eval_trace_lanes.sh +145 -0
  71. package/scripts/test_main_commit_guard_lanes.sh +1 -0
  72. package/scripts/test_marker_axes_run_lanes.sh +1 -0
  73. package/scripts/test_marker_crossfamily_lanes.sh +1 -0
  74. package/scripts/test_marker_defense_lanes.sh +1 -0
  75. package/scripts/test_marker_diff_sha_lanes.sh +1 -0
  76. package/scripts/test_marker_floor_lanes.sh +1 -0
  77. package/scripts/test_meta_prompt_restate_lanes.sh +36 -0
  78. package/scripts/test_mutation_probe_lanes.sh +26 -6
  79. package/scripts/test_name_boundary_locale_lanes.sh +1 -0
  80. package/scripts/test_outbound_pr_gate_lanes.sh +1 -0
  81. package/scripts/test_package_coverage_lanes.sh +1 -0
  82. package/scripts/test_peer_worktree_detect_lanes.sh +1 -0
  83. package/scripts/test_pipe_verdict_guard_lanes.sh +1 -0
  84. package/scripts/test_post_squash_verify_lanes.sh +1 -0
  85. package/scripts/test_pr_merge_verified_lanes.sh +24 -0
  86. package/scripts/test_precommit_gitlink_lanes.sh +1 -0
  87. package/scripts/test_precommit_pointer_index_lanes.sh +1 -0
  88. package/scripts/test_precommit_staged_drift_lanes.sh +1 -0
  89. package/scripts/test_prepush_stdin_integrity.sh +1 -0
  90. package/scripts/test_prior_art_prompt_lanes.sh +1 -0
  91. package/scripts/test_prless_delta_scan_lanes.sh +1 -0
  92. package/scripts/test_probe_live_eval_lanes.sh +1 -0
  93. package/scripts/test_psa_singlefile_lanes.sh +1 -0
  94. package/scripts/test_remote_marker_gate_lanes.sh +97 -0
  95. package/scripts/test_residency_admission_lanes.sh +1 -0
  96. package/scripts/test_revert_probe_lanes.sh +1 -0
  97. package/scripts/test_reviewer_capability_conformance.sh +1 -0
  98. package/scripts/test_selfcheck_state_lanes.sh +1 -0
  99. package/scripts/test_session_close_chain_lanes.sh +1 -0
  100. package/scripts/test_session_close_lanes.sh +8 -0
  101. package/scripts/test_session_load_mirror_fp_lanes.sh +1 -0
  102. package/scripts/test_sim_isolated_run_lanes.sh +1 -0
  103. package/scripts/test_stale_clone_guard_lanes.sh +1 -0
  104. package/scripts/test_stale_ref_close_lanes.sh +1 -0
  105. package/scripts/test_tag_version_lanes.sh +1 -0
  106. package/scripts/test_version_lockstep_lanes.sh +1 -0
  107. package/scripts/test_wizard_snippet_merge_lanes.sh +1 -0
  108. package/scripts/test_worktree_reclaim_lanes.sh +1 -0
@@ -4,6 +4,7 @@
4
4
  #
5
5
  # The load-bearing lanes are the REFUSALS: a refusal must happen BEFORE the merge, so each refusal
6
6
  # lane also asserts the fake gh never received `pr merge` (a merge log that stays empty).
7
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
7
8
  set -uo pipefail
8
9
  cd "$(dirname "$0")/.."
9
10
  SC="$PWD/scripts/pr_merge_verified.sh"
@@ -30,6 +31,10 @@ setup() {
30
31
  mkdir -p "$d/seed/plugins/p/skills/s"; printf 'Plain text one.\n' > "$d/seed/plugins/p/skills/s/SKILL.md"; git -C "$d/seed" add plugins
31
32
  git -C "$d/seed" commit -qm skill --no-verify; git -C "$d/seed" push -q origin HEAD:main
32
33
  git -C "$d/seed" switch -qc feat; printf 'Plain text two.\n' > "$d/seed/plugins/p/skills/s/SKILL.md"
34
+ elif [ -n "${SETUP_LANE:-}" ]; then # SETUP_LANE=1: the PR changes only a lane file (scripts/test_*)
35
+ mkdir -p "$d/seed/scripts"; printf 'echo l1\n' > "$d/seed/scripts/test_x_lanes.sh"; git -C "$d/seed" add scripts
36
+ git -C "$d/seed" commit -qm lane --no-verify; git -C "$d/seed" push -q origin HEAD:main
37
+ git -C "$d/seed" switch -qc feat; printf 'echo l2\n' > "$d/seed/scripts/test_x_lanes.sh"
33
38
  elif [ -n "${SETUP_DOCS:-}" ]; then
34
39
  mkdir -p "$d/seed/docs"; printf 'x1\n' > "$d/seed/docs/x.md"; git -C "$d/seed" add docs/x.md
35
40
  git -C "$d/seed" commit -qm docs --no-verify; git -C "$d/seed" push -q origin HEAD:main
@@ -247,6 +252,25 @@ SETUP_EXTRA=1 setup cvd; mkgh "$T/cvd"; run "$T/cvd" 7 --rerun 'git --version &&
247
252
  { [ "$RC" -eq 0 ] && printf '%s' "$OUT" | grep -q 'mentions none of this PR'; } \
248
253
  && ok "L25b --rerun naming a tracked dir β†’ advisory still fires (blobs only)" || bad "L25b rc=$RC (dir listing counted as coverage?)"
249
254
 
255
+ # ── defect-path prompt (1c β€” print only, 2026-11-14 harvest H2) ──
256
+ DP='name the path the defect travels'
257
+ # D1 a code-changing PR (a, b) β†’ the one-line prompt prints, rc and merge unchanged (L24's run, covering --rerun)
258
+ setup dp1; mkgh "$T/dp1"; run "$T/dp1" 7 --rerun "$GOOD"
259
+ { [ "$RC" -eq 0 ] && merged "$T/dp1" && [ "$(printf '%s\n' "$OUT" | grep -cF "$DP")" -eq 1 ]; } \
260
+ && ok "D1 code-changing PR β†’ exactly one defect-path line, merge + verify unchanged (rc=0)" || { bad "D1 rc=$RC"; printf '%s\n' "$OUT" | tail -4; }
261
+ # D2 docs-only PR β†’ quiet (the condition is narrowed so doc PRs carry no noise)
262
+ SETUP_DOCS=1 setup dp2; mkgh "$T/dp2"; run "$T/dp2" 7 --rerun "$GOODX"
263
+ { [ "$RC" -eq 0 ] && merged "$T/dp2" && ! printf '%s' "$OUT" | grep -qF "$DP"; } \
264
+ && ok "D2 docs-only PR β†’ no defect-path line" || bad "D2 rc=$RC (prompt fired on a docs-only PR?)"
265
+ # D3 lane-only PR β†’ quiet
266
+ SETUP_LANE=1 setup dp3; mkgh "$T/dp3"; run "$T/dp3" 7 --rerun 'grep -q l2 scripts/test_x_lanes.sh && echo instrument-ok'
267
+ { [ "$RC" -eq 0 ] && merged "$T/dp3" && ! printf '%s' "$OUT" | grep -qF "$DP"; } \
268
+ && ok "D3 lane-only PR (scripts/test_*) β†’ no defect-path line" || { bad "D3 rc=$RC (prompt fired on a lane-only PR?)"; printf '%s\n' "$OUT" | tail -3; }
269
+ # D4 it is printed BEFORE the merge: a run whose merge is refused still shows it (and still exits 5, nothing verified)
270
+ setup dp4; mkgh "$T/dp4"; : > "$T/dp4/merge_fail"; run "$T/dp4" 7 --rerun "$GOOD"
271
+ { [ "$RC" -eq 5 ] && printf '%s' "$OUT" | grep -qF "$DP"; } \
272
+ && ok "D4 merge refused β†’ line was already printed (pre-merge), rc unchanged (5)" || { bad "D4 rc=$RC"; printf '%s\n' "$OUT" | tail -3; }
273
+
250
274
  # ── completion record (tracks/_meta/fh_completed_<date>.md) ──
251
275
  # cl_setup <name> : a work clone that HAS a tracks/ dir (a consumer without one is skipped silently β€” L30)
252
276
  cl_setup() { setup "$1"; mkgh "$T/$1"; mkdir -p "$T/$1/work/tracks"; }
@@ -21,6 +21,7 @@
21
21
  #
22
22
  # Usage: bash scripts/test_precommit_gitlink_lanes.sh Exit: 0 = all behave Β· 1 = regression Β· 10 = own setup broke.
23
23
 
24
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
24
25
  set -uo pipefail
25
26
  cd "$(dirname "$0")/.." || exit 1
26
27
  ROOT="$(pwd -P)"
@@ -8,6 +8,7 @@
8
8
  # N1 staged VALID pointer, file rm'd from disk β†’ [Pointers] block runs with no ❌ (control: index read works)
9
9
  # N2 staged broken pointer, file still on disk β†’ BLOCKED (the pre-fix path also caught this β€” control)
10
10
  # Usage: bash scripts/test_precommit_pointer_index_lanes.sh [--hook <path>] (default = templates/.git-hooks/pre-commit)
11
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
11
12
  set -u; ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"; HOOK="$ROOT/templates/.git-hooks/pre-commit"
12
13
  [ "${1:-}" = "--hook" ] && HOOK="$2"
13
14
  T=$(mktemp -d); trap 'rm -rf "$T"' EXIT; pass=0; fail=0
@@ -17,6 +17,7 @@
17
17
  #
18
18
  # Usage: bash scripts/test_precommit_staged_drift_lanes.sh Exit: 0 = all behave; 1 = regression.
19
19
 
20
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
20
21
  set -uo pipefail
21
22
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
22
23
  HOOK="$REPO_ROOT/templates/.git-hooks/pre-commit"
@@ -8,6 +8,7 @@
8
8
  # silently disarming the Destructive-Op gate on a branch-delete / force push.
9
9
  #
10
10
  # This test reproduces the mechanism (not just greps for the fix), then asserts the fix is present.
11
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
11
12
  set -uo pipefail
12
13
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
13
14
  HOOK="$ROOT/templates/.git-hooks/pre-push"
@@ -3,6 +3,7 @@
3
3
  # πŸŸ₯ 이 ν›…μ˜ μ‚¬ν™œμ€ Β«λ§‰λ‚˜Β» κ°€ μ•„λ‹ˆλΌ **Β«μ†ŒμŒμ΄ μ•„λ‹Œκ°€Β»** λ‹€. λƒ‰λ…μžκ°€ μ§€λͺ©ν•œ 자기무λ ₯ν™” 경둜:
4
4
  # νŠΈλ¦¬κ±°κ°€ λΆ€μ •ν™•ν•˜λ©΄ ν•˜λ£¨ μˆ˜μ‹­ 번 뜨고, 3회 거절 μ–΅μ œκ°€ μ˜€μ „ 쀑에 μΌœμ Έμ„œ κΈ°λŠ₯이 쑰용히 μ£½λŠ”λ‹€.
5
5
  # κ·Έλž˜μ„œ μŒμ„± 레인이 양성보닀 λ§Žλ‹€.
6
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
6
7
  set -uo pipefail
7
8
  FH="$(cd "$(dirname "$0")/.." && pwd)"
8
9
  H="$FH/scripts/prior_art_prompt.sh"
@@ -10,6 +10,7 @@
10
10
  # λ ˆμΈμ€ **ν•©μ„± 레포**λ₯Ό μ§“λŠ”λ‹€ β€” 라이브 레포λ₯Ό sim λŒ€μƒμœΌλ‘œ μ“°μ§€ μ•ŠλŠ”λ‹€.
11
11
  #
12
12
  # μ‹€ν–‰: bash scripts/test_prless_delta_scan_lanes.sh
13
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
13
14
  set -uo pipefail
14
15
 
15
16
  HERE="$(cd "$(dirname "$0")" && pwd)"
@@ -25,6 +25,7 @@
25
25
  #
26
26
  # exit: 0 = all lanes as expected Β· 1 = regression Β· 10 = harness error (setup failed, not a verdict)
27
27
 
28
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
28
29
  set -uo pipefail
29
30
 
30
31
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -19,6 +19,7 @@
19
19
  #
20
20
  # Verdict is the exit code. Never parse a summary line for it.
21
21
 
22
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
22
23
  set -uo pipefail
23
24
 
24
25
  REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
@@ -4,6 +4,7 @@
4
4
  # πŸŸ₯ Β«FAIL 0Β» 이 «검사가 λ„λŠ” 것» 을 증λͺ…ν•˜μ§€ μ•ŠλŠ”λ‹€. ν•©μ„± 레포 ν”½μŠ€μ²˜λ‘œ μ–‘Β·μŒμ„±μ„ λ‘˜ λ‹€ 보인닀.
5
5
  # πŸŸ₯ 그리고 컨트둀이 **μ‚΄μ•„ μžˆλŠ”μ§€** λ₯Ό κ°’μœΌλ‘œ μ°λŠ”λ‹€ β€” 죽은 μ»¨νŠΈλ‘€μ€ κΉ¨λ—ν•œ λŒ€μƒμ˜ 0 κ³Ό
6
6
  # λ˜‘κ°™μ΄ 생겼닀([[feedback_catches_come_from_two_signals_disagreeing]]).
7
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
7
8
  set -u
8
9
  SRC_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
9
10
  PASS=0; FAIL=0
@@ -142,6 +143,77 @@ out=$(RMG_GUARD_FILE=templates/_tiny.sh run); rc=$?
142
143
  [ "$rc" -eq 10 ] && ok "H2: λ°°μ—΄ μΆ”μΆœμ΄ 5개 미만이면 rc=10 (νŒŒμ„œ νŒŒμ†μ„ Β«μžμ‚° μ—†μŒΒ» 으둜 μ•ˆ μ½λŠ”λ‹€)" \
143
144
  || ng "H2 어긋남 (rc=$rc) β€” κΉ¨μ§„ νŒŒμ„œκ°€ 쑰용히 ν†΅κ³Όμ‹œν‚¨λ‹€"
144
145
 
146
+ echo
147
+ echo "== push μ‹€ν–‰μ˜ PR λ³Έλ¬Έ 쑰회 (AQ-20261114-10 β€” 같은 HEAD 두 νŒμ •) =="
148
+ # πŸŸ₯ #1095 Β· #1103: λ§ˆμ»€κ°€ PR λ³Έλ¬Έμ—λ§Œ 있으면 pull_request 싀행은 초둝인데 push 싀행은 λΉ¨κ°•μ΄μ—ˆλ‹€.
149
+ # push 싀행은 이벀트 본문이 μ—†μ–΄μ„œλ‹€. κ°€μ§œ gh 둜 쑰회 응닡을 꽂아 λ‹€μ„― 갈래λ₯Ό κ°€λ₯Έλ‹€.
150
+ FAKEGH="$TMPD/fakegh"; mkdir -p "$FAKEGH"
151
+ mkgh(){ # $1=이름 $2=λͺ¨λ“œ(json|fail|garbage) $3=json λ³Έλ¬Έ
152
+ printf '#!/usr/bin/env bash\n' > "$FAKEGH/$1"
153
+ case "$2" in
154
+ json) printf 'cat <<'"'"'JSON'"'"'\n%s\nJSON\n' "$3" >> "$FAKEGH/$1" ;;
155
+ fail) printf 'echo "HTTP 502: Bad Gateway" >&2; exit 1\n' >> "$FAKEGH/$1" ;;
156
+ garbage) printf 'echo "<html>not json</html>"\n' >> "$FAKEGH/$1" ;;
157
+ esac
158
+ chmod +x "$FAKEGH/$1"
159
+ }
160
+ BODY_JSON=$(python3 -c 'import json,sys; print(json.dumps(sys.argv[1]))' "$(printf '%s' "$FULL" | sed 1,2d)")
161
+ mk claude/frontier-auto-push plugins/fh-meta/skills/demo/SKILL.md "frontier-auto: λ§ˆμ»€λŠ” PR λ³Έλ¬Έμ—λ§Œ"
162
+ PBR=$(git rev-parse --abbrev-ref HEAD)
163
+ mkgh ok json "[{\"head\":{\"ref\":\"$PBR\",\"repo\":{\"full_name\":\"o/r\"}},\"body\":$BODY_JSON}]"
164
+ mkgh fork json "[{\"head\":{\"ref\":\"$PBR\",\"repo\":{\"full_name\":\"x/fork\"}},\"body\":$BODY_JSON}]"
165
+ mkgh nulle json "[null]"
166
+ mkgh noref json "[{\"head\":{},\"body\":$BODY_JSON}]"
167
+ mkgh norepo json "[{\"head\":{\"ref\":\"$PBR\",\"repo\":null},\"body\":$BODY_JSON}]"
168
+ mkgh empty json "[]"
169
+ mkgh other json "[{\"head\":{\"ref\":\"claude/someone-else\",\"repo\":{\"full_name\":\"o/r\"}},\"body\":$BODY_JSON}]"
170
+ mkgh fail fail
171
+ mkgh junk garbage
172
+ plook(){ RMG_PR_LOOKUP=1 RMG_REPO=o/r RMG_GH="$FAKEGH/$1" RMG_BASE_REF=_base RMG_HEAD_REF="$PBR" bash "${2:-scripts/remote_marker_gate.sh}" 2>&1; }
173
+ out=$(plook ok); rc=$?
174
+ if [ "$rc" -eq 0 ] && printf '%s' "$out" | /usr/bin/grep -q "PR($PBR) 1 개 본문"; then
175
+ ok "L1 (a) push + 이 채널 PR 본문에 마컀 β†’ rc=0 (pull_request μ‹€ν–‰κ³Ό 같은 νŒμ •)"
176
+ else ng "L1 어긋남 (rc=$rc) β€” push 싀행이 PR 본문을 λͺ» μ½λŠ”λ‹€: $(printf '%s' "$out" | tail -2)"; fi
177
+ out=$(plook empty); rc=$?
178
+ [ "$rc" -eq 1 ] && printf '%s' "$out" | /usr/bin/grep -q "PR 이 μ—†λ‹€" \
179
+ && ok "L2 (c) push + PR μ—†μŒ + 컀밋에 마컀 μ—†μŒ β†’ rc=1 (λΉ¨κ°• μœ μ§€)" \
180
+ || ng "L2 어긋남 (rc=$rc) β€” PR μ—†λŠ” push κ°€ ν†΅κ³Όν•œλ‹€"
181
+ out=$(plook other); rc=$?
182
+ [ "$rc" -eq 1 ] && ok "L3 (d) 같은 컀밋을 ν’ˆμ€ Β«λ‚¨μ˜ 채널» PR λ³Έλ¬ΈμœΌλ‘œλŠ” 톡과 μ•ˆ ν•œλ‹€ β†’ rc=1" \
183
+ || ng "L3 어긋남 (rc=$rc) β€” λ‹€λ₯Έ head ref 의 본문을 기둝으둜 μ…Œλ‹€"
184
+ out=$(plook fail); rc=$?
185
+ [ "$rc" -eq 10 ] && printf '%s' "$out" | /usr/bin/grep -q "PR μ‘°νšŒκ°€ μ‹€νŒ¨" \
186
+ && ok "L4 (e) PR 쑰회 μ‹€νŒ¨ β†’ rc=10 λΉ¨κ°• (Β«PR μ—†μŒΒ» 으둜 μ•ˆ μ ‘λŠ”λ‹€)" \
187
+ || ng "L4 어긋남 (rc=$rc) β€” 쑰회 μ‹€νŒ¨κ°€ νŒμ •μœΌλ‘œ μ ‘ν˜”λ‹€"
188
+ out=$(plook junk); rc=$?
189
+ [ "$rc" -eq 10 ] && ok "L5 (e') 쑰회 응닡이 JSON 이 μ•„λ‹ˆλ©΄ rc=10" \
190
+ || ng "L5 어긋남 (rc=$rc) β€” κΉ¨μ§„ 응닡을 Β«PR μ—†μŒΒ» 으둜 μ½μ—ˆλ‹€"
191
+ out=$(plook fork); rc=$?
192
+ [ "$rc" -eq 1 ] && ok "L3b 같은 브랜치 μ΄λ¦„μ˜ «포크» PR λ³Έλ¬ΈμœΌλ‘œλŠ” 톡과 μ•ˆ ν•œλ‹€ β†’ rc=1 (codex R1)" \
193
+ || ng "L3b 어긋남 (rc=$rc) β€” 포크 PR 본문을 기둝으둜 μ…Œλ‹€"
194
+ out=$(plook nulle); rc=$?
195
+ [ "$rc" -eq 10 ] && ok "L5b 응닡 ν•­λͺ©μ΄ 깨쑌으면([null]) rc=10 β€” 쑰용히 버리지 μ•ŠλŠ”λ‹€ (codex R1)" \
196
+ || ng "L5b 어긋남 (rc=$rc) β€” κΉ¨μ§„ ν•­λͺ©μ„ Β«PR μ—†μŒΒ» 으둜 μ½μ—ˆλ‹€"
197
+ for _m in noref norepo; do
198
+ out=$(plook "$_m"); rc=$?
199
+ [ "$rc" -eq 10 ] && ok "L5c 응닡 ν•­λͺ©μ— head.ref / head.repo κ°€ μ—†μœΌλ©΄($_m) rc=10 (codex R2)" \
200
+ || ng "L5c 어긋남 ($_m rc=$rc) β€” 귀속 λΆˆκ°€ ν•­λͺ©μ„ Β«PR μ—†μŒΒ» 으둜 μ½μ—ˆλ‹€"
201
+ done
202
+ out=$(RMG_PR_LOOKUP=1 RMG_GH="$FAKEGH/ok" RMG_BASE_REF=_base RMG_HEAD_REF="$PBR" bash scripts/remote_marker_gate.sh 2>&1); rc=$?
203
+ [ "$rc" -eq 10 ] && ok "L6 RMG_REPO 없이 쑰회 λͺ¨λ“œ β†’ rc=10 (쑰회 λΆˆκ°€λ₯Ό ν†΅κ³Όλ‘œ μ•ˆ μ½λŠ”λ‹€)" \
204
+ || ng "L6 어긋남 (rc=$rc)"
205
+ # 되돌림 known-pair: 쑰회 λΈ”λ‘λ§Œ 끈 μ‚¬λ³Έμ—μ„œ L1 이 λΉ¨κ°œμ Έμ•Ό κ·Έ 블둝이 μΌν•œλ‹€.
206
+ sed -E 's/^if \[ -z "\$BODY_FILE" \] && \[ "\$\{RMG_PR_LOOKUP:-0\}" = "1" \]; then$/if false; then/' \
207
+ scripts/remote_marker_gate.sh > scripts/_nolookup.sh
208
+ if /usr/bin/grep -q '^if false; then$' scripts/_nolookup.sh; then
209
+ out=$(plook ok scripts/_nolookup.sh); rc=$?
210
+ [ "$rc" -eq 1 ] && ok "R2 되돌림: 쑰회 블둝을 끄면 L1 이 rc=1 λΉ¨κ°• β†’ κ·Έ 블둝이 push νŒμ •μ„ λ°”κΎΌλ‹€" \
211
+ || ng "R2: 꺼도 rc=$rc β€” λ‹€λ₯Έ 것이 L1 을 ν†΅κ³Όμ‹œν‚¨λ‹€(액컀 귀속 ν‹€λ¦Ό)"
212
+ else
213
+ ng "R2 계기 였λ₯˜ β€” 되돌림 μΉ˜ν™˜μ΄ μ•ˆ λ¨Ήμ—ˆλ‹€. ν”„λ‘œλΈŒκ°€ μ£½μ—ˆλ‹€"
214
+ fi
215
+ rm -f scripts/_nolookup.sh
216
+
145
217
  echo
146
218
  echo "== 되돌림 ν”„λ‘œλΈŒ β€” 액컀가 μž₯식인가 =="
147
219
  # ν•„μˆ˜ ν•„λ“œ 루프λ₯Ό 무λ ₯ν™”ν•œ μ‚¬λ³ΈμœΌλ‘œ P1 을 λ‹€μ‹œ λŒλ¦°λ‹€. 적색이 초둝이 λ˜μ–΄μ•Ό Β«κ·Έ 쀄이 μΌν•œλ‹€Β».
@@ -181,6 +253,31 @@ else
181
253
  /usr/bin/grep -q 'remote_marker_gate.sh' "$WF" \
182
254
  && ok "W2: validate.yml 이 remote_marker_gate.sh λ₯Ό μ‹€μ œλ‘œ λΆ€λ₯Έλ‹€(배선됨)" \
183
255
  || ng "W2: κ²Œμ΄νŠΈκ°€ CI 에 λ°°μ„  μ•ˆ 됐닀 β€” 산문이 μ‹€ν–‰κΈ°λ‹€"
256
+ # W3 은 Β«κΈ€μžκ°€ μžˆλ‚˜Β» κ°€ μ•„λ‹ˆλΌ Β«κ·Έ μŠ€ν…μ˜ env 값이 그것인가» λ₯Ό YAML 둜 μ½λŠ”λ‹€(codex R2 β€” 주석 μ²˜λ¦¬ν•œ 쀄도 grep μ—” λ‚¨λŠ”λ‹€).
257
+ w3(){ python3 - "$1" <<'PY'
258
+ import sys
259
+ try:
260
+ import yaml
261
+ except ImportError:
262
+ print("NO-YAML"); sys.exit(3)
263
+ wf = yaml.safe_load(open(sys.argv[1], encoding="utf-8"))
264
+ want = "${{ github.event_name == 'push' && '1' || '0' }}"
265
+ for job in (wf.get("jobs") or {}).values():
266
+ for st in job.get("steps") or []:
267
+ if str(st.get("name", "")).startswith("Floorless-channel"):
268
+ env = st.get("env") or {}
269
+ sys.exit(0 if env.get("RMG_PR_LOOKUP") == want and env.get("RMG_REPO") and env.get("GH_TOKEN") else 1)
270
+ sys.exit(2)
271
+ PY
272
+ }
273
+ w3 "$WF" >/dev/null; w3rc=$?
274
+ sed -E 's/^([[:space:]]+)RMG_PR_LOOKUP:/\1# RMG_PR_LOOKUP:/' "$WF" > "$TMPD/wf_mut.yml"
275
+ w3 "$TMPD/wf_mut.yml" >/dev/null; w3m=$?
276
+ if [ "$w3rc" -eq 0 ] && [ "$w3m" -eq 1 ] && /usr/bin/grep -q '# RMG_PR_LOOKUP:' "$TMPD/wf_mut.yml"; then
277
+ ok "W3: Floorless μŠ€ν… env 에 push μ‘°νšŒκ°€ 배선됐닀 Β· κ·Έ 쀄을 주석 μ²˜λ¦¬ν•œ 사본은 λΉ¨κ°•(되돌림 컨트둀 μ‚΄μ•„ 있음)"
278
+ else
279
+ ng "W3: push 쑰회 λ°°μ„  νŒμ • 어긋남 (μ‹€λ¬Ό rc=$w3rc Β· 주석 사본 rc=$w3m β€” 3 = PyYAML μ—†μŒ Β· 2 = μŠ€ν… λͺ» 찾음)"
280
+ fi
184
281
  fi
185
282
 
186
283
  echo
@@ -2,6 +2,7 @@
2
2
  # test_residency_admission_lanes.sh β€” residency_admission_check.sh 의 known-pair 레인.
3
3
  # πŸŸ₯ 컨트둀(κ°λŸ‰Β·λ¬΄λ³€κ²½)이 μ—†μœΌλ©΄ Β«μ˜€νƒμ΄ μžˆλ‚˜Β» λ₯Ό λͺ» μž°λ‹€. 차단 레인만 μžˆλŠ” μŠ€μœ„νŠΈλŠ”
4
4
  # γ€Œλ§‰ν˜”λ‹€γ€λ§Œ 증λͺ…ν•˜κ³  γ€Œμ˜³κ²Œ λ§‰ν˜”λ‹€γ€λŠ” λͺ» 증λͺ…ν•œλ‹€(`feedback_gate_verification_must_execute`).
5
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
5
6
  set -uo pipefail
6
7
  CHECK="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/residency_admission_check.sh}"
7
8
  # πŸŸ₯ μ ˆλŒ€κ²½λ‘œλ‘œ κ³ μ •ν•œλ‹€. 각 λ ˆμΈμ€ μž„μ‹œ λ””λ ‰ν„°λ¦¬λ‘œ `cd` ν•˜λ―€λ‘œ μƒλŒ€κ²½λ‘œλ₯Ό λ°›μœΌλ©΄
@@ -20,6 +20,7 @@
20
20
  #
21
21
  # Usage: bash scripts/test_revert_probe_lanes.sh
22
22
 
23
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
23
24
  set -uo pipefail
24
25
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
25
26
  SUT="${FH_REVERT_PROBE_BIN:-$ROOT/scripts/revert_probe.sh}"
@@ -39,6 +39,7 @@
39
39
  #
40
40
  # Usage: bash scripts/test_reviewer_capability_conformance.sh Exit: 0 = conforms; 1 = drift.
41
41
 
42
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
42
43
  set -uo pipefail
43
44
  # Script-relative, NOT `git rev-parse --show-toplevel`. Measured 2026-08-13 in a vendored tree
44
45
  # (npm install, then `git init` at a level above β€” a monorepo committing node_modules is the
@@ -20,6 +20,7 @@
20
20
  #
21
21
  # Exit 0 = all lanes hold Β· 1 = a discriminator would mis-route.
22
22
 
23
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
23
24
  set -uo pipefail
24
25
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
25
26
  SELFCHECK="$SCRIPT_DIR/selfcheck.sh"
@@ -23,6 +23,7 @@
23
23
  #
24
24
  # Exit 0 = every asserting lane calibrated Β· exit 1 = the gate's instrument is wrong.
25
25
 
26
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
26
27
  set -uo pipefail
27
28
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
28
29
  ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -24,6 +24,7 @@
24
24
  # Exit 0 = 8/8 lanes calibrated Β· exit 1 = the gate's instrument is wrong (do not trust its verdict)
25
25
  # exit 3 = FIXTURE ERROR β€” a lane's premise never obtained, so this run's verdicts prove nothing
26
26
 
27
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
27
28
  set -uo pipefail
28
29
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
29
30
  # πŸŸ₯ ENVIRONMENT ISOLATION (2026-08-27) β€” the suite inherited FH_COMPANION_STORE from the
@@ -99,6 +100,13 @@ _lane "β‘€c-M Β«## πŸŸ₯ 이 μƒˆλ²½μ΄ μž‘μ€ 것» is not the section" "$CA"
99
100
  - x')"
100
101
  _lane "β‘€c-C no fh_completed file β†’ no β‘€-catches line" 'β‘€-catches' 0 "$(_fixture 0 '')"
101
102
 
103
+ # β‘€-done-anchor record-only line (2026-11-14): bare Β«μ™„λ£ŒΒ» is named; an anchored one is not
104
+ DA='β“˜ β‘€-done-anchor'
105
+ _lane "β‘€d-N bare Β«μ™„λ£ŒΒ» line β†’ named" "$DA" 1 "$(_fixture 0 '- 수리 μ™„λ£Œ')"
106
+ _lane "β‘€d-P Β«μ™„λ£ŒΒ» with PR + sha β†’ silent" "$DA" 0 "$(_fixture 0 '- 수리 μ™„λ£Œ β€” #1097 merged a1b2c3d4')"
107
+ _lane "β‘€d-P2 Β«μ™„λ£ŒΒ» with a file path β†’ silent" "$DA" 0 "$(_fixture 0 '- λ¬Έμ„œ μ™„λ£Œ scripts/foo.sh Β· λ―Έν•΄κ²°: μ—†μŒ')"
108
+ _lane "β‘€d-C no done-word at all β†’ silent" "$DA" 0 "$(_fixture 0 '- ν•­λͺ© ν•˜λ‚˜')"
109
+
102
110
  # β‘€ card-last fixture premise β€” the two β‘€ lanes are ORDERING lanes: each asserts what the subject
103
111
  # does when one file is strictly newer than another. Establishing that ordering by writing one file
104
112
  # after the other is not establishing it β€” it is hoping for it.
@@ -11,6 +11,7 @@
11
11
  # case that is NOT provably old-and-identical (L2–L6, L8–L11) must still be listed. L0 is the instrument
12
12
  # control β€” the hook actually reached the freshness block β€” so a script that dies early cannot
13
13
  # pass L1 by printing nothing.
14
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
14
15
  set -uo pipefail
15
16
  HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
17
  SUBJECT="$HERE/fh_session_load.sh"
@@ -25,6 +25,7 @@
25
25
  #
26
26
  # Usage: bash scripts/test_sim_isolated_run_lanes.sh
27
27
 
28
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
28
29
  set -uo pipefail
29
30
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
30
31
  SUT="${FH_SIM_RUNNER_BIN:-$ROOT/scripts/sim_isolated_run.sh}"
@@ -6,6 +6,7 @@
6
6
  # NOT enough β€” B must explicitly fetch to know it is behind, so the fixture fetches for it; the
7
7
  # no-fetch env only skips the guard's own network call) and a private marker dir per lane.
8
8
 
9
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
9
10
  set -u
10
11
  G="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/stale_clone_guard.sh"
11
12
  pass=0; fail=0
@@ -17,6 +17,7 @@
17
17
  # restated here: a restated copy drifts from the thing it claims to verify.
18
18
  # πŸŸ₯ No network. The subject under test is the caller, so the scanner is a stub whose verdict
19
19
  # line is the lane's input β€” a live scan would make these lanes depend on Zenodo's state.
20
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
20
21
  set -uo pipefail
21
22
 
22
23
  REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -17,6 +17,7 @@
17
17
  #
18
18
  # Exit 0 = the guard discriminates Β· 1 = it would let a mismatched tag through, or block a good one.
19
19
 
20
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
20
21
  set -uo pipefail
21
22
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
22
23
  REPO="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -9,6 +9,7 @@
9
9
  # Every lane runs against a THROWAWAY fixture tree, never against this repo, so the suite is
10
10
  # hermetic: a real bump in progress can neither turn it green nor turn it red.
11
11
 
12
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
12
13
  set -uo pipefail
13
14
  CHECK="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/version_lockstep_check.sh"
14
15
  TMPROOT=$(mktemp -d "${TMPDIR:-/tmp}/fh_lockstep.XXXXXX")
@@ -19,6 +19,7 @@
19
19
  # β“˜ GAP lanes pin behaviour believed wrong without failing the suite.
20
20
  # Exit 0 = calibrated Β· 1 = the instrument (or the extraction) is wrong.
21
21
 
22
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
22
23
  set -uo pipefail
23
24
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
24
25
  ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
@@ -3,6 +3,7 @@
3
3
  # Fixture: a real `git init` main checkout + a real `git worktree add`, gitignored tracks/ on both sides.
4
4
  # The lanes assert the ORDER (list file before copy) as well as the verdicts β€” the list is the evidence
5
5
  # that survives the copy, which is the whole reason the script exists.
6
+ . "$(dirname "${BASH_SOURCE[0]}")/fixture_guard_lib.sh" # scrub inherited GIT_* env first (#1088)
6
7
  set -uo pipefail
7
8
  cd "$(dirname "$0")/.." || exit 1
8
9
  ROOT="$(pwd -P)"