@chrono-meta/fh-gate 3.19.0 → 3.20.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.
@@ -11,25 +11,25 @@
11
11
  "plugins": [
12
12
  {
13
13
  "name": "fh-meta",
14
- "version": "3.19.0",
14
+ "version": "3.20.0",
15
15
  "description": "New in 2.2.0: BREAKING (gate): chamber step 6 now reads ACTUAL.md, not BUDGET.md — an in-flight chamber run whose actual cost sits in BUDGET.md blocks until the ACTUAL: line moves to tracks/_chamber/<slug>/ACTUAL.md (the runner prints the path). Why: BUDGET.md's pre-verdict hash IS the ordering witness, and step 6 hard-blocked until that same file changed, so every run that reached COMPLETE necessarily mutated a witnessed artifact and verify returned TAMPERED — the chamber's promotion condition was unsatisfiable by construction, not by strictness. Two roles (immutable witness / post-verdict calibration sink) had collided in one file; each was correct alone, so neither side's code showed the conflict. Also: ko-tech-writer Step 2/4-b scans are now calibration-backed (known-pair fixtures + reproducible command, shipped) — discrimination is proven, 'zero residue' is explicitly NOT; chamber lane suite 12 -> 33 including the runner x witness seam no test covered; chamber_run.sh now teaches the two-commit discipline (gate hashes and verdict hash must land in separate commits/PRs — it previously advised the opposite). New in 2.1.0: BREAKING (gate): `crossfamily: declined` in an Axes 2-3 marker now requires grounds naming a record path that RESOLVES on disk — bare `declined`, and `declined` justified by author judgment, are blocked at commit. Remedy: cite where the operator decision lives (e.g. `.. — operator declined sidecars, per knowledge/shared/rules/operational_adaptation.md`), or use `DEGRADED_PANEL_UNUSED` if a panel was reachable and you chose not to recruit it — which is what author judgment actually is. `declined` was the only enum value with no grounds requirement; a cross-family review then broke the first (vocabulary-grep) fix three ways — self-validating on the value's own token, vacuous keyword passes, and over-blocking real declinations in natural prose — so the check asserts a resolvable record instead of words. Also: standpoint axis gains `tier1b` (a STATIC read of a target repo, executed nothing) plus a decide-in-order procedure, after blind floor-tier sims graded pure cold-reads as `tier2` three rounds running; steel-quench Wave 1's sixth angle (gate-locality) gains the output-template row it never had, so a mandatory angle stops being structurally unreportable; verify-bidirectional gains category 5 (prescriptive doctrine statement); Sister Asset Protocol gains an active-adoption trigger; new resident doctrine — Mechanization Boundary, Local Execution First, Skeleton-not-Muscle, Expedition track, and this package's versioning policy. Hub meta-operations toolkit — 35 skills + 7 agents. New in 2.0.1: harness-doctor cadence hook, portability lint wired into pre-commit, branch_claim.sh claim-count-vs-tree-count warning, louder confidentiality-scan fail-open notice, fh-gate.sh missing-package.json survival, identity ① reclassified 🟢 (cross-harness adapters + relay argument channel). New in 1.4.53: `fh-codex-doctor` (npm bin) — Codex adapter drift scanner; reads the documented M1/M2/M3 skill tier map + skill/agent source and reports codex-native/adapter-required/claude-native/unclassified per unit, wired into `npm test`/`prepublishOnly` (fail-closed on unclassified Claude-native primitives). New in 1.4.49: steel-quench gains Step 0.6 Verdict-Invariance Probe (groundedness axis — a load-bearing judged gate's verdict must track behavior, not rubric phrasing; measured flip-count over cross-family paraphrases; arXiv:2605.06161 Policy Invariance anchor); multi_model_sidecar_strategy §Vendor-native harness (a model is strongest in its own vendor CLI — Claude/CC, GPT/codex, Gemini/Antigravity; a universal router degrades all of them, so it stays an autocomplete/QA sidecar, never orchestration); predelete_check.sh fail-closed rewrite; memory-hygiene A-TMA anchor. New in 1.4.48: phantom-quench + steel-quench gain external frontier anchors (arXiv:2607.02052 package-hallucination; arXiv:2607.02057 prompt-coverage-adequacy); README model-flat claim reframed from a per-release point-curve to structural invariants (operation flattens across tiers; depth tier-order fixed within a generation). New in 1.4.47: onboarding step ① surfaces the Mode D companion-store session-start load in the auto-read salience anchor (previously only in the local binding + rules, so a greeting could skip the load). New in 1.4.46: context-doctor command-output axis (route to rtk/proxy for verbose CLI stdout, complementing .claudeignore; risk-gated to token-scarce envs). New in 1.4.41: context-doctor 2026 trigger vocab (context engineering/rot/collapse) + phantom-citation hardening; hub measurement-integrity-checklist (cross-model measurement pre-flight: display-name pin/reps≥3/discriminating probe). New in 1.4.40: install-wizard queryable-wiki scaffold (INDEX + session-start read + R/W/C ingest). New in 1.4.39: auto-decorrelation (cross-family verifier sidecar recruitment) + video-ingest (capability-routed video ingestion). New in 1.4.x: verify-axis check-class taxonomy (mandatory-pass/measured/judged), no-reinvention Tier-0 inventory, 7-class failure taxonomy, Destructive-Op Gate, Wave-T (Temper), tier-floor governance, Mode D Model Notice, FC consent lane, default-Sonnet guidance. New in 1.3.0: public-surface-audit, field-harvest Mode B auto-trigger, 4-axis gate scope ext. Validated cross-CLI: Claude Code, Codex, Gemini.",
16
16
  "source": "./plugins/fh-meta"
17
17
  },
18
18
  {
19
19
  "name": "fh-commons",
20
- "version": "3.19.0",
20
+ "version": "3.20.0",
21
21
  "description": "Project-agnostic utility skills — 6 skills (convergence-loop · deliberation · mcp-circuit-breaker · token-budget-gate · ko-tech-writer · persona-cast) + 7 agents (quench-challenger + the web-review cast: designer · ux-writer · fe-dev · be-dev · qa · a11y). Domain-independent utilities transplantable into any project.",
22
22
  "source": "./plugins/fh-commons"
23
23
  },
24
24
  {
25
25
  "name": "fh-qp",
26
- "version": "3.19.0",
26
+ "version": "3.20.0",
27
27
  "description": "QP (Quality Platform) — the generic edition of a field QA harness's Prepare→Automation→Regression loop as an FH plugin: 4 skills (qp router · qp-plan · qp-run · qp-regress) + qp_tools.sh (target-class · adapter-probe · mask · surface-reach · mtm-check · run-verbs, typed exit codes) + a zero-domain-constant profile slot + 29 known-pair lanes. Drives web targets through the session's Playwright MCP and desktop targets through computer-use MCP (mobile deferred); calls a registered qasp typed capability when one exists (strictest-wins) — none is registered today, so the MCP fallback is the first edition. Verdict contract: a MACHINE closure requires a recorded assertion; a failed first step is attributed BLOCKED, not FAIL; surface_reach counts every TC in the denominator. Born as chamber run #18 (EMIT, 2026-09-05).",
28
28
  "source": "./plugins/fh-qp"
29
29
  },
30
30
  {
31
31
  "name": "fh-preprep",
32
- "version": "3.19.0",
32
+ "version": "3.20.0",
33
33
  "description": "preprep — a presentation-preparation harness. 1 skill. One CLI over 17 lanes (7 built-in + 10 module) that reads a declared surface manifest and checks a talk's assets against each other: canonical terms, jargon glosses, retired vocabulary, inter-slide dependencies, pacing, get/put round-trips, adjacent duplication, slide relations, geometry, attribute consistency, fonts, diagrams, slide refs, and screen-parity between manuscript and deck. Verdict contract: exit 0 pass / 1 findings / 2 cannot-judge — a surface that could not be read is UNMEASURED, never 0. Promoted out of fh-commons 2026-09-13 after the skill grew past one role (routing / lane modules / fixtures).",
34
34
  "source": "./plugins/fh-preprep"
35
35
  }
package/CATALOG.md CHANGED
@@ -737,6 +737,10 @@ Sister-asset cross-audit treating FH's companion store, gbrain, and Obsidian as
737
737
  **File:** `knowledge/shared/harness-core/live_surface_automation_pattern.md`
738
738
  Live-surface automation pattern — the capability pattern FH routes to when a mapping project needs an agent to drive a live UI surface: the cross-platform observe-act-verify contract, the Appium-less principle, and the hybrid-WebView vision-synthesis rule. FH routes drivers (no-reinvention).
739
739
 
740
+ ### 2026-09-24 | pattern | visual-assets, animation, apng, instrument-calibration, operator-in-the-loop, warp
741
+ **File:** `knowledge/shared/patterns/visual-asset-repair-loop.md`
742
+ Repairing raster animation assets with an operator in the loop — serve-and-verify preview, calibrated measures (EDT stroke width · second-moment ellipse IoU · contour row-median body sway), reconstruction-as-control for exact integer-offset fixes, direction-separable warp instead of cut-and-paste, and turning the eye test into a gate.
743
+
740
744
  ### 2026-07-17 | pattern | ensemble-union, detection-task, voting-vs-union (backfill)
741
745
  **File:** `knowledge/patterns/ensemble_union_detection_task_pattern.md`
742
746
  Ensemble union pattern for detection tasks — detection ensembles combine by UNION (recall gain), generation ensembles by VOTING; field-measured on a fixed open-weight 3-model panel.
package/CLAUDE.md CHANGED
@@ -424,6 +424,12 @@ git commit …
424
424
  directly. Normal path: `git switch -c <branch>` → push the branch → `gh pr create` → after review
425
425
  `gh pr merge --squash --delete-branch --admin` (self-approval is impossible when you authored the PR,
426
426
  so `--admin` after a completed review is the normal route, not a shortcut).
427
+ 🟥 **Run that merge as `bash scripts/pr_merge_verified.sh <PR#> --rerun '<the lane that exercises the
428
+ change>'`** — it records the PR head *before* the merge deletes it, merges with exactly the flags
429
+ above, then re-runs your lane on the merged `main` and compares every file the branch touched. A
430
+ green `gh pr merge` only says the merge happened, not that the squash carried the branch
431
+ (2026-09-21: four merges, none checked). `--rerun` is required and refused before merging if it is
432
+ missing or does nothing (`true`, `echo …`).
427
433
 
428
434
  **Mechanically enforced** by `templates/.git-hooks/pre-push`, which blocks a direct push to
429
435
  `main`/`master` unless the explicit `MAIN_PUSH_OK=1` acknowledgment is set (same channel shape as
@@ -4323,3 +4323,55 @@
4323
4323
  ⚠️ 그리고 ⓐ 가 이 세션에 **실피해**를 남겼다 — 가짜 HOME 스파이크가 운영자 userData 에
4324
4324
  중복 테마(`codex-pet-chunsik-2`)를 심었고, 마감에서 열거·백업·제거했다. 팔이 그 함정을
4325
4325
  문서화한 것과 **그 함정에 이미 빠져 있던 것**은 별개다.
4326
+
4327
+ - date: 2026-09-24
4328
+ session: 57e9186d (FH 거버너 · FoD 야간 2차)
4329
+ agent: general-purpose (opus)
4330
+ task: >-
4331
+ ㉛ observe-and-heal — FH 게이트 항목이 다른 도구와의 경합으로 간헐적으로 사라지는 것을
4332
+ 「부팅 1회 관측→어긋날 때만 치유 + 주기 관측만」으로 닫는다. 조건 넷(부팅당 1회를 구조로 ·
4333
+ 어긋날 때만 쓴다 · 무엇을 바꿨는지 남긴다 · 실패를 침묵하지 않는다)과 known-negative 를
4334
+ 임무문에 명시했다.
4335
+ count: 1
4336
+ note: >-
4337
+ 🟥 마감 검사의 tally 는 **320** 을 셌다. 내가 이름으로 아는 디스패치는 **이 하나**다.
4338
+ 차이는 귀속 불가다 — 압축 전 구간 · 병렬 peer 세션 다섯(①-c 가 잡은 119 35783 3586 7648
4339
+ 87205)이 같은 날짜 칸에 합산된다. 어제·그제 항목이 이미 이름 붙인 같은 사각이고,
4340
+ **지어내지 않는다.** 이 엔트리는 「신원을 아는 것」만 담는다.
4341
+ outcome: partial
4342
+ evidence: >-
4343
+ 산출은 실물로 랜딩했다(FoD PR #101, 레인 `test_gate_heal_lanes.js` 62다리, 게이트 191/0,
4344
+ 되돌림 프로브 둘). 내가 독립 재현한 것: 게이트 직접 실행 · 레인 단독 실행 ·
4345
+ 되돌림 4단(적용확인 1 → rc=1/FAIL 3 → 복원 잔존 0 → rc=0) · 구조 넷 diff 직독.
4346
+ 🟥 **partial 인 이유**: cross-family(gpt-5.5) 적대검증이 여섯 중 셋을 열었고,
4347
+ **그중 하나는 팔의 보고가 거짓이었다** — *"heal 재실행 진입점을 안 내보낸다"* 고 했는데
4348
+ `:306` 이 `performBootHeal` 을 그대로 export 한다. 제품 호출부가 하나인 건 사실이지만
4349
+ 그건 「지금 호출부가 하나」이지 「구조적 보장」이 아니다. 나머지 둘도 같은 축이었다
4350
+ (UNKNOWN 비쓰기가 주입 함수에 위임됨 · tick 실패가 `state.last` 에만 들어가 읽는 곳이 0).
4351
+ learning: >-
4352
+ 🟥 **팔이 「구조로 막았다」고 말할 때 그 말이 가장 검증이 필요하다.** 이번 건에서 팔은
4353
+ 조건 넷을 전부 만족했다고 보고했고 레인 62개가 초록이었는데, **레인 자신이 그 주장을
4354
+ 못 재는 칸**(export 여부 · 주입 함수 신뢰 · state 를 읽는 곳이 있나)에서 셋이 열렸다.
4355
+ 같은 계열 리뷰로는 안 나왔을 것이다 — 저자의 낙관적 독해를 공유하기 때문이다.
4356
+ ⇒ **게이트 코드는 cross-family 가 필수**라는 §Field-Harness Load-Bearing Change Gate 가
4357
+ 장식이 아님을 이 건이 실측으로 보였다. 팔의 보고를 받고 «게이트 191/0» 만 보고 머지했으면
4358
+ 셋 다 안 잡혔다.
4359
+ ⚠️ 팔이 자기 실수 하나를 **스스로 보고**한 것은 신뢰할 만했다(게이트 라벨로 레인을 매핑해
4360
+ 첫 완주가 FAIL 1). 그 정직성이 위 거짓 주장과 공존한다 — **자기보고는 부분적으로만 믿는다.**
4361
+
4362
+ - date: 2026-09-24
4363
+ session: 6f4b6814 → fork 6b1c29c8 (FH 거버너 · 정책렌즈 2차 · 스쿼시 검증)
4364
+ agent: general-purpose (sonnet ×2 · opus ×3)
4365
+ task: >-
4366
+ ① 캐던스 회수 둘(sonnet): 주간감사 · harness-doctor, 읽기 전용 + 리포트 한 장씩.
4367
+ ② 정책렌즈 2차 정답키용 블라인드 주석(opus ×2): 사본 6파일만, 지배 문장 CORE/BORDERLINE 전수.
4368
+ ③ Meta Muse Glimmer 탈상관 적합성 조사(opus): 1차 출처 대조 + Jev 교훈.
4369
+ count: 5
4370
+ outcome: partial
4371
+ evidence: >-
4372
+ ①② 산출 전부 사용(weekly_audit_2026-09-24 · harness_doctor_2026-09-24 · KEY_round2.tsv).
4373
+ ③ 판정 INSTALL-TRIAL 을 운영자가 채택해 시험 진행 중.
4374
+ 🟥 partial 인 이유: 주석자 #1 은 **실격** — 내가 준 사본 파일명에 POS/NEG 정답이 박혀 있었다
4375
+ (주석자 본인이 보고). 결함은 팔이 아니라 내 발주였다. #2 를 중립 파일명으로 재발주해 키로 썼다.
4376
+ 주간감사 팔은 자기 selfcheck 출력을 `tail` 로 잘라 rc 를 못 잡았고 그걸 UNCALIBRATED 로
4377
+ 정직하게 적었다 — PASS 로 접지 않았다.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: visual-asset-repair-loop
3
+ description: Techniques for repairing raster animation assets (sprite/APNG frames) with an operator in the loop — measure before tuning, reconstruct past transforms as controls, prefer direction-separable warps over cut-and-paste, and make "does it shake / is it clean" a gate instead of an eye test. Distilled from one night of desktop-pet art repair (2026-09-24) where the operator caught every visual defect first.
4
+ type: reference
5
+ tags: [pattern, visual-assets, animation, instrument-calibration, operator-in-the-loop, field-harness]
6
+ ---
7
+
8
+ # Visual asset repair loop
9
+
10
+ **Provenance.** One night, one field harness (a desktop-pet app whose states are APNG loops), ~12 merged
11
+ art fixes. The operator reviewed every change in a browser preview and **caught every defect before the
12
+ governor did** — outline chips, head/body proportion, a trapezoid face, torn shoulders, frame-to-frame
13
+ shake (twice). Self-catch count: 0. This file is what that night teaches, stated so another harness can
14
+ reuse it without the character, the app, or the company.
15
+
16
+ ## 1. The review surface is part of the instrument
17
+
18
+ - **Serve the bytes the app will read, and prove it.** A preview page that shows an old file is worse than
19
+ no preview. After starting it, fetch each changed asset back through the page's own URL rule and
20
+ byte-compare with the repo copy — and request a nonexistent file to confirm the comparison can fail
21
+ (a 404 control). Twice that night the first comparison was wrong for instrument reasons: a port already
22
+ held by an older preview server (answering 200 for a different directory), and an extraction that pulled
23
+ empty URLs and "compared" nothing.
24
+ - **Look at the operator's scale and background.** Zoomed crops find pixel faults the operator cannot see
25
+ and hide shape faults they can. Render both, and judge at the size the operator reported from.
26
+ - **A crop claim must contain what it claims.** Derive every crop box from the target's own bounding box
27
+ and label it. The governor once reported "joints are clean" from a crop framed on the cheek. Say what the
28
+ crop shows, not what it was meant to show.
29
+ - **An animated image drawn to a canvas is one frame.** Capturing "several loop phases" that way silently
30
+ yields the same frame N times.
31
+
32
+ ## 2. Measure before you tune — and calibrate each measure on a known pair
33
+
34
+ | Question | Instrument that answered it | Controls that proved it alive |
35
+ |---|---|---|
36
+ | Is the new outline the same thickness as the old? | distance-transform ridge width of the dark mask (2 × EDT at local maxima), split by distance from the head | synthetic bars of 6 px and 10 px read back 6.0 and 10.0 |
37
+ | Is the head still an oval? | IoU between the head mask and the ellipse with the same second moments; plus upper-vs-lower width ratio for trapezoid drift | true ellipse 0.999 · trapezoid 0.758 |
38
+ | Does the whole body slide between frames? | per-row left/right contour x, median shift vs frame 0, averaged; range over frames | arm-only motion reads 0 · 2 px body shift reads 2 · real file-read path reads 2 |
39
+
40
+ Two failure shapes to avoid, both hit that night:
41
+ - **Extreme points confuse motion with drift.** Left/right-most pixel amplitude moved "3 → 1 → 3" across
42
+ versions and answered nothing — a waving arm and a sliding body look identical to it. Row-median contour
43
+ shift separates them.
44
+ - **A self-check that feeds data directly skips the path the bug lives on.** The first body-sway tool read
45
+ frames with `list(ImageSequence.Iterator(im))`, which returns the same object repeatedly (every frame
46
+ became the last one → all motions read 0.0). Its self-check passed because it built frame lists in memory.
47
+ The fix added a leg that writes a synthetic APNG and reads it back through the real path.
48
+ - **Carry-over numbers are not measurements.** A stroke width measured on a different motion with a loose
49
+ threshold (8 px) was reused; the true value was 6 px, and the redrawn outline came out visibly heavy.
50
+
51
+ ## 3. When every repair round creates a new artifact, change the question
52
+
53
+ Head-only shrinking (to fix a head that read too large) was attempted seven ways: cut-and-paste with seam
54
+ patching, redrawing the outline, rule-based gap filling, and three partial warps. Every one tore the
55
+ shoulders somewhere, because **"shrink the head, keep the shoulders fixed" forces a discontinuity at the
56
+ joint** — any fill is invented content, any partial pull bends lines.
57
+
58
+ What worked was a **direction-separable warp**: uniform scale on one axis for the whole figure (so no
59
+ relative distortion anywhere), and on the other axis scale only above the neck with a short smooth ramp.
60
+ A smooth monotone mapping in one variable cannot kink a line, so the joints stayed the original art. The
61
+ cost (body 7 % narrower) was stated with numbers and accepted by the operator.
62
+
63
+ Heuristic: if two consecutive rounds each introduce a *new* defect class at the same place, stop patching
64
+ that place and ask what constraint makes the place impossible. (Same shape as this repo's convergence rule:
65
+ if it does not converge, loosen or reframe — do not tighten.)
66
+
67
+ ## 4. Reconstruction as a control — exact fixes without re-rendering
68
+
69
+ A batch resize had applied the same scale to every frame but a **different integer offset per frame**
70
+ (it re-centered each frame on its own bounding box), which made still poses shake. To fix only position:
71
+ re-run the old transform from the pre-change originals and require the result to equal the current file
72
+ **pixel for pixel**. Where it matches (9 of 10 motions), the per-frame offsets it computes are exact, and the
73
+ fix is integer shifts — no resampling, pixels untouched. Where it does not match (1 motion), do not touch it:
74
+ the transform is not the whole story there.
75
+
76
+ Corollaries:
77
+ - **Batch normalization must use one offset per motion** (union bounding box), never per frame. Its self-check
78
+ fixture must *contain* inter-frame motion; a fixture whose frames are already aligned passes the bug.
79
+ - **Thresholds depend on the motion type.** A 4 px cut-off correctly found shaking in lively motions and
80
+ missed a lying-still pose where 1 px is visible.
81
+ - **"Restore the original" is not always the goal.** One motion's original itself drifted 3 px; restoring
82
+ made it worse. The operator's intent was "hold it still", so the fix cancelled the measured drift instead.
83
+ Judge each motion against the intent, not against provenance.
84
+
85
+ ## 5. Smaller techniques worth keeping
86
+
87
+ - **Transplant, don't synthesize.** Chipped outline pixels in a few frames were repaired by copying the
88
+ damaged band from the best-aligned clean frame of the same loop (alignment by alpha residual; refuse when
89
+ no donor fits). A morphology repair scored better on its own metric and looked worse — the metric looked
90
+ along the same axis as the repair.
91
+ - **Bisect a defect's origin before blaming the latest change.** The chipped outline existed in the version
92
+ before the two most recent edits; reverting them would have fixed nothing.
93
+ - **A hole connected to the outside is not a hole.** `fill_holes` treats a transparent sliver that leaks to
94
+ the canvas edge through a 1-px gap as "outside". Close the silhouette first, then find the interior.
95
+ - **Test the resampler hypothesis by swapping the resampler.** A white fringe blamed on Lanczos ringing
96
+ survived a switch to box filtering — refuted; the real cause was the leaking hole above.
97
+ - **Land agreements where the next editor reads them.** A "keep the base disc fixed while the character
98
+ turns" decision was never written down; a later batch tool broke it silently and a full search of every
99
+ record channel found nothing. The fix restored it and wrote it into the field harness's asset map.
100
+ - **Make the eye test a gate.** After the operator caught frame shake twice, a ratchet lane (per-motion
101
+ body-sway baseline, block on +0.5 px, block on unmeasured new motions) went into the field gate, and a
102
+ deliberate 1 px shift of one frame was confirmed to be blocked.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
5
5
  "homepage": "https://github.com/chrono-meta/forge-harness#readme",
6
6
  "bugs": {
@@ -118,6 +118,8 @@
118
118
  "plugins/fh-qp/skills",
119
119
  "scripts/.env_purity_tokens.defaults",
120
120
  "scripts/activity_log.sh",
121
+ "scripts/post_squash_verify.sh",
122
+ "scripts/pr_merge_verified.sh",
121
123
  "scripts/adapters/fixtures/mate_agent_boundary_known_negative.md",
122
124
  "scripts/adapters/fixtures/mate_agent_boundary_known_positive.md",
123
125
  "scripts/adapters/fixtures/qasp_web_rules_known_negative.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-commons",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-meta",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,5 +1,25 @@
1
1
  # forge-harness (fh-meta) Changelog
2
2
 
3
+ ### [3.20.0] — 2026-09-24 — 스쿼시 머지가 브랜치를 «다 실었나» 를 명령으로 확인한다
4
+
5
+ **minor — 새 출하 스크립트 둘 + 머지 절차 교리 변경.** 소비자의 게이트 수용은 안 깬다(새 스크립트는
6
+ 직접 부를 때만 돈다 — 훅에 배선되지 않았다).
7
+
8
+ - **`scripts/post_squash_verify.sh`** (신규 출하) — 스쿼시 머지 뒤 ① 브랜치가 건드린 경로마다 **트리 엔트리
9
+ (mode·type·oid)** 를 머지 커밋과 대조(SAME / COMBINED / DIFFERS / EXTRA) ② `--rerun` 을 머지된 트리의 임시
10
+ 워크트리에서 실행. **`--rerun` 없으면 rc=2** — «① 만 초록» 이 불가능하다. no-op(`:`·`true`·echo 만) rc=3 ·
11
+ 출력 없는 rc=0 은 rc=4. cross-family 5라운드 수렴(개행/`\001` 경로 · tip==merge · 2부모 머지 · 누락 피연산자
12
+ 무한루프 · git diff 실패 삼킴 · `chmod +x` 누락을 SAME 으로 보던 자리), 레인 21/0.
13
+ - **`scripts/pr_merge_verified.sh`** (신규 출하) — 머지 경로 배선. PR head 를 **머지 전에** 기록하고
14
+ `--match-head-commit` 으로 고정 → `gh pr merge --squash --delete-branch --admin` → state==MERGED 확인 →
15
+ 위 검증 자동 실행. 모든 거절(인자·no-op rerun·읽을 수 없는 head)은 **머지 전에**. 큐잉·지연 머지는 rc=6
16
+ «검증 안 됨». 레인 10/0(가짜 `gh` · 로컬 bare origin).
17
+ - **CLAUDE.md §Integration branch** — 머지를 `pr_merge_verified.sh <PR#> --rerun '<그 변경을 도는 레인>'` 으로.
18
+ 플로어(sonnet) 블라인드 sim: 이 줄이 있는 팔 3/3 이 스크립트 사용 · 없는 팔 0/3.
19
+ - **`knowledge/shared/patterns/visual-asset-repair-loop.md`** (신규) — 래스터 애니메이션 자산을 운영자와 함께
20
+ 고치는 기법(서빙 바이트 대조 미리보기 · 보정된 계기 셋 · 재현을 컨트롤로 · 방향별 워프 · 눈 검사를 게이트로).
21
+ 한 필드 하네스·하룻밤 n=1 이라는 범위를 문서가 명시한다.
22
+
3
23
  ### [3.19.0] — 2026-09-24 — 「못 쟀다」와 「못 믿는다」를 다른 값으로 가른다
4
24
 
5
25
  **minor — 판정 어휘가 넷으로 늘어난 행동 변경.** 소비자의 게이트 수용은 안 깬다
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-qp",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -0,0 +1,176 @@
1
+ #!/usr/bin/env bash
2
+ # post_squash_verify.sh — after a squash merge, check that the merge carried the branch AND that
3
+ # the instrument still passes on the merged tree. Two questions, and the second is mandatory.
4
+ #
5
+ # Origin: tracks/_meta/fh_signal_2026-09-21_post-squash-verify.md. Four PRs were squash-merged in
6
+ # one day and none of them was compared afterwards — a green `gh pr merge --squash` was taken as
7
+ # "the content landed". A squash guarantees no such thing: conflict resolution, partial apply or a
8
+ # moved base can make the branch tip and the merged main differ, silently.
9
+ #
10
+ # ① blob check is each file the branch touched identical on the merge commit?
11
+ # ② rerun does the instrument pass on the MERGED tree (the branch + everything else on main)?
12
+ #
13
+ # 🟥 ② IS REQUIRED. Without --rerun the script refuses to run (rc=2). A script that runs only ① and
14
+ # prints green is the shape this repo already got wrong once: a strong half nobody calls beside a
15
+ # weak half that looks like the whole check (CLAUDE.md §Destructive-Op Gate, 2026-08-23 retraction
16
+ # of predelete_check.sh). ① alone cannot see "same files, but broken once combined".
17
+ # 🟥 A TRIVIAL ② IS REFUSED (rc=3): empty, `:`, `true`, `exit 0` and friends. And a ② that exits 0 but
18
+ # prints nothing is reported as an instrument failure (rc=4), not a pass — silence is not a result.
19
+ #
20
+ # USAGE
21
+ # bash scripts/post_squash_verify.sh --tip <branch-tip-sha> --merge <squash-commit> \
22
+ # --rerun '<command that exercises the change>' [--repo <path>] [--keep]
23
+ # --tip record it BEFORE merging (the branch is deleted by --delete-branch); `git reflog` or the
24
+ # PR's headRefOid also has it: gh pr view <n> --json headRefOid -q .headRefOid
25
+ # --merge the squash commit on the integration branch (default: HEAD of --repo)
26
+ # --rerun run with `bash -c` inside a throwaway detached worktree at --merge. Cwd = that worktree.
27
+ #
28
+ # EXIT 0 both halves pass · 1 content mismatch or ② failed · 2 usage (incl. missing --rerun)
29
+ # 3 trivial ② refused · 4 instrument/harness error (② silent, worktree not creatable, bad sha)
30
+ #
31
+ # Labels for ①, per path the branch changed (merge-base(tip, merge^) .. tip, machine-listed):
32
+ # SAME blob on --merge == blob on --tip (incl. both absent = deletion carried)
33
+ # COMBINED differs, AND main also changed that path since the branch was cut — expected for a
34
+ # merge, not a failure; ② is what vouches for it
35
+ # 🟥 DIFFERS differs and main did not touch the path — the squash lost or altered branch content
36
+ # Extra paths in the squash commit that the branch never touched are reported as 🟥 EXTRA.
37
+
38
+ set -uo pipefail
39
+
40
+ TIP=""; MERGE=""; RERUN=""; RERUN_SET=0; REPO="."; KEEP=0; PRECHECK=0
41
+ # 🟥 cross-family R3: `shift 2` with one arg left fails WITHOUT shifting, so a trailing `--tip` looped
42
+ # forever. Every operand-taking option checks $# first.
43
+ _need() { [ $# -ge 2 ] || { echo "🟥 $1 needs a value" >&2; exit 2; }; }
44
+ while [ $# -gt 0 ]; do
45
+ case "$1" in
46
+ --tip) _need "$@"; TIP="${2:-}"; shift 2 ;;
47
+ --merge) _need "$@"; MERGE="${2:-}"; shift 2 ;;
48
+ --rerun) _need "$@"; RERUN="${2-}"; RERUN_SET=1; shift 2 ;;
49
+ --repo) _need "$@"; REPO="${2:-}"; shift 2 ;;
50
+ --keep) KEEP=1; shift ;;
51
+ --precheck) PRECHECK=1; shift ;; # validate --rerun only (rc 0/2/3), touch no git state — for callers that must refuse BEFORE merging
52
+ -h|--help) sed -n '2,40p' "$0"; exit 0 ;;
53
+ *) echo "unknown arg: $1" >&2; exit 2 ;;
54
+ esac
55
+ done
56
+
57
+ if [ "$RERUN_SET" -eq 0 ]; then
58
+ echo "🟥 --rerun is required. ① alone cannot see a merge that is byte-correct per file but broken" >&2
59
+ echo " once combined with the rest of main. Name the command that exercises this change." >&2
60
+ exit 2
61
+ fi
62
+ [ "$PRECHECK" -eq 1 ] || [ -n "$TIP" ] || { echo "🟥 --tip is required (the branch tip before merge)" >&2; exit 2; }
63
+
64
+ # ── trivial-command refusal ── normalise whitespace and a trailing ';' then compare
65
+ _r=$(printf '%s' "$RERUN" | tr -s '[:space:]' ' ' | sed -e 's/^ *//' -e 's/ *;* *$//')
66
+ case "$_r" in
67
+ ""|":"|"true"|"/usr/bin/true"|"/bin/true"|"exit"|"exit 0"|"return 0"|"echo"|"echo ok"|"true && true"|": && :")
68
+ echo "🟥 --rerun '$RERUN' does not exercise anything — refused. A trivial command's rc=0 is not ②." >&2
69
+ exit 3 ;;
70
+ esac
71
+ # 🟥 cross-family R1 (codex): the exact list above let `printf ok` / `echo ok; :` through — rc=0 with
72
+ # output, so the silence guard passed too. Refuse a command whose EVERY segment (split on ; && || |)
73
+ # starts with a no-op word. Named residual: wrapping (`bash -c 'echo ok'`, a script that only echoes)
74
+ # still passes — closing that needs judging what a command does, which is not this script's call.
75
+ _noop=1
76
+ while IFS= read -r _seg; do
77
+ _w=$(printf '%s' "$_seg" | sed -e 's/^[[:space:]]*//' | cut -d' ' -f1)
78
+ [ -z "$_w" ] && continue
79
+ case "$_w" in :|true|/bin/true|/usr/bin/true|echo|printf|exit|return) : ;; *) _noop=0; break ;; esac
80
+ done <<< "$(_x="${RERUN//&&/$'\n'}"; _x="${_x//||/$'\n'}"; printf '%s' "$_x" | tr ';|' '\n\n')"
81
+ # (R2: split with bash substitution, not `sed 's/&&/\n/'` — older BSD sed writes a literal "n".)
82
+ if [ "$_noop" -eq 1 ]; then
83
+ echo "🟥 --rerun '$RERUN' only echoes / no-ops — refused. Printing is not exercising the change." >&2
84
+ exit 3
85
+ fi
86
+
87
+ [ "$PRECHECK" -eq 0 ] || { echo "✅ --rerun accepted (precheck)"; exit 0; }
88
+
89
+ G() { git -C "$REPO" "$@"; }
90
+ G rev-parse --git-dir >/dev/null 2>&1 || { echo "🟥 HARNESS-ERROR: not a git repo: $REPO" >&2; exit 4; }
91
+ [ -n "$MERGE" ] || MERGE=$(G rev-parse HEAD)
92
+ TIP_C=$(G rev-parse --verify -q "$TIP^{commit}") || { echo "🟥 HARNESS-ERROR: --tip not a commit: $TIP" >&2; exit 4; }
93
+ MERGE_C=$(G rev-parse --verify -q "$MERGE^{commit}") || { echo "🟥 HARNESS-ERROR: --merge not a commit: $MERGE" >&2; exit 4; }
94
+ PARENT=$(G rev-parse --verify -q "$MERGE_C^") || { echo "🟥 HARNESS-ERROR: --merge has no parent" >&2; exit 4; }
95
+ # 🟥 cross-family R1: a squash commit has exactly one parent, and --tip must not be the merge itself
96
+ # (tip == merge compares the commit to itself and renders green).
97
+ NPAR=$(G rev-list --parents -n 1 "$MERGE_C" | wc -w | tr -d ' '); NPAR=$((NPAR-1))
98
+ [ "$NPAR" -eq 1 ] || { echo "🟥 HARNESS-ERROR: --merge has $NPAR parents — not a squash commit" >&2; exit 4; }
99
+ [ "$TIP_C" != "$MERGE_C" ] || { echo "🟥 HARNESS-ERROR: --tip equals --merge — nothing to compare" >&2; exit 4; }
100
+ MB=$(G merge-base "$TIP_C" "$PARENT") || { echo "🟥 HARNESS-ERROR: no merge-base between tip and merge^" >&2; exit 4; }
101
+
102
+ echo "── post-squash verify ── tip=${TIP_C:0:10} merge=${MERGE_C:0:10} base-of-branch=${MB:0:10}"
103
+
104
+ # ── ① blob check. Path lists come from git, never from the caller.
105
+ # 🟥 cross-family R1: without -z git C-quotes unusual names ("x\ny"), the quoted string is looked up
106
+ # literally, both sides read ABSENT and a dropped file renders SAME.
107
+ # 🟥 cross-family R2: the R1 fix carried paths one-per-line with newlines swapped for \001 — and a
108
+ # path containing a real \001 byte then collided with the sentinel (fail-open again). No sentinel
109
+ # now: NUL-delimited lists go straight into arrays, membership is an exact array compare.
110
+ _names_into() { # _names_into <array-name> <rev> <rev>
111
+ # 🟥 cross-family R3: `< <(git diff …)` drops git's rc — a failed diff became an empty list and the
112
+ # EXTRA scan silently had nothing to scan. Capture to a file, check rc, then read.
113
+ local _n="$1" _p _f _rc; shift; eval "$_n=()"
114
+ _f=$(mktemp "${TMPDIR:-/tmp}/psv-names-XXXXXX")
115
+ G diff -z --name-only "$@" > "$_f"; _rc=$?
116
+ if [ "$_rc" -ne 0 ]; then rm -f "$_f"
117
+ echo "🟥 HARNESS-ERROR: git diff failed (rc=$_rc) for $* — path inventory untrustworthy" >&2; exit 4; fi
118
+ while IFS= read -r -d '' _p; do eval "$_n[\${#$_n[@]}]=\"\$_p\""; done < "$_f"
119
+ rm -f "$_f"
120
+ }
121
+ _in() { # _in <needle> <elements...>
122
+ local _x="$1" _e; shift; for _e in "$@"; do [ "$_e" = "$_x" ] && return 0; done; return 1
123
+ }
124
+ _names_into BR "$MB" "$TIP_C"
125
+ _names_into SQ "$PARENT" "$MERGE_C"
126
+ _names_into MAIN "$MB" "$PARENT"
127
+ [ "${#BR[@]}" -gt 0 ] || { echo "🟥 HARNESS-ERROR: the branch changed no paths (mb..tip empty) — wrong --tip?" >&2; exit 4; }
128
+
129
+ # 🟥 cross-family R4: compare the TREE ENTRY (mode + type + oid), not the blob — a squash that drops a
130
+ # `chmod +x` keeps the same blob and rendered SAME. Exec-bit loss is how hooks get silently disarmed.
131
+ # 🟥 no pipeline here (repo pipefail class-lock, 2026-09-24): the first version piped ls-tree into
132
+ # `head -1`, and an early-closing reader can kill the producer → empty entry on BOTH sides →
133
+ # ABSENT == ABSENT → SAME. A path-exact ls-tree prints at most one line; strip at the tab in bash.
134
+ _blob() { local _e; _e=$(G ls-tree "$1" -- "$2" 2>/dev/null) || _e=""
135
+ _e="${_e%%$'\t'*}"; [ -n "$_e" ] && printf '%s' "$_e" || echo "ABSENT"; }
136
+ BAD=0; N=0
137
+ for p in "${BR[@]}"; do
138
+ N=$((N+1))
139
+ bt=$(_blob "$TIP_C" "$p"); bm=$(_blob "$MERGE_C" "$p")
140
+ if [ "$bt" = "$bm" ]; then
141
+ printf ' ✅ SAME %q\n' "$p"
142
+ elif _in "$p" ${MAIN[@]+"${MAIN[@]}"}; then
143
+ printf ' ⚠️ COMBINED %q (main also changed it — ② vouches for this one)\n' "$p"
144
+ else
145
+ printf ' 🟥 DIFFERS %q (tip=%s merge=%s)\n' "$p" "$bt" "$bm"; BAD=1
146
+ fi
147
+ done
148
+ for p in ${SQ[@]+"${SQ[@]}"}; do
149
+ _in "$p" "${BR[@]}" && continue
150
+ printf ' 🟥 EXTRA %q (in the squash, never on the branch)\n' "$p"; BAD=1
151
+ done
152
+ echo " ① $N branch path(s) compared"
153
+
154
+ # ── ② rerun on the merged tree, in a throwaway detached worktree (never touches the caller's HEAD)
155
+ WT=$(mktemp -d "${TMPDIR:-/tmp}/post-squash-XXXXXX"); rmdir "$WT"
156
+ if ! G worktree add --detach -q "$WT" "$MERGE_C" >/dev/null 2>&1; then
157
+ echo "🟥 HARNESS-ERROR: could not create a worktree at ${MERGE_C:0:10} — ② not run, not passed" >&2
158
+ exit 4
159
+ fi
160
+ _cleanup() { [ "$KEEP" -eq 1 ] && { echo " (kept worktree: $WT)"; return; }; G worktree remove --force "$WT" >/dev/null 2>&1 || true; }
161
+ trap _cleanup EXIT
162
+
163
+ echo " ② rerun in merged tree: $RERUN"
164
+ OUT=$(cd "$WT" && bash -c "$RERUN" 2>&1); RC=$?
165
+ printf '%s\n' "$OUT" | tail -8 | sed 's/^/ │ /'
166
+ if [ "$RC" -ne 0 ]; then
167
+ echo " 🟥 ② FAILED rc=$RC on the merged tree"; exit 1
168
+ fi
169
+ if [ -z "$(printf '%s' "$OUT" | tr -d '[:space:]')" ]; then
170
+ echo " 🟥 ② exited 0 but printed NOTHING — instrument silence, not a pass" >&2; exit 4
171
+ fi
172
+ echo " ✅ ② rc=0 on the merged tree"
173
+
174
+ [ "$BAD" -eq 0 ] || { echo "🟥 ① content mismatch — see DIFFERS/EXTRA above"; exit 1; }
175
+ echo "✅ post-squash verify: ① carried · ② passes on the merged tree"
176
+ exit 0
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env bash
2
+ # pr_merge_verified.sh — squash-merge a PR, then verify the merge actually carried it.
3
+ #
4
+ # This is the WIRING for scripts/post_squash_verify.sh. That script needs the branch tip, and the
5
+ # tip is gone once `gh pr merge --delete-branch` runs — so the only reliable moment to capture it is
6
+ # before the merge. A verifier nobody can feed is a verifier nobody calls; this wrapper feeds it.
7
+ #
8
+ # 1. record the PR head (headRefOid) and fetch that object locally
9
+ # 2. gh pr merge --squash --delete-branch --admin (the repo's normal path, CLAUDE.md §Integration)
10
+ # 3. read the merge commit from GitHub, fetch it
11
+ # 4. post_squash_verify.sh --tip <head> --merge <merge commit> --rerun <cmd>
12
+ #
13
+ # 🟥 --rerun is REQUIRED and is checked BEFORE the merge (rc=2). Discovering after an irreversible-ish
14
+ # step that the verification half cannot run would recreate the exact defect post_squash_verify
15
+ # exists to stop: a merge whose second half nobody ran.
16
+ # 🟥 This script does not decide whether to merge. Approval is still yours — it only makes the
17
+ # verification impossible to forget once you do.
18
+ #
19
+ # USAGE bash scripts/pr_merge_verified.sh <pr-number> --rerun '<command>' [--repo <path>]
20
+ # EXIT 0 merged + verified · 1 merged but verify FAILED (the merge stands — act on it)
21
+ # 2 usage (nothing merged) · 3 trivial --rerun refused (nothing merged)
22
+ # 4 harness error (see message: before or after the merge)
23
+ # 6 merge accepted but not completed (queue/lag) — NOT verified, nothing claimed
24
+ # 5 merge itself failed (nothing merged)
25
+
26
+ set -uo pipefail
27
+ PR=""; RERUN=""; RERUN_SET=0; REPO="."
28
+ _need() { [ $# -ge 2 ] || { echo "🟥 $1 needs a value" >&2; exit 2; }; }
29
+ while [ $# -gt 0 ]; do
30
+ case "$1" in
31
+ --rerun) _need "$@"; RERUN="${2-}"; RERUN_SET=1; shift 2 ;;
32
+ --repo) _need "$@"; REPO="${2:-}"; shift 2 ;;
33
+ -h|--help) sed -n '2,24p' "$0"; exit 0 ;;
34
+ -*) echo "unknown arg: $1" >&2; exit 2 ;;
35
+ *) [ -z "$PR" ] || { echo "🟥 one PR number only" >&2; exit 2; }; PR="$1"; shift ;;
36
+ esac
37
+ done
38
+ case "$PR" in ''|*[!0-9]*) echo "🟥 usage: pr_merge_verified.sh <pr-number> --rerun '<cmd>'" >&2; exit 2 ;; esac
39
+ [ "$RERUN_SET" -eq 1 ] || { echo "🟥 --rerun is required — checked before merging so the verify half cannot be skipped" >&2; exit 2; }
40
+ PSV="$(cd "$(dirname "$0")" && pwd)/post_squash_verify.sh"
41
+ [ -f "$PSV" ] || { echo "🟥 HARNESS-ERROR (before merge): $PSV missing — not merging" >&2; exit 4; }
42
+
43
+ # the --rerun is validated by the SAME code that will judge it after the merge — no second list to drift
44
+ bash "$PSV" --precheck --rerun "$RERUN" >/dev/null; _pc=$?
45
+ [ "$_pc" -eq 0 ] || { echo "🟥 --rerun refused before merging (rc=$_pc) — nothing merged" >&2; exit "$_pc"; }
46
+
47
+ cd "$REPO" || { echo "🟥 HARNESS-ERROR (before merge): cannot cd $REPO" >&2; exit 4; }
48
+
49
+ # 1. head before merge
50
+ HEAD_OID=$(gh pr view "$PR" --json headRefOid -q .headRefOid < /dev/null) || HEAD_OID=""
51
+ [ -n "$HEAD_OID" ] || { echo "🟥 HARNESS-ERROR (before merge): could not read PR #$PR head" >&2; exit 4; }
52
+ git fetch -q origin "pull/$PR/head" < /dev/null 2>/dev/null || git fetch -q origin "$HEAD_OID" < /dev/null 2>/dev/null || true
53
+ git cat-file -e "$HEAD_OID^{commit}" 2>/dev/null \
54
+ || { echo "🟥 HARNESS-ERROR (before merge): PR head $HEAD_OID not fetchable — not merging" >&2; exit 4; }
55
+ echo "── PR #$PR head recorded: $HEAD_OID"
56
+
57
+ # 2. merge
58
+ # 🟥 cross-family W1: pin the merge to the head we RECORDED. Without it, a push landing between the
59
+ # record and the merge gets squashed in unverified, and «merged and verified» describes a commit
60
+ # nobody checked. GitHub refuses the merge if the head moved — that refusal is rc=5, nothing merged.
61
+ if ! gh pr merge "$PR" --squash --delete-branch --admin --match-head-commit "$HEAD_OID" < /dev/null; then
62
+ echo "🟥 merge failed — nothing merged" >&2; exit 5
63
+ fi
64
+
65
+ # 3. merge commit
66
+ # 🟥 cross-family W1: `gh pr merge` exiting 0 is not «merged» — a merge queue or auto-merge accepts
67
+ # the request and returns. Ask GitHub for the state; only MERGED with a real oid continues.
68
+ ST=$(gh pr view "$PR" --json state -q .state < /dev/null) || ST=""
69
+ MC=$(gh pr view "$PR" --json mergeCommit -q .mergeCommit.oid < /dev/null) || MC=""
70
+ if [ "$ST" != "MERGED" ] || [ -z "$MC" ] || [ "$MC" = "null" ]; then
71
+ echo "🟥 merge ACCEPTED but not completed (state=${ST:-?} mergeCommit=${MC:-none}) — queued or lagging." >&2
72
+ echo " NOT verified. When it lands: bash $PSV --tip $HEAD_OID --merge <merge commit> --rerun '<cmd>'" >&2
73
+ exit 6
74
+ fi
75
+ git fetch -q origin < /dev/null 2>/dev/null || true
76
+ # W2 (B): a narrow/single-branch refspec may not bring the merge commit — ask for it by oid too
77
+ git cat-file -e "$MC^{commit}" 2>/dev/null || git fetch -q origin "$MC" < /dev/null 2>/dev/null || true
78
+ git cat-file -e "$MC^{commit}" 2>/dev/null \
79
+ || { echo "🟥 HARNESS-ERROR (AFTER merge): merge commit $MC not fetchable — run post_squash_verify by hand with --tip $HEAD_OID --merge $MC" >&2; exit 4; }
80
+ echo "── merged as $MC"
81
+
82
+ # 4. verify
83
+ bash "$PSV" --repo . --tip "$HEAD_OID" --merge "$MC" --rerun "$RERUN"; rc=$?
84
+ case "$rc" in
85
+ 0) echo "✅ PR #$PR merged and verified"; exit 0 ;;
86
+ 1) echo "🟥 PR #$PR IS MERGED but verification FAILED — the merge stands; fix forward or revert" >&2; exit 1 ;;
87
+ *) echo "🟥 HARNESS-ERROR (AFTER merge): post_squash_verify rc=$rc — PR #$PR is merged, verification did not complete" >&2; exit 4 ;;
88
+ esac
@@ -1430,6 +1430,19 @@ else
1430
1430
  echo "FAIL test_sidecar_calibrate_lanes.sh: sidecar_calibrate.sh present but its anchor is missing"
1431
1431
  fail=1
1432
1432
  fi
1433
+ # Squash-merge verification + its merge-path wiring (2026-09-24). Same subject/anchor pairing as above:
1434
+ # both scripts return verdict exit codes, and pr_merge_verified's whole job is to REFUSE before merging —
1435
+ # a refusal nobody re-runs is one the next edit quietly removes. Lanes are hermetic (temp repos, fake gh).
1436
+ for _pair in "post_squash_verify.sh:test_post_squash_verify_lanes.sh" "pr_merge_verified.sh:test_pr_merge_verified_lanes.sh"; do
1437
+ _subj="${_pair%%:*}"; _lane="${_pair##*:}"
1438
+ if [ ! -f "scripts/$_subj" ]; then
1439
+ _absent_subject_verdict "$_lane" "scripts/$_subj" || fail=1
1440
+ elif [ -f "scripts/$_lane" ]; then
1441
+ bash "scripts/$_lane" || fail=1
1442
+ else
1443
+ echo "FAIL $_lane: $_subj present but its anchor is missing"; fail=1
1444
+ fi
1445
+ done
1433
1446
 
1434
1447
  # The isolated sim runner gets the same treatment, and it earned it in one session. Its lanes are
1435
1448
  # hermetic (the `claude` CLI is stubbed), so running them is free — and L8a is the lane that caught