@chrono-meta/fh-gate 3.38.0 → 3.39.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 +36 -0
- package/.claude/rules/fh_4axis_gate.md +6 -1
- package/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +1 -1
- package/README.ja.md +2 -2
- package/README.ko.md +2 -2
- package/README.md +5 -4
- package/README.zh.md +2 -2
- package/docs/ETHOS.md +3 -1
- package/docs/codex-compat.md +2 -2
- package/knowledge/shared/harness-core/agents_md_runtime_details.md +1 -1
- package/knowledge/shared/harness-core/fh_module_contract.md +2 -0
- package/knowledge/shared/harness-core/fh_three_layer_canon.md +7 -0
- package/knowledge/shared/harness-core/governance_engineering_definition.md +81 -0
- package/knowledge/shared/harness-core/governor_landing_before_compact.md +57 -0
- package/knowledge/shared/harness-core/lease_record_channel.md +32 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +60 -0
- package/knowledge/shared/rules/operations.md +16 -0
- package/package.json +9 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-commons/skills/convergence-loop/SKILL.md +8 -0
- package/plugins/fh-commons/skills/convergence-loop/fh-module.yaml +22 -0
- package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +5 -0
- package/plugins/fh-commons/skills/persona-cast/SKILL.md +20 -4
- package/plugins/fh-commons/skills/persona-cast/fh-module.yaml +20 -0
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +26 -0
- package/plugins/fh-meta/skills/steel-quench/SKILL.md +8 -3
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/convergence_verdict.py +177 -0
- package/scripts/lane_gap_hint.py +166 -0
- package/scripts/lane_gap_hint.sh +7 -0
- package/scripts/package_coverage_check.sh +19 -0
- package/scripts/persona_cast_merge.py +235 -0
- package/scripts/probe_live_eval_lib.py +41 -0
- package/scripts/selfcheck.sh +12 -1
- package/scripts/test_convergence_verdict_lanes.sh +67 -0
- package/scripts/test_lane_gap_hint_lanes.sh +91 -0
- package/scripts/test_live_eval_construct_lanes.sh +70 -0
- package/scripts/test_persona_cast_merge_lanes.sh +108 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# test_persona_cast_merge_lanes.sh — known-pair calibration for scripts/persona_cast_merge.py (persona-cast Step 4).
|
|
3
|
+
# Fixture: three lens outputs in parallax shape. designer raises A (unique) and B (shared with qa); qa raises B and C (unique);
|
|
4
|
+
# a11y raises only B → decorative. Each lane checks one promise of Step 4; M1 is the positive control that the same fixture
|
|
5
|
+
# can produce «earned».
|
|
6
|
+
set -u
|
|
7
|
+
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
M="$HERE/persona_cast_merge.py"
|
|
9
|
+
[ -f "$M" ] || { echo "HARNESS-ERROR: $M missing"; exit 2; }
|
|
10
|
+
W="$(mktemp -d)"; trap 'rm -rf "$W"' EXIT
|
|
11
|
+
pass=0; fail=0
|
|
12
|
+
ok() { pass=$((pass+1)); echo " ✅ $1"; }
|
|
13
|
+
bad() { fail=$((fail+1)); echo " ❌ $1"; }
|
|
14
|
+
echo '<html>screen</html>' > "$W/screen.html"
|
|
15
|
+
cat > "$W/designer.md" <<'EOF'
|
|
16
|
+
### Strengths
|
|
17
|
+
- clear headline
|
|
18
|
+
### Concerns
|
|
19
|
+
**Critical** — a person in this seat would stop the release
|
|
20
|
+
- [button.pay "결제하기"] primary action is below the fold · move it up
|
|
21
|
+
**Important** — would file it
|
|
22
|
+
- [`header .logo`] logo overlaps the menu · add spacing
|
|
23
|
+
- the colours feel off somewhere
|
|
24
|
+
### Absence check
|
|
25
|
+
- no empty state shown
|
|
26
|
+
### Open questions
|
|
27
|
+
### Unique-to-this-seat
|
|
28
|
+
- [button.pay "결제하기"]
|
|
29
|
+
- [header .logo]
|
|
30
|
+
EOF
|
|
31
|
+
cat > "$W/qa.md" <<'EOF'
|
|
32
|
+
### Strengths
|
|
33
|
+
### Concerns
|
|
34
|
+
**Important**
|
|
35
|
+
- [Header .LOGO] logo covers the menu so the menu cannot be tested · fix overlap
|
|
36
|
+
**Suggestion**
|
|
37
|
+
- [form#card input[name=cvc]] no reachable error state · add validation message
|
|
38
|
+
### Absence check
|
|
39
|
+
- no test account named
|
|
40
|
+
### Open questions
|
|
41
|
+
### Unique-to-this-seat
|
|
42
|
+
- [form#card input[name=cvc]]
|
|
43
|
+
- [header .logo]
|
|
44
|
+
EOF
|
|
45
|
+
cat > "$W/a11y.md" <<'EOF'
|
|
46
|
+
### Strengths
|
|
47
|
+
### Concerns
|
|
48
|
+
**Critical**
|
|
49
|
+
- [header .logo] logo covers the menu for keyboard users · fix
|
|
50
|
+
### Absence check
|
|
51
|
+
- no focus order shown
|
|
52
|
+
### Open questions
|
|
53
|
+
### Unique-to-this-seat
|
|
54
|
+
- [header .logo]
|
|
55
|
+
EOF
|
|
56
|
+
run() { OUT=$(python3 "$M" --artifact "$W/screen.html" "$@" 2>&1); RC=$?; }
|
|
57
|
+
row() { printf '%s\n' "$OUT" | awk -v l="$1" '$1==l'; }
|
|
58
|
+
run --lens designer="$W/designer.md" --lens qa="$W/qa.md" --lens a11y="$W/a11y.md"
|
|
59
|
+
[ "$RC" = 0 ] && row designer | grep -q 'earned$' && row designer | awk '{exit !($2==2 && $3==1 && $4==1)}' \
|
|
60
|
+
&& ok "M1 control: designer total 2 · no-loc 1 · unique 1 → earned" || { bad "M1 (rc=$RC)"; printf '%s\n' "$OUT" | sed 's/^/ /'; }
|
|
61
|
+
row a11y | grep -q 'decorative on this artifact$' && row a11y | awk '{exit !($4==0)}' \
|
|
62
|
+
&& ok "M2 a lens whose only concern another lens also raised → unique 0 → decorative" || bad "M2 $(row a11y)"
|
|
63
|
+
row designer | awk '{exit !($3==1)}' && ! printf '%s\n' "$OUT" | grep -q 'colours feel off' \
|
|
64
|
+
&& ok "M3 a concern without [location] is counted in no-loc and never merged" || bad "M3"
|
|
65
|
+
printf '%s\n' "$OUT" | grep -qF -- '- [header .logo] seats=a11y,designer,qa' \
|
|
66
|
+
&& ok "M4 location keys normalize case, whitespace and backticks (\`header .logo\` = Header .LOGO)" || bad "M4"
|
|
67
|
+
printf '%s\n' "$OUT" | awk '/^Critical/{c=1} /^Important/{c=0} c && /header \.logo/{f=1} END{exit !f}' \
|
|
68
|
+
&& ok "M5 merged severity = the highest any seat gave (a11y Critical beats designer/qa Important)" || bad "M5"
|
|
69
|
+
row designer | awk '{exit !($5=="1/2")}' && row qa | awk '{exit !($5=="1/2")}' \
|
|
70
|
+
&& ok "M6 self-tag-hit counts only self-tags that were really unique (designer 1/2, qa 1/2)" || bad "M6 $(row designer) | $(row qa)"
|
|
71
|
+
printf '### Strengths\n- fine\n' > "$W/broken.md"
|
|
72
|
+
run --lens designer="$W/designer.md" --lens broken="$W/broken.md"
|
|
73
|
+
[ "$RC" = 2 ] && printf '%s\n' "$OUT" | grep -q 'UNMEASURED: lens broken' && [ -z "$(row broken)" ] \
|
|
74
|
+
&& ok "M7 a lens output with no Concerns section is UNMEASURED (rc 2), never «decorative»" || bad "M7 (rc=$RC)"
|
|
75
|
+
run --lens designer="$W/designer.md" --lens gone="$W/nope.md"
|
|
76
|
+
[ "$RC" = 2 ] && printf '%s\n' "$OUT" | grep -q 'UNMEASURED: lens gone' && ok "M8 a missing lens file is UNMEASURED (rc 2)" || bad "M8 (rc=$RC)"
|
|
77
|
+
OUT=$(python3 "$M" --lens designer="$W/designer.md" 2>&1); RC=$?
|
|
78
|
+
[ "$RC" = 2 ] && ok "M9 no --artifact (no sha256 for the header) is UNMEASURED (rc 2)" || bad "M9 (rc=$RC)"
|
|
79
|
+
run --lens designer="$W/designer.md"
|
|
80
|
+
[ "$RC" = 0 ] && row designer | awk '{exit !($4==2)}' && ok "M10 a lens alone: every kept concern is unique (control for M2)" || bad "M10 $(row designer)"
|
|
81
|
+
# M11 (2026-11-06 blind sim, 3/3 runs saw it): a location with a nested «]» or an inner quoted label is kept whole
|
|
82
|
+
run --lens designer="$W/designer.md" --lens qa="$W/qa.md"
|
|
83
|
+
printf '%s\n' "$OUT" | grep -qF -- '- [form#card input[name=cvc]] seats=qa' && printf '%s\n' "$OUT" | grep -qF -- '- [button.pay "결제하기"] seats=designer' \
|
|
84
|
+
&& ! printf '%s\n' "$OUT" | grep -qF 'qa: ]' && ok "M11 nested brackets and an inner quoted label stay inside the location" || { bad "M11"; printf '%s\n' "$OUT" | grep '^- \[' | sed 's/^/ /'; }
|
|
85
|
+
# M12–M16 (codex R1, 2026-11-06): each would let a decorative lens read «earned». Base: a lens «x» raising only [shared].
|
|
86
|
+
mk() { printf '### Concerns\n%s\n### Absence check\n- none\n' "$2" > "$W/$1.md"; }
|
|
87
|
+
mk base '- [shared] the defect'
|
|
88
|
+
mk sevitem '- **Critical** — [shared] the defect'
|
|
89
|
+
run --lens base="$W/base.md" --lens x="$W/sevitem.md"
|
|
90
|
+
row base | grep -q 'decorative' && row x | awk '{exit !($2==1)}' && ok "M12 «- **Critical** — [loc] text» keeps its location (base stays decorative)" || bad "M12 base=$(row base) x=$(row x)"
|
|
91
|
+
printf '### Concerns\n- [shared] the defect\n## Appendix\n- [padding] example only\n### Absence check\n- none\n' > "$W/appx.md"
|
|
92
|
+
run --lens base="$W/base.md" --lens x="$W/appx.md"; row x | awk '{exit !($4==0 && $2==1)}' && ok "M13 a «## Appendix» ends Concerns — its [padding] does not earn a seat" || bad "M13 $(row x)"
|
|
93
|
+
printf '### Strengths\n### Concerns\n' > "$W/trunc.md"
|
|
94
|
+
run --lens base="$W/base.md" --lens x="$W/trunc.md"; [ "$RC" = 2 ] && printf '%s\n' "$OUT" | grep -q 'UNMEASURED: lens x' \
|
|
95
|
+
&& ok "M14 a reply cut off after «### Concerns» (no Absence check) is UNMEASURED, not «0 concerns → decorative»" || bad "M14 (rc=$RC)"
|
|
96
|
+
mk empty '- [``] made up
|
|
97
|
+
- [padding]'
|
|
98
|
+
run --lens base="$W/base.md" --lens x="$W/empty.md"; row x | awk '{exit !($2==0 && $3==2 && $4==0)}' && ok "M15 an empty location and a concern with no text are dropped to no-loc, never unique" || bad "M15 $(row x)"
|
|
99
|
+
mk quoted '- [button "Save ] now"] the defect'
|
|
100
|
+
run --lens x="$W/quoted.md"; printf '%s\n' "$OUT" | grep -qF -- '- [button "Save ] now"] seats=x' && ok "M16 a «]» inside a quoted label stays in the location" || bad "M16 $(printf '%s\n' "$OUT" | grep '^- \[')"
|
|
101
|
+
# M17–M18 (codex R2)
|
|
102
|
+
printf '### Concerns\n- [shared] the defect\n```\n- [padding] example only\n```\n### Absence check\n- none\n' > "$W/fenced.md"
|
|
103
|
+
run --lens base="$W/base.md" --lens x="$W/fenced.md"; row x | awk '{exit !($2==1 && $4==0)}' && ok "M17 a fenced example inside Concerns is not a finding" || bad "M17 $(row x)"
|
|
104
|
+
run --lens base="$W/base.md" --lens x="$W/trunc.md"; row base | grep -q 'UNMEASURED (a peer lens was unreadable)' && ! row base | grep -q 'earned' \
|
|
105
|
+
&& ok "M18 an unreadable peer leaves no seat verdict (base alone would read «earned»)" || bad "M18 $(row base)"
|
|
106
|
+
[ $((pass+fail)) -eq 18 ] || { echo "HARNESS-ERROR: counted $((pass+fail)) lanes, expected 18"; exit 2; }
|
|
107
|
+
echo "persona_cast_merge lanes: $pass passed · $fail failed"
|
|
108
|
+
[ "$fail" -eq 0 ]
|