@chrono-meta/fh-gate 3.8.0 → 3.9.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/regression/probes_live.yaml +108 -6
- package/.claude-plugin/marketplace.json +4 -4
- package/knowledge/shared/harness-core/governance_engineering_definition.md +7 -3
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +39 -0
- package/package.json +2 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +64 -0
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-preprep/skills/preprep/SKILL.md +7 -1
- package/plugins/fh-preprep/skills/preprep/fixtures/font_revert_probe.py +6 -4
- package/plugins/fh-preprep/skills/preprep/lane_font.py +105 -16
- package/plugins/fh-preprep/skills/preprep/test_lane_font.py +170 -21
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/com.forge-harness.live-eval.plist +5 -2
- package/scripts/probe_live_eval.sh +117 -3
- package/scripts/probe_live_eval_lib.py +178 -5
- package/scripts/selfcheck.sh +22 -0
- package/scripts/test_probe_live_eval_lanes.sh +271 -10
- package/scripts/test_temper_check_lanes.sh +307 -0
|
@@ -9,8 +9,14 @@
|
|
|
9
9
|
# score-pair known-pair calibration of score_probe(): PASS / FAIL / UNCALIBRATED(present) /
|
|
10
10
|
# UNCALIBRATED(absent) / FAILED-TO-RUN, both empty-string and missing-file shapes
|
|
11
11
|
# select-guard the mechanical selection rule (class filter, utterance-shape, INERT-ANCHOR,
|
|
12
|
-
# CLI-event
|
|
13
|
-
# REAL probes.md + probes_live.yaml
|
|
12
|
+
# CLI-event / arm-capability / arm-state excludes) reproduces the CURRENT
|
|
13
|
+
# 13-selected / 20-excluded split against the REAL probes.md + probes_live.yaml
|
|
14
|
+
# shipped in this repo. The numbers are PINNED, not derived — see the S2 note.
|
|
15
|
+
# blackout a whole run whose every probe was silent in BOTH arms is UNCALIBRATED, not a
|
|
16
|
+
# wall of FAIL; the boundary and its deliberate narrowness are pinned by BL1-BL5
|
|
17
|
+
# control-b the optional second known-negative, incl. its fail-closed degrade (a declared
|
|
18
|
+
# second control that did not run is FAILED-TO-RUN, never a quiet PASS)
|
|
19
|
+
# advisory advisory_re is recorded and never moves a verdict
|
|
14
20
|
# dead-pointer probes_live.yaml naming an id absent from probes.md is caught (nonzero exit),
|
|
15
21
|
# not silently ignored — this IS the "id 가 probes.md 에 실재하는지" guard the
|
|
16
22
|
# dispatching session's task named explicitly
|
|
@@ -30,10 +36,33 @@ PROBES_LIVE="$REPO_ROOT/.claude/regression/probes_live.yaml"
|
|
|
30
36
|
command -v python3 >/dev/null 2>&1 || { echo "❌ HARNESS-ERROR — python3 missing"; exit 10; }
|
|
31
37
|
[ -f "$LIB" ] || { echo "❌ HARNESS-ERROR — $LIB missing"; exit 10; }
|
|
32
38
|
[ -f "$RUNNER" ] || { echo "❌ HARNESS-ERROR — $RUNNER missing"; exit 10; }
|
|
39
|
+
# 🟥 ADJACENT FINDING, fixed here 2026-09-14 because this file is shipped and was failing OPEN in
|
|
40
|
+
# the wrong direction. `package.json` files[] packs probe_live_eval.sh, probe_live_eval_lib.py,
|
|
41
|
+
# THIS FILE and probes_live.yaml — but NOT `.claude/regression/probes.md` (verified with
|
|
42
|
+
# `npm pack --dry-run --json`: the only packed `probes.md` is the unrelated
|
|
43
|
+
# tests/seam_absence_probes.md). The RUNNER already degrades correctly on that
|
|
44
|
+
# (`[ -f "$PROBES_MD" ] || exit 2`); this suite had no such guard, so in a consumer install the
|
|
45
|
+
# select lanes crashed with a FileNotFoundError traceback and the suite printed
|
|
46
|
+
# **RESULT: REGRESSION** — reporting a missing fixture as a broken harness. exit 10 is the value
|
|
47
|
+
# this file's own header reserves for exactly this ("harness error (setup failed, not a verdict)").
|
|
48
|
+
# 🟥 This does NOT decide whether probes.md should ship. That is an operator call and is untouched;
|
|
49
|
+
# what changes is only that the non-answer stops rendering as a verdict.
|
|
50
|
+
[ -f "$PROBES_MD" ] || { echo "❌ HARNESS-ERROR — $PROBES_MD missing (not shipped in the npm package; the select/dry-run lanes need the hub repo)"; exit 10; }
|
|
51
|
+
[ -f "$PROBES_LIVE" ] || { echo "❌ HARNESS-ERROR — $PROBES_LIVE missing"; exit 10; }
|
|
33
52
|
|
|
34
53
|
T="$(mktemp -d)" || { echo "❌ HARNESS-ERROR — mktemp failed"; exit 10; }
|
|
35
54
|
trap 'rm -rf "$T"' EXIT
|
|
36
55
|
|
|
56
|
+
# Snapshot the LIVE evidence dir BEFORE any lane runs, so EV8 can prove this suite did not deposit
|
|
57
|
+
# into it. Taken here, at the top, because a snapshot taken next to its own assertion proves
|
|
58
|
+
# nothing. "ABSENT" and "0" are different states and stay different.
|
|
59
|
+
_LIVE_EV_DIR="$REPO_ROOT/tracks/_meta/live_eval_runs"
|
|
60
|
+
if [ -d "$_LIVE_EV_DIR" ]; then
|
|
61
|
+
LIVE_EV_BEFORE="$(find "$_LIVE_EV_DIR" -mindepth 1 -maxdepth 1 | wc -l | tr -d ' ')"
|
|
62
|
+
else
|
|
63
|
+
LIVE_EV_BEFORE="ABSENT"
|
|
64
|
+
fi
|
|
65
|
+
|
|
37
66
|
FAIL=0; N=0
|
|
38
67
|
_lane() { # $1=id $2=class $3=desc $4=expected $5=actual
|
|
39
68
|
N=$((N + 1))
|
|
@@ -183,8 +212,45 @@ fi
|
|
|
183
212
|
# — confirmed by a known-pair: "list every Skill available to you" -> NO-SKILL-TOOL while the
|
|
184
213
|
# tool-listing control answered correctly). It failed 0/5 for that reason alone.
|
|
185
214
|
# 🟥 The exclusion does NOT mean the delegation works — that question is now UNMEASURED, not answered.
|
|
186
|
-
|
|
187
|
-
|
|
215
|
+
# 🟥 11/22 -> 13/20 on 2026-09-14, and the pin did its job again — it went red and this paragraph is
|
|
216
|
+
# the required explanation. Two rows gained live coverage and one exclusion reason was corrected:
|
|
217
|
+
# +G-GREET-02, +G-GREET-05 — both were being dropped as NO-UTTERANCE, which was TRUE and
|
|
218
|
+
# IRRELEVANT: their probes.md Input cells carried no quoted literal, while the utterance they
|
|
219
|
+
# need ("안녕") sat one row above in G-GREET-01 the whole time. G-GREET-05 is the one CLAUDE.md
|
|
220
|
+
# itself calls a downstream remap anchor that forks machine-map (pmh-dev #54), and it had ZERO
|
|
221
|
+
# live coverage.
|
|
222
|
+
# ~G-GREET-03 — still excluded, but now by name (ARM_STATE_EXCLUDE) with its real reason instead
|
|
223
|
+
# of NO-UTTERANCE. Its 4-door menu renders only on the RETURNING branch and the arm has no Bash
|
|
224
|
+
# to run the branch test. Measured 2026-09-14: three reps of the identical input against the
|
|
225
|
+
# identical clone split 2 returning-menu / 1 new-user-menu, so a ①②③④ regex would score a
|
|
226
|
+
# possibly-correct answer red. Deliberately left UNCOVERED — a decorative probe is worse.
|
|
227
|
+
# ~G-LINT-01 — moved from NOT-YET-AUTHORED into ARM_CAPABILITY_EXCLUDE. Excluded either way, so
|
|
228
|
+
# the counts are unaffected; what changed is that it no longer emits a nightly warning that
|
|
229
|
+
# reads like a to-do for a spec nobody can write against a route the arm cannot take.
|
|
230
|
+
_lane S2 select-guard "selected count == 13 (11 + G-GREET-02 + G-GREET-05)" "13" "$sel_count"
|
|
231
|
+
_lane S3 select-guard "excluded count == 20 (33 probes.md rows - 13 selected)" "20" "$exc_count"
|
|
232
|
+
|
|
233
|
+
# S7/S8: the two newly-covered rows must actually be IN the selection, and the state-excluded row
|
|
234
|
+
# must carry its OWN reason rather than the generic utterance-shape one. Counting alone would pass
|
|
235
|
+
# if some unrelated pair of rows had swapped in ([[feedback_count_is_true_but_referent_drifted]] —
|
|
236
|
+
# the count is true and the referent drifted).
|
|
237
|
+
greet_new=$(python3 -c "
|
|
238
|
+
import json; s=json.load(open('$SELECT_JSON'))['selected']
|
|
239
|
+
ids={p['id'] for p in s}
|
|
240
|
+
print('yes' if {'G-GREET-02','G-GREET-05'} <= ids else 'no')")
|
|
241
|
+
_lane S7 select-guard "G-GREET-02 and G-GREET-05 are selected BY NAME (not just a count of 13)" "yes" "$greet_new"
|
|
242
|
+
|
|
243
|
+
g03_reason=$(python3 -c "
|
|
244
|
+
import json; e=json.load(open('$SELECT_JSON'))['excluded']
|
|
245
|
+
r=[x['reason'] for x in e if x['id']=='G-GREET-03']
|
|
246
|
+
print('branch-state' if r and 'branch-state' in r[0] else (r[0] if r else 'MISSING'))")
|
|
247
|
+
_lane S8 select-guard "G-GREET-03 excluded with its real reason, not NO-UTTERANCE" "branch-state" "$g03_reason"
|
|
248
|
+
|
|
249
|
+
# S9: both nightly warnings are closed. They had fired identically for 8 consecutive nights, which
|
|
250
|
+
# is how a warning becomes background noise. A warning count is the right assertion here precisely
|
|
251
|
+
# because ANY new drift between probes.md and probes_live.yaml should re-break this lane.
|
|
252
|
+
warn_count=$(python3 -c "import json; print(len(json.load(open('$SELECT_JSON'))['warnings']))")
|
|
253
|
+
_lane S9 select-guard "no STALE-YAML-ENTRY / NOT-YET-AUTHORED warnings remain" "0" "$warn_count"
|
|
188
254
|
|
|
189
255
|
# --subset and --ids filters
|
|
190
256
|
sub_out="$(python3 "$LIB" select --probes-md "$PROBES_MD" --probes-live "$PROBES_LIVE" --subset 3 \
|
|
@@ -245,11 +311,12 @@ dry_stdout="$(cd "$REPO_ROOT" && bash "$RUNNER" --dry-run --out "$DRY_OUT" 2>&1)
|
|
|
245
311
|
dry_rc=$?
|
|
246
312
|
_lane R1 dry-run "probe_live_eval.sh --dry-run exits 0" "0" "$dry_rc"
|
|
247
313
|
_lane R2 dry-run "--dry-run creates no OUTDIR (no live run attempted)" "absent" "$([ -d "$DRY_OUT" ] && echo present || echo absent)"
|
|
314
|
+
# Pinned like S2/S3 and for the same reason — see the S2 note for why 11 became 13 on 2026-09-14.
|
|
248
315
|
case "$dry_stdout" in
|
|
249
|
-
*"SELECTED (
|
|
316
|
+
*"SELECTED (13)"*) r3=yes ;;
|
|
250
317
|
*) r3=no ;;
|
|
251
318
|
esac
|
|
252
|
-
_lane R3 dry-run "--dry-run stdout shows the real
|
|
319
|
+
_lane R3 dry-run "--dry-run stdout shows the real 13-probe selection" "yes" "$r3"
|
|
253
320
|
|
|
254
321
|
# ── fail-fast: probe_live_eval.sh aborts on the FIRST rc=2 runner call, not after burning the
|
|
255
322
|
# rest of the selected set (2026-09-05, the launchd incident this exists for) ────────────────────
|
|
@@ -308,7 +375,7 @@ _live_hash() { if [ -f "$LIVE_REPORT" ]; then shasum "$LIVE_REPORT" | cut -c1-40
|
|
|
308
375
|
live_before="$(_live_hash)"
|
|
309
376
|
COUNTER1="$T/failfast_counter_broken.txt"; : > "$COUNTER1"
|
|
310
377
|
ff_out="$(cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_broken.sh" FH_FAKESIM_COUNTER="$COUNTER1" \
|
|
311
|
-
bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_broken" --report-out "$T/failfast_report_broken.md" 2>&1)"
|
|
378
|
+
bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_broken" --report-out "$T/failfast_report_broken.md" 2>&1)"
|
|
312
379
|
ff_rc=$?
|
|
313
380
|
_lane FF1 fail-fast "aborts with rc=2 on the runner's own preflight failure" "2" "$ff_rc"
|
|
314
381
|
ff_calls=$(wc -l < "$COUNTER1" | tr -d ' ')
|
|
@@ -325,7 +392,7 @@ _lane FF3 fail-fast "abort message names what happened (not a silent stop)" "yes
|
|
|
325
392
|
# ([[feedback_control_presence_is_not_discrimination]]).
|
|
326
393
|
COUNTER2="$T/failfast_counter_ok.txt"; : > "$COUNTER2"
|
|
327
394
|
( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_ok.sh" FH_FAKESIM_COUNTER="$COUNTER2" \
|
|
328
|
-
bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_ok" --report-out "$T/failfast_report_ok.md" ) >/dev/null 2>&1
|
|
395
|
+
bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_ok" --report-out "$T/failfast_report_ok.md" ) >/dev/null 2>&1
|
|
329
396
|
ff2_calls=$(wc -l < "$COUNTER2" | tr -d ' ')
|
|
330
397
|
_lane FF4 fail-fast "control — a healthy runner (rc=0) is called for all 4 (2 probes x 2 arms), not stopped early" "4" "$ff2_calls"
|
|
331
398
|
live_after="$(_live_hash)"
|
|
@@ -354,10 +421,10 @@ if PATH="$SHADOW_NOCLAUDE" command -v claude >/dev/null 2>&1; then
|
|
|
354
421
|
else
|
|
355
422
|
COUNTER3="$T/failfast_counter_noclaude.txt"; : > "$COUNTER3"
|
|
356
423
|
( cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" FH_SIM_RUNNER_BIN="$STUBROOT/fake_sim_ok.sh" FH_FAKESIM_COUNTER="$COUNTER3" \
|
|
357
|
-
bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_noclaude" --report-out "$T/failfast_report_noclaude.md" ) >/dev/null 2>&1
|
|
424
|
+
bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_noclaude" --report-out "$T/failfast_report_noclaude.md" ) >/dev/null 2>&1
|
|
358
425
|
ff7_calls=$(wc -l < "$COUNTER3" | tr -d ' ')
|
|
359
426
|
_lane FF7 fail-fast "claude absent from PATH + stub runner: stub still called for all 4 (the seam bypasses the CLI preflight)" "4" "$ff7_calls"
|
|
360
|
-
ff7b_out="$(cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" bash "$RUNNER" --subset 2 --model sonnet --out "$T/failfast_run_noclaude_real" --report-out "$T/failfast_report_noclaude_real.md" 2>&1)"
|
|
427
|
+
ff7b_out="$(cd "$REPO_ROOT" && PATH="$SHADOW_NOCLAUDE" bash "$RUNNER" --subset 2 --model sonnet --no-evidence --out "$T/failfast_run_noclaude_real" --report-out "$T/failfast_report_noclaude_real.md" 2>&1)"
|
|
361
428
|
ff7b_rc=$?
|
|
362
429
|
case "$ff7b_out" in *"claude CLI not on PATH"*) ff7b_msg=yes ;; *) ff7b_msg=no ;; esac
|
|
363
430
|
_lane FF7b fail-fast "control — the REAL runner path with claude absent still exits 2 and names claude" "2/yes" "$ff7b_rc/$ff7b_msg"
|
|
@@ -426,6 +493,200 @@ _lane MV7 majority "control: reps=1 unchanged (PASS, 1/1)" "PASS 1/1" "$r"
|
|
|
426
493
|
r="$(_score_run 1 F)"
|
|
427
494
|
_lane MV8 majority "control: reps=1 failing case unchanged" "FAIL 0/1" "$r"
|
|
428
495
|
|
|
496
|
+
echo ""
|
|
497
|
+
echo "── run-blackout / second control / advisory (2026-09-14) ─────────"
|
|
498
|
+
# WHY THESE LANES EXIST. On 2026-09-13 all 11 probes scored 0/3 — G-GREET-01 included, which is 3/3
|
|
499
|
+
# on every other night in the record — and the report rendered ten of them as FAIL: "the rule did
|
|
500
|
+
# not fire", when nothing had been measured at all. score_run now separates those two facts.
|
|
501
|
+
# _blackout: $1=polarity-spec list "id:pol:primaryhits:controlhits" (hits = 3 chars of 1/0)
|
|
502
|
+
# prints "OVERALL rc silent/scored blackout suspect firstrowverdict"
|
|
503
|
+
_blackout() {
|
|
504
|
+
python3 - "$REPO_ROOT" "$@" <<'PY'
|
|
505
|
+
import sys, os, tempfile
|
|
506
|
+
sys.path.insert(0, os.path.join(sys.argv[1], 'scripts'))
|
|
507
|
+
from probe_live_eval_lib import score_run
|
|
508
|
+
PAT = 'XHITX'
|
|
509
|
+
root = tempfile.mkdtemp(); live = []; ids = []
|
|
510
|
+
for spec in sys.argv[2:]:
|
|
511
|
+
pid, pol, ph, ch = spec.split(':')
|
|
512
|
+
base = os.path.join(root, pid); os.makedirs(base)
|
|
513
|
+
for i in range(3):
|
|
514
|
+
open(os.path.join(base, 'primary_r%d.txt' % (i+1)), 'w').write(PAT if ph[i] == '1' else 'x')
|
|
515
|
+
open(os.path.join(base, 'control_r%d.txt' % (i+1)), 'w').write(PAT if ch[i] == '1' else 'x')
|
|
516
|
+
live.append({'id': pid, 'polarity': pol, 'expect_re': PAT}); ids.append(pid)
|
|
517
|
+
r = score_run(live, root, ids, 0.8, 'sonnet', reps=3)
|
|
518
|
+
print('%s %d %d/%d %s %s %s' % (r['overall'], r['rc'], r['silent'], r['scored'],
|
|
519
|
+
r['blackout'], r['blackout_suspect'], r['rows'][0]['verdict']))
|
|
520
|
+
PY
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
# BL1 — the 2026-09-13 shape: every probe silent in BOTH arms. Nothing was measured.
|
|
524
|
+
r="$(_blackout A:present:000:000 B:present:000:000 C:present:000:000 D:present:000:000)"
|
|
525
|
+
_lane BL1 blackout "all probes silent in both arms -> RUN-BLACKOUT, rows UNCALIBRATED not FAIL" \
|
|
526
|
+
"UNCALIBRATED 2 4/4 True False UNCALIBRATED" "$r"
|
|
527
|
+
|
|
528
|
+
# 🟥 BL2 is the load-bearing control, and it is the 2026-09-12 shape. ONE probe's channel was alive
|
|
529
|
+
# (its pattern hit), so a verdict IS computable and a genuine broad regression is a live hypothesis.
|
|
530
|
+
# Converting this to UNCALIBRATED would hide exactly the failure the instrument exists to catch.
|
|
531
|
+
# Verdict must be untouched; only an advisory flag is raised.
|
|
532
|
+
r="$(_blackout A:present:111:000 B:present:000:000 C:present:000:000 D:present:000:000)"
|
|
533
|
+
_lane BL2 blackout "one live channel -> NOT blackout; verdict stays FAIL, suspect flag only" \
|
|
534
|
+
"FAIL 1 3/4 False True PASS" "$r"
|
|
535
|
+
|
|
536
|
+
# BL3 — control: a healthy run must not trip either flag. Without this, BL1/BL2 could both be
|
|
537
|
+
# passing because the detector fires on everything.
|
|
538
|
+
r="$(_blackout A:present:111:000 B:present:111:000 C:present:111:000 D:present:111:000)"
|
|
539
|
+
_lane BL3 blackout "control — a healthy run raises neither flag" \
|
|
540
|
+
"PASS 0 0/4 False False PASS" "$r"
|
|
541
|
+
|
|
542
|
+
# BL4 — the >=3 guard. A two-probe spot-check that finds nothing is the ORDINARY answer ("the rule
|
|
543
|
+
# did not fire"), not evidence the instrument died. Widening the guard down to 1 would make every
|
|
544
|
+
# failing single-probe --ids run report itself as unmeasurable.
|
|
545
|
+
r="$(_blackout A:present:000:000 B:present:000:000)"
|
|
546
|
+
_lane BL4 blackout "fewer than 3 scored probes -> no blackout (a spot-check keeps its FAIL)" \
|
|
547
|
+
"FAIL 1 2/2 False True FAIL" "$r"
|
|
548
|
+
|
|
549
|
+
# BL5 — the advisory boundary sits at a MAJORITY (0.50), not at the observed incident value (0.73).
|
|
550
|
+
# 2 of 4 silent is exactly 0.50 and must raise the flag while leaving the verdict alone.
|
|
551
|
+
r="$(_blackout A:present:111:000 B:present:111:000 C:present:000:000 D:present:000:000)"
|
|
552
|
+
_lane BL5 blackout "silent_fraction exactly 0.50 -> suspect flag, verdict unchanged" \
|
|
553
|
+
"FAIL 1 2/4 False True PASS" "$r"
|
|
554
|
+
|
|
555
|
+
# ── second control (control_input_b) + advisory channel ───────────────────────────────────────
|
|
556
|
+
# _ctrlb: $1=has_b(y/n) $2=ctrl hit(1/0) $3=ctrl_b hit(1/0|MISSING) $4=advisory(y/n)
|
|
557
|
+
# prints "VERDICT|reason"
|
|
558
|
+
_ctrlb() {
|
|
559
|
+
python3 - "$REPO_ROOT" "$@" <<'PY'
|
|
560
|
+
import sys, os, tempfile
|
|
561
|
+
sys.path.insert(0, os.path.join(sys.argv[1], 'scripts'))
|
|
562
|
+
from probe_live_eval_lib import score_run
|
|
563
|
+
has_b, ch, cbh, adv = sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]
|
|
564
|
+
root = tempfile.mkdtemp(); base = os.path.join(root, 'X'); os.makedirs(base)
|
|
565
|
+
for i in (1, 2, 3):
|
|
566
|
+
open(os.path.join(base, 'primary_r%d.txt' % i), 'w').write('HIT and deep-clarify')
|
|
567
|
+
open(os.path.join(base, 'control_r%d.txt' % i), 'w').write('HIT' if ch == '1' else 'x')
|
|
568
|
+
if cbh != 'MISSING':
|
|
569
|
+
open(os.path.join(base, 'control_b_r%d.txt' % i), 'w').write('HIT' if cbh == '1' else 'x')
|
|
570
|
+
spec = {'id': 'X', 'polarity': 'present', 'expect_re': 'HIT'}
|
|
571
|
+
if has_b == 'y':
|
|
572
|
+
spec['control_input_b'] = 'second known-negative'
|
|
573
|
+
if adv == 'y':
|
|
574
|
+
spec['advisory_re'] = 'deep-clarify'
|
|
575
|
+
row = score_run([spec], root, ['X'], 0.8, 'sonnet', reps=3)['rows'][0]
|
|
576
|
+
print('%s|%s' % (row['verdict'], row.get('reason', '')))
|
|
577
|
+
PY
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
# CB1 — the whole point of a second known-negative: it catches a false positive the FIRST control
|
|
581
|
+
# cannot see. control stays clean, control_b fires -> the pattern does not discriminate.
|
|
582
|
+
r="$(_ctrlb y 0 1 n)"
|
|
583
|
+
_lane CB1 control-b "a hit in the SECOND control alone -> UNCALIBRATED" "UNCALIBRATED|" "$r"
|
|
584
|
+
|
|
585
|
+
# CB2 — 🟥 the degrade direction. A declared second control that produced nothing DID NOT RUN, and
|
|
586
|
+
# an uncalibrated probe must never read as calibrated-and-passing. Folding a missing calibration
|
|
587
|
+
# arm into "the control stayed silent, so we discriminate" is not-found-is-not-zero aimed at the
|
|
588
|
+
# calibration channel.
|
|
589
|
+
r="$(_ctrlb y 0 MISSING n)"
|
|
590
|
+
_lane CB2 control-b "declared control_b that never ran -> FAILED-TO-RUN, never PASS" \
|
|
591
|
+
"FAILED-TO-RUN|control_b: rc=? bytes=0" "$r"
|
|
592
|
+
|
|
593
|
+
# CB3 — control: a probe with NO control_b declared behaves exactly as before. A change that only
|
|
594
|
+
# works for the new field would silently alter all 12 existing probes.
|
|
595
|
+
r="$(_ctrlb n 0 MISSING n)"
|
|
596
|
+
_lane CB3 control-b "control — no control_b declared -> unchanged PASS" "PASS|" "$r"
|
|
597
|
+
|
|
598
|
+
# CB4 — control: clean both controls still passes (CB1 must not be passing because control_b
|
|
599
|
+
# poisons everything).
|
|
600
|
+
r="$(_ctrlb y 0 0 n)"
|
|
601
|
+
_lane CB4 control-b "control — both known-negatives clean -> PASS" "PASS|" "$r"
|
|
602
|
+
|
|
603
|
+
# AD1 — the advisory channel records the ROUTE while the widened pattern scores the BEHAVIOR, and
|
|
604
|
+
# it must NEVER move the verdict. This is what keeps the G-TRIG-07 proposal-format residual visible
|
|
605
|
+
# after the row goes green.
|
|
606
|
+
r="$(_ctrlb n 0 MISSING y)"
|
|
607
|
+
_lane AD1 advisory "advisory_re is recorded in reason and does not change the verdict" \
|
|
608
|
+
"PASS|advisory[deep-clarify] 3/3" "$r"
|
|
609
|
+
|
|
610
|
+
echo ""
|
|
611
|
+
echo "── evidence preservation (2026-09-14) ────────────────────────────"
|
|
612
|
+
# WHY. Every run's response bodies went into a mktemp and died with it, so 2026-09-12 (pass_rate
|
|
613
|
+
# 0.18) and 2026-09-13 (every probe 0/3) are PERMANENTLY unattributable — model blip, rate limit,
|
|
614
|
+
# clone failure and real regression all left the same trace: none. These lanes pin that the flat
|
|
615
|
+
# artifacts survive AND that the clone trees do not (sim_isolated_run.sh puts a full
|
|
616
|
+
# `git clone --local` under <out>/w_<arm>_r<n>/repo; preserving those would be tens of GB a night).
|
|
617
|
+
EVSTUB="$T/ev_stub"; mkdir -p "$EVSTUB"
|
|
618
|
+
cat > "$EVSTUB/fake_sim_bodies.sh" <<'FAKEEV'
|
|
619
|
+
#!/usr/bin/env bash
|
|
620
|
+
arm=""; out=""
|
|
621
|
+
while [ $# -gt 0 ]; do
|
|
622
|
+
case "$1" in
|
|
623
|
+
--arm) arm="$2"; shift 2 ;;
|
|
624
|
+
--out) out="$2"; shift 2 ;;
|
|
625
|
+
*) shift ;;
|
|
626
|
+
esac
|
|
627
|
+
done
|
|
628
|
+
mkdir -p "$out"
|
|
629
|
+
printf '🐿️ stub body for %s\n' "$arm" > "$out/${arm}_r1.txt"
|
|
630
|
+
printf 'stub prompt\n' > "$out/${arm}_r1.prompt.txt"
|
|
631
|
+
printf 'corpus\tX\n' > "$out/${arm}_r1.meta.tsv"
|
|
632
|
+
# the clone tree the real runner leaves behind — must NOT be preserved
|
|
633
|
+
mkdir -p "$out/w_${arm}_r1/repo/deep/nested"
|
|
634
|
+
head -c 200000 /dev/zero > "$out/w_${arm}_r1/repo/deep/nested/big.bin" 2>/dev/null
|
|
635
|
+
echo "RESULT: CLEAN"
|
|
636
|
+
exit 0
|
|
637
|
+
FAKEEV
|
|
638
|
+
chmod +x "$EVSTUB/fake_sim_bodies.sh"
|
|
639
|
+
|
|
640
|
+
EVROOT="$T/evidence_root"
|
|
641
|
+
( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$EVSTUB/fake_sim_bodies.sh" \
|
|
642
|
+
FH_LIVE_EVAL_EVIDENCE_ROOT="$EVROOT" \
|
|
643
|
+
bash "$RUNNER" --ids "G-GREET-01,G-TRIG-07" --report-out "$T/ev_report.md" ) >"$T/ev.log" 2>&1
|
|
644
|
+
|
|
645
|
+
ev_day="$(find "$EVROOT" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)"
|
|
646
|
+
_lane EV1 evidence "a run creates a dated evidence dir under the evidence root" \
|
|
647
|
+
"yes" "$([ -n "$ev_day" ] && echo yes || echo no)"
|
|
648
|
+
|
|
649
|
+
_lane EV2 evidence "the response BODY is preserved (primary_r1.txt survives the mktemp)" \
|
|
650
|
+
"yes" "$([ -s "$ev_day/G-TRIG-07/primary_r1.txt" ] && echo yes || echo no)"
|
|
651
|
+
|
|
652
|
+
# 🟥 EV3 is the cost guard. `find -maxdepth 1 -type f` is the only thing standing between this
|
|
653
|
+
# feature and tens of GB a night; if someone "simplifies" it to `cp -r`, this lane is what says so.
|
|
654
|
+
clone_leak=$(find "$EVROOT" -name 'big.bin' 2>/dev/null | wc -l | tr -d ' ')
|
|
655
|
+
_lane EV3 evidence "the per-rep CLONE TREE is NOT preserved (w_*/repo/** excluded)" "0" "$clone_leak"
|
|
656
|
+
|
|
657
|
+
# EV4: the second control's body is preserved too — it is the arm a future reader needs most when
|
|
658
|
+
# a probe scores UNCALIBRATED and they have to see WHICH negative leaked.
|
|
659
|
+
_lane EV4 evidence "control body preserved alongside primary" \
|
|
660
|
+
"yes" "$([ -s "$ev_day/G-TRIG-07/control_r1.txt" ] && echo yes || echo no)"
|
|
661
|
+
|
|
662
|
+
# EV5: the verdict travels with the bodies — a body set with no report forces the next reader to
|
|
663
|
+
# re-derive what the run concluded.
|
|
664
|
+
_lane EV5 evidence "the run's report is copied in beside the bodies" \
|
|
665
|
+
"yes" "$([ -s "$ev_day/_report.md" ] && echo yes || echo no)"
|
|
666
|
+
|
|
667
|
+
# 🟥 EV6 — the delete guard. The ONLY line in probe_live_eval.sh that removes anything must refuse
|
|
668
|
+
# to run against a root outside $REPO_ROOT/tracks/_meta, which is exactly the case this lane is in.
|
|
669
|
+
# Without this, an overridable evidence root would be an overridable `rm -rf` target.
|
|
670
|
+
case "$(cat "$T/ev.log" 2>/dev/null)" in
|
|
671
|
+
*"refusing to prune"*) ev_guard=yes ;;
|
|
672
|
+
*) ev_guard=no ;;
|
|
673
|
+
esac
|
|
674
|
+
_lane EV6 evidence "prune REFUSES an evidence root outside tracks/_meta (and says so)" "yes" "$ev_guard"
|
|
675
|
+
|
|
676
|
+
# EV7 control: --no-evidence really writes nothing, so EV1-EV5 are not passing on a path that gets
|
|
677
|
+
# populated no matter what the flag says.
|
|
678
|
+
EVROOT2="$T/evidence_root_off"
|
|
679
|
+
( cd "$REPO_ROOT" && FH_SIM_RUNNER_BIN="$EVSTUB/fake_sim_bodies.sh" \
|
|
680
|
+
FH_LIVE_EVAL_EVIDENCE_ROOT="$EVROOT2" \
|
|
681
|
+
bash "$RUNNER" --ids "G-GREET-01" --no-evidence --report-out "$T/ev_report2.md" ) >/dev/null 2>&1
|
|
682
|
+
_lane EV7 evidence "control — --no-evidence creates no evidence root at all" \
|
|
683
|
+
"absent" "$([ -d "$EVROOT2" ] && echo present || echo absent)"
|
|
684
|
+
|
|
685
|
+
# 🟥 EV8 — the live evidence path must be untouched by this suite, same guard as FF5 for the report.
|
|
686
|
+
LIVE_EV="$REPO_ROOT/tracks/_meta/live_eval_runs"
|
|
687
|
+
_lane EV8 evidence "control — the LIVE evidence dir was not written by these lanes" \
|
|
688
|
+
"$LIVE_EV_BEFORE" "$([ -d "$LIVE_EV" ] && find "$LIVE_EV" -mindepth 1 -maxdepth 1 | wc -l | tr -d ' ' || echo ABSENT)"
|
|
689
|
+
|
|
429
690
|
echo ""
|
|
430
691
|
echo "── summary ──────────────────────────────────────────────────────"
|
|
431
692
|
echo "lanes: $N failed: $([ "$FAIL" -eq 0 ] && echo 0 || echo '>=1')"
|