@chrono-meta/fh-gate 3.27.0 โ 3.29.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.
- package/.claude-plugin/marketplace.json +4 -4
- package/CHEATSHEET.md +2 -2
- package/CLAUDE.md +6 -3
- package/README.ja.md +2 -4
- package/README.ko.md +2 -4
- package/README.md +19 -19
- package/README.zh.md +2 -4
- package/docs/REFERENCE.md +4 -1
- package/knowledge/shared/harness-core/claude_md_full_reference.md +2 -0
- package/knowledge/shared/harness-core/claude_md_gate_details.md +7 -0
- package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +12 -0
- package/knowledge/shared/harness-core/fh_module_contract.md +97 -0
- package/knowledge/shared/harness-core/fh_three_layer_canon.md +12 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +16 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +137 -0
- package/package.json +12 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +84 -4
- package/plugins/fh-commons/skills/ko-tech-writer/fh-module.yaml +19 -0
- package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_negative.md +73 -1
- package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_positive.md +39 -1
- package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_unclosed.md +6 -0
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +32 -0
- package/plugins/fh-meta/skills/auto-decorrelation/SKILL.md +17 -0
- package/plugins/fh-meta/skills/frontier-digest/SKILL.md +14 -10
- package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +17 -1
- package/plugins/fh-meta/skills/sim-conductor/SKILL.md +2 -2
- package/plugins/fh-meta/skills/sim-conductor/SKILL_detail.md +3 -3
- package/plugins/fh-meta/skills/steel-quench/SKILL.md +25 -1
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/degrade_direction_scan.sh +43 -0
- package/scripts/dispatch_receipt.py +185 -0
- package/scripts/doc_claim_triad_scan.py +43 -4
- package/scripts/fh-gate.sh +71 -11
- package/scripts/fh_module_check.py +686 -0
- package/scripts/finding_fleet.sh +15 -3
- package/scripts/fixtures/frontier_digest_recall.tsv +5 -0
- package/scripts/ko_tech_writer_calibrate.py +288 -15
- package/scripts/package_coverage_check.sh +5 -0
- package/scripts/probe_live_eval.sh +19 -1
- package/scripts/probe_live_eval_lib.py +174 -5
- package/scripts/resident_cost.py +1 -1
- package/scripts/selfcheck.sh +48 -21
- package/scripts/session_checklist.py +214 -5
- package/scripts/session_close_check.sh +44 -0
- package/scripts/sim_isolated_run.sh +31 -0
- package/scripts/test_claude_md_size_lanes.sh +22 -7
- package/scripts/test_degrade_scan_shell_probes.sh +81 -0
- package/scripts/test_dispatch_receipt_lanes.sh +95 -0
- package/scripts/test_doc_claim_triad_lanes.sh +30 -0
- package/scripts/test_fh_audit_check_lanes.sh +10 -5
- package/scripts/test_fh_gate_regressions.sh +71 -1
- package/scripts/test_fh_module_check_lanes.sh +581 -0
- package/scripts/test_finding_pipeline_lanes.sh +83 -0
- package/scripts/test_frontier_digest_recall.sh +26 -0
- package/scripts/test_frontier_digest_recall_negctl.sh +15 -0
- package/scripts/test_ko_tech_writer_lanes.sh +1 -1
- package/scripts/test_locale_invariance_lanes.sh +19 -0
- package/scripts/test_mutation_probe_lanes.sh +22 -6
- package/scripts/test_probe_live_eval_lanes.sh +116 -0
- package/scripts/test_resident_cost_lanes.sh +1 -1
- package/scripts/test_selfcheck_state_lanes.sh +32 -0
- package/scripts/test_session_checklist_lanes.sh +167 -0
- package/scripts/test_sim_isolated_run_lanes.sh +51 -0
- package/scripts/test_utterance_checklist_hook_lanes.sh +175 -0
- package/scripts/utterance_checklist_hook.py +193 -0
- package/scripts/utterance_checklist_hook.sh +31 -0
- package/templates/PRE-PUBLISH-CHECKLIST.md +10 -0
- package/templates/degrade_direction_scan.sh +43 -0
package/scripts/finding_fleet.sh
CHANGED
|
@@ -142,7 +142,7 @@ with open(sys.argv[2], "w", encoding="utf-8") as w:
|
|
|
142
142
|
eval "$cmd" < "$pf" > "$raw" 2>"$out/err2_${fam}_${role}.txt"
|
|
143
143
|
local rc=$?
|
|
144
144
|
FAM="$fam" ROLE="$role" RC="$rc" /usr/bin/python3 - "$raw" "$out/part2_${fam}_${role}.jsonl" "$out/findings_r1.jsonl" <<'PYR2'
|
|
145
|
-
import json, os, sys
|
|
145
|
+
import json, os, re, sys
|
|
146
146
|
own_r1 = {} # own round-1 id -> its trusted member_id alias (or None)
|
|
147
147
|
try:
|
|
148
148
|
for _l in open(sys.argv[3], encoding="utf-8"):
|
|
@@ -186,9 +186,21 @@ with open(dst, "w", encoding="utf-8") as w:
|
|
|
186
186
|
line = line.strip().lstrip("\ufeff")
|
|
187
187
|
if line.startswith("DROPPED:"):
|
|
188
188
|
_body = line[len("DROPPED:"):]
|
|
189
|
+
# ๐ฅ A DROPPED line withdraws ONE finding: the one its body STARTS with (id or title, the longest that
|
|
190
|
+
# fits, followed by a non-[A-Za-z0-9_-] char or the end). Searching the whole line used to withdraw
|
|
191
|
+
# every finding merely named in it โ ยซcodex-logic-10ยป took ยซcodex-logic-1ยป, title ยซQ10ยป took ยซQ1ยป,
|
|
192
|
+
# ยซโฆ Race condition remains validยป took ยซRace conditionยป โ and the silently omitted finding then
|
|
193
|
+
# counted as accounted for, so no fallback ran (L125โL127, 2026-10-22, codex R1). An unrecognised
|
|
194
|
+
# withdrawal falls back to round 1 (the safe side). ASCII boundary so ยซcodex-logic-1์ยป still counts.
|
|
195
|
+
_head = _body.strip().lstrip("\"'`*#([ ").strip()
|
|
196
|
+
_best = None
|
|
189
197
|
for _id, _t in own_r1_titles.items():
|
|
190
|
-
|
|
191
|
-
|
|
198
|
+
for _ref in (_id, _t):
|
|
199
|
+
if _ref and _head.startswith(_ref) and not re.match(r"[A-Za-z0-9_-]", _head[len(_ref):len(_ref) + 1]):
|
|
200
|
+
if _best is None or len(_ref) > len(_best[1]):
|
|
201
|
+
_best = (_id, _ref)
|
|
202
|
+
if _best:
|
|
203
|
+
withdrawn_ids.add(_best[0])
|
|
192
204
|
# ๐ฅ saw_bytes ๋ฅผ ์ฌ๊ธฐ์ ยซ์ฌ๋ฆฌ์ง ์๋๋คยป. DROPPED ๋ 2์ฐจ ๊ณ์ฝ์ด ์๊ตฌํ ์ถ๋ ฅ์ด๋ฏ๋ก
|
|
193
205
|
# ใ๊ณ์ฝ ๋ฐ ์๋ตใ์ ์ฆ๊ฑฐ๊ฐ ๋ ์ ์๋ค (cross-family #5, codex 2026-09-10).
|
|
194
206
|
# ๐ฅ "DROPPED: none" ์ ์ญ์ ๊ฐ ์๋๋ค. ์ธ๋ฉด ยซ์จ์ ์ํ ์์คยป ๊ณ์ธก์ด ๊ทธ ์๋ฆฌ์์ ๊ฑฐ์ง์ด ๋๋ค.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# item<TAB>kind<TAB>announced-on channel ids (comma-separated; at least ONE must be in SKILL.md Step 1)
|
|
2
|
+
# Known-positive recall set. Channel assignments are the operator-reported/expected venues, not live-verified.
|
|
3
|
+
Aside agent browser (YC-backed) launch-yc,product-hunt
|
|
4
|
+
Orca agent orchestration show-hn,product-hunt,geeknews
|
|
5
|
+
Context7 docs MCP show-hn,product-hunt,geeknews
|
|
@@ -21,7 +21,10 @@ Python `re` ๋ โ ์ธ ํ์ฉ ์์ง ์ค **์ด๋์๋ ์๋ ์ ์ผํ ๊ฒ**
|
|
|
21
21
|
โ ์ด๊ฑธ ํต๊ณผํ๋ค๊ณ ยซStep 2 ์์ฌ 0ยป ์ ์ฃผ์ฅํ๋ฉด
|
|
22
22
|
`harness_terminal_correlation_and_recommendations.md` ์ ๊ฐ๋ฑ ์ฌ์ ๊ฐ ๊ทธ๋๋ก ์ฌ๋ฐํ๋ค.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
์ฌ์ฉ: python3 ko_tech_writer_calibrate.py (๋ณด์ )
|
|
25
|
+
python3 ko_tech_writer_calibrate.py --scan ๋ฌธ์.md (๊ฐ์ ๋ ์ธยทํํฐ๋ก ๋ฌธ์ ์ค์บ, ์ค\t๋ ์ธ\t๋ณธ๋ฌธ)
|
|
26
|
+
|
|
27
|
+
exit: 0 ์ ๋ ์ธ ํ๋ณ ยท 1 ํ๋ณ ์คํจ(ํฝ์ค์ฒ ๋ถ์ฌ ํฌํจ โ known_unclosed.md ๊ฐ ์์ผ๋ฉด 1) ยท 3 --scan ๋์์ ์ ๋ซํ ๋ธ๋ก ยท 10 harness error(์
๋ ฅ ์ค๋ฅ)
|
|
25
28
|
"""
|
|
26
29
|
import os
|
|
27
30
|
import re
|
|
@@ -30,6 +33,7 @@ import sys
|
|
|
30
33
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
31
34
|
FIX = os.path.join(HERE, "..", "plugins", "fh-commons", "skills", "ko-tech-writer", "fixtures")
|
|
32
35
|
POS = os.path.join(FIX, "known_positive.md")
|
|
36
|
+
UNC = os.path.join(FIX, "known_unclosed.md")
|
|
33
37
|
NEG = os.path.join(FIX, "known_negative.md")
|
|
34
38
|
|
|
35
39
|
# (๋ผ๋ฒจ, ํจํด) โ Step 2 ์ 5ํด๋์ค + Step 4-b ์ 2ํจํด.
|
|
@@ -56,27 +60,235 @@ LANES = [
|
|
|
56
60
|
# ๋ซํ ๋ช
์ฌ ์ดํ๋ผ **recall ์ด ๋ฎ๋ค** โ ๋ฎ์ ์ชฝ์ด ๊ณผ์ฐจ๋จ๋ณด๋ค ์์ ํ ๋ฐฉํฅ์ด๊ณ ,
|
|
57
61
|
# ๋ํ๋ ค๋ฉด ์ดํ๋ฅผ ๋๋ฆฌ๋ ๊ฒ ์๋๋ผ ํํ์ ๋ถ์์ด ํ์ํ๋ค.
|
|
58
62
|
("C4 ์กฐ๊ฐ๋ฌธ(ํ๋ณดยท๋ซํ ์ดํ)", r"(์ธต|๊ฒ|์ |์ถ|๊ฑด|๋ฟ|๋ฐ|์
)\.\s*(<!--|$)"),
|
|
59
|
-
(
|
|
63
|
+
# ๊ฐ์ถ๋ค(์ ์ฐจ๋ฅผ ๊ฐ์ถ ๊ฒํ )๋ ยซhaveยป ์ง์ญ์ด ์๋๋ค โ `๊ฐ(?!์ถ|์ถ|์ถโฆ)` ๋ก ๋บ๋ค (๊ฐ์ถยท๊ฐ์ถยท๊ฐ์ถฐ ํํ ํฌํจ โ ์ฒซํ `๊ฐ(?!์ถ)` ๋ ยซ๊ฐ์ถยป ์ ๋ชป ๋บ๋ค)(tuning doc 1๊ฑด์์ 2๊ฑด ์คํ, ๋ณด๊ณ ์นยทn=1ยท๋
๋ฆฝ ์๋).
|
|
64
|
+
("C5 ์์ ์ง์ญ", r"(์|๋ฅผ) ?(๊ฐ(?!์ถ|์ถ|์ถ|์ถค|์ถฐ|์ท|์ถฅ)|๊ฐ์ง(?!๋ฐ|๊ฐ|์น))"), # ๊ฐ์ง๋ฐํยท๊ฐ์ง๊ฐ์ยท๊ฐ์ง์น๊ธฐ ๋ ์์ ๊ฐ ์๋๋ค(2์ถ ๋ฆฌ๋ทฐ B1)
|
|
60
65
|
("C6 ์ ์นญ ์ดํ", r"์ ๋ถ|๋ชจ๋|ํ๋๋|์ ํ|์ผ์ |์์ธ ์์ด"),
|
|
61
66
|
("C6b ๋ถ์ ํ ์ ์นญ", r"(์|๋ชป) ?(ํ|๋ง๋ค|๋์ค|์กํ)|์ง ์์(๋ค|์ต๋๋ค)"),
|
|
67
|
+
# โโ ์ธก์ ํด๋์ค (2026-10-17 ์ํ ยง4 (๋ด๋ถ ๊ธฐ๋ก) ์์ ๋ณด์ ํ ์ ๊ท์)
|
|
68
|
+
# ๐ฅ ์๋ ํํธ๋ ์ ๋ถ ยซํ๋ณดยป๋ค. ์ด์์ ์ํธ์ง์ด ์ด ํจํด๋ค๊ณผ ๋ฐ๋๋ก ๊ฐ ์ฌ๋ก๊ฐ ์๋ค(๊ทธ๊ฒ์ ๋ฑ).
|
|
69
|
+
("C7 ๊ฒนํ์ด๊ดํธยท๋ซํ(Y1/Y2)", r"[ยซยปใใใใ]", "skipfig"),
|
|
70
|
+
("C8 ์ ๊ธฐํธ(Y3)", r"ยง"),
|
|
71
|
+
# ๋ถ์ ๋ชฉ๋ก: ์ ๋/๋/๋ฉ/๋จ/๋ผ/ํจ ๋ ์ ์ ์ฉ๋ก(tuning doc 1๊ฑด์์ ์คํ 4๊ฑด ์ ๋ถ ์ด ํํ, ๋ณด๊ณ ์นยทn=1ยท๋
๋ฆฝ ์๋). ๊ทธ๋ฆผ/์ฝ๋ ๋ธ๋ก ์์ ํธ์ง ๋์ ๋ฐ.
|
|
72
|
+
("C9 ์/๋ชป+๋์ฌ(N3ยทํ๋ณดยท๋
ธ์ด์ฆ ํผ)", r"(?<![๊ฐ-ํฃ])(์|๋ชป) (?!(?:๋|๋ผ|๋ฉ๋๋ค|๋ฉ๋๊น|๋๋ค|๋|๋จ|๋๋ค|๋์ต๋๋ค|๋๋|๋๋|๋๋ฉด|๋ผ์|ํจ|ํจ์ผ๋ก|ํจ์|ํจ์ด|ํจ์|ํจ๊ณผ)(?![๊ฐ-ํฃ]))[๊ฐ-ํฃ]{1,6}", "candidate", "skipfig", "neg=1"),
|
|
73
|
+
("C10 ๊ตฌ์ด ์ด์ ์ด๋ฏธ(N4)", r"(๋๊น์|๊ณ ์|๊ฑฐ๋ ์|๋ฌ๋ผ๋์)[*.\s]*(<!--.*)?$"),
|
|
74
|
+
("C11 ๋น์ ยทํ์๋ก(N5)", r"๋น์ |ํ์๋ก\s*(ํฉ|ํ|ํ)"),
|
|
75
|
+
("C12 ๋ผํด ๋ค ์กฐ์ฌ ๋์ด์ฐ๊ธฐ(N9)", r"[A-Za-z0-9)`]\s(๋|์|์ด|๊ฐ|์|๋ฅผ|๋ก|๋ก๋|์|์์|์)(?![๊ฐ-ํฃ])", "skipfig"),
|
|
76
|
+
# โโ 2026-10-17 ์ ๋
์ด์์ ๊ต์ N14ยทN15. ํฉ์ฑ์ด/๋ณตํฉ์ด๋ก๋ง ์ขํ๋ค(์ผ์์ด ๊ฒน์นจ์ ๋ ์ธ์์ ๋บ)
|
|
77
|
+
("C13 ๋ด๋ถ ํฉ์ฑ์ด(N14)", r"๊ณต๊ฒฉ ๋ฐฐํฐ๋ฆฌ|์ด๊ธด ๊ธฐ๋ก|์ดํ ๋ฐฉํฅ ๋ ์ฆ"),
|
|
78
|
+
("C14 ์ํโํ
์คํธ ๋ณตํฉ์ด(N15)", r"(?<![๊ฐ-ํฃ])์ํ\s?(ํ๊ฒฝ|๊ฒฐ๊ณผ|์ผ์ด์ค|์ฝ๋|์๋ํ|ํ๋ค์ค|ํต๊ณผ)"),
|
|
79
|
+
# โโ ๊ฒฝ๋์ฌ ยซ๋ด๋คยป ํ๋ณด (S23 ๋ณ์ข
). ๐ฅ UNCALIBRATED: ใํ์ ์ ๋ด๋ฆฌ๋คใ๋ ๊ด์ฉ๊ตฌ๋ผ ยซ๋ด๋ยป ๋ ์ ์ ์ฉ๋ก๊ฐ ๋ง๋ค โ ๊ณผ์ฐจ๋จ์ด ์์ ๊ฒฐ๊ณผ.
|
|
80
|
+
# ํ๋ณ๋ ฅ์ ์ฃผ์ฅํ์ง ์๋๋ค. ์ก๋ ํํ ๋: ๋ฐ์ดํ ๋ช
์ฌ+๋ฅผ ๋๋ค / ํ์ ์ ๋ด๋.
|
|
81
|
+
("C15 ๊ฒฝ๋์ฌ ๋ด๋ค(ํ๋ณดยทUNCALIBRATED)", r"['โโใยปใ\"`]\s?(์|๋ฅผ) (๋|๋ธ|๋ด๋|๋ผ|๋
)|ํ์ ์ (๋|๋ธ|๋ด๋|๋ผ|๋
)", "candidate", "uncalibrated", "neg=1"),
|
|
82
|
+
# โโ S7 ๋ด๋ถ ์กฐ์ด ํ๋ณด ์ถ์ถ๊ธฐ (ํจ์ lane โ ์ค ํจํด์ด ์๋๋ผ ๋ฌธ์ ์ ์ฒด๋ฅผ ๋ณธ๋ค)
|
|
83
|
+
("C16 ๋ด๋ถ ์กฐ์ด ํ๋ณด(S7ยทํ๋ณด)", None, "s7"),
|
|
62
84
|
]
|
|
63
85
|
|
|
86
|
+
# โโ ์ค ํํฐ: ๊ทธ๋ฆผ/์ฐจํธ ๋ธ๋กยท์ฝ๋ ํ์ค ์์ ์ค์ ํธ์ง ๋์์ด ์๋๋ค (lane 4๋ฒ์งธ ์ธ์ "skipfig")
|
|
87
|
+
# ์ํ๊ธฐ๊ณ๋ค: ํ์ค๋ ``` ์ ~~~ ๋ฅผ ๋ฐ๋ก ๋ซ๊ณ , [๊ทธ๋ฆผ: โฆ] ์ ๋๊ดํธ ๊น์ด๋ก ๋ซ๋๋ค(`[๊ทธ๋ฆผ: x[0] y]` ๊ฐ ์ผ์ฐ ์ ๋ซํ๋ค).
|
|
88
|
+
# ๐ฅ ์ ๋ซํ ๋ธ๋ก์ EOF ๊น์ง ๋ฌธ์๋ฅผ ์ผํจ๋ค โ ํต๊ณ์ open_fence/open_fig ๋ก ๋จ๊ธฐ๊ณ scan ๋ชจ๋๊ฐ ๊ฒฝ๊ณ + ๋น0 ์ข
๋ฃ.
|
|
89
|
+
FIG_OPEN = re.compile(r"\[(?:๊ทธ๋ฆผ|์ฐจํธ):")
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class Blocks(object):
|
|
93
|
+
def __init__(self):
|
|
94
|
+
self.fence = None # "`" | "~" | None
|
|
95
|
+
self.fence_line = 0
|
|
96
|
+
self.depth = 0 # [๊ทธ๋ฆผ: ๋๊ดํธ ๊น์ด
|
|
97
|
+
self.fig_line = 0
|
|
98
|
+
self.total = self.skipped = 0
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _strip(line, st, n):
|
|
102
|
+
"""st ์ํ๋ก line ์ ๋๋ ค๋ธ ๋๋จธ์ง๋ฅผ ๋๋ ค์ค๋ค."""
|
|
103
|
+
ls = line.lstrip()
|
|
104
|
+
if st.fence:
|
|
105
|
+
if ls.startswith(st.fence * 3):
|
|
106
|
+
st.fence = None
|
|
107
|
+
return ""
|
|
108
|
+
if st.depth == 0 and (ls.startswith("```") or ls.startswith("~~~")):
|
|
109
|
+
st.fence, st.fence_line = ls[0], n
|
|
110
|
+
return ""
|
|
111
|
+
out, pos = [], 0
|
|
112
|
+
while True:
|
|
113
|
+
if st.depth > 0:
|
|
114
|
+
while pos < len(line) and st.depth > 0:
|
|
115
|
+
if line[pos] == "[":
|
|
116
|
+
st.depth += 1
|
|
117
|
+
elif line[pos] == "]":
|
|
118
|
+
st.depth -= 1
|
|
119
|
+
pos += 1
|
|
120
|
+
if st.depth > 0:
|
|
121
|
+
return "".join(out)
|
|
122
|
+
m = FIG_OPEN.search(line, pos)
|
|
123
|
+
if not m:
|
|
124
|
+
out.append(line[pos:])
|
|
125
|
+
return "".join(out)
|
|
126
|
+
out.append(line[pos:m.start()])
|
|
127
|
+
st.depth, st.fig_line, pos = 1, n, m.end()
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def iter_lines(lines, skipfig, st):
|
|
131
|
+
for i, raw in enumerate(lines, 1):
|
|
132
|
+
line = raw.rstrip("\n")
|
|
133
|
+
st.total += 1
|
|
134
|
+
if skipfig:
|
|
135
|
+
kept = _strip(line, st, i)
|
|
136
|
+
if kept != line:
|
|
137
|
+
st.skipped += 1
|
|
138
|
+
line = kept
|
|
139
|
+
yield i, line
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def read_lines(path):
|
|
143
|
+
with open(path, encoding="utf-8") as fh:
|
|
144
|
+
return fh.read().split("\n")
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def scan_lines(path, skipfig=False, st=None):
|
|
148
|
+
"""(์ค๋ฒํธ, ์ค) ๋ฅผ ๋ธ๋ค. skipfig ๋ฉด ํ์ค ยท [๊ทธ๋ฆผ:/์ฐจํธ: โฆ] ๋ธ๋ก(์ฌ๋ฌ ์ค ํฌํจ)์ ์ค์์ ๋๋ ค๋ธ๋ค. ํต๊ณ๋ st ์."""
|
|
149
|
+
return iter_lines(read_lines(path), skipfig, st or Blocks())
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def unclosed(st):
|
|
153
|
+
out = []
|
|
154
|
+
if st.fence:
|
|
155
|
+
out.append("code fence (%s) opened at line %d" % (st.fence * 3, st.fence_line))
|
|
156
|
+
if st.depth > 0:
|
|
157
|
+
out.append("[๊ทธ๋ฆผ:/์ฐจํธ: block opened at line %d" % st.fig_line)
|
|
158
|
+
return out
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
# โโ S7 ํ๋ณด ์ถ์ถ๊ธฐ. ๋ฑ๋ง ํ์ ์ด ์๋๋ผ ยซ์ฒซ ๋ฑ์ฅ์ ํ์ด๊ฐ ์๋ยป ๋ง ๋ณธ๋ค. ํํธ๋ ์ ๋ถ ํ๋ณด.
|
|
162
|
+
# ๋๋ฆฌ ์๋ ค์ง ์ฝ์ด๋ ๋
์์ธต์ ๋ฐ๋ผ ๋ค๋ฅด๋ค โ ๊ธฐ๋ณธ ๋ชฉ๋ก์ ๊ธฐ์ ๋
์ ๊ธฐ์ค์ด๊ณ ๋ฌธ์๋ง๋ค ๊ณ ์ณ๋ผ(๋
์์ธต ๋๊ธ์ด ๋จผ์ ).
|
|
163
|
+
# `--scan FILE --s7-common LIST` ๋ก ํต์งธ ๊ต์ฒดํ๋ค(์ค๋น ํ๋, # ์ฃผ์). ๊ธฐ๋ณธ ๋ชฉ๋ก์ ๊ณ ์ ์ด๊ณ ํฝ์ค์ฒ๊ฐ ํญ๋ชฉ ํ๋(MCP)๋ฅผ ๋ชป ๋ฐ๋๋ค.
|
|
164
|
+
S7_COMMON = {"AI", "API", "URL", "HTTP", "HTTPS", "JSON", "YAML", "CLI", "CI", "CD", "PR", "UI", "UX",
|
|
165
|
+
"LLM", "SQL", "HTML", "CSS", "OS", "ID", "QA", "PDF", "CPU", "GPU", "UTF", "SDK", "MCP"}
|
|
166
|
+
ACRO = re.compile(r"(?<![A-Za-z0-9])[A-Z]{2,}[A-Z0-9]*(?![A-Za-z])")
|
|
167
|
+
HEADING = re.compile(r"^\s{0,3}#{1,6}\s")
|
|
168
|
+
COMMENT = re.compile(r"<!--.*?-->", re.S)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def has_gloss(term, line, heading):
|
|
172
|
+
"""์ฒซ ๋ฑ์ฅ ์ค์ ํ์ด๊ฐ ์๋. ๊ดํธ ํ์ด TERM(ํ๊ธโฆ) / ํ๊ธ(TERM) / TERM = / TERM์ยท๋ โฆ ์
๋๋ค.
|
|
173
|
+
์ ๋ชฉ ์ค์ ยซ์ ๋ชฉ ์์ยป ํ์ด๊ฐ ์์ด์ผ ํ๋ค โ ๋ค ๋ณธ๋ฌธ์ ์ ์๋ ยซ์ ์ ์ ์ ์ ๋ชฉ์ ์ผ๋คยป ๋ฅผ ์ง์ฐ์ง ์๋๋ค."""
|
|
174
|
+
t = re.escape(term)
|
|
175
|
+
if re.search(t + r"\s?\([^)]*[๊ฐ-ํฃ][^)]*\)", line):
|
|
176
|
+
return True
|
|
177
|
+
if re.search(t + r"\s?\(\s?[A-Za-z][A-Za-z-]+(\s+[A-Za-z-]+)+\s?\)", line): # CORS(Cross-Origin Resource Sharing) โ ์๋ฌธ ํ์ด๋ ํ์ด๋ค(2์ถ ๋ฆฌ๋ทฐ B3)
|
|
178
|
+
return True
|
|
179
|
+
if re.search(r"[๊ฐ-ํฃ][๊ฐ-ํฃ ]{1,30}\(\s?" + t + r"\s?\)", line):
|
|
180
|
+
return True
|
|
181
|
+
if re.search(t + r"\s?=\s?(?![0-9])", line): # TTL=60 ์ ๊ฐ์ด์ง ํ์ด๊ฐ ์๋๋ค
|
|
182
|
+
return True
|
|
183
|
+
# ์ ์ํ: ยซTERM์ด๋/๋ โฆยป, ๋ปยท์ฝ์ยท์ค์๋ง์ ๋งํ๋ ยซTERM์/๋ โฆยป, ๋๋ ์ค๋ช
์ด 6์ ์ด์์ธ ยซTERM์/๋ โฆ ์
๋๋คยป
|
|
184
|
+
# (ยซRBAC์ ํ์์
๋๋คยป ์ฒ๋ผ ์ ์ด๊ฐ ์งง์ผ๋ฉด ์ ์๊ฐ ์๋๋ค โ 2์ถ ๋ฆฌ๋ทฐ B3. ์๋ฏธ ํ์ ์ด๋ผ ํ๋ณด ๋ ์ธ์ ์ ์ถฉ์ด๋ค)
|
|
185
|
+
if not heading and (re.search(t + r"(์ด๋|๋)\s", line)
|
|
186
|
+
or re.search(t + r"(์|๋)[^.]{0,60}(์ฝ์|์ค์๋ง|๋ปํฉ๋๋ค|๋ปํ๋ค|์๋ฏธํฉ๋๋ค|์๋ฏธํ๋ค|๋งํฉ๋๋ค|๊ฐ๋ฆฌํต๋๋ค|๊ฐ๋ฆฌํจ๋ค)", line)
|
|
187
|
+
or re.search(t + r"(์|๋)\s[^.]{6,60}(์
๋๋ค|์ด๋ค)", line)):
|
|
188
|
+
return True
|
|
189
|
+
return False
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def load_common(path):
|
|
193
|
+
with open(path, encoding="utf-8") as fh:
|
|
194
|
+
return {l.split("#")[0].strip() for l in fh if l.split("#")[0].strip()}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def s7_candidates(path, common=None, st=None):
|
|
198
|
+
"""[(์ฉ์ด, ์ค๋ฒํธ, ์ข
๋ฅ)] โ ์ข
๋ฅ: heading-before-gloss(์ ๋ชฉ ์ฒซ ๋ฑ์ฅยท์ ๋ชฉ ์ ํ์ด ์์) ยท unglossed-first-use.
|
|
199
|
+
๋ค๋ฅธ ๋ ์ธ๊ณผ ๊ฐ์ ๋ธ๋ก ํํฐ(ํ์คยท๊ทธ๋ฆผ)๋ฅผ ์ด๋ค."""
|
|
200
|
+
common = S7_COMMON if common is None else common
|
|
201
|
+
text = open(path, encoding="utf-8").read()
|
|
202
|
+
text = COMMENT.sub(lambda m: re.sub(r"[^\n]", " ", m.group(0)), text) # ์ค๋ฒํธ ๋ณด์กด
|
|
203
|
+
seen, out = set(), []
|
|
204
|
+
for i, line in iter_lines(text.split("\n"), True, st or Blocks()):
|
|
205
|
+
heading = bool(HEADING.match(line))
|
|
206
|
+
# ์ฝ๋ ์คํฌ ยท URL ์์ ๋๋ฌธ์๋ ๋
์ ์ดํ๊ฐ ์๋๋ค(2์ถ ๋ฆฌ๋ทฐ B2) โ ๊ฐ์ ๊ธธ์ด์ ๊ณต๋ฐฑ์ผ๋ก ์ง์ ์์น๋ฅผ ๋ณด์กดํ๋ค
|
|
207
|
+
scan = re.sub(r"`[^`]*`|https?://\S+", lambda mm: " " * len(mm.group(0)), line)
|
|
208
|
+
for m in ACRO.finditer(scan):
|
|
209
|
+
term = m.group(0)
|
|
210
|
+
if term in seen or term in common or term.rstrip("0123456789") in common: # HTTP2 โ HTTP
|
|
211
|
+
continue
|
|
212
|
+
seen.add(term)
|
|
213
|
+
if not has_gloss(term, line, heading):
|
|
214
|
+
out.append((term, i, "heading-before-gloss" if heading else "unglossed-first-use"))
|
|
215
|
+
return out
|
|
216
|
+
|
|
217
|
+
|
|
64
218
|
# ์ ๋ ์กํ๋ฉด ์ ๋๋ ํ ํฐ โ ใ๋ ์ก๋๋คใ๋ฅผ ๋ด๋ ์ฃฝ์ ๊ณ๊ธฐ ๋ฐฐ์ ์ฉ
|
|
65
219
|
NEVER = r"ZZZ_absent_token_ZZZ"
|
|
66
220
|
|
|
67
221
|
|
|
68
|
-
def count(path, pattern):
|
|
222
|
+
def count(path, pattern, skipfig=False):
|
|
69
223
|
"""ํจํด์ ๋งค์นญ๋๋ **์ค ์**. ํ์ผ ๋ถ์ฌ๋ ์์ธ๋ก ์ฌ๋ฆฐ๋ค(๋ฌด์ 0 ๊ธ์ง)."""
|
|
70
224
|
rx = re.compile(pattern, re.MULTILINE)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
225
|
+
return sum(1 for _, line in scan_lines(path, skipfig) if rx.search(line))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def scan(path, common=None):
|
|
229
|
+
"""๋ฌธ์ ์ค์บ ๋ชจ๋: ์ ๋ ์ธ(+S7)์ ๊ฐ์ ํํฐ๋ก ๋๋ ค (rows, stats) ๋ฅผ ๋ธ๋ค โ ๋ ์ธ ์ ์์ ๋จ์ผ ์์ค.
|
|
230
|
+
stats = ๋ ์ธ๋ณ Blocks ์ค skipfig ๋ ์ธ์ ๊ฒ(๋ชจ๋ skipfig ๋ ์ธ์ด ๊ฐ์ ์ํ๊ธฐ๊ณ๋ผ ํ๋๋ฉด ์ถฉ๋ถ)."""
|
|
231
|
+
rows, st = [], Blocks()
|
|
232
|
+
for lane in LANES:
|
|
233
|
+
label, pat, flags = lane[0], lane[1], lane[2:]
|
|
234
|
+
if "s7" in flags:
|
|
235
|
+
for term, i, kind in s7_candidates(path, common):
|
|
236
|
+
rows.append((label, i, "%s [%s]" % (term, kind)))
|
|
237
|
+
continue
|
|
238
|
+
rx = re.compile(pat)
|
|
239
|
+
sk = "skipfig" in flags
|
|
240
|
+
lst = Blocks()
|
|
241
|
+
for i, line in scan_lines(path, sk, lst):
|
|
242
|
+
if rx.search(line):
|
|
243
|
+
rows.append((label, i, line.strip()))
|
|
244
|
+
if sk:
|
|
245
|
+
st = lst
|
|
246
|
+
return rows, st
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def scan_main(args):
|
|
250
|
+
"""--scan FILE [--s7-common LIST]. ์
๋ ฅ ์ค๋ฅ๋ stderr + 10, ์ ๋ซํ ๋ธ๋ก์ ๊ฒฝ๊ณ + 3."""
|
|
251
|
+
path = common_path = None
|
|
252
|
+
it = iter(args)
|
|
253
|
+
for a in it:
|
|
254
|
+
if a == "--s7-common":
|
|
255
|
+
common_path = next(it, None)
|
|
256
|
+
if not common_path:
|
|
257
|
+
sys.stderr.write("usage error: --s7-common needs a file\n")
|
|
258
|
+
return 10
|
|
259
|
+
elif path is None and not a.startswith("--"):
|
|
260
|
+
path = a
|
|
261
|
+
else:
|
|
262
|
+
sys.stderr.write("usage: ko_tech_writer_calibrate.py --scan FILE [--s7-common LIST]\n")
|
|
263
|
+
return 10
|
|
264
|
+
if path is None:
|
|
265
|
+
sys.stderr.write("usage: ko_tech_writer_calibrate.py --scan FILE [--s7-common LIST]\n")
|
|
266
|
+
return 10
|
|
267
|
+
try:
|
|
268
|
+
common = load_common(common_path) if common_path else None
|
|
269
|
+
rows, st = scan(path, common)
|
|
270
|
+
except (OSError, UnicodeDecodeError) as e:
|
|
271
|
+
sys.stderr.write("harness error: cannot scan %s: %s\n" % (path, e))
|
|
272
|
+
return 10
|
|
273
|
+
print("scanned: %s %d lines" % (path, st.total))
|
|
274
|
+
print("s7-common: %s (%d entries)" % (common_path or "default", len(common if common is not None else S7_COMMON)))
|
|
275
|
+
print("skipped: %d lines (fence/fig); filter applies to C7, C9, C12, C16 only" % st.skipped)
|
|
276
|
+
for label, i, text in rows:
|
|
277
|
+
print("%d\t%s\t%s" % (i, label, text[:200]))
|
|
278
|
+
bad = unclosed(st)
|
|
279
|
+
if bad:
|
|
280
|
+
for b in bad:
|
|
281
|
+
sys.stderr.write("WARNING unclosed block at EOF: %s -- everything after it was skipped; C7/C9/C12/C16 results are NOT valid\n" % b)
|
|
282
|
+
return 3
|
|
283
|
+
return 0
|
|
77
284
|
|
|
78
285
|
|
|
79
286
|
def main():
|
|
287
|
+
if len(sys.argv) > 1:
|
|
288
|
+
if sys.argv[1] == "--scan":
|
|
289
|
+
return scan_main(sys.argv[2:])
|
|
290
|
+
sys.stderr.write("usage: ko_tech_writer_calibrate.py [--scan FILE [--s7-common LIST]]\n")
|
|
291
|
+
return 10
|
|
80
292
|
for p in (POS, NEG):
|
|
81
293
|
if not os.path.isfile(p):
|
|
82
294
|
sys.stderr.write("harness error: fixture missing %s\n" % p)
|
|
@@ -89,10 +301,51 @@ def main():
|
|
|
89
301
|
print("")
|
|
90
302
|
|
|
91
303
|
npass = nfail = 0
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
304
|
+
ncand = []
|
|
305
|
+
for lane in LANES:
|
|
306
|
+
label, pat, flags = lane[0], lane[1], lane[2:]
|
|
307
|
+
candidate = "candidate" in flags
|
|
308
|
+
if candidate or "s7" in flags:
|
|
309
|
+
ncand.append(label.split()[0] + (" UNCALIBRATED" if "uncalibrated" in flags else ""))
|
|
310
|
+
if "s7" in flags:
|
|
311
|
+
p, n = len(s7_candidates(POS)), len(s7_candidates(NEG))
|
|
312
|
+
if p >= 1 and n == 0:
|
|
313
|
+
print("OK %s -- CANDIDATE-ONLY: positive %d / negative 0 (discriminates the constructed pair; "
|
|
314
|
+
"precision on real documents UNMEASURED, hits need per-case judgment)" % (label, p))
|
|
315
|
+
npass += 1
|
|
316
|
+
else:
|
|
317
|
+
print("FAIL %s -- positive %d / negative %d (needs positive >= 1 and negative 0)" % (label, p, n))
|
|
318
|
+
nfail += 1
|
|
319
|
+
continue
|
|
320
|
+
sk = "skipfig" in flags
|
|
321
|
+
p = count(POS, pat, sk)
|
|
322
|
+
n = count(NEG, pat, sk)
|
|
323
|
+
want = [int(f[4:]) for f in flags if f.startswith("neg=")]
|
|
324
|
+
if want and n != want[0]:
|
|
325
|
+
# ํ๋ณด ๋ ์ธ๋ ์์ฑ ์๋ ๊ณ ์ ํ๋ค: ๋ฌธ์ํ๋ ๊ณผ์ฐจ๋จ ์ค ยซ๋งยป ๊ฑธ๋ ค์ผ ํ๋ค. ์ ์คํ(๋๋ ๋ถ์ ๋ชฉ๋ก ์์ค)์ด ยซ์์๋ ๊ณผ์ฐจ๋จยป ์ ๋ฌปํ์ง ์๊ฒ.
|
|
326
|
+
print("FAIL %s -- negative count %d != documented over-block %d (a new false alarm, or the exclusion was lost)"
|
|
327
|
+
% (label, n, want[0]))
|
|
328
|
+
nfail += 1
|
|
329
|
+
elif "uncalibrated" in flags:
|
|
330
|
+
if p >= 1 and n >= 1:
|
|
331
|
+
print("OK %s -- UNCALIBRATED CANDIDATE: positive %d / negative %d (idiom over-block shown; "
|
|
332
|
+
"no discrimination claimed)" % (label, p, n))
|
|
333
|
+
npass += 1
|
|
334
|
+
else:
|
|
335
|
+
print("FAIL %s -- uncalibrated candidate lane lost its positive or its documented over-block "
|
|
336
|
+
"(positive %d / negative %d)" % (label, p, n))
|
|
337
|
+
nfail += 1
|
|
338
|
+
elif candidate:
|
|
339
|
+
# ํ๋ณด ์ ์ฉ ๋ ์ธ: ์ ์ ์ฉ๋ก๋ฅผ ์ก๋ ๊ณผ์ฐจ๋จ์ด **์์๋ ๊ฒฐ๊ณผ**๋ค. ํ๋ณ(discriminates)์ ์ฃผ์ฅํ์ง ์๋๋ค.
|
|
340
|
+
if p >= 1 and n >= 1:
|
|
341
|
+
print("OK %s -- CANDIDATE-ONLY: positive %d / negative %d (expected over-block; "
|
|
342
|
+
"does NOT discriminate, hits need per-case judgment)" % (label, p, n))
|
|
343
|
+
npass += 1
|
|
344
|
+
else:
|
|
345
|
+
print("FAIL %s -- candidate lane lost its documented over-block or positive "
|
|
346
|
+
"(positive %d / negative %d)" % (label, p, n))
|
|
347
|
+
nfail += 1
|
|
348
|
+
elif p >= 1 and n == 0:
|
|
96
349
|
print("OK %s -- positive %d / negative 0 (discriminates)" % (label, p))
|
|
97
350
|
npass += 1
|
|
98
351
|
elif p < 1:
|
|
@@ -103,6 +356,23 @@ def main():
|
|
|
103
356
|
% (label, n))
|
|
104
357
|
nfail += 1
|
|
105
358
|
|
|
359
|
+
# ๋ธ๋ก ํํฐ ๋ ์ธ โ ์ ๋ซํ [๊ทธ๋ฆผ: ์ด ยซ๋ณด๊ณ ยป ๋๋๊ฐ(์์ฑ ํฝ์ค์ฒ) ยท ์ ์ ํฝ์ค์ฒ(~~~ ํ์คยท์ค์ฒฉ ๋๊ดํธ ํฌํจ)๋ ๋ซํ ์ฑ ๋๋๋๊ฐ
|
|
360
|
+
if not os.path.isfile(UNC):
|
|
361
|
+
print("FAIL BLOCK unclosed fixture missing -- %s" % UNC)
|
|
362
|
+
nfail += 1
|
|
363
|
+
else:
|
|
364
|
+
su, sn = Blocks(), Blocks()
|
|
365
|
+
list(scan_lines(UNC, True, su))
|
|
366
|
+
list(scan_lines(NEG, True, sn))
|
|
367
|
+
if unclosed(su) and not unclosed(sn) and sn.skipped >= 1:
|
|
368
|
+
print("OK BLOCK unclosed-block report -- positive: %s / negative: closed, %d lines skipped (discriminates)"
|
|
369
|
+
% ("; ".join(unclosed(su)), sn.skipped))
|
|
370
|
+
npass += 1
|
|
371
|
+
else:
|
|
372
|
+
print("FAIL BLOCK unclosed-block report -- positive %r / negative %r (skipped %d)"
|
|
373
|
+
% (unclosed(su), unclosed(sn), sn.skipped))
|
|
374
|
+
nfail += 1
|
|
375
|
+
|
|
106
376
|
# META ์ปจํธ๋กค 1 โ ์๋ ํ ํฐ์ด ์์ชฝ ๋ค 0์ธ๊ฐ (๊ณ๊ธฐ๊ฐ ยซ๋ ์ก๋๋คยป ๋ฅผ ๋ด์ง ์๋๋ค)
|
|
107
377
|
if count(POS, NEVER) == 0 and count(NEG, NEVER) == 0:
|
|
108
378
|
print("OK META control -- an absent token matches nothing in either fixture")
|
|
@@ -122,9 +392,12 @@ def main():
|
|
|
122
392
|
|
|
123
393
|
print("")
|
|
124
394
|
if nfail == 0:
|
|
125
|
-
|
|
126
|
-
|
|
395
|
+
ndisc = npass - len(ncand)
|
|
396
|
+
print("CALIBRATED (%d discriminating incl. 2 meta controls; %d candidate-only: %s) -- Step 2 classes + Step 4-b discriminate; candidate lanes do not."
|
|
397
|
+
% (ndisc, len(ncand), ", ".join(ncand)))
|
|
127
398
|
print(" NOT proven: 'zero residue' in any real document. That is measured per document.")
|
|
399
|
+
print(" C7-C12 positives are the harvest's own 'before' sentences (re-built short); C13-C14 positives are constructed (no harvest pair), so")
|
|
400
|
+
print(" false-positive rate on out-of-distribution text is UNMEASURED. C9 over-blocks by design.")
|
|
128
401
|
print(" Citing this suite as evidence of 'zero residue' reproduces the very downgrade")
|
|
129
402
|
print(" recorded in harness_terminal_correlation_and_recommendations.md.")
|
|
130
403
|
return 0
|
|
@@ -39,6 +39,11 @@ cd "$REPO_ROOT" || exit 1
|
|
|
39
39
|
# scripts/sync_to_be_lanes.sh โ forward-path lane suite for sync-to-be.sh, itself
|
|
40
40
|
# ACCEPTED_ABSENT above; added 2026-08-14, pmh-dev#69.
|
|
41
41
|
ACCEPTED_ABSENT=(
|
|
42
|
+
# 2026-10-19 โ cartridge admission checker and its lanes. Not shipped yet on purpose: publishing cartridges
|
|
43
|
+
# (fh-cartridges) is an open operator decision, and shipping the checker would put it in the next npm
|
|
44
|
+
# release by default. selfcheck resolves its row as SKIP (ยซnot in files[], and absentยป) on a consumer tree.
|
|
45
|
+
"scripts/cartridge_admit.py"
|
|
46
|
+
"scripts/test_cartridge_admit_lanes.sh"
|
|
42
47
|
# ๐ฅ 2026-09-21 (์ผ๊ฐ) โ ์ ์ฑ
๋ ์ฆ ์ฑ์ ๊ธฐ์ ๊ทธ ๋ ์ธ. **FH ์๊ธฐ ์ฐ๊ตฌ์ ์คํ ๊ธฐ๋ก**์ด์ง ์๋น์
|
|
43
48
|
# ๋ฅ๋ ฅ์ด ์๋๋ค: ํ์ ๋์์ด `scripts/fixtures/policy_lens_knownpair_2026-09-21/` ์์
|
|
44
49
|
# 1์ฐจ ๋ฐ 48๊ฐ ํ์ผ(236K)์ด๊ณ , ๊ทธ๊ฒ๊น์ง ์ค์ด ๋ณด๋ด๋ฉด ์๋ฌด๋ ์ ์ฐ๋ ์คํ ์์นด์ด๋ธ๊ฐ ํจํค์ง
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
# bash scripts/probe_live_eval.sh --ids G-GREET-01,G-TRIG-02 --model sonnet
|
|
70
70
|
# bash scripts/probe_live_eval.sh --subset 3
|
|
71
71
|
# bash scripts/probe_live_eval.sh --subset 3 --report-out /tmp/spot.md # spot-check: keep the nightly record untouched
|
|
72
|
+
# bash scripts/probe_live_eval.sh --target G-TRIG-02 --before tracks/_meta/live_eval_2026-10-16.md
|
|
73
|
+
# # after a repair aimed at one probe: target reported apart from the other probes, before/after
|
|
72
74
|
# bash scripts/probe_live_eval.sh # full selected set โ nightly cron shape
|
|
73
75
|
#
|
|
74
76
|
# PORTABILITY: bash 3.2 (macOS) + bash 5.x (Linux CI). No associative arrays, no `${var,,}`,
|
|
@@ -140,6 +142,8 @@ SUBSET=""
|
|
|
140
142
|
IDS=""
|
|
141
143
|
OUTDIR=""
|
|
142
144
|
REPORT_OUT="" # --report-out: where the markdown report lands (default: tracks/_meta/live_eval_<date>.md)
|
|
145
|
+
TARGET="" # --target <probe-id>: report that probe apart from the rest (record only; default output unchanged)
|
|
146
|
+
BEFORE="" # --before <prior live_eval .md>: the "before" side of the --target split
|
|
143
147
|
NO_EVIDENCE=0 # --no-evidence: skip the preserved-artifact copy (lanes / throwaway spot-checks)
|
|
144
148
|
while [ $# -gt 0 ]; do
|
|
145
149
|
case "$1" in
|
|
@@ -151,6 +155,8 @@ while [ $# -gt 0 ]; do
|
|
|
151
155
|
--out) OUTDIR="${2:-}"; shift 2 ;;
|
|
152
156
|
--report-out) REPORT_OUT="${2:-}"; shift 2 ;; # lanes/spot-checks MUST pass this โ never the live path
|
|
153
157
|
--no-evidence) NO_EVIDENCE=1; shift ;;
|
|
158
|
+
--target) TARGET="${2:-}"; shift 2 ;;
|
|
159
|
+
--before) BEFORE="${2:-}"; shift 2 ;;
|
|
154
160
|
*) echo "unknown flag: $1" >&2; exit 2 ;;
|
|
155
161
|
esac
|
|
156
162
|
done
|
|
@@ -198,6 +204,15 @@ if [ "$SELECTED_COUNT" -eq 0 ]; then
|
|
|
198
204
|
exit 2
|
|
199
205
|
fi
|
|
200
206
|
|
|
207
|
+
# --target must name a probe that is actually in this run: a typo would otherwise burn the whole
|
|
208
|
+
# live run and only fail at report time.
|
|
209
|
+
if [ -n "$TARGET" ] && ! grep -qxF -- "$TARGET" "$SPEC_DIR/selected_ids.txt"; then
|
|
210
|
+
echo "โ --target '$TARGET' is not among the selected probes (see SELECTED above) โ refusing before any live call." >&2
|
|
211
|
+
rm -rf "$WORKDIR"
|
|
212
|
+
exit 2
|
|
213
|
+
fi
|
|
214
|
+
[ -z "$BEFORE" ] || [ -n "$TARGET" ] || { echo "โ --before only makes sense with --target" >&2; rm -rf "$WORKDIR"; exit 2; }
|
|
215
|
+
|
|
201
216
|
# `claude` presence is the REAL runner's preflight, so it is checked only on that path. Under
|
|
202
217
|
# FH_SIM_RUNNER_BIN the stub owns its own preflight โ measured 2026-09-05 on CI (ubuntu, no
|
|
203
218
|
# `claude` installed): this line fired BEFORE the stub was ever called, so FF2/FF3/FF4/FF6 went
|
|
@@ -336,7 +351,10 @@ echo ""
|
|
|
336
351
|
# default overwrote a real night's distribution once (2026-09-05 10:18: test_probe_live_eval_lanes.sh FF4
|
|
337
352
|
# ran the real script with a stub runner and replaced the 02:30 report). Lanes pass --report-out.
|
|
338
353
|
REPORT_PATH="${REPORT_OUT:-$REPO_ROOT/tracks/_meta/live_eval_${RUN_DATE}.md}"
|
|
339
|
-
|
|
354
|
+
SCORE_EXTRA=()
|
|
355
|
+
[ -n "$TARGET" ] && SCORE_EXTRA+=(--target "$TARGET")
|
|
356
|
+
[ -n "$BEFORE" ] && SCORE_EXTRA+=(--before "$BEFORE")
|
|
357
|
+
python3 "$LIB" score ${SCORE_EXTRA[@]+"${SCORE_EXTRA[@]}"} \
|
|
340
358
|
--probes-live "$PROBES_LIVE" \
|
|
341
359
|
--select-json "$SELECT_JSON" \
|
|
342
360
|
--ids-file "$SPEC_DIR/selected_ids.txt" \
|