@chrono-meta/fh-gate 3.42.0 → 3.44.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 +16 -8
- package/.claude/rules/fh_4axis_gate.md +8 -0
- package/.claude-plugin/marketplace.json +4 -4
- package/AGENTS.md +9 -0
- package/README.ja.md +2 -0
- package/README.ko.md +2 -0
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/docs/HOW_FH_DIFFERS.en.md +37 -0
- package/docs/HOW_FH_DIFFERS.md +39 -0
- package/docs/USER_GUIDE.md +208 -2
- package/docs/model_tier_expectations.md +8 -4
- package/knowledge/shared/harness-core/claude_md_full_reference.md +10 -0
- package/knowledge/shared/harness-core/dispatch_conditional_prohibition.md +18 -0
- package/knowledge/shared/harness-core/fh_module_contract.md +19 -0
- package/knowledge/shared/harness-core/governance_engineering_definition.md +16 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +24 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +42 -0
- package/knowledge/shared/plugin-catalog/recommended_plugins.md +53 -9
- package/package.json +13 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +49 -14
- package/plugins/fh-commons/skills/ko-tech-writer/SKILL_detail.md +60 -0
- package/plugins/fh-commons/skills/ko-tech-writer/fixtures/sense_negative.md +30 -0
- package/plugins/fh-commons/skills/ko-tech-writer/fixtures/sense_positive.md +56 -0
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +55 -2
- package/plugins/fh-meta/skills/auto-decorrelation/SKILL.md +45 -1
- package/plugins/fh-meta/skills/edit-manifest/SKILL.md +14 -1
- package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -1
- package/plugins/fh-meta/skills/meta-prompt-builder/SKILL.md +19 -0
- package/plugins/fh-meta/skills/sim-conductor/SKILL_detail.md +3 -3
- package/plugins/fh-meta/skills/steel-quench/SKILL_detail.md +8 -4
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/agy_launch_guard.sh +49 -0
- package/scripts/agy_remote_run.sh +187 -0
- package/scripts/capability_registry_check.sh +15 -2
- package/scripts/codex_launch_guard.sh +87 -0
- package/scripts/finding_fleet.sh +35 -2
- package/scripts/finding_verifier.sh +6 -2
- package/scripts/ko_tech_writer_calibrate.py +88 -1
- package/scripts/live_eval_trace.py +141 -0
- package/scripts/package_coverage_check.sh +7 -0
- package/scripts/pr_merge_verified.sh +7 -0
- package/scripts/prepush_guard_check.sh +33 -20
- package/scripts/probe_live_eval.sh +6 -3
- package/scripts/probe_live_eval_lib.py +92 -2
- package/scripts/remote_marker_gate.sh +56 -0
- package/scripts/selfcheck.sh +58 -2
- package/scripts/session_checklist.py +109 -5
- package/scripts/session_close_check.sh +16 -0
- package/scripts/sidecar_calibrate.sh +10 -2
- package/scripts/sidecar_wait.sh +21 -1
- package/scripts/sim_isolated_run.sh +17 -2
- package/scripts/test_agy_launch_guard_lanes.sh +227 -0
- package/scripts/test_agy_remote_run_lanes.sh +228 -0
- package/scripts/test_codex_launch_guard_lanes.sh +138 -0
- package/scripts/test_finding_pipeline_lanes.sh +6 -2
- package/scripts/test_fixture_guard_coverage_lanes.sh +71 -10
- package/scripts/test_live_eval_trace_lanes.sh +191 -0
- package/scripts/test_meta_prompt_restate_lanes.sh +36 -0
- package/scripts/test_mutation_probe_lanes.sh +26 -6
- package/scripts/test_pr_merge_verified_lanes.sh +23 -0
- package/scripts/test_preprep_speech_coach_lanes.sh +18 -2
- package/scripts/test_prepush_guard_failure_visibility_lanes.sh +152 -0
- package/scripts/test_remote_marker_gate_lanes.sh +96 -0
- package/scripts/test_session_checklist_lanes.sh +205 -0
- package/scripts/test_session_close_lanes.sh +7 -0
- package/scripts/test_sidecar_calibrate_lanes.sh +4 -0
- package/scripts/test_sidecar_wait_stdin.sh +18 -0
|
@@ -143,6 +143,77 @@ out=$(RMG_GUARD_FILE=templates/_tiny.sh run); rc=$?
|
|
|
143
143
|
[ "$rc" -eq 10 ] && ok "H2: 배열 추출이 5개 미만이면 rc=10 (파서 파손을 «자산 없음» 으로 안 읽는다)" \
|
|
144
144
|
|| ng "H2 어긋남 (rc=$rc) — 깨진 파서가 조용히 통과시킨다"
|
|
145
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
|
+
|
|
146
217
|
echo
|
|
147
218
|
echo "== 되돌림 프로브 — 앵커가 장식인가 =="
|
|
148
219
|
# 필수 필드 루프를 무력화한 사본으로 P1 을 다시 돌린다. 적색이 초록이 되어야 «그 줄이 일한다».
|
|
@@ -182,6 +253,31 @@ else
|
|
|
182
253
|
/usr/bin/grep -q 'remote_marker_gate.sh' "$WF" \
|
|
183
254
|
&& ok "W2: validate.yml 이 remote_marker_gate.sh 를 실제로 부른다(배선됨)" \
|
|
184
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
|
|
185
281
|
fi
|
|
186
282
|
|
|
187
283
|
echo
|
|
@@ -996,6 +996,211 @@ else
|
|
|
996
996
|
fail "L54 rc=$RC rows=$L54_ROWS (want 1, no H) (see $TMPDIR_ROOT/l54.out)"
|
|
997
997
|
fi
|
|
998
998
|
|
|
999
|
+
# L55 — re-extract keeps every line the table parser does not consume (2026-11-14 harvest H3: a result-sheet section
|
|
1000
|
+
# written below the table — 13 lines — vanished on `extract --out`). Known pair + decoys:
|
|
1001
|
+
# preface above the table · a result section below it · a decoy that LOOKS 7-column but is not a row (no «| » lead) ·
|
|
1002
|
+
# an 8-cell line · a real 7-cell row with a judgment (must stay an orphan row, NOT be copied into the kept block too).
|
|
1003
|
+
# Then a second re-extract over that output must be byte-identical (idempotent).
|
|
1004
|
+
build_jsonl "$TMPDIR_ROOT/l55.jsonl" "[{'type':'user','timestamp':'2026-10-18T01:00:00.000Z','message':{'role':'user','content':'Please move the session bar a little higher than it is now.'}}]"
|
|
1005
|
+
L55="$TMPDIR_ROOT/l55.md"
|
|
1006
|
+
run "$TMPDIR_ROOT/l55a.out" extract --transcript "$TMPDIR_ROOT/l55.jsonl" --out "$L55"
|
|
1007
|
+
L55A_RC=$RC
|
|
1008
|
+
python3 - "$L55" <<'PYEOF'
|
|
1009
|
+
import sys
|
|
1010
|
+
p = sys.argv[1]; L = open(p, encoding="utf-8").read().rstrip("\n").split("\n")
|
|
1011
|
+
i = next(k for k, l in enumerate(L) if l.startswith("| # |"))
|
|
1012
|
+
L[i:i] = ["PREFACE-LINE operator note above the table", ""]
|
|
1013
|
+
L += ["", "## 8차 결과 시트", "", "RESULT-LINE-1 merged #1095 after CI green", "",
|
|
1014
|
+
"|decoy|b|c|d|e|f|g|", "| e1 | e2 | e3 | e4 | e5 | e6 | e7 | e8 |",
|
|
1015
|
+
"RESULT-LINE-2 still open: P22-B", "| 9 | 10-17 08:00 | gone utterance | ✅DONE | x | - | - |"]
|
|
1016
|
+
open(p, "w", encoding="utf-8").write("\n".join(L) + "\n")
|
|
1017
|
+
PYEOF
|
|
1018
|
+
run "$TMPDIR_ROOT/l55b.out" extract --transcript "$TMPDIR_ROOT/l55.jsonl" --out "$L55"
|
|
1019
|
+
L55B_RC=$RC; cp "$L55" "$TMPDIR_ROOT/l55_after1.md"
|
|
1020
|
+
run "$TMPDIR_ROOT/l55c.out" extract --transcript "$TMPDIR_ROOT/l55.jsonl" --out "$L55"
|
|
1021
|
+
L55C_RC=$RC
|
|
1022
|
+
L55_KEPT=$(awk '/^## 이전 결과서의 표 밖 내용/{f=1;next} f' "$L55")
|
|
1023
|
+
L55_ORDER=$(printf '%s\n' "$L55_KEPT" | grep -nE '^(PREFACE-LINE|## 8차|RESULT-LINE-1|\|decoy|\| e1 |RESULT-LINE-2)' | cut -d: -f2- | awk '{print $1}' | tr '\n' ',')
|
|
1024
|
+
if [ "$L55A_RC" -eq 0 ] && [ "$L55B_RC" -eq 0 ] && [ "$L55C_RC" -eq 0 ] \
|
|
1025
|
+
&& [ "$L55_ORDER" = "PREFACE-LINE,##,RESULT-LINE-1,|decoy|b|c|d|e|f|g|,|,RESULT-LINE-2," ] \
|
|
1026
|
+
&& [ "$(grep -c 'gone utterance' "$L55")" -eq 1 ] \
|
|
1027
|
+
&& awk '/^## 이전 결과서에서 이어받지 못한 판정/{f=1} f && /gone utterance/{ok=1} /^## 이전 결과서의 표 밖 내용/{f=0} END{exit !ok}' "$L55" \
|
|
1028
|
+
&& [ "$(grep -c 'PREFACE-LINE' "$L55")" -eq 1 ] && [ "$(grep -c '^|decoy|' "$L55")" -eq 1 ] \
|
|
1029
|
+
&& ! printf '%s\n' "$L55_KEPT" | grep -qE '^(📎|↩️|채널 2/2|\|---)' \
|
|
1030
|
+
&& grep -q '표 밖 줄 6줄은 맨 아래' "$L55" \
|
|
1031
|
+
&& cmp -s "$L55" "$TMPDIR_ROOT/l55_after1.md"; then
|
|
1032
|
+
pass "L55 re-extract keeps non-table lines (preface · result section · 7-col-looking decoy · 8-cell line) in order, once; a real row stays an orphan row; a second re-extract is byte-identical"
|
|
1033
|
+
else
|
|
1034
|
+
fail "L55 rc=$L55A_RC/$L55B_RC/$L55C_RC order=$L55_ORDER (see $L55 · $TMPDIR_ROOT/l55_after1.md)"
|
|
1035
|
+
fi
|
|
1036
|
+
|
|
1037
|
+
# L56 — what an independent review reproduced against L55's first version (2026-11-15), each a known-positive:
|
|
1038
|
+
# a note starting with a generated prefix · a note appended to a generated status line · a hand-added row with empty
|
|
1039
|
+
# judgment cells · a fenced block holding a 7-cell line, a separator and two blank lines · a person's own 3-column table.
|
|
1040
|
+
# Known-negative (the control that keeps the regexes honest): the transcript grows between runs, so «채널 2/2 …» and
|
|
1041
|
+
# «📎 원장 … (N lines)» change counts — their stale copies must NOT pile up in the kept block. Then a further run is identical.
|
|
1042
|
+
build_jsonl "$TMPDIR_ROOT/l56.jsonl" "[{'type':'user','timestamp':'2026-10-18T01:00:00.000Z','message':{'role':'user','content':'Please move the session bar a little higher than it is now.'}}]"
|
|
1043
|
+
L56="$TMPDIR_ROOT/l56.md"
|
|
1044
|
+
run "$TMPDIR_ROOT/l56a.out" extract --transcript "$TMPDIR_ROOT/l56.jsonl" --out "$L56"
|
|
1045
|
+
L56A_RC=$RC
|
|
1046
|
+
python3 - "$L56" <<'PYEOF'
|
|
1047
|
+
import sys
|
|
1048
|
+
p = sys.argv[1]; L = open(p, encoding="utf-8").read().rstrip("\n").split("\n")
|
|
1049
|
+
i = next(k for k, l in enumerate(L) if l.startswith("채널 2/2"))
|
|
1050
|
+
L.insert(i + 1, L[i] + " · NOTE-APPENDED by the operator") # keep the pure status line too: its stale copy is the control
|
|
1051
|
+
L += ["", "🟥 훅 기록 NOTE-PREFIX the operator's red note",
|
|
1052
|
+
"| hand | 10-17 07:00 | NOTE-HANDROW a request added by hand | | | | |",
|
|
1053
|
+
"", "```", "| a | b | c | d | e | f | g |", "", "", "code after two blanks", "|---|---|", "```",
|
|
1054
|
+
"", "| k | v | w |", "|---|---|---|", "| 1 | 2 | 3 |"]
|
|
1055
|
+
open(p, "w", encoding="utf-8").write("\n".join(L) + "\n")
|
|
1056
|
+
PYEOF
|
|
1057
|
+
cp "$L56" "$TMPDIR_ROOT/l56_edited.md"
|
|
1058
|
+
build_jsonl "$TMPDIR_ROOT/l56.jsonl" "[{'type':'user','timestamp':'2026-10-18T01:00:00.000Z','message':{'role':'user','content':'Please move the session bar a little higher than it is now.'}},{'type':'user','timestamp':'2026-10-18T01:09:00.000Z','message':{'role':'user','content':'Also make the badge smaller please.'}}]"
|
|
1059
|
+
run "$TMPDIR_ROOT/l56b.out" extract --transcript "$TMPDIR_ROOT/l56.jsonl" --out "$L56"
|
|
1060
|
+
L56B_RC=$RC; cp "$L56" "$TMPDIR_ROOT/l56_after1.md"
|
|
1061
|
+
run "$TMPDIR_ROOT/l56c.out" extract --transcript "$TMPDIR_ROOT/l56.jsonl" --out "$L56"
|
|
1062
|
+
L56C_RC=$RC
|
|
1063
|
+
L56_KEPT=$(awk '/^## 이전 결과서의 표 밖 내용/{f=1;next} f' "$L56")
|
|
1064
|
+
L56_FENCE=$(printf '%s\n' "$L56_KEPT" | awk '/^```/{n++; print; next} n==1{print}' | tr '\n' '~')
|
|
1065
|
+
if [ "$L56A_RC" -eq 0 ] && [ "$L56B_RC" -eq 0 ] && [ "$L56C_RC" -eq 0 ] \
|
|
1066
|
+
&& printf '%s\n' "$L56_KEPT" | grep -q 'NOTE-APPENDED by the operator' \
|
|
1067
|
+
&& printf '%s\n' "$L56_KEPT" | grep -qF "🟥 훅 기록 NOTE-PREFIX the operator's red note" \
|
|
1068
|
+
&& printf '%s\n' "$L56_KEPT" | grep -qF '| hand | 10-17 07:00 | NOTE-HANDROW a request added by hand | | | | |' \
|
|
1069
|
+
&& [ "$L56_FENCE" = '```~| a | b | c | d | e | f | g |~~~code after two blanks~|---|---|~```~' ] \
|
|
1070
|
+
&& printf '%s\n' "$L56_KEPT" | grep -qxF '|---|---|---|' \
|
|
1071
|
+
&& ! grep -q '^| - | b | c |' "$L56" \
|
|
1072
|
+
&& [ "$(printf '%s\n' "$L56_KEPT" | grep -c '^채널 2/2 열음 — raw [0-9]*건 · 압축 요약 [0-9]*건([^)]*)$')" -eq 0 ] \
|
|
1073
|
+
&& [ "$(printf '%s\n' "$L56_KEPT" | grep -c '원장 = .* lines)$')" -eq 0 ] \
|
|
1074
|
+
&& grep -q '^채널 2/2 열음 — raw 2건' "$L56" \
|
|
1075
|
+
&& cmp -s "$L56" "$TMPDIR_ROOT/l56_after1.md"; then
|
|
1076
|
+
pass "L56 kept: prefix-looking note · note on a status line · hand row with empty judgments · fenced code verbatim · own 3-col table; stale status lines do not pile up when counts change; next run identical"
|
|
1077
|
+
else
|
|
1078
|
+
fail "L56 rc=$L56A_RC/$L56B_RC/$L56C_RC fence=$L56_FENCE (see $L56 · $TMPDIR_ROOT/l56_edited.md)"
|
|
1079
|
+
fi
|
|
1080
|
+
|
|
1081
|
+
# L57 — the second independent review (2026-11-15) against L56's version, each reproduced there:
|
|
1082
|
+
# (a) a hook-only H row from a run WITH the hook file must not be kept when the next run has no hook file
|
|
1083
|
+
# (b) skeleton rows of a longer transcript must not be kept when the sheet is re-extracted from a shorter one
|
|
1084
|
+
# (c) an UNCLOSED fence above the table must not swallow it: row 1's judgment is still carried into the live table
|
|
1085
|
+
# (d) a 4-backtick fence holding «```» and a filled 7-cell row is kept verbatim, not split or orphaned
|
|
1086
|
+
# (e) a person's own 7-column table keeps its separator line
|
|
1087
|
+
python3 - "$TMPDIR_ROOT" <<'PYEOF'
|
|
1088
|
+
import json, sys, datetime
|
|
1089
|
+
d = sys.argv[1]
|
|
1090
|
+
def loc(z):
|
|
1091
|
+
t = datetime.datetime.strptime(z, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=datetime.timezone.utc).astimezone()
|
|
1092
|
+
return t.strftime("%Y-%m-%dT%H:%M:%S")
|
|
1093
|
+
def tr(path, texts):
|
|
1094
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
1095
|
+
for k, t in enumerate(texts):
|
|
1096
|
+
f.write(json.dumps({"type": "user", "timestamp": "2026-10-18T01:0%d:00Z" % k, "message": {"role": "user", "content": t}}) + "\n")
|
|
1097
|
+
tr(d + "/l57_long.jsonl", ["first request about the session bar", "second request about the badge", "third request about the footer"])
|
|
1098
|
+
tr(d + "/l57_short.jsonl", ["first request about the session bar"])
|
|
1099
|
+
with open(d + "/l57_hook.jsonl", "w", encoding="utf-8") as f:
|
|
1100
|
+
f.write(json.dumps({"ts": loc("2026-10-18T01:00:00Z"), "n": 1, "text": "first request about the session bar"}) + "\n")
|
|
1101
|
+
f.write(json.dumps({"ts": loc("2026-10-18T05:00:00Z"), "n": 2, "text": "HOOKONLY request typed while a tool ran"}) + "\n")
|
|
1102
|
+
PYEOF
|
|
1103
|
+
L57="$TMPDIR_ROOT/l57.md"
|
|
1104
|
+
run "$TMPDIR_ROOT/l57a.out" extract --transcript "$TMPDIR_ROOT/l57_long.jsonl" --utterances "$TMPDIR_ROOT/l57_hook.jsonl" --out "$L57"
|
|
1105
|
+
L57_RCS="$RC"
|
|
1106
|
+
L57_HROW=$(grep -c '^| H1 | .*HOOKONLY' "$L57") # control: the H row really existed in run 1
|
|
1107
|
+
python3 - "$L57" <<'PYEOF'
|
|
1108
|
+
import sys
|
|
1109
|
+
p = sys.argv[1]; L = open(p, encoding="utf-8").read().rstrip("\n").split("\n")
|
|
1110
|
+
L.insert(1, "```python"); L.insert(2, "x = 1 # FENCE-UNCLOSED the operator never closed this")
|
|
1111
|
+
for k, l in enumerate(L):
|
|
1112
|
+
if l.startswith("| 1 |"):
|
|
1113
|
+
L[k] = l.replace("| | | | |", "| ✅DONE | L57-EVID | - | - |")
|
|
1114
|
+
L += ["", "````", "```", "| 9 | 10-18 01:09 | FENCE4 in fence | x | y | z | w |", "```", "````",
|
|
1115
|
+
"", "OWN-TABLE:", "| a | b | c | d | e | f | g |", "|---|---|---|---|---|---|---|", "| 1x | p | q | | | | |"]
|
|
1116
|
+
open(p, "w", encoding="utf-8").write("\n".join(L) + "\n")
|
|
1117
|
+
PYEOF
|
|
1118
|
+
run "$TMPDIR_ROOT/l57b.out" extract --transcript "$TMPDIR_ROOT/l57_short.jsonl" --out "$L57"
|
|
1119
|
+
L57_RCS="$L57_RCS/$RC"; cp "$L57" "$TMPDIR_ROOT/l57_after1.md"
|
|
1120
|
+
run "$TMPDIR_ROOT/l57c.out" extract --transcript "$TMPDIR_ROOT/l57_short.jsonl" --out "$L57"
|
|
1121
|
+
L57_RCS="$L57_RCS/$RC"
|
|
1122
|
+
L57_KEPT=$(awk '/^## 이전 결과서의 표 밖 내용/{f=1;next} f' "$L57")
|
|
1123
|
+
L57_LIVE=$(awk '/^## /{exit} {print}' "$L57")
|
|
1124
|
+
L57_F4=$(printf '%s\n' "$L57_KEPT" | awk '/^````$/{n++; print; next} n==1{print}' | tr '\n' '~')
|
|
1125
|
+
if [ "$L57_RCS" = "0/0/0" ] && [ "$L57_HROW" -eq 1 ] \
|
|
1126
|
+
&& ! grep -q 'HOOKONLY' "$L57" \
|
|
1127
|
+
&& ! grep -qE '^\| [0-9]+ \| [^|]* \| (second|third) request' "$L57" \
|
|
1128
|
+
&& printf '%s\n' "$L57_LIVE" | grep -qE '^\| 1 \| .*first request.* \| ✅DONE \| L57-EVID \| - \| - \|$' \
|
|
1129
|
+
&& printf '%s\n' "$L57_KEPT" | grep -qF 'FENCE-UNCLOSED' \
|
|
1130
|
+
&& [ "$L57_F4" = '````~```~| 9 | 10-18 01:09 | FENCE4 in fence | x | y | z | w |~```~````~' ] \
|
|
1131
|
+
&& ! grep -q '^| - | 10-18 01:09 | FENCE4' "$L57" \
|
|
1132
|
+
&& printf '%s\n' "$L57_KEPT" | awk '/^OWN-TABLE:/{f=1} f' | grep -qxF '|---|---|---|---|---|---|---|' \
|
|
1133
|
+
&& printf '%s\n' "$L57_KEPT" | grep -qF '| 1x | p | q | | | | |' \
|
|
1134
|
+
&& cmp -s "$L57" "$TMPDIR_ROOT/l57_after1.md"; then
|
|
1135
|
+
pass "L57 no stale H/skeleton rows kept · unclosed fence leaves the table live (judgment carried) · 4-tick fence verbatim · own 7-col separator kept · next run identical"
|
|
1136
|
+
else
|
|
1137
|
+
fail "L57 rc=$L57_RCS hrow=$L57_HROW f4=$L57_F4 (see $L57 · $TMPDIR_ROOT/l57_after1.md)"
|
|
1138
|
+
fi
|
|
1139
|
+
|
|
1140
|
+
# L58 — the third (last) review round (2026-11-15): rows BOTH passes skipped vanished, and a BOM hid the title.
|
|
1141
|
+
# kept verbatim: a spaced «| --- | … |» separator · an aligned «| :--- | … |» separator · a person's «| # | 항목 | … |» header
|
|
1142
|
+
# (all three were skipped by carry_forward AND assumed «carried» by the keep pass) · and a BOM-prefixed sheet must not
|
|
1143
|
+
# leave a stale title in the kept block.
|
|
1144
|
+
build_jsonl "$TMPDIR_ROOT/l58.jsonl" "[{'type':'user','timestamp':'2026-10-18T01:00:00.000Z','message':{'role':'user','content':'Please move the session bar a little higher than it is now.'}}]"
|
|
1145
|
+
L58="$TMPDIR_ROOT/l58.md"
|
|
1146
|
+
run "$TMPDIR_ROOT/l58a.out" extract --transcript "$TMPDIR_ROOT/l58.jsonl" --out "$L58"
|
|
1147
|
+
L58_RCS="$RC"
|
|
1148
|
+
python3 - "$L58" <<'PYEOF'
|
|
1149
|
+
import sys
|
|
1150
|
+
p = sys.argv[1]; L = open(p, encoding="utf-8").read().rstrip("\n").split("\n")
|
|
1151
|
+
L += ["", "MY-TABLE:", "| # | 항목 | 담당 | 상태 | 증거 | 비고 | 기한 |", "| --- | --- | --- | --- | --- | --- | --- |",
|
|
1152
|
+
"| m1 | x | y | | | | |", "| :--- | :--- | :--- | :--- | :--- | :--- | :--- |"]
|
|
1153
|
+
open(p, "w", encoding="utf-8").write("\ufeff" + "\n".join(L) + "\n")
|
|
1154
|
+
PYEOF
|
|
1155
|
+
run "$TMPDIR_ROOT/l58b.out" extract --transcript "$TMPDIR_ROOT/l58.jsonl" --out "$L58"
|
|
1156
|
+
L58_RCS="$L58_RCS/$RC"; cp "$L58" "$TMPDIR_ROOT/l58_after1.md"
|
|
1157
|
+
run "$TMPDIR_ROOT/l58c.out" extract --transcript "$TMPDIR_ROOT/l58.jsonl" --out "$L58"
|
|
1158
|
+
L58_RCS="$L58_RCS/$RC"
|
|
1159
|
+
L58_KEPT=$(awk '/^## 이전 결과서의 표 밖 내용/{f=1;next} f' "$L58")
|
|
1160
|
+
L58_MINE=$(printf '%s\n' "$L58_KEPT" | awk '/^MY-TABLE:/{f=1;next} f' | tr '\n' '~')
|
|
1161
|
+
if [ "$L58_RCS" = "0/0/0" ] \
|
|
1162
|
+
&& [ "$L58_MINE" = '| # | 항목 | 담당 | 상태 | 증거 | 비고 | 기한 |~| --- | --- | --- | --- | --- | --- | --- |~| m1 | x | y | | | | |~| :--- | :--- | :--- | :--- | :--- | :--- | :--- |~' ] \
|
|
1163
|
+
&& ! grep -q '^| - | :---' "$L58" \
|
|
1164
|
+
&& ! printf '%s\n' "$L58_KEPT" | grep -q '세션 요청 체크리스트 (스켈레톤)' \
|
|
1165
|
+
&& cmp -s "$L58" "$TMPDIR_ROOT/l58_after1.md"; then
|
|
1166
|
+
pass "L58 a person's «| # |» header, spaced and aligned separators kept verbatim in order · BOM sheet leaves no stale title · next run identical"
|
|
1167
|
+
else
|
|
1168
|
+
fail "L58 rc=$L58_RCS mine=$L58_MINE (see $L58)"
|
|
1169
|
+
fi
|
|
1170
|
+
|
|
1171
|
+
# KR1 — KNOWN RESIDUAL (round 4, 2026-11-15), not a pass claim. A person's 7-column table whose header is NOT the
|
|
1172
|
+
# checklist header («| Name | Owner | … |»): its header and filled rows are carried as orphan judgments with the first
|
|
1173
|
+
# cell replaced by «-» (Name · alpha lost), and an empty «| 2 | … |» row is dropped. Measured on the same fixture
|
|
1174
|
+
# against origin/main 3572903: main loses exactly the same cells AND drops the label line and the separator, so this
|
|
1175
|
+
# is not a regression of this change (operator «ㅇㅇ 그러자 추천대로» 2026-11-15: decide by regression, then merge).
|
|
1176
|
+
# What this lane asserts: the part this change does keep (label line + separator survive in order). What it only
|
|
1177
|
+
# reports: the residual loss — printed as KNOWN-RESIDUAL, counted in neither PASS nor FAIL. If the residual stops
|
|
1178
|
+
# reproducing, the lane says so: turn it into a pass lane then.
|
|
1179
|
+
build_jsonl "$TMPDIR_ROOT/kr1.jsonl" "[{'type':'user','timestamp':'2026-10-18T01:00:00.000Z','message':{'role':'user','content':'first request about the bar'}}]"
|
|
1180
|
+
KR1="$TMPDIR_ROOT/kr1.md"
|
|
1181
|
+
run "$TMPDIR_ROOT/kr1a.out" extract --transcript "$TMPDIR_ROOT/kr1.jsonl" --out "$KR1"
|
|
1182
|
+
KR1_RCS="$RC"
|
|
1183
|
+
python3 - "$KR1" <<'PYEOF'
|
|
1184
|
+
import sys
|
|
1185
|
+
p = sys.argv[1]; L = open(p, encoding="utf-8").read().rstrip("\n").split("\n")
|
|
1186
|
+
L += ["", "MY-HUMAN-TABLE:", "| Name | Owner | Due | A | B | C | D |", "|---|---|---|---|---|---|---|",
|
|
1187
|
+
"| alpha | me | 11-20 | x | y | z | w |", "| 2 | | | | | | |"]
|
|
1188
|
+
open(p, "w", encoding="utf-8").write("\n".join(L) + "\n")
|
|
1189
|
+
PYEOF
|
|
1190
|
+
run "$TMPDIR_ROOT/kr1b.out" extract --transcript "$TMPDIR_ROOT/kr1.jsonl" --out "$KR1"
|
|
1191
|
+
KR1_RCS="$KR1_RCS/$RC"
|
|
1192
|
+
KR1_KEPT=$(awk '/^## 이전 결과서의 표 밖 내용/{f=1;next} f' "$KR1" | awk '/^MY-HUMAN-TABLE:/{f=1} f' | tr '\n' '~')
|
|
1193
|
+
if [ "$KR1_RCS" = "0/0" ] && [ "${KR1_KEPT#MY-HUMAN-TABLE:~|---|---|---|---|---|---|---|~}" != "$KR1_KEPT" ]; then
|
|
1194
|
+
pass "KR1 (kept part) a person's table: label line and separator survive in order"
|
|
1195
|
+
else
|
|
1196
|
+
fail "KR1 (kept part) rc=$KR1_RCS kept=$KR1_KEPT (see $KR1)"
|
|
1197
|
+
fi
|
|
1198
|
+
if grep -qF '| alpha |' "$KR1" || grep -qF '| Name |' "$KR1"; then
|
|
1199
|
+
echo "ℹ️ KR1 residual no longer reproduces (Name/alpha cells survive) — promote KR1 to a pass lane"
|
|
1200
|
+
else
|
|
1201
|
+
echo "⚠️ KNOWN-RESIDUAL KR1: a different-header 7-column table's rows become orphan judgments with «-» in the first cell (Name · alpha lost) and its empty «2» row is dropped — same as origin/main 3572903; not counted as a pass"
|
|
1202
|
+
fi
|
|
1203
|
+
|
|
999
1204
|
echo "── $PASS_COUNT passed, $FAIL_COUNT failed ──"
|
|
1000
1205
|
|
|
1001
1206
|
if [ "$FAIL_COUNT" -gt 0 ]; then
|
|
@@ -100,6 +100,13 @@ _lane "⑤c-M «## 🟥 이 새벽이 잡은 것» is not the section" "$CA"
|
|
|
100
100
|
- x')"
|
|
101
101
|
_lane "⑤c-C no fh_completed file → no ⑤-catches line" '⑤-catches' 0 "$(_fixture 0 '')"
|
|
102
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
|
+
|
|
103
110
|
# ⑤ card-last fixture premise — the two ⑤ lanes are ORDERING lanes: each asserts what the subject
|
|
104
111
|
# does when one file is strictly newer than another. Establishing that ordering by writing one file
|
|
105
112
|
# after the other is not establishing it — it is hoping for it.
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
# Exit: 0 = all lanes pass; 1 = at least one failed.
|
|
14
14
|
|
|
15
15
|
set -uo pipefail
|
|
16
|
+
# Every agy in this file is a FAKE (a stub script), and agy_launch_guard.sh refuses any agy launch
|
|
17
|
+
# without an isolation marker. The guard's own refusal is tested in test_agy_launch_guard_lanes.sh;
|
|
18
|
+
# here the marker only lets the fakes through so these lanes keep measuring what they measure.
|
|
19
|
+
export FH_AGY_ISOLATION=container
|
|
16
20
|
|
|
17
21
|
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
18
22
|
CAL="$REPO/scripts/sidecar_calibrate.sh"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
# P3 the caller's own stdin is NOT consumed by the wrapper (spool regression)
|
|
25
25
|
# P4 verdict codes: TIMEOUT=1 · EMPTY=0 · COMPLETE=0, and EMPTY/COMPLETE are distinguished
|
|
26
26
|
# P5 an unwritable outfile is exit 2, not "EMPTY" (a false clean on the typed channel)
|
|
27
|
+
# P10 a model the CLI refuses is HARNESS-ERROR (rc 3), not COMPLETE · P10b control
|
|
27
28
|
#
|
|
28
29
|
# Verdicts are read by running the wrapper DIRECTLY — piping it into `tail` and reading `$?`
|
|
29
30
|
# answers with tail's status and turns a real exit 1 green.
|
|
@@ -176,6 +177,23 @@ else
|
|
|
176
177
|
bad "P8 stderr or child exit code lost (out='$(head -c 40 "$TD/p8.out" 2>/dev/null)' verdict='$(head -1 "$TD/p8.txt")')"
|
|
177
178
|
fi
|
|
178
179
|
|
|
180
|
+
# P10 — a model the CLI refuses (measured 2026-11-16: codex «-m gpt-5.5» → HTTP 400 "not supported when
|
|
181
|
+
# using Codex with a ChatGPT account", rc 1) is a HARNESS-ERROR, never COMPLETE: a COMPLETE verdict with
|
|
182
|
+
# an error body reads as «the reviewer answered and found nothing». Control P10b: an ordinary non-zero exit
|
|
183
|
+
# with other text stays COMPLETE (the new verdict must not swallow every failure).
|
|
184
|
+
SIDECAR_POLL=1 bash "$SW" "$TD/p10.out" 20 -- sh -c 'echo "ERROR: {\"type\":\"error\",\"status\":400,\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The '"'"'gpt-5.5'"'"' model is not supported when using Codex with a ChatGPT account.\"}}" >&2; exit 1' >"$TD/p10.txt" 2>&1 </dev/null; p10rc=$?
|
|
185
|
+
if grep -q 'SIDECAR_VERDICT=HARNESS-ERROR' "$TD/p10.txt" && ! grep -q 'SIDECAR_VERDICT=COMPLETE' "$TD/p10.txt" && [ "$p10rc" -eq 3 ]; then
|
|
186
|
+
ok "P10 a refused model is SIDECAR_VERDICT=HARNESS-ERROR (rc 3), not COMPLETE"
|
|
187
|
+
else
|
|
188
|
+
bad "P10 refused model: rc=$p10rc verdict='$(grep -m1 SIDECAR_VERDICT "$TD/p10.txt")'"
|
|
189
|
+
fi
|
|
190
|
+
SIDECAR_POLL=1 bash "$SW" "$TD/p10b.out" 20 -- sh -c 'echo "some review text"; exit 1' >"$TD/p10b.txt" 2>&1 </dev/null; p10brc=$?
|
|
191
|
+
if grep -q 'SIDECAR_VERDICT=COMPLETE exit=1' "$TD/p10b.txt" && [ "$p10brc" -eq 0 ]; then
|
|
192
|
+
ok "P10b control: an ordinary non-zero exit stays COMPLETE exit=1"
|
|
193
|
+
else
|
|
194
|
+
bad "P10b control: rc=$p10brc verdict='$(grep -m1 SIDECAR_VERDICT "$TD/p10b.txt")'"
|
|
195
|
+
fi
|
|
196
|
+
|
|
179
197
|
echo "----"
|
|
180
198
|
echo "sidecar_wait stdin anchor: $pass passed, $fail failed"
|
|
181
199
|
[ "$fail" -eq 0 ] || exit 1
|