@chrono-meta/fh-gate 3.39.1 → 3.40.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 +9 -2
- package/.claude-plugin/marketplace.json +4 -4
- package/CLAUDE.md +2 -2
- package/README.ja.md +20 -18
- package/README.zh.md +20 -18
- package/knowledge/shared/harness-core/claude_md_full_reference.md +8 -1
- package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +9 -0
- package/knowledge/shared/harness-core/fh_module_contract.md +55 -1
- package/knowledge/shared/harness-core/lease_record_channel.md +26 -2
- package/knowledge/shared/harness-core/onboarding_acceleration_autopilot.md +7 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +36 -0
- package/knowledge/shared/rules/operations.md +1 -0
- package/package.json +10 -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 +35 -0
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/agent_tools_pin.txt +16 -0
- package/scripts/catch_tally.py +215 -0
- package/scripts/claim_precision_report.py +138 -0
- package/scripts/fh_module_check.py +182 -1
- package/scripts/generated_harness_check.py +4 -0
- package/scripts/package_coverage_check.sh +5 -0
- package/scripts/post_squash_verify.sh +53 -1
- package/scripts/pr_merge_verified.sh +56 -0
- package/scripts/probe_live_eval.sh +61 -0
- package/scripts/probe_live_eval_lib.py +47 -4
- package/scripts/selfcheck.sh +5 -0
- package/scripts/selfdev_merge_tier.sh +153 -0
- package/scripts/session_checklist.py +38 -1
- package/scripts/session_close_check.sh +67 -1
- package/scripts/sim_isolated_run.sh +62 -1
- package/scripts/test_agent_tools_pin_lanes.sh +73 -0
- package/scripts/test_catch_tally_lanes.sh +10 -0
- package/scripts/test_claim_precision_report_lanes.sh +77 -0
- package/scripts/test_fh_module_check_lanes.sh +106 -1
- package/scripts/test_generated_harness_check_lanes.sh +8 -0
- package/scripts/test_post_squash_verify_lanes.sh +23 -2
- package/scripts/test_pr_merge_verified_lanes.sh +55 -3
- package/scripts/test_probe_live_eval_lanes.sh +160 -5
- package/scripts/test_selfdev_merge_tier_lanes.sh +128 -0
- package/scripts/test_session_checklist_lanes.sh +57 -0
- package/scripts/test_session_close_chain_lanes.sh +93 -0
- package/scripts/test_sim_isolated_run_lanes.sh +67 -0
- package/templates/harness_birth_core.md +57 -0
|
@@ -547,6 +547,14 @@ M="$(bud_meta b29b say --timeout 60)"
|
|
|
547
547
|
{ [ "$(meta_get "$M" ended_at_cap)" = no ] && [ "$(meta_get "$M" max_turns)" = unset ] && [ "$(meta_get "$M" timeout_s)" = 60 ]; } \
|
|
548
548
|
&& ok "L29b KNOWN-NEGATIVE — normal answer: ended_at_cap=no, max_turns=unset, timeout_s=60" \
|
|
549
549
|
|| no "L29b normal answer mis-recorded ($(meta_get "$M" ended_at_cap))"
|
|
550
|
+
# L29w cost axis (2026-11-12): every episode's meta carries wall_s as whole seconds; the hang under
|
|
551
|
+
# --timeout 1 must read >=1 (a constant 0 would be a dead clock).
|
|
552
|
+
# --timeout 2 so a constant 1 (or 0) producer is red (codex R1 B).
|
|
553
|
+
M="$(bud_meta b29w hang --timeout 2)"
|
|
554
|
+
_w="$(meta_get "$M" wall_s)"
|
|
555
|
+
{ [[ "$_w" =~ ^[0-9]+$ ]] && [ "$_w" -ge 2 ] && [ "$_w" -le 30 ]; } \
|
|
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»)"
|
|
550
558
|
M="$(bud_meta b29c die --timeout 60)"
|
|
551
559
|
[ "$(meta_get "$M" ended_at_cap)" = UNKNOWN ] \
|
|
552
560
|
&& ok "L29c a crash (rc=7) is UNKNOWN, not no and not yes" \
|
|
@@ -662,5 +670,64 @@ mkdir -p "$WORKROOT/inh2"; printf 'x\n' > "$WORKROOT/inh2/CLAUDE.md"
|
|
|
662
670
|
|| no "L30l inherit warning count=$(grep -c 'arms WILL inherit' "$WORKROOT/o30l.log")"
|
|
663
671
|
rm -rf "$WORKROOT/inh2"
|
|
664
672
|
|
|
673
|
+
# ── L31 §CONSUMER SURFACE (2026-11-10, AQ-20261110-6) — opt-in flags reach the CLI, defaults do not move
|
|
674
|
+
# L31a default: none of the four flags in argv (byte-identical default is the whole promise)
|
|
675
|
+
# L31b all four given: each reaches argv, --add-dir is THIS rep's wrapper (w_a_r1), settings path absolute
|
|
676
|
+
# L31c --permission-mode bypassPermissions → rc 2 and NO arm invoked (known-negative)
|
|
677
|
+
# L31d bad --setting-sources token → rc 2 · L31e missing --settings file → rc 2
|
|
678
|
+
# L31f --turns path carries the same flags on every turn call (two call sites, one promise)
|
|
679
|
+
SURFS="$WORKROOT/surf_settings.json"; printf '{"permissions":{"allow":["Write"]}}' > "$SURFS"
|
|
680
|
+
LOG31a="$WORKROOT/argv31a.log"; : > "$LOG31a"
|
|
681
|
+
( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31a" \
|
|
682
|
+
bash "$SUT" --arm a --reps 1 --prompt p --out "$WORKROOT/o31a" ) >/dev/null 2>&1
|
|
683
|
+
{ [ -s "$LOG31a" ] && cmp -s "$LOG31a" "$LOG"; } \
|
|
684
|
+
&& ok "L31a default argv is byte-identical to the L8a default run (no consumer-surface flag)" \
|
|
685
|
+
|| no "L31a default argv changed (or arm not run): $(cat "$LOG31a")"
|
|
686
|
+
LOG31b="$WORKROOT/argv31b.log"; : > "$LOG31b"
|
|
687
|
+
( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31b" \
|
|
688
|
+
bash "$SUT" --arm a --reps 1 --prompt p --mode act --setting-sources project,local --settings "$SURFS" \
|
|
689
|
+
--permission-mode acceptEdits --add-wrapper-dir --out "$WORKROOT/o31b" ) >/dev/null 2>&1
|
|
690
|
+
{ grep -q -- '--setting-sources project,local' "$LOG31b" && grep -q -- "--settings /" "$LOG31b" \
|
|
691
|
+
&& grep -q -- '--permission-mode acceptEdits' "$LOG31b" && grep -qE -- "--add-dir [^ ]*/o31b/w_a_r1( |$)" "$LOG31b"; } \
|
|
692
|
+
&& ok "L31b all four flags reach argv; --add-dir = this rep's wrapper; --settings absolute" \
|
|
693
|
+
|| no "L31b flags missing from argv: $(cat "$LOG31b")"
|
|
694
|
+
LOG31c="$WORKROOT/argv31c.log"; : > "$LOG31c"
|
|
695
|
+
( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31c" \
|
|
696
|
+
bash "$SUT" --arm a --reps 1 --prompt p --permission-mode bypassPermissions --out "$WORKROOT/o31c" ) >/dev/null 2>&1; RC31c=$?
|
|
697
|
+
{ [ "$RC31c" = 2 ] && [ ! -s "$LOG31c" ]; } \
|
|
698
|
+
&& ok "L31c bypassPermissions → rc 2, no arm invoked" \
|
|
699
|
+
|| no "L31c bypassPermissions slipped (rc=$RC31c · argv lines=$(wc -l < "$LOG31c" | tr -d ' '))"
|
|
700
|
+
run_sut --arm a --reps 1 --prompt p --setting-sources user,global --out "$WORKROOT/o31d"
|
|
701
|
+
[ "$RC" = 2 ] && ok "L31d bad --setting-sources token → rc 2" || no "L31d bad token accepted (rc=$RC)"
|
|
702
|
+
run_sut --arm a --reps 1 --prompt p --settings "$WORKROOT/nope.json" --out "$WORKROOT/o31e"
|
|
703
|
+
[ "$RC" = 2 ] && ok "L31e missing --settings file → rc 2" || no "L31e missing settings file accepted (rc=$RC)"
|
|
704
|
+
printf 'one\ntwo\n' > "$WORKROOT/t31f.txt"; LOG31f="$WORKROOT/argv31f.log"; : > "$LOG31f"
|
|
705
|
+
( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31f" \
|
|
706
|
+
bash "$SUT" --arm a --reps 1 --turns "$WORKROOT/t31f.txt" --setting-sources project,local --add-wrapper-dir --out "$WORKROOT/o31f" ) >/dev/null 2>&1
|
|
707
|
+
_n31f=$(grep -c . "$LOG31f")
|
|
708
|
+
[ "$_n31f" -ge 1 ] && [ "$(grep -c -- '--setting-sources project,local' "$LOG31f")" = "$_n31f" ] \
|
|
709
|
+
&& [ "$(grep -cE -- "--add-dir [^ ]*/o31f/w_a_r1( |$)" "$LOG31f")" = "$_n31f" ] \
|
|
710
|
+
&& ok "L31f --turns: every turn call ($_n31f) carries the consumer-surface flags" \
|
|
711
|
+
|| no "L31f turns path dropped flags: $(cat "$LOG31f")"
|
|
712
|
+
|
|
713
|
+
# L31g env inheritance (codex R1): ADDWRAP/SETSRC/SETFILE/PERMMODE in the env must not switch anything on
|
|
714
|
+
LOG31g="$WORKROOT/argv31g.log"; : > "$LOG31g"
|
|
715
|
+
( cd "$SRC" && PATH="$STUBBIN:$PATH" HOME="$FAKEHOME" FH_STUB_MODE=say FH_STUB_ARGV_LOG="$LOG31g" \
|
|
716
|
+
ADDWRAP=1 SETSRC=project SETFILE="$SURFS" PERMMODE=plan bash "$SUT" --arm a --reps 1 --prompt p --out "$WORKROOT/o31g" ) >/dev/null 2>&1
|
|
717
|
+
{ [ -s "$LOG31g" ] && cmp -s "$LOG31g" "$LOG"; } && ok "L31g inherited env vars do not enable consumer-surface flags" \
|
|
718
|
+
|| no "L31g env leaked into argv: $(cat "$LOG31g")"
|
|
719
|
+
# L31h empty --permission-mode → rc 2 (codex R1) · L31i trailing value flag → rc 2, no hang (codex R1)
|
|
720
|
+
run_sut --arm a --reps 1 --prompt p --permission-mode '' --out "$WORKROOT/o31h"
|
|
721
|
+
[ "$RC" = 2 ] && ok "L31h empty --permission-mode → rc 2" || no "L31h empty mode accepted (rc=$RC)"
|
|
722
|
+
_t0=$(date +%s); run_sut --arm a --reps 1 --prompt p --out "$WORKROOT/o31i" --settings; _el=$(( $(date +%s) - _t0 ))
|
|
723
|
+
{ [ "$RC" = 2 ] && [ "$_el" -lt 20 ]; } && ok "L31i trailing --settings with no value → rc 2 in ${_el}s" || no "L31i trailing flag rc=$RC elapsed=${_el}s"
|
|
724
|
+
# L31j a source list without `local` drops the isolation deny file → rc 2 (codex R2)
|
|
725
|
+
run_sut --arm a --reps 1 --prompt p --setting-sources project --out "$WORKROOT/o31j"
|
|
726
|
+
[ "$RC" = 2 ] && ok "L31j --setting-sources without local → rc 2" || no "L31j source list without local accepted (rc=$RC)"
|
|
727
|
+
# L31k the forwarded string itself is validated: space-separated and empty-token lists → rc 2 (codex R2)
|
|
728
|
+
run_sut --arm a --reps 1 --prompt p --setting-sources 'project local' --out "$WORKROOT/o31k"; _rk1=$RC
|
|
729
|
+
run_sut --arm a --reps 1 --prompt p --setting-sources ',,,' --out "$WORKROOT/o31k2"; _rk2=$RC
|
|
730
|
+
{ [ "$_rk1" = 2 ] && [ "$_rk2" = 2 ]; } && ok "L31k 'project local' and ',,,' → rc 2" || no "L31k malformed source list accepted (rc=$_rk1/$_rk2)"
|
|
731
|
+
|
|
665
732
|
echo "sim_isolated_run lanes: $pass passed, $fail failed"
|
|
666
733
|
[ "$fail" -eq 0 ] || exit 1
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Harness birth core — the five parts every new harness carries
|
|
2
|
+
|
|
3
|
+
**Read this before writing the first file of a new harness** — a CLAUDE.md, rules, a checklist or a
|
|
4
|
+
skill for a domain or a new/empty project ("X 용 하네스 세팅해 줘", "set up a harness for X").
|
|
5
|
+
It matters most where **no script can decide right from wrong** (reviewing prose, plans, designs,
|
|
6
|
+
copy): there the harness's only defence against confident wrong verdicts is what is written below.
|
|
7
|
+
|
|
8
|
+
Write the five parts **into the new harness itself, in the domain's own words**. Do not copy FH
|
|
9
|
+
paths, FH vocabulary or a pointer back to this file — the new harness must stand without FH.
|
|
10
|
+
|
|
11
|
+
## 1. Purpose (one paragraph, first thing in its CLAUDE.md)
|
|
12
|
+
Why this harness exists, for whom, what a *good* result is — and what it must never do. A role
|
|
13
|
+
name alone ("you are a reviewer") is not a purpose.
|
|
14
|
+
|
|
15
|
+
## 2. When unsure
|
|
16
|
+
One explicit rule: when evidence is missing, **mark it** (e.g. `확인 필요` / `UNVERIFIED`) and say
|
|
17
|
+
what would settle it. Never guess, never round toward "looks fine", never state an unchecked fact
|
|
18
|
+
as true or false.
|
|
19
|
+
|
|
20
|
+
## 3. Calibration without a script — create `calibration/`
|
|
21
|
+
- **Inputs and answers live apart.** `calibration/inputs/` holds one small, realistic good example
|
|
22
|
+
and one bad example (the bad one carries the domain's typical defects), named neutrally
|
|
23
|
+
(`sample_a`, `sample_b`). `calibration/expected.md` holds the verdict each must get, why, and
|
|
24
|
+
**where that expectation comes from**: the user's own stated criteria, a cited domain standard,
|
|
25
|
+
or an example the user confirmed. An expectation the builder made up alone is
|
|
26
|
+
`unconfirmed` — it does not calibrate anything until the user confirms it.
|
|
27
|
+
- **The check**: review each input as a normal task **without opening `expected.md`**, write the
|
|
28
|
+
result to `calibration/runs/<date>.md`, then compare with `expected.md` and note match / mismatch.
|
|
29
|
+
Run it once right after the harness is built, again after the rules change, and before trusting
|
|
30
|
+
the harness on a new kind of input. A mismatch means fix the rules, not the expected answer.
|
|
31
|
+
- `calibration/verdict_log.md` — one line per finding in real use: accepted / rejected / unclear by
|
|
32
|
+
the author. When the same kind of finding keeps being rejected, revisit that rule.
|
|
33
|
+
- Until the **current** rules have been run on a confirmed pair and matched, the top of the
|
|
34
|
+
CLAUDE.md says `UNCALIBRATED — <what is missing>`. A rule change or a new kind of input puts that
|
|
35
|
+
line back until the check passes again — an old match does not carry over.
|
|
36
|
+
|
|
37
|
+
## 4. Irreversible edges
|
|
38
|
+
List the actions in this domain that cannot be taken back (publish, send, share, post, delete,
|
|
39
|
+
overwriting the only copy). The harness takes one only on the human's **explicit go-ahead for that
|
|
40
|
+
concrete action**. A condition the harness itself would have to judge ("publish it if it looks
|
|
41
|
+
fine") is not a go-ahead — report the findings and ask. Edits the user asks for are fine; keep the
|
|
42
|
+
original recoverable (a copy or version) and say where it is.
|
|
43
|
+
|
|
44
|
+
## 5. Typed verdict
|
|
45
|
+
Every finding: severity (e.g. blocking / should-fix / optional) and confidence, quoting the source
|
|
46
|
+
passage. The overall verdict comes from a small fixed set (e.g. go / fix-then-go / rework). A bare
|
|
47
|
+
"OK" is not a verdict. **While the harness is `UNCALIBRATED`, it gives findings but no overall
|
|
48
|
+
verdict** in real use — it says "findings only — not calibrated yet" instead. The calibration run
|
|
49
|
+
itself is the one place a provisional overall verdict is written, so it can be compared.
|
|
50
|
+
|
|
51
|
+
## Done when (check before reporting the harness as built)
|
|
52
|
+
- [ ] all five parts are in the files (not only described in the reply)
|
|
53
|
+
- [ ] `calibration/` holds the two inputs and `expected.md` with each expectation's source, and a
|
|
54
|
+
first run is recorded in `calibration/runs/` — or the CLAUDE.md says `UNCALIBRATED` and why
|
|
55
|
+
- [ ] the reply says plainly whether the harness is calibrated or not
|
|
56
|
+
- [ ] if `.claude/` cannot be written (headless runs need a human for it), the rules live in a root
|
|
57
|
+
folder and CLAUDE.md imports them — no pointer to a file that does not exist
|