@chrono-meta/fh-gate 3.29.0 → 3.30.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-plugin/marketplace.json +4 -4
- package/AGENTS.md +7 -2
- package/knowledge/shared/harness-core/claude_md_gate_details.md +1 -1
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +105 -0
- package/package.json +2 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +19 -0
- package/plugins/fh-meta/skills/phantom-quench/SKILL.md +1 -1
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/mapped_tracks.sh +20 -13
- package/scripts/memory_gc_report.py +55 -5
- package/scripts/pr_merge_verified.sh +56 -8
- package/scripts/selfcheck.sh +2 -0
- package/scripts/session_checklist.py +3 -2
- package/scripts/session_close_check.sh +1 -1
- package/scripts/sim_isolated_run.sh +62 -0
- package/scripts/stale_ref_scan.py +47 -3
- package/scripts/test_hook_source_gate_lanes.sh +16 -2
- package/scripts/test_mapped_tracks_lanes.sh +55 -1
- package/scripts/test_memory_gc_report_lanes.sh +91 -1
- package/scripts/test_mutation_probe_lanes.sh +18 -2
- package/scripts/test_pr_merge_verified_lanes.sh +48 -1
- package/scripts/test_prepush_real_fire_lanes.sh +215 -0
- package/scripts/test_session_checklist_lanes.sh +34 -0
- package/scripts/test_sim_isolated_run_lanes.sh +88 -0
- package/scripts/test_stale_ref_scan_lanes.sh +11 -1
- package/templates/.git-hooks/pre-push +82 -1
|
@@ -11,25 +11,25 @@
|
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "fh-meta",
|
|
14
|
-
"version": "3.
|
|
14
|
+
"version": "3.30.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.
|
|
20
|
+
"version": "3.30.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.
|
|
26
|
+
"version": "3.30.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.
|
|
32
|
+
"version": "3.30.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/AGENTS.md
CHANGED
|
@@ -27,8 +27,13 @@ When the user's message is a bare greeting in any language (`hi` · `hello` · `
|
|
|
27
27
|
start intent (`resume` · `where were we` · `what is this`), do not answer with a generic greeting.
|
|
28
28
|
Run FH onboarding:
|
|
29
29
|
|
|
30
|
-
1.
|
|
31
|
-
(
|
|
30
|
+
1. **First turn — three reads in parallel, then answer:** in the first turn issue, in parallel,
|
|
31
|
+
`bash scripts/mapped_tracks.sh` (it prints `onboarding_branch=new|returning|UNKNOWN`; UNKNOWN is
|
|
32
|
+
not `new`), a read of `knowledge/shared/harness-core/fh_detail_protocols.md`, and a read of the top
|
|
33
|
+
~60 lines of `tracks/_meta/reference_next_session_starter.md` (if present). All three are reads:
|
|
34
|
+
act on none of them until all three are back and the procedure file has been read — that keeps the
|
|
35
|
+
order `CLAUDE.md` §Active Onboarding Protocol requires (procedure before Step 1) while the reads
|
|
36
|
+
share one turn instead of three to five sequential ones. Never skip a file that section requires.
|
|
32
37
|
2. Reply in the greeting's language. First line: 🐿️ and the welcome line on the same line —
|
|
33
38
|
new: "Welcome to FH." · returning: "Welcome back to FH." · if
|
|
34
39
|
`tracks/_meta/reference_next_session_starter.md` exists (the operator): "The FH operator — good to
|
|
@@ -175,7 +175,7 @@ destroys live state without anyone noticing. This is why the loss class is calle
|
|
|
175
175
|
|
|
176
176
|
### Scholarly deposit (Zenodo / DOI / arXiv) — measured 2026-09-07, why Step 1b exists
|
|
177
177
|
|
|
178
|
-
Two things happened on the same day, on the same record (`10.5281/zenodo.22542168`, v1.0.1):
|
|
178
|
+
Two things happened on the same day, on the same record (`10.5281/zenodo.22542168`, v1.0.1): <!-- stale-ref: pinned-line=22542168 -->
|
|
179
179
|
|
|
180
180
|
1. **Form ≠ server.** The rich-text description and the companion-DOI related identifier were visible
|
|
181
181
|
in the deposit form and **absent** from `/api/records/<id>/draft`. The editor had not flushed its
|
|
@@ -4925,3 +4925,108 @@
|
|
|
4925
4925
|
outcome: "accepted — #129 0 findings (26k tokens read); #131 R1 card scroll reset, R2 scroll clamp + bridge recording while FH mode off (all fixed with lanes); #934 0 findings (56k); delta: MultiEdit gap"
|
|
4926
4926
|
evidence: "FoD PR #129 · #131 · FH PR #934"
|
|
4927
4927
|
tokens: UNMEASURED
|
|
4928
|
+
- date: 2026-10-23
|
|
4929
|
+
agent: "general-purpose (sonnet) ×1 — frontier digest 10-23 triage"
|
|
4930
|
+
task: "read today's digest + live_eval and propose FH candidates"
|
|
4931
|
+
trigger: "operator «다른팔로 오늘자 다이제스트도 확인해보자» + standing dispatch request"
|
|
4932
|
+
outcome: "accepted — live_eval 12 PASS; candidates C1 (withhold builder claim → P9) and C2 (merge receipt actor/lease → FH #937)"
|
|
4933
|
+
evidence: "tracks/_meta/fh_completed_2026-10-23.md · FH #937"
|
|
4934
|
+
tokens: UNMEASURED
|
|
4935
|
+
- date: 2026-10-23
|
|
4936
|
+
agent: "general-purpose (sonnet) ×3 — P8b harder-task builders (A FoD multi-file · B FH multi-file · C report rewrite), isolated, blind to the hypothesis"
|
|
4937
|
+
task: "build behaviour-graded bug-fix tasks (parent FAIL / fix PASS) for the FoD capability A/B"
|
|
4938
|
+
trigger: "operator «병렬가속화도 거버너모드로 가능하면 하자» + standing dispatch request"
|
|
4939
|
+
outcome: "accepted with governor re-check 42/42; later the experiment that used them was found contaminated (work trees inside the FH checkout) — tasks kept, runs voided; Gemini Argon audit voided one task (P8B-09)"
|
|
4940
|
+
evidence: "tracks/_meta/p3_contract_ab/p8b/{A,B,C}/BUILD_NOTES.md · p8b/RESULTS_P8b.md"
|
|
4941
|
+
tokens: UNMEASURED
|
|
4942
|
+
- date: 2026-10-23
|
|
4943
|
+
agent: "general-purpose (sonnet) ×3 — FoD feature builders F1 second opinion · F2 speed meter · F3 in-house context pack (separate clones under /private/tmp/fod-build)"
|
|
4944
|
+
task: "build each feature with lanes and revert probes; commit locally, no push"
|
|
4945
|
+
trigger: "operator AskUserQuestion choice: full-mode second opinion · speed meter · in-house context pack + FoD standing delegation"
|
|
4946
|
+
outcome: "accepted after governor integration (char/token-level 3-way merge, duplicate prefs reader collapsed); F1 could not run gate self-check (FH hook blocked an uncommitted gate file) — governor ran it after commit; F2 proxy label renamed by governor"
|
|
4947
|
+
evidence: "FoD #133 · #134 · #135 · v1.0.32 prerelease"
|
|
4948
|
+
tokens: UNMEASURED
|
|
4949
|
+
- date: 2026-10-23
|
|
4950
|
+
agent: "general-purpose (sonnet) ×1 — FoD codex R1 fixer"
|
|
4951
|
+
task: "fix 7 cross-review findings (2 residency A) each with a red-before/green-after lane"
|
|
4952
|
+
trigger: "codex R1 on the integrated FoD branch"
|
|
4953
|
+
outcome: "accepted — governor re-ran suite (5095, 0 fail) and self-check; codex R2 found 3 B, fixed by governor"
|
|
4954
|
+
evidence: "FoD #133 commits 93edcc4 · b65da72 · 7927e12 · 16438bf"
|
|
4955
|
+
tokens: UNMEASURED
|
|
4956
|
+
- date: 2026-10-23
|
|
4957
|
+
agent: "codex (gpt) ×9 + agy (gemini-4-argon-high ×5, gemini-3.8-flash-high ×4) — read-only reviews, task audit, patch author"
|
|
4958
|
+
task: "P8b task validity audit (Argon) · stale-ref R1/R2 · FoD 1.0.32 R1/R2 · mapped_tracks patch (Argon author) + review · sim guard R1/R2 · memory anchor lint · onboarding blind sim (Flash ×6)"
|
|
4959
|
+
trigger: "operator «코덱스랑 제미나이는 쓸일이 없는거지?» · «제미나이는 플래시로 대체하자»"
|
|
4960
|
+
outcome: "accepted — Argon voided P8B-09 and caught the v1.0.3 pin conflicting with 830f0a9; codex found the FoD residency hole (user-writable edition.json); Flash found the sim guard dirname loop; Argon weekly bucket exhausted (429); two Flash runs ended «interrupted» (cause unverified)"
|
|
4961
|
+
evidence: "FH #938 · #939 · #940 · FoD #133 · tracks/_meta/p3_contract_ab/p8/PREREGISTRATION_P8.md 수정 3b"
|
|
4962
|
+
tokens: UNMEASURED
|
|
4963
|
+
- date: 2026-10-23
|
|
4964
|
+
agent: "general-purpose (sonnet) ×1 — P10 task-set builder (isolated: /private/tmp/fod-p10, hypothesis not shared)"
|
|
4965
|
+
task: "24 behaviour-graded bug-fix tasks where a single pass tends to miss (boundary · aliasing · sibling regression · docstring spec)"
|
|
4966
|
+
trigger: "operator «🔧 FH 자체 개발이랑 fod 개발 이어서 병렬로 가자» · card «끔이 자주 실패하는 과제 묶음부터»"
|
|
4967
|
+
outcome: "accepted — governor re-ran verify 24/24 (fail-before rc=1 · fix rc=0), hidden tests absent from parent trees, 0 spy/mock graders"
|
|
4968
|
+
evidence: "/private/tmp/fod-p10/BUILD_REPORT.md · tracks/_meta/p3_contract_ab/p10/PREREGISTRATION_P10.md"
|
|
4969
|
+
tokens: UNMEASURED
|
|
4970
|
+
- date: 2026-10-23
|
|
4971
|
+
agent: "general-purpose (sonnet) ×1 — FH small-fix bundle (worktree, patch only)"
|
|
4972
|
+
task: "session_checklist unblocked TypeError · pr_merge_verified --rerun advisory · old-sheet empty-cell advisories"
|
|
4973
|
+
trigger: "card FH «안 닫힌 것»"
|
|
4974
|
+
outcome: "accepted with additions — governor fixed a fourth defect the builder only reported (N/A key compare) and two codex R1 Lows; builder's first L25 lane stayed green under revert (fixture lacked the defect shape), rebuilt"
|
|
4975
|
+
evidence: "FH #945"
|
|
4976
|
+
tokens: UNMEASURED
|
|
4977
|
+
- date: 2026-10-23
|
|
4978
|
+
agent: "general-purpose (sonnet) ×1 — FoD Codex gate plan B builder"
|
|
4979
|
+
task: "implement design B (consult evidence for codex) with lanes and isolated measurement"
|
|
4980
|
+
trigger: "operator «둘 다» (FH 갈래) · card «Codex 게이트 구현(안 B) 미착수»"
|
|
4981
|
+
outcome: "no change needed — B had already landed as FoD #78 (2026-10-19, incl. codex: wired-consult); the card was stale. Builder re-ran lanes 17/17 · full suite 5099/0 fail/1 skip, measured consult latency ≈246 ms (synthetic), permission_mode real value still unmeasured"
|
|
4982
|
+
evidence: "FoD #78 (9dbd153) · /private/tmp/fod-build/codexgate-REPORT.md"
|
|
4983
|
+
tokens: UNMEASURED
|
|
4984
|
+
- date: 2026-10-23
|
|
4985
|
+
agent: "codex (gpt) ×1 — read-only review"
|
|
4986
|
+
task: "adversarial review of FH #945 diff"
|
|
4987
|
+
trigger: "load-bearing change to the merge wrapper"
|
|
4988
|
+
outcome: "accepted — 2 Low (non-ASCII path escaping · glob/dir words silencing the advisory), both fixed with revert-probed lanes"
|
|
4989
|
+
evidence: "FH #945"
|
|
4990
|
+
tokens: UNMEASURED
|
|
4991
|
+
- date: 2026-10-23
|
|
4992
|
+
agent: "general-purpose (sonnet) ×2 — FoD consult-vs-hook equivalence lane builder (R0 + R1 fixes)"
|
|
4993
|
+
task: "prove the app-side consult never allows a Bash command the PreToolUse hook stops"
|
|
4994
|
+
trigger: "operator «ㅇㅇ 바로시작하자» (wired-consult keep + equivalence lane)"
|
|
4995
|
+
outcome: "accepted — 0 divergence over 696 cmds, 72 pass cells, 33 rule cells, 5 repo states; governor verified pass.js confirm semantics and the allowRules wiring, added EQ-W guard after codex R2"
|
|
4996
|
+
evidence: "chrono-meta/friends-on-desk#136"
|
|
4997
|
+
tokens: UNMEASURED
|
|
4998
|
+
- date: 2026-10-23
|
|
4999
|
+
agent: "fh-meta:persona-innovator (sonnet) ×1 + agy gemini-3.8-flash-high ×1 (critic)"
|
|
5000
|
+
task: "alternative experiment frames after two ceiling calibrations; critique of those frames"
|
|
5001
|
+
trigger: "operator «탈상관 이노베이터 정체성 다 잘 활용해줘»"
|
|
5002
|
+
outcome: "accepted frame 1 (done-claim honesty) → H1; Gemini added the claim-suppression control and frozen extraction rule; governor noted frame 3 duplicates P9"
|
|
5003
|
+
evidence: "tracks/_meta/p3_contract_ab/h1_honesty/PREREGISTRATION_H1.md"
|
|
5004
|
+
tokens: UNMEASURED
|
|
5005
|
+
- date: 2026-10-23
|
|
5006
|
+
agent: "general-purpose (sonnet) ×3 — H1 claim extractors (1 keyword-script, 2 reading)"
|
|
5007
|
+
task: "blind extraction of FIXED/TESTED/SCOPE claims from 128 final messages"
|
|
5008
|
+
trigger: "H1 preregistration"
|
|
5009
|
+
outcome: "first extractor used a keyword script against the brief → kept as second instrument; reading extraction 64+64; run-level agreement 117/128"
|
|
5010
|
+
evidence: "tracks/_meta/p3_contract_ab/h1_honesty/RESULTS_H1.md"
|
|
5011
|
+
tokens: UNMEASURED
|
|
5012
|
+
- date: 2026-10-23
|
|
5013
|
+
agent: "codex (gpt) ×4 — read-only reviews"
|
|
5014
|
+
task: "CHANGELOG v3.30.0 fact-check · equivalence lane R1 · R2"
|
|
5015
|
+
trigger: "release + load-bearing gate test"
|
|
5016
|
+
outcome: "accepted — 3 CHANGELOG overstatements fixed; R1 6 findings fixed; R2 2 High adjudicated against source (one pinned by EQ-W guard, one named residual)"
|
|
5017
|
+
evidence: "FH #946 · FoD #136"
|
|
5018
|
+
tokens: UNMEASURED
|
|
5019
|
+
- date: 2026-10-24
|
|
5020
|
+
agent: "general-purpose (sonnet) ×1 — P11 fix-of-fix task miner (isolated /private/tmp/fod-p11)"
|
|
5021
|
+
task: "tasks from commits that had to repair an earlier fix (clawd-on-desk 21 · forge-harness 2)"
|
|
5022
|
+
trigger: "operator «코덱스로그인도되면 ㄱㄱ» · P10 ceiling"
|
|
5023
|
+
outcome: "accepted with exclusions — 23/23 fail-before/fix verified ×3 by governor; 6 path-scoring tasks excluded from the primary set; later a Gemini audit found 2 more defective tasks (P11-12 prompt↔test contradiction, P11-17 exact-string requirement)"
|
|
5024
|
+
evidence: "tracks/_meta/p3_contract_ab/p11/RESULTS_P11.md"
|
|
5025
|
+
tokens: UNMEASURED
|
|
5026
|
+
- date: 2026-10-24
|
|
5027
|
+
agent: "codex (gpt) ×1 + agy gemini-3.8-flash-high ×1 — P11 task-validity audit"
|
|
5028
|
+
task: "can the graded behaviour be inferred from the prompt alone (5 tasks both models failed)"
|
|
5029
|
+
trigger: "a third hypothesis (task defect) missing from the P11 preregistration"
|
|
5030
|
+
outcome: "codex 5/5 VALID (2 wrong, one with a false source claim); Gemini found both defects; governor confirmed in source — the H-blind-spot reading was withdrawn"
|
|
5031
|
+
evidence: "tracks/_meta/p3_contract_ab/p11/RESULTS_P11.md"
|
|
5032
|
+
tokens: UNMEASURED
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrono-meta/fh-gate",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.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": {
|
|
@@ -346,6 +346,7 @@
|
|
|
346
346
|
"scripts/test_preprep_retired_lanes.sh",
|
|
347
347
|
"scripts/test_preprep_slide_refs_lanes.sh",
|
|
348
348
|
"scripts/test_prepush_destructive_lanes.sh",
|
|
349
|
+
"scripts/test_prepush_real_fire_lanes.sh",
|
|
349
350
|
"scripts/test_prepush_stdin_integrity.sh",
|
|
350
351
|
"scripts/test_prior_art_prompt_lanes.sh",
|
|
351
352
|
"scripts/test_probe_live_eval_lanes.sh",
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# forge-harness (fh-meta) Changelog
|
|
2
2
|
|
|
3
|
+
### [3.30.0] — 2026-10-23 — sim 러너가 지침 파일 아래 출력 폴더를 거부 · 머지 영수증 · 메모리 근거 앵커 · 온보딩 빨라짐
|
|
4
|
+
|
|
5
|
+
**minor.** In short (for upgraders): `scripts/sim_isolated_run.sh` now refuses an `--out` that sits under a directory holding Claude instruction files — read the BREAKING line below if you run it from inside a checkout. The rest adds output (a receipt line, report sections, an advisory), is faster, or corrects how three tools classify what they read (`unblocked` status rows, memory promote candidates, stale-reference pins) — see the bullets. Upgrading from 3.29.0 needs no action unless you point `--out` inside a repo.
|
|
6
|
+
|
|
7
|
+
BREAKING (gate): `sim_isolated_run.sh` 는 `--out` 의 조상 어디에든 `CLAUDE.md` · `CLAUDE.local.md` · `.claude/CLAUDE(.local).md` · `AGENTS.md` · `.claude/AGENTS.md` · `.claude/rules/*.md` 가 있으면 **어떤 팔도 돌리기 전에 종료 2 로 거부한다** — 예전엔 그대로 돌았고, `claude -p` 가 조상 지침을 전부 실어 팔마다 실제 레포 지침이 섞였다(2026-10-23 짝 실측: 체크아웃 아래 지침 3개 로드 · `/private/tmp` 아래 0개). 처방: `--out` 을 레포 밖(기본 mktemp 또는 `/private/tmp/...`)에 둔다. 섞여도 된다고 판단하면 `FH_SIM_ALLOW_INHERIT=1`(출력에 한 번 남는다). `$HOME/.claude` 안의 사용자 전역 지침은 모든 팔에 똑같이 실리므로 거부 사유가 아니다(#940 · #942).
|
|
8
|
+
|
|
9
|
+
BREAKING (gate): pre-push 훅이 **`git push --mirror`**(명령줄 · `--mir` 같은 축약 · `remote.<name>.mirror` 설정)를 감지해, 원격에서 지워질 ref 를 `git ls-remote` 로 스스로 계산하고 기존 판정에 넣는다 — 예전엔 git 이 미러 삭제를 훅 stdin 에 **넘기지 않아**(git 2.50.1 실측) 병합 안 된 원격 브랜치가 막힘 없이 지워졌다. 이제 병합된 브랜치는 그대로 지나가고, 고유 작업이 있는 브랜치 · 태그 · notes 삭제는 멈춘다. 원격 ref 를 못 읽으면(30초 제한 · 대화형 인증 없음) 멈춘다. 처방: 미러 대신 명시적 refspec 으로 푸시하거나, 확인을 마친 뒤 `DESTRUCTIVE_OP_OK=1`. 실제 `git push` 로 재는 레인 `scripts/test_prepush_real_fire_lanes.sh` 신설(#948).
|
|
10
|
+
|
|
11
|
+
소비자에게 닿는 작은 변화:
|
|
12
|
+
- `pr_merge_verified.sh`: GitHub 가 머지 요청을 받은 뒤 로컬 영수증 한 줄(pr · head · merge · outcome · actor · lease) 기록을 **시도한다** — 기본 경로 `<git-common-dir>/fh-merge-receipts.jsonl`, `PMV_RECEIPTS` 로 바꿀 수 있다. 쓰기에 실패하면 경고만 하고 종료 코드는 그대로다. 거절된 머지엔 안 남긴다. `--lease '<label>'` 로 어떤 승인 아래 머지했는지 적는다(기록만, 강제 아님)(#937). `--rerun` 의 낱말 어디에도(그리고 그 낱말이 가리키는 스크립트 본문에도) PR 이 바꾼 파일이 안 나오면 stderr 에 경고 한 줄 — 종료 코드와 머지는 그대로다(#945).
|
|
13
|
+
- `session_checklist.py unblocked`: 상태 칸이 빈 결과서에서 `TypeError` 로 죽던 것을 고쳤다 · N/A 행을 «아직 열림» 으로 보고하던 것도 고쳤다(#945).
|
|
14
|
+
- `memory_gc_report.py`: 근거 앵커(커밋 · #N · 파일 경로 · arXiv · URL)가 없는 반복 교훈은 승격 후보 대신 «promote held», 앵커 없는 feedback/project 는 «unanchored» 목록으로 나온다. 읽기 전용 · 순서 불변(#943).
|
|
15
|
+
- `stale_ref_scan.py`: `<!-- stale-ref: pinned-line=<id> -->` 줄 고정 — 그 줄의 그 id 만 조용히 한다. 파일 고정은 HTML 주석 안 · 온전한 낱말일 때만 센다(예전엔 산문 속 언급이나 `pinned-off` 같은 근사어가 파일 전체를 조용히 했다)(#938).
|
|
16
|
+
- 배포되는 레인 `test_hook_source_gate_lanes.sh` 가 git 없는 트리(압축 해제본 등)에서 거짓 적색을 내던 것을 고쳤다. 같은 주간 클린룸 감사 5회차가 pipefail 델타 잠금이 큰 파일에서 열리던 것도 닫았다(체크아웃 전용)(#921).
|
|
17
|
+
- 온보딩: `mapped_tracks.sh` 가 파일마다 fork 하지 않는다(운영자 허브 실측 7.1–12.0 s → 0.32–0.37 s, 출력 바이트 동일). `AGENTS.md` 는 비-Claude 런타임이 온보딩 파일 셋을 첫 턴에 병렬로 읽게 한다(agy 블라인드 sim: 도구 라운드 6–15 → 1)(#939).
|
|
18
|
+
|
|
19
|
+
허브 내부 · 소비자 영향 없음:
|
|
20
|
+
- 컴패니언 스토어 동기화가 실험 작업 트리(`work/` · `work.hidden/` · `repo/`)를 복사하지 않는다(#944). 위임 기록(#941). 카트리지 검사기가 MultiEdit 을 쓰기 도구로 센다(#936 — 체크아웃 전용).
|
|
21
|
+
|
|
3
22
|
### [3.29.0] — 2026-10-22 — fh-gate 가 실패를 통과로 접지 않는다(종료 코드 10 · cross 단일 계열 ESCALATE) · GitHub 릴리스 페이지 자동 · 위임 영수증
|
|
4
23
|
|
|
5
24
|
**minor.** In short (for upgraders): the `fh-gate` CLI now fails closed in two places where it could pass or proceed before — read the two BREAKING lines below if you run it in CI or branch on its exit code. Nothing else changes for package consumers. Upgrading from 3.28.0 needs no action unless you use `FH_BACKEND=cross` or branch on exit codes.
|
|
@@ -22,7 +22,7 @@ model: sonnet
|
|
|
22
22
|
|
|
23
23
|
> **Renamed from `source-grounding-audit` (2026-06-06)** — the grounding member of the quench series
|
|
24
24
|
> (steel-quench · phantom-quench · goal-quench). Same skill, same ruleset; only the label changed to fit
|
|
25
|
-
> the family. The **v1 paper (Zenodo 10.5281/zenodo.20397566) cites the old name** — that is the
|
|
25
|
+
> the family. The **v1 paper (Zenodo 10.5281/zenodo.20397566) cites the old name** — that is the <!-- stale-ref: pinned-line=20397566 -->
|
|
26
26
|
> historical record, not a phantom (`paper/forge_harness_v1.0.html` is left unchanged by design; readers
|
|
27
27
|
> map *source-grounding-audit (v1) = phantom-quench (current)*). The deprecated redirect stub directory
|
|
28
28
|
> was removed 2026-06-12 — old-name utterances ("source grounding audit", "grounding audit") route here
|
package/scripts/mapped_tracks.sh
CHANGED
|
@@ -138,31 +138,38 @@ if command -v git >/dev/null 2>&1 && [ -d "$HUB_ROOT/.git" ] || { command -v
|
|
|
138
138
|
if git -C "$HUB_ROOT" rev-parse --git-dir >/dev/null 2>&1; then _TRACKED_OK=1; fi
|
|
139
139
|
fi
|
|
140
140
|
|
|
141
|
+
_TRACKED_NL=$'\n'"$_TRACKED"$'\n'
|
|
141
142
|
_SESS=0
|
|
142
143
|
_SESS_NAMES=""
|
|
143
144
|
_is_shipped() { # $1 = path relative to HUB_ROOT
|
|
144
145
|
[ "$_TRACKED_OK" = "1" ] || return 1
|
|
145
|
-
# 🟥
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
|
|
146
|
+
# 🟥 In-process literal match (no pipe, no per-file fork).
|
|
147
|
+
# · Why NOT a pipe: under `set -o pipefail` a matching `grep -qxF` exits before reading its
|
|
148
|
+
# input, the producer dies of SIGPIPE, and pipefail raises that 141 as the pipeline's
|
|
149
|
+
# status — so **a match is read as a non-match**. `$_TRACKED` is `git ls-files` output,
|
|
150
|
+
# which grows with the hub, so there is no structural bound to hide behind: the scanner's
|
|
151
|
+
# own measurements put the onset near ~16 KB (`pipefail_earlyexit_scan.sh` header), ≈300
|
|
152
|
+
# tracked paths under tracks/. Reproduced deterministically at 6,000 paths (2026-09-28):
|
|
153
|
+
# pipe form → rc=141 “NO-MATCH”, here-string → MATCH.
|
|
154
|
+
# · And the direction is the one this function exists to prevent: a shipped file read as
|
|
155
|
+
# user-made makes a **fresh clone** answer `returning`, the onboarding FP CLAUDE.md names.
|
|
156
|
+
# Lane: test_mapped_tracks_lanes.sh §L-pipe.
|
|
157
|
+
# · Why NOT `grep -qxF "$1" <<<"$_TRACKED"`: the here-string avoids SIGPIPE, but forks a
|
|
158
|
+
# process per file across tracks/*/session_*.md and tracks/_meta/*.md (≈1,300–1,800 files,
|
|
159
|
+
# measured ≈6–12 s on macOS). Precomputing `$_TRACKED_NL` once and matching via `case`
|
|
160
|
+
# keeps it in-shell; quoting `"$1"` forces glob characters (`[`, `]`, `*`, `?`) in a path
|
|
161
|
+
# to match literally rather than as patterns (Lane §L-glob).
|
|
162
|
+
case "$_TRACKED_NL" in *$'\n'"$1"$'\n'*) return 0;; *) return 1;; esac
|
|
156
163
|
}
|
|
157
164
|
for _f in "$HUB_ROOT"/tracks/*/session_*.md "$HUB_ROOT"/tracks/_meta/*.md; do
|
|
158
165
|
[ -f "$_f" ] || continue
|
|
159
166
|
_rel="tracks/${_f#"$HUB_ROOT"/tracks/}"
|
|
160
|
-
case "$
|
|
167
|
+
case "${_f##*/}" in .gitkeep) continue ;; esac
|
|
161
168
|
_is_shipped "$_rel" && continue
|
|
162
169
|
_SESS=$((_SESS + 1))
|
|
163
170
|
# Cap the sample. The COUNT is the answer; the names are a debugging aid, and an operator hub
|
|
164
171
|
# has hundreds — dumping them turns a one-line verdict into a screenful nobody reads.
|
|
165
|
-
[ "$_SESS" -le 3 ] && _SESS_NAMES="$_SESS_NAMES $
|
|
172
|
+
[ "$_SESS" -le 3 ] && _SESS_NAMES="$_SESS_NAMES ${_f##*/}"
|
|
166
173
|
done
|
|
167
174
|
|
|
168
175
|
if [ "$_TRACKED_OK" = "1" ]; then
|
|
@@ -14,6 +14,11 @@ WHAT: reads every topic file's frontmatter and the index, and reports
|
|
|
14
14
|
· every entry — status, type, age (from `metadata.hits`), distinct days, last hit, index line
|
|
15
15
|
· cold — non-user, age 1, last hit ≥ --cold-days ago → drop from the INDEX only
|
|
16
16
|
· promote — age ≥ --promote-age across ≥ 2 distinct days → propose a rule/hook (human approves)
|
|
17
|
+
— only when the body cites at least one evidence anchor; otherwise «promote held»
|
|
18
|
+
· unanchored — feedback/project entries whose body cites no evidence anchor (commit sha · #PR/issue ·
|
|
19
|
+
file path · arXiv id · URL). harness2 (google-research, 2026-10) stores a lesson only with
|
|
20
|
+
a cited run contrast; this is the record-property half of that: present or not, never
|
|
21
|
+
whether the cited thing proves the lesson (judgment stays judgment).
|
|
17
22
|
· order — user entries in index order, then valid measured entries by age (ties: index
|
|
18
23
|
order), then the rest in index order; cold entries leave the order. Entries with an
|
|
19
24
|
error status never drive cold / promote / measured ranking until repaired
|
|
@@ -36,6 +41,35 @@ exit: 0 report printed · 2 memory dir or index unreadable (instrument error, ne
|
|
|
36
41
|
"""
|
|
37
42
|
import argparse, datetime as dt, json, os, re, sys, urllib.parse
|
|
38
43
|
|
|
44
|
+
# Evidence anchors a lesson can cite. A date alone is not an anchor (it says when, not what was measured).
|
|
45
|
+
# Presence is what is reported, never how many (one anchor is enough; double matches do not matter).
|
|
46
|
+
# NOT anchors, by design: [[wiki-links]] to other memories (a relation, not an artifact), bare dates.
|
|
47
|
+
# Round-1/2 review (codex · Gemini Flash, 2026-10-23) set these edges. Stopped at the round cap: a static string
|
|
48
|
+
# matcher does not converge (each round finds new edges) — residuals are listed in the lanes file, not chased.
|
|
49
|
+
_EXT = (r'md|sh|py|js|mjs|cjs|ts|tsx|jsx|json|ya?ml|toml|txt|plist|html|css|rs|go|rb|java|kt|swift|c|h|cpp|hpp|'
|
|
50
|
+
r'sql|lock|cfg|ini|env|xml|csv|ipynb')
|
|
51
|
+
ANCHOR_RES = [
|
|
52
|
+
# commit sha: hex mixing letters and digits, any case, not part of a #colour, UUID or longer word
|
|
53
|
+
re.compile(r'(?<![#\w-])(?=[0-9a-fA-F]*[0-9])(?=[0-9a-fA-F]*[a-fA-F])[0-9a-fA-F]{7,40}(?![\w-])'),
|
|
54
|
+
# commit sha named as such: then all-digit / all-letter hex counts too («commit 1234567», «커밋 deadbeef»)
|
|
55
|
+
re.compile(r'(?:commit|sha|커밋)\s*[:#]?\s*`?[0-9a-fA-F]{7,40}(?![\w-])', re.I),
|
|
56
|
+
# PR / issue: #N (not ' entities, not #section-slugs, not «#123456;» CSS) and owner/repo#N
|
|
57
|
+
re.compile(r'(?<![\w&#(])#\d+(?![\w;-])'), # not «(#2)» — a link to a section of the same document
|
|
58
|
+
re.compile(r'[\w.-]+/[\w.-]+#\d+\b'),
|
|
59
|
+
# file path (case-insensitive extension) and the usual extensionless build files
|
|
60
|
+
re.compile(r'[\w./~-]+\.(?:' + _EXT + r')\b', re.I),
|
|
61
|
+
re.compile(r'\b(?:Dockerfile|Makefile|Gemfile|Procfile)\b'),
|
|
62
|
+
re.compile(r'arXiv[: ]?(?:\d{4}\.\d{4,5}|[a-z-]+(?:\.[A-Z]{2})?/\d{7})', re.I), # arXiv id (new and legacy)
|
|
63
|
+
re.compile(r'https?://\S+')] # URL
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
_WIKI = re.compile(r'\[\[[^\]]*\]\]')
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def count_anchors(text):
|
|
70
|
+
text = _WIKI.sub(' ', text) # [[x]] / [[x.md]] is a relation to another memory, never an anchor
|
|
71
|
+
return sum(len(r.findall(text)) for r in ANCHOR_RES) # URL
|
|
72
|
+
|
|
39
73
|
def link_dests(line):
|
|
40
74
|
"""Markdown inline-link destinations with their start offset: <...> form, balanced parens, title dropped."""
|
|
41
75
|
out, i = [], 0
|
|
@@ -76,7 +110,7 @@ def indent(line):
|
|
|
76
110
|
|
|
77
111
|
def parse_entry(path, today):
|
|
78
112
|
"""-> dict(status, type, hits[(date,str)], bad[str])"""
|
|
79
|
-
out = {'status': 'OK', 'type': None, 'hits': [], 'bad': []}
|
|
113
|
+
out = {'status': 'OK', 'type': None, 'hits': [], 'bad': [], 'anchors': 0}
|
|
80
114
|
try:
|
|
81
115
|
text = open(path, encoding='utf-8').read()
|
|
82
116
|
except (OSError, UnicodeDecodeError) as e:
|
|
@@ -88,11 +122,13 @@ def parse_entry(path, today):
|
|
|
88
122
|
out['status'] = 'NO_FRONTMATTER'
|
|
89
123
|
return out
|
|
90
124
|
try:
|
|
91
|
-
end = next(i for i in range(1, len(lines)) if lines[i].
|
|
125
|
+
end = next(i for i in range(1, len(lines)) if lines[i].rstrip() == '---')
|
|
92
126
|
except StopIteration:
|
|
93
127
|
out['status'] = 'UNTERMINATED_FRONTMATTER'
|
|
94
128
|
return out
|
|
95
129
|
fm = lines[1:end]
|
|
130
|
+
body = "\n".join(lines[end + 1:])
|
|
131
|
+
out['anchors'] = count_anchors(body)
|
|
96
132
|
meta_i = next((i for i, l in enumerate(fm) if indent(l) == 0 and re.match(r'^metadata:\s*$', l)), None)
|
|
97
133
|
if meta_i is None:
|
|
98
134
|
return out
|
|
@@ -143,6 +179,7 @@ def parse_entry(path, today):
|
|
|
143
179
|
out['hits'].append((d.isoformat(), m.group(2)))
|
|
144
180
|
if out['bad'] and out['status'] == 'OK':
|
|
145
181
|
out['status'] = 'HITS_MALFORMED'
|
|
182
|
+
out['anchors'] += count_anchors("\n".join(t for _, t in out['hits'])) # a hit line may cite the evidence
|
|
146
183
|
return out
|
|
147
184
|
|
|
148
185
|
|
|
@@ -199,7 +236,7 @@ def main():
|
|
|
199
236
|
entries = []
|
|
200
237
|
for n in names:
|
|
201
238
|
p = parse_entry(os.path.join(a.memory_dir, n), today)
|
|
202
|
-
e = {'file': n, 'status': p['status'], 'type': p['type'], 'bad': p['bad'],
|
|
239
|
+
e = {'file': n, 'status': p['status'], 'type': p['type'], 'bad': p['bad'], 'anchors': p['anchors'],
|
|
203
240
|
'index_line': pos.get(n, {}).get('line'), 'index_ord': pos.get(n, {}).get('ord'),
|
|
204
241
|
'past_cap': pos.get(n, {}).get('past_cap', False)}
|
|
205
242
|
if p['hits']:
|
|
@@ -215,8 +252,11 @@ def main():
|
|
|
215
252
|
ok = lambda e: e['status'] == 'OK'
|
|
216
253
|
cold = [e for e in entries if ok(e) and e['type'] != 'user' and e['age'] == 1
|
|
217
254
|
and days_since(e['last_hit']) >= a.cold_days]
|
|
218
|
-
|
|
219
|
-
|
|
255
|
+
due = [e for e in entries if ok(e) and e['age'] is not None and e['age'] >= a.promote_age
|
|
256
|
+
and e['distinct_days'] >= 2]
|
|
257
|
+
promote = [e for e in due if e['anchors'] > 0]
|
|
258
|
+
promote_held = [e for e in due if e['anchors'] == 0] # recurring, but cites nothing to promote on
|
|
259
|
+
unanchored = [e for e in entries if ok(e) and e['type'] in ('feedback', 'project') and e['anchors'] == 0]
|
|
220
260
|
cold_set = {e['file'] for e in cold}
|
|
221
261
|
listed = sorted((e for e in entries if e['index_line'] is not None), key=lambda e: e['index_ord'])
|
|
222
262
|
users = [e for e in listed if e['type'] == 'user']
|
|
@@ -234,6 +274,8 @@ def main():
|
|
|
234
274
|
'errors': [[e['file'], e['status'], e['bad']] for e in entries if e['status'] != 'OK'],
|
|
235
275
|
'cold': [e['file'] for e in cold],
|
|
236
276
|
'promote': [[e['file'], e['age'], e['distinct_days']] for e in promote],
|
|
277
|
+
'promote_held': [[e['file'], e['age'], e['distinct_days']] for e in promote_held],
|
|
278
|
+
'unanchored': [e['file'] for e in unanchored],
|
|
237
279
|
'order': order, 'entries': entries}
|
|
238
280
|
if a.json:
|
|
239
281
|
print(json.dumps(rep, ensure_ascii=False, indent=1))
|
|
@@ -259,6 +301,14 @@ def main():
|
|
|
259
301
|
print(f" promote candidates (age ≥ {a.promote_age} over ≥ 2 days → propose rule/hook, human approves): {len(promote)}")
|
|
260
302
|
for e in promote:
|
|
261
303
|
print(f" promote {e['file']} age {e['age']} · days {e['distinct_days']} · last {e['last_hit']}")
|
|
304
|
+
print(f" promote held (recurs, but the body cites no evidence anchor — add one before proposing): {len(promote_held)}")
|
|
305
|
+
for e in promote_held:
|
|
306
|
+
print(f" held {e['file']} age {e['age']} · days {e['distinct_days']} · last {e['last_hit']}")
|
|
307
|
+
print(f" unanchored feedback/project (no commit · #PR · file · arXiv · URL in the body): {len(unanchored)}")
|
|
308
|
+
for e in unanchored[:20]:
|
|
309
|
+
print(f" unanchored {e['file']}")
|
|
310
|
+
if len(unanchored) > 20:
|
|
311
|
+
print(f" … {len(unanchored) - 20} more (--json lists all)")
|
|
262
312
|
print(f" proposed order ({len(order)}):")
|
|
263
313
|
for n, f in enumerate(order, 1):
|
|
264
314
|
print(f" {n:>3}. {f}")
|
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
# 🟥 This script does not decide whether to merge. Approval is still yours — it only makes the
|
|
17
17
|
# verification impossible to forget once you do.
|
|
18
18
|
#
|
|
19
|
-
# USAGE bash scripts/pr_merge_verified.sh <pr-number> --rerun '<command>' [--repo <path>]
|
|
19
|
+
# USAGE bash scripts/pr_merge_verified.sh <pr-number> --rerun '<command>' [--repo <path>] [--lease '<label>']
|
|
20
|
+
# RECEIPT once GitHub has accepted the merge request (every outcome from there: verified · verify failed · queued/not completed ·
|
|
21
|
+
# merged from another head · not fetchable — never for a refusal or a merge GitHub did not take) one JSON line goes to
|
|
22
|
+
# ${PMV_RECEIPTS:-<git common dir>/fh-merge-receipts.jsonl} — local, never pushed: pr · head · merge · outcome ·
|
|
23
|
+
# actor (agent-session:claude-code when CLAUDECODE is set, else human-or-unknown — a human cannot be proven) ·
|
|
24
|
+
# lease (the --lease label of the standing approval the caller merges under, else NONE — recorded, not enforced) · rerun.
|
|
25
|
+
# Why: arXiv:2610.28683 — 27% of merges that passed a «non-author review» gate rested on an agent approving under a
|
|
26
|
+
# human account; who decided must be on the record, not inferred later (frontier digest 2026-10-23).
|
|
20
27
|
# EXIT 0 merged + verified · 1 merged but verify FAILED (the merge stands — act on it)
|
|
21
28
|
# 2 usage (nothing merged) · 3 trivial --rerun refused (nothing merged)
|
|
22
29
|
# 4 harness error (see message: before or after the merge)
|
|
@@ -26,13 +33,14 @@
|
|
|
26
33
|
# (gh non-zero but GitHub says MERGED → continue to verify; state unreadable → 4, outcome UNKNOWN)
|
|
27
34
|
|
|
28
35
|
set -uo pipefail
|
|
29
|
-
PR=""; RERUN=""; RERUN_SET=0; REPO="."
|
|
36
|
+
PR=""; RERUN=""; RERUN_SET=0; REPO="."; LEASE="NONE"
|
|
30
37
|
_need() { [ $# -ge 2 ] || { echo "🟥 $1 needs a value" >&2; exit 2; }; }
|
|
31
38
|
while [ $# -gt 0 ]; do
|
|
32
39
|
case "$1" in
|
|
33
40
|
--rerun) _need "$@"; RERUN="${2-}"; RERUN_SET=1; shift 2 ;;
|
|
34
41
|
--repo) _need "$@"; REPO="${2:-}"; shift 2 ;;
|
|
35
|
-
|
|
42
|
+
--lease) _need "$@"; LEASE="${2-}"; [ -n "$LEASE" ] || { echo "🟥 --lease needs a non-empty label" >&2; exit 2; }; shift 2 ;;
|
|
43
|
+
-h|--help) sed -n '2,30p' "$0"; exit 0 ;;
|
|
36
44
|
-*) echo "unknown arg: $1" >&2; exit 2 ;;
|
|
37
45
|
*) [ -z "$PR" ] || { echo "🟥 one PR number only" >&2; exit 2; }; PR="$1"; shift ;;
|
|
38
46
|
esac
|
|
@@ -48,6 +56,23 @@ bash "$PSV" --precheck --rerun "$RERUN" >/dev/null; _pc=$?
|
|
|
48
56
|
|
|
49
57
|
cd "$REPO" || { echo "🟥 HARNESS-ERROR (before merge): cannot cd $REPO" >&2; exit 4; }
|
|
50
58
|
|
|
59
|
+
# receipt (after GitHub accepted the merge request — a queued merge counts: the request was made under this actor/lease). Best-effort: a receipt that cannot be written is said, never silently skipped,
|
|
60
|
+
# and never changes the exit code — the merge already happened.
|
|
61
|
+
_receipt() { # outcome merge_oid
|
|
62
|
+
local f="${PMV_RECEIPTS:-}"
|
|
63
|
+
if [ -z "$f" ]; then local gd; gd=$(git rev-parse --git-common-dir 2>/dev/null) || gd=""; [ -n "$gd" ] && f="$gd/fh-merge-receipts.jsonl"; fi
|
|
64
|
+
local actor="human-or-unknown"; [ -n "${CLAUDECODE:-}" ] && actor="agent-session:claude-code"
|
|
65
|
+
if [ -z "$f" ] || ! PMV_R_PR="$PR" PMV_R_HEAD="$HEAD_OID" PMV_R_MERGE="${2:-}" PMV_R_OUT="$1" PMV_R_ACTOR="$actor" PMV_R_LEASE="$LEASE" \
|
|
66
|
+
PMV_R_RERUN="$RERUN" python3 -c 'import json,os,time
|
|
67
|
+
e=os.environ
|
|
68
|
+
print(json.dumps({"at":time.strftime("%Y-%m-%dT%H:%M:%S%z"),"pr":int(e["PMV_R_PR"]),"head":e["PMV_R_HEAD"],"merge":e["PMV_R_MERGE"] or None,
|
|
69
|
+
"outcome":e["PMV_R_OUT"],"actor":e["PMV_R_ACTOR"],"lease":e["PMV_R_LEASE"],"rerun":e["PMV_R_RERUN"]},ensure_ascii=False))' >> "$f" 2>/dev/null; then
|
|
70
|
+
echo "⚠️ merge receipt NOT written (${f:-no git dir}) — record by hand: PR #$PR $1 actor=$actor lease=$LEASE" >&2
|
|
71
|
+
else
|
|
72
|
+
echo "── receipt: $f (actor=$actor · lease=$LEASE · $1)"
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
|
|
51
76
|
# 1. head before merge
|
|
52
77
|
HEAD_OID=$(gh pr view "$PR" --json headRefOid -q .headRefOid < /dev/null) || HEAD_OID=""
|
|
53
78
|
[ -n "$HEAD_OID" ] || { echo "🟥 HARNESS-ERROR (before merge): could not read PR #$PR head" >&2; exit 4; }
|
|
@@ -56,6 +81,28 @@ git cat-file -e "$HEAD_OID^{commit}" 2>/dev/null \
|
|
|
56
81
|
|| { echo "🟥 HARNESS-ERROR (before merge): PR head $HEAD_OID not fetchable — not merging" >&2; exit 4; }
|
|
57
82
|
echo "── PR #$PR head recorded: $HEAD_OID"
|
|
58
83
|
|
|
84
|
+
# 1b. coverage advisory — WARNING ONLY (never changes rc, never merges or refuses). post_squash_verify's precheck rejects a
|
|
85
|
+
# command that is trivially empty; it cannot see a command that is real but never touches this PR's files. Static, pre-merge,
|
|
86
|
+
# no execution: does any word of --rerun (or a tracked script it names) mention a path/basename this PR changes?
|
|
87
|
+
_changed=$(git -c core.quotepath=off diff --name-only "$(git merge-base origin/main "$HEAD_OID" 2>/dev/null || echo "$HEAD_OID^")" "$HEAD_OID" < /dev/null 2>/dev/null) || _changed=""
|
|
88
|
+
if [ -n "$_changed" ]; then
|
|
89
|
+
_hay="$RERUN"
|
|
90
|
+
set -f # split --rerun into words WITHOUT globbing it against the checkout (cross-family R1: `echo *` listed dirs)
|
|
91
|
+
for _w in $RERUN; do # unquoted on purpose: split into words; a word naming a tracked FILE adds that file's text (a runner script)
|
|
92
|
+
_w="${_w//[\"\';|&()]/}"
|
|
93
|
+
[ -n "$_w" ] && [ "$(git cat-file -t "$HEAD_OID:$_w" < /dev/null 2>/dev/null)" = blob ] \
|
|
94
|
+
&& _wc=$(git show "$HEAD_OID:$_w" < /dev/null 2>/dev/null) && _hay="$_hay $_wc"
|
|
95
|
+
done
|
|
96
|
+
set +f
|
|
97
|
+
_hay=" $(printf '%s' "$_hay" | tr -s '[:space:]"'"'"';|&()' ' ') "
|
|
98
|
+
_hit=0
|
|
99
|
+
while IFS= read -r _f; do
|
|
100
|
+
[ -n "$_f" ] || continue
|
|
101
|
+
case "$_hay" in *" $_f "*|*" $(basename "$_f") "*) _hit=1; break ;; esac
|
|
102
|
+
done <<< "$_changed"
|
|
103
|
+
[ "$_hit" -eq 1 ] || echo "⚠️ --rerun mentions none of this PR's $(printf '%s\n' "$_changed" | wc -l | tr -d ' ') changed file(s) (nor any script it names) — it may not exercise the change. Advisory only; merging continues." >&2
|
|
104
|
+
fi
|
|
105
|
+
|
|
59
106
|
# 2. merge
|
|
60
107
|
# 🟥 cross-family W1: pin the merge to the head we RECORDED. Without it, a push landing between the
|
|
61
108
|
# record and the merge gets squashed in unverified, and «merged and verified» describes a commit
|
|
@@ -76,7 +123,7 @@ if ! gh pr merge "$PR" --squash --delete-branch --admin --match-head-commit "$HE
|
|
|
76
123
|
MERGED)
|
|
77
124
|
# MERGED alone does not say WHICH head merged — someone may have pushed and merged after we
|
|
78
125
|
# recorded (codex A2). Only the recorded head may continue to verification.
|
|
79
|
-
[ "$HO" = "$HEAD_OID" ] || { echo "🟥 HARNESS-ERROR: gh pr merge failed, and PR #$PR is MERGED from head ${HO:-?}, not the recorded $HEAD_OID — NOT verified" >&2; exit 4; }
|
|
126
|
+
[ "$HO" = "$HEAD_OID" ] || { _receipt "merged-other-head-not-verified" ""; echo "🟥 HARNESS-ERROR: gh pr merge failed, and PR #$PR is MERGED from head ${HO:-?}, not the recorded $HEAD_OID — NOT verified" >&2; exit 4; }
|
|
80
127
|
echo "⚠️ gh pr merge exited non-zero; GitHub reports MERGED from the recorded head — continuing to verify" >&2
|
|
81
128
|
echo " the head branch may still exist on origin — delete it by hand if so" >&2 ;;
|
|
82
129
|
# 🟥 a persistent OPEN cannot prove nothing merged (state may still be stale) — say what was seen
|
|
@@ -94,19 +141,20 @@ MC=$(gh pr view "$PR" --json mergeCommit -q .mergeCommit.oid < /dev/null) || MC=
|
|
|
94
141
|
if [ "$ST" != "MERGED" ] || [ -z "$MC" ] || [ "$MC" = "null" ]; then
|
|
95
142
|
echo "🟥 merge ACCEPTED but not completed (state=${ST:-?} mergeCommit=${MC:-none}) — queued or lagging." >&2
|
|
96
143
|
echo " NOT verified. When it lands: bash $PSV --tip $HEAD_OID --merge <merge commit> --rerun '<cmd>'" >&2
|
|
144
|
+
_receipt "accepted-not-completed" ""
|
|
97
145
|
exit 6
|
|
98
146
|
fi
|
|
99
147
|
git fetch -q origin < /dev/null 2>/dev/null || true
|
|
100
148
|
# W2 (B): a narrow/single-branch refspec may not bring the merge commit — ask for it by oid too
|
|
101
149
|
git cat-file -e "$MC^{commit}" 2>/dev/null || git fetch -q origin "$MC" < /dev/null 2>/dev/null || true
|
|
102
150
|
git cat-file -e "$MC^{commit}" 2>/dev/null \
|
|
103
|
-
|| { 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; }
|
|
151
|
+
|| { _receipt "merged-not-fetchable" "$MC"; 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; }
|
|
104
152
|
echo "── merged as $MC"
|
|
105
153
|
|
|
106
154
|
# 4. verify
|
|
107
155
|
bash "$PSV" --repo . --tip "$HEAD_OID" --merge "$MC" --rerun "$RERUN"; rc=$?
|
|
108
156
|
case "$rc" in
|
|
109
|
-
0) echo "✅ PR #$PR merged and verified"; exit 0 ;;
|
|
110
|
-
1) echo "🟥 PR #$PR IS MERGED but verification FAILED — the merge stands; fix forward or revert" >&2; exit 1 ;;
|
|
111
|
-
*) echo "🟥 HARNESS-ERROR (AFTER merge): post_squash_verify rc=$rc — PR #$PR is merged, verification did not complete" >&2; exit 4 ;;
|
|
157
|
+
0) _receipt "verified" "$MC"; echo "✅ PR #$PR merged and verified"; exit 0 ;;
|
|
158
|
+
1) _receipt "verify-failed" "$MC"; echo "🟥 PR #$PR IS MERGED but verification FAILED — the merge stands; fix forward or revert" >&2; exit 1 ;;
|
|
159
|
+
*) _receipt "verify-incomplete" "$MC"; echo "🟥 HARNESS-ERROR (AFTER merge): post_squash_verify rc=$rc — PR #$PR is merged, verification did not complete" >&2; exit 4 ;;
|
|
112
160
|
esac
|
package/scripts/selfcheck.sh
CHANGED
|
@@ -1014,6 +1014,8 @@ for _pair in \
|
|
|
1014
1014
|
"scripts/destructive_pre_gate.sh|scripts/test_destructive_pre_gate_lanes.sh" \
|
|
1015
1015
|
"templates/.git-hooks/pre-push|scripts/test_prepush_destructive_lanes.sh" \
|
|
1016
1016
|
"templates/.git-hooks/pre-push|scripts/test_prepush_destructive_liveness.sh" \
|
|
1017
|
+
`# 실제 git push 발화 레인 (2026-10-24, 형제 하네스 회신). 합성 stdin 레인은 «판정» 만 잰다 — 이 레인은 git 이 그 동작에서 훅을 «부르는가 · 그 줄을 넘기는가» 를 잰다. --mirror 는 삭제 줄을 안 넘긴다(실측).` \
|
|
1018
|
+
"templates/.git-hooks/pre-push|scripts/test_prepush_real_fire_lanes.sh" \
|
|
1017
1019
|
`# ── 증거 vs 판정 토큰 충돌(2026-09-19). SUBJECT 는 훅이 아니라 «되돌림 프로브 자신»이다 — 이 레인이 재는 것은 게이트의 동작이 아니라 그 프로브의 «출력 계약»(자기가 authored 한 줄에만 ❌ 를 쓴다)이고, 이 집계기가 ❌ 로 실패를 판정하므로 둘이 같은 채널을 공유한다. 실측: run 35426860480 의 로그를 사람이 두 번 연속 오귀속했다 ──` \
|
|
1018
1020
|
"scripts/test_prepush_destructive_liveness.sh|scripts/test_liveness_echo_token_lanes.sh" \
|
|
1019
1021
|
"templates/.git-hooks/pre-push|scripts/test_push_zone_lanes.sh" \
|
|
@@ -962,7 +962,8 @@ def do_unblocked(file_path):
|
|
|
962
962
|
rid = re.sub(r"[^A-Za-z0-9]", "", cells[idx_num]).upper()
|
|
963
963
|
if not rid:
|
|
964
964
|
continue
|
|
965
|
-
|
|
965
|
+
# an empty/invalid status cell classifies to None — that row is open (idle), never a crash
|
|
966
|
+
keys = classify_status(cells[idx_status] if idx_status < len(cells) else "") or set()
|
|
966
967
|
status_by_id[rid] = keys
|
|
967
968
|
rows_flat.append((rid, keys, cells))
|
|
968
969
|
|
|
@@ -973,7 +974,7 @@ def do_unblocked(file_path):
|
|
|
973
974
|
# open rows collapsed two different nothings into the same rc=4: "every dependency was
|
|
974
975
|
# resolved and closed" and "nobody ever wrote a dependency". The first is a clean run; the
|
|
975
976
|
# second is an unread channel. («not found» is not «0» — the named family in this repo.)
|
|
976
|
-
idle = not ("DONE" in keys or "
|
|
977
|
+
idle = not ("DONE" in keys or "N/A" in keys) # classify_status returns the key "N/A", never "n/a"
|
|
977
978
|
joined = " | ".join(cells)
|
|
978
979
|
for m in DEP_RE.finditer(joined):
|
|
979
980
|
dep = m.group(1).upper()
|