@chrono-meta/fh-gate 3.31.0 → 3.32.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.31.0",
14
+ "version": "3.32.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.31.0",
20
+ "version": "3.32.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.31.0",
26
+ "version": "3.32.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.31.0",
32
+ "version": "3.32.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/README.md CHANGED
@@ -85,10 +85,13 @@ cd ~/projects/forge-harness && claude # then type: hi (or 안녕 ·
85
85
  approved one by one and a decline is recorded.
86
86
 
87
87
  **Taking it off again.** From the FH clone, `python3 scripts/fh_detach.py --project <the project you ran the
88
- wizard in>` prints what the wizard wrote; add `--apply` to undo it. It takes FH off the machine setup, not one
89
- project: the `~/.zshrc` block and the FH clone's own hooks and `core.hooksPath` go too. `--plugin` also runs
88
+ wizard in>` prints what the wizard wrote for that project; add `--apply` to undo it. Other projects keep FH. Add
89
+ `--machine` to also remove what every project shares: the `~/.zshrc` block and the FH clone's own hooks and
90
+ `core.hooksPath` (without it they are listed as kept). Another project you ran the wizard in needs its own `--project` — detach those
91
+ first and run `--machine` last. Changed in 3.32.0: before that, `--apply` removed the shared setup too. If `--project`
92
+ is the FH clone itself, its own hooks count as that project's and go without `--machine`. `--plugin` also runs
90
93
  `claude plugin uninstall fh-meta@forge-harness` and removes the `forge-harness` marketplace entry. A hook counts
91
- as FH's only when every field equals a shipped snippet entry — so one you wrote yourself survives unless it is
94
+ as FH's only when every field equals a shipped snippet entry (or the wizard's companion-store hook form) — so one you wrote yourself survives unless it is
92
95
  identical to FH's — and anything FH-like that does not match is listed for you to look at (exit 1). Installed
93
96
  the plugin only, with no clone? Run `claude plugin uninstall fh-meta@forge-harness`. Door ① leaves only its verdict records
94
97
  in `~/.fh/logs/` (delete the folder when you no longer want them) and npm's own `npx` cache.
@@ -124,7 +124,7 @@ FH 자산(규칙·스킬·스크립트 등)을 고치면 4축 검증 마커를
124
124
  `/context-doctor` 를 불러라. 무엇이 상주 중이고 무엇을 뺄 수 있는지 진단한다.
125
125
 
126
126
  **Q. FH 를 떼고 싶다.**
127
- FH 클론에서 `python3 scripts/fh_detach.py --project <마법사를 돌린 프로젝트>` — 먼저 무엇을 지울지 보여 주고 아무것도 안 바꾼다. 맞으면 `--apply`. 프로젝트 하나가 아니라 머신 설정 전체(`~/.zshrc` 블록 · FH 클론의 훅)를 떼는 명령이다. `--plugin` 은 fh-meta 플러그인과 forge-harness 마켓플레이스 등록까지 지운다. 클론 없이 플러그인만 깔았으면 `claude plugin uninstall fh-meta@forge-harness`.
127
+ FH 클론에서 `python3 scripts/fh_detach.py --project <마법사를 돌린 프로젝트>` — 먼저 무엇을 지울지 보여 주고 아무것도 안 바꾼다. 맞으면 `--apply`. 기본은 그 프로젝트만 뗀다 — 다른 프로젝트는 그대로다. 모든 프로젝트가 같이 쓰는 것(`~/.zshrc` 블록 · FH 클론의 훅 · `core.hooksPath`)까지 떼려면 `--machine` 을 더한다(안 주면 «kept (machine-wide …)» 로 보여 주기만 한다). 마법사를 돌린 다른 프로젝트는 그 프로젝트 경로로 따로 뗀다 — 그것들을 먼저 떼고 `--machine` 은 마지막에. 3.32.0 에서 바뀌었다: 그 전에는 `--apply` 만으로 공유분까지 지웠다. `--project` 로 FH 클론 자신을 주면 그 클론의 훅은 «그 프로젝트 것» 이라 `--machine` 없이도 지워진다. `--plugin` 은 fh-meta 플러그인과 forge-harness 마켓플레이스 등록까지 지운다. 클론 없이 플러그인만 깔았으면 `claude plugin uninstall fh-meta@forge-harness`.
128
128
 
129
129
  ---
130
130
 
@@ -351,3 +351,11 @@ How to apply:
351
351
  prompt, tool choice tends to degrade», with grouping by user intent as the remedy. The quantity is tool
352
352
  definitions **loaded into the prompt** (deferred tools not yet loaded do not count) — not installed skills
353
353
  or MCP inventory. FH's loaded count per session is `UNMEASURED`, not «fine».
354
+ **Measured 2026-10-28** (one headless session in the hub, the `init` event's lists; one machine, one config —
355
+ a reading, not a distribution): tools **available** 112 = 29 built-in + 83 MCP (two desktop/browser
356
+ automation servers alone carry 64), skills 82 (FH plugins 41), agents 19 (FH 14). FH itself adds **0 tool
357
+ definitions** — its weight is skill and agent descriptions, which the quote does not count. How many of the
358
+ 112 are **loaded** depends on the runtime's deferred-tool loading and is still not read from this event —
359
+ so whether any session crosses the quoted threshold stays `UNMEASURED`; what is measured is that the extra
360
+ *available* definitions come from the operator's MCP servers, not from FH. Re-measure with
361
+ `claude -p … --output-format stream-json --verbose` and read the `init` line.
@@ -5086,3 +5086,31 @@
5086
5086
  outcome: "all A findings taken; FH #961 R1 caught a missing permission purpose and a label loophole; FH #962 R1 caught SIGPIPE→141 before the refusal"
5087
5087
  evidence: "FoD #164 · #165 · FH #961 · #962"
5088
5088
  tokens: UNMEASURED
5089
+ - date: 2026-10-28
5090
+ agent: "general-purpose (sonnet) — below-floor marker re-check (purpose: independence)"
5091
+ task: "4 pending markers of below_floor_scan.sh — verdict a/b/c each"
5092
+ trigger: "운영자 2026-10-28 «추천대로 7까지 모두 … 병렬로» (weekly audit 🟥 below-floor 4)"
5093
+ outcome: "scanner right on all 4; governor re-ran items 3·4 with revert probes — item 4's named anchor lane did NOT exercise the fix (reverted code stayed PASS 7) → FH #967 F8"
5094
+ evidence: "FH #967 · tracks/_meta markers (local)"
5095
+ tokens: UNMEASURED
5096
+ - date: 2026-10-28
5097
+ agent: "codex (gpt) ×7 — read-only reviews"
5098
+ task: "FH #965 R1·R2 · FH #966 R1·R2 · FH #967 R1 · (FoD gate / R2 residual reviews pending)"
5099
+ trigger: "load-bearing installer undo · CI lock base · lane anchors"
5100
+ outcome: "#965 R1 4 + R2 1 taken · #966 R1 4 + R2 1 taken (PIPESCAN_BASE leaked into fixtures under push) · #967 R1 2 C taken"
5101
+ evidence: "FH #965 · #966 · #967"
5102
+ tokens: UNMEASURED
5103
+ - date: 2026-10-28
5104
+ agent: "general-purpose (sonnet) ×2 — FoD builders (purpose: context)"
5105
+ task: "FoD gate inline-data false positive (#36 family) · FoD #164/#165 R2 residuals"
5106
+ trigger: "운영자 2026-10-28 «추천대로 7까지 모두 … 병렬로»"
5107
+ outcome: "residuals: first design (cache + budget) drew 5 new defects in codex R1 → governor ordered a reduction, R2 1 B named as residual, merged FoD #167 · gate: two rounds of governor-directed extension (in-order names; codex R1 receiver/open/replace fixes in progress)"
5108
+ evidence: "FoD #167 · FoD branch fix/gate-inline-data-mention"
5109
+ tokens: UNMEASURED
5110
+ - date: 2026-10-28
5111
+ agent: "fh-meta:beginner (sonnet) + fh-meta:challenger (sonnet) — scoped Area B for v3.32.0 (purpose: independence)"
5112
+ task: "cold read and claim attack of the 3.32.0 changelog and detach docs"
5113
+ trigger: "version policy: minor needs Area B since the previous minor (7-day interval conflict recorded)"
5114
+ outcome: "M findings: BREAKING audience, clone-as-project exception, read-error scope, ordering advice, 3.31.0 change notice; two code defects → FH #968; all doc items folded into the release"
5115
+ evidence: "FH #968 · release PR v3.32.0"
5116
+ tokens: UNMEASURED
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "3.31.0",
3
+ "version": "3.32.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": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-commons",
3
- "version": "3.31.0",
3
+ "version": "3.32.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.31.0",
3
+ "version": "3.32.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,5 +1,21 @@
1
1
  # forge-harness (fh-meta) Changelog
2
2
 
3
+ ### [3.32.0] — 2026-10-28 — fh_detach 기본 = 프로젝트 하나 · CI 에서 pipefail 델타 잠금이 실제로 돈다 · 레인 앵커 보강
4
+
5
+ **minor.** In short (for upgraders): `scripts/fh_detach.py` (still a dry run unless `--apply`) now takes off only the named project by default; add `--machine` to also remove what every project shares (`~/.zshrc` block, the FH clone's own hooks, `core.hooksPath`). In 3.31.0, `--apply` removed those too — if you relied on that, add `--machine`. Detach your other projects first and run `--machine` last. The pipefail class-lock delta no longer reports «SKIP» when it cannot find a base; the one `BREAKING (gate)` line below applies only to a clone of this repository running its own CI — the scanner and that lane are not in the npm package, so this change does not reach npm consumers.
6
+
7
+ BREAKING (gate): (hub clones only — not in the npm package) selfcheck's pipefail class-lock lane now FAILS under `GITHUB_ACTIONS=true` when the delta cannot find a base — check out with `fetch-depth: 0`, and on a push pass the event's `before` as `PIPESCAN_BASE` (this repository's `validate.yml` now does both). A `before` missing after a force-push falls back to `merge-base(HEAD, origin/main)` with a warning; if that is HEAD itself (force-push to main), it fails.
8
+
9
+ 소비자에게 닿는 변화:
10
+ - `scripts/fh_detach.py`: 기본 범위가 **그 프로젝트 하나**다(실행은 여전히 `--apply` 가 있어야 한다). 지우는 것 = 그 프로젝트의 `.claude/settings*.json` FH 훅 · `CLAUDE.local.md` 동반 절 · 그 프로젝트의 `~/.cc_sentinels` 이름 · 안 고친 템플릿 사본. 남는 것 = `~/.zshrc` 블록 · FH 클론 자신의 훅과 동반 절 · `core.hooksPath` · 다른 프로젝트 · 플러그인 — 공유분은 `kept (machine-wide …)` 줄로 보인다. `--machine` 을 주면 공유분까지 지운다(그래도 다른 프로젝트는 그대로 — 각자 `--project` 로 먼저 떼고 `--machine` 은 마지막에). 🟥 3.31.0 에서 `--apply` 로 머신 전체를 떼던 사람은 이제 `--machine` 을 더해야 같은 결과다. 예외: `--project` 가 FH 클론 자신이면 그 클론의 훅·동반 절은 «그 프로젝트 것» 이라 `--machine` 없이도 지워진다(셸 블록·hooksPath 는 여전히 `--machine` 만). 공유 단계(셸 블록 · 클론 settings · hooksPath)의 읽기 오류는 `--machine` 일 때만 종료 10 이고, 없으면 `kept (machine-wide, could not be read …)` 로 보인다. 그 프로젝트 자신의 파일이나 배포 스니펫을 못 읽으면 종래대로 종료 10(트레이스백 대신 `HARNESS-ERROR`, #968). install-wizard SKILL.md §Detach · README · USER_GUIDE(#965 · #968).
11
+ - `scripts/pipefail_earlyexit_scan.sh changed`(새 pipefail 조기종료 줄을 막는 델타 잠금): 기준(`merge-base HEAD origin/main`)을 못 구하면 HEAD 로 떨어져 «변경 없음 SKIP» rc 0 을 내던 폴백을 없앴다 — 이제 rc 2(측정 못 함). 얕은 CI 체크아웃에서 이 잠금이 한 번도 물지 않았다(하류 실측 2026-10-27). 기준은 두 번째 인자(주었는데 체크아웃에 없으면 rc 2) 또는 새 환경변수 `PIPESCAN_BASE`(0 으로만 된 sha 는 미설정 · 체크아웃에 없으면 경고 뒤 merge-base, 그게 HEAD 면 rc 2)로 줄 수 있다. selfcheck 의 이 레인은 CI(`GITHUB_ACTIONS=true`)에서 측정 못 하면 실패한다(로컬은 종전대로 경고). 같은 PR 에서 배포되는 레인 `test_prepush_real_fire_lanes.sh` 의 `stdin_has` 를 파이프 없이 고쳤다(`grep -q` 조기 종료가 생산자를 SIGPIPE 로 죽이는 형태)(#966 · #968).
12
+ - `scripts/test_mutation_probe_lanes.sh` R7-1: 다른 프로브가 «읽은 뒤·잠그기 전» 에 대상을 되돌리는 경우를, 시간 추정(잠금까지 걸린 시간의 절반) 대신 관측으로 맞춘다 — `scripts/mutation_probe.py` 의 테스트 전용 환경변수 `MUTATION_PROBE_TEST_AFTER_READ`(설정하지 않으면 효과 없음)가 읽은 직후 `<경로>.read` 를 만들고 `<경로>.go` 를 60초까지 기다린다. 표지 자리에 미리 있는 링크·파일은 따라가지 않고 종료 2(R7-1c). 빠른 러너에서 복원이 잠금 뒤로 밀려 옳은 프로브가 빨개지던 하류 실측이 계기다(#966).
13
+ - `scripts/test_fh_run_resolver_lanes.sh` F8: `package.json` 없는 트리에서 `fh-run.sh` 가 경고를 내고 버전을 `UNKNOWN-no-package-json` 으로 적고 계속 해석하는지 직접 돈다. 3.7.0 의 «무음 사망» 수리(#715)가 이 파일을 앵커로 적었지만 그 경우를 한 번도 안 돌렸다(수리 전 코드로 되돌려도 초록이었다 — 2026-10-28 플로어 재검). `dispatch_conditional_prohibition.md §Two-Purposes`: 도구 정의 개수를 한 번 실측해 적었다(쓸 수 있는 도구 112 · FH 가 더하는 도구 0) — 로드된 개수는 여전히 `UNMEASURED`(#967).
14
+ - `scripts/fh_session_load.sh`(배포됨): 아래 허브 동기화가 거부 표지를 남겼을 때만 세션 시작에 두 줄을 띄운다 — 표지가 없으면 아무것도 안 한다(#964).
15
+
16
+ 허브에서만(이 레포를 클론해 컴패니언 스토어 동기화를 쓰는 경우 — `sync-to-be.sh` 는 npm 패키지에 없다):
17
+ - `scripts/sync-to-be.sh` 가 대량 유입으로 거부(rc 14)하면 표지를 남긴다. 표지는 원인을 고친 뒤(제외 · 삭제 · `FH_SYNC_BULK_OK=1`) **다음 동기화가 «커밋할 것 없음» 이나 커밋까지 가야** 지워진다. 다른 스토어의 표지는 표지와 현재 스토어 경로가 둘 다 있을 때만 걸러진다(#964).
18
+
3
19
  ### [3.31.0] — 2026-10-27 — 설치 마법사 되돌리기(fh_detach) · 디스패치마다 목적 적기 · selfcheck 시간 상한 · 바깥 질문 검사기(실험 종료 · 호출부 없음)
4
20
 
5
21
  **minor.** In short (for upgraders): one new tool takes off what `/install-wizard` put on (`scripts/fh_detach.py`, dry run by default), one new checker screens a question before it goes to an outside model (`scripts/abstract_consult_check.py`, nothing calls it — off by default), and `selfcheck.sh` gives the mutation-probe lane suite a longer time budget. `fh_detach.py` takes FH off the whole machine setup (the `~/.zshrc` block and the FH clone's hooks go too), not one project — run the dry run first. The pre-send checker is an ended experiment (it missed its pre-registered bar) kept as an inert tool: it sends nothing and nothing calls it. For npm consumers nothing that passed before is refused now; upgrading from 3.30.0 needs no action. The one `BREAKING (gate)` line below applies only if you run the companion-store sync script (`scripts/sync-to-be.sh`) from a clone of this repository — that script is not in the npm package.
@@ -289,16 +289,22 @@ When run again in an environment that has already passed the wizard (`~/.cc_sent
289
289
 
290
290
  ## Detach (undo the wizard)
291
291
 
292
- What this wizard writes can be taken back with one command (the named residuals below are the exceptions). It
293
- takes FH off the machine setup, not one project — the zshrc block and the FH clone's hooks and `core.hooksPath`
294
- go too. With no clone (plugin only), use `claude plugin uninstall fh-meta@forge-harness` instead:
292
+ What this wizard writes can be taken back with one command (the named residuals below are the exceptions). By
293
+ default it takes FH off **one project** — that project's hooks, companion section, sentinels and template copies.
294
+ `--machine` also removes what every project shares: the zshrc block, the FH clone's own hooks and `core.hooksPath`;
295
+ without it those are listed as `kept (machine-wide …)` and left alone. Neither touches another project the wizard
296
+ ran in — detach each one with its own `--project`, and run `--machine` last. Changed in 3.32.0 (before, `--apply` also
297
+ removed the shared setup). When `--project` is the FH clone itself, its own hooks and companion section are that
298
+ project's and go without `--machine`. With no clone (plugin only), use
299
+ `claude plugin uninstall fh-meta@forge-harness` instead:
295
300
 
296
301
  ```bash
297
302
  python3 "$FH_DIR/scripts/fh_detach.py" --project . # dry run — prints the plan, changes nothing
298
- python3 "$FH_DIR/scripts/fh_detach.py" --project . --apply # carry it out (--plugin also uninstalls fh-meta and removes the forge-harness marketplace entry)
303
+ python3 "$FH_DIR/scripts/fh_detach.py" --project . --apply # carry it out for this project
304
+ python3 "$FH_DIR/scripts/fh_detach.py" --project . --machine --apply # this project + what every project shares (--plugin also uninstalls fh-meta and removes the forge-harness marketplace entry)
299
305
  ```
300
306
 
301
- It removes the zshrc block, the FH hook entries (every field equal to a shipped snippet entry, key order ignored),
307
+ Together (with `--machine`) they remove the zshrc block, the FH hook entries (every field equal to a shipped snippet entry, key order ignored),
302
308
  the companion section in `CLAUDE.local.md`, the gate's `core.hooksPath`, this project's `~/.cc_sentinels/*_wizard_*`
303
309
  files and unchanged template copies. A user's own hook survives, even one sharing a script name or a group with FH —
304
310
  unless it is identical to FH's shipped entry, which the tool cannot tell apart.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.31.0",
3
+ "version": "3.32.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.31.0",
3
+ "version": "3.32.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -2,19 +2,22 @@
2
2
  """fh_detach.py — undo what /install-wizard wrote, and nothing else.
3
3
 
4
4
  Usage:
5
- python3 scripts/fh_detach.py [--project DIR] [--fh-dir DIR] [--home DIR] [--apply] [--plugin]
5
+ python3 scripts/fh_detach.py [--project DIR] [--machine] [--fh-dir DIR] [--home DIR] [--apply] [--plugin]
6
6
 
7
7
  Default is a dry run: it prints the plan and changes nothing. `--apply` carries it out.
8
8
 
9
+ Scope: by default only the project — ②(the project's files) ③ ⑤ ⑥. `--machine` adds what every project shares:
10
+ ① ~/.zshrc, ② and ③ in the FH clone itself, and ④. Without it, those are listed as kept, never touched.
11
+
9
12
  What counts as FH's (each is removed only on an EXACT match with what the wizard writes today):
10
- ① ~/.zshrc the wizard's block (marked `# >>> forge-harness >>>` … or the older unmarked 4 lines)
13
+ ① ~/.zshrc [--machine] the wizard's block (marked `# >>> forge-harness >>>` … or the older unmarked 4 lines)
11
14
  ② <dir>/.claude/settings.json · settings.local.json
12
15
  hook entries equal in every field (key order ignored) to an entry in a shipped
13
16
  templates/settings.*.snippet.json, or to the Mode-D companion hook form. A file the wizard created is deleted when
14
17
  nothing else is left in it; if a .prewizard backup equals the stripped file, its bytes are
15
18
  put back (so the user's own formatting returns).
16
19
  ③ <dir>/CLAUDE.local.md the «Companion-store session-start read» section the wizard appended
17
- ④ git core.hooksPath only when it is `templates/.git-hooks` (the wizard's value) in the FH clone
20
+ ④ git core.hooksPath [--machine] only when it is `templates/.git-hooks` (the wizard's value) in the FH clone
18
21
  ⑤ ~/.cc_sentinels/<project>_wizard_* (and the folder, when that leaves it empty)
19
22
  ⑥ .claude/rules/local_fh_context.md · fh_env_context.jsonc only when byte-equal to the shipped template,
20
23
  plus their exact lines in .git/info/exclude
@@ -22,10 +25,9 @@ What counts as FH's (each is removed only on an EXACT match with what the wizard
22
25
 
23
26
  What it never does: delete a user's own hook (even one sharing a group or a script name with FH — a hook identical
24
27
  to FH's shipped entry cannot be told apart and is treated as FH's), edit a line it did not write, or touch a file
25
- it cannot parse (that is exit 10, file untouched). Scope: ① and ④ are machine/clone-wide, so this takes FH off the
26
- whole setup, not one project.
28
+ it cannot parse (that is exit 10, file untouched).
27
29
 
28
- Exit: 0 = no recognised FH trace left · 1 = something FH-like is left that needs a human look (listed) ·
30
+ Exit: 0 = no recognised FH trace left in the chosen scope (machine-wide ones kept without --machine are listed) · 1 = something FH-like is left that needs a human look (listed) ·
29
31
  10 = could not read something it needed (nothing changed past that point) · 11 = bad arguments.
30
32
  """
31
33
  import argparse
@@ -378,11 +380,14 @@ def plan_plugin(plan):
378
380
 
379
381
  def main(argv=None):
380
382
  ap = argparse.ArgumentParser(
381
- description="Undo what /install-wizard wrote (dry run unless --apply). Machine-wide: the ~/.zshrc block and "
382
- "the FH clone's hooks and core.hooksPath go too, not only --project.",
383
+ description="Undo what /install-wizard wrote (dry run unless --apply). Default: only --project. "
384
+ "--machine also takes the ~/.zshrc block, the FH clone's hooks and core.hooksPath.",
383
385
  epilog="exit: 0 no recognised FH trace left · 1 something FH-like is LEFT (listed) for a human look · "
384
386
  "10 could not read something it needed · 11 bad arguments")
385
387
  ap.add_argument("--project", default=os.getcwd(), help="project the wizard ran in (default: cwd)")
388
+ ap.add_argument("--machine", action="store_true",
389
+ help="also remove what every project shares: the ~/.zshrc block, the FH clone's own hooks and "
390
+ "companion section, and core.hooksPath (default: only --project)")
386
391
  ap.add_argument("--fh-dir", default=os.environ.get("FH_DIR") or os.path.dirname(os.path.dirname(
387
392
  os.path.abspath(__file__))), help="FH clone/package (default: $FH_DIR, else this script's repo)")
388
393
  ap.add_argument("--home", default=os.path.expanduser("~"), help="home directory to clean (default: ~)")
@@ -396,27 +401,37 @@ def main(argv=None):
396
401
  proj = os.path.abspath(a.project)
397
402
  fh = os.path.abspath(a.fh_dir)
398
403
  plan = Plan(a.apply)
404
+ # machine-wide steps go to their own plan; without --machine they are only reported, never run
405
+ shared = plan if a.machine else Plan(False)
406
+ unread = [] # without --machine an unreadable shared file is reported, never a reason to stop (codex R1)
407
+
408
+ def plan_shared(fn, *args):
409
+ try:
410
+ fn(shared, *args)
411
+ except (HarnessError, OSError, UnicodeDecodeError) as e: # a read failure, not only a parse one (codex R2)
412
+ if a.machine:
413
+ raise e if isinstance(e, HarnessError) else HarnessError(str(e))
414
+ unread.append(str(e))
399
415
  try:
400
416
  cmds, keys = snippet_commands(fh)
401
- plan_zshrc(plan, a.home)
402
- seen = set()
403
- for d in (proj, fh):
404
- if d in seen:
405
- continue
406
- seen.add(d)
417
+ plan_shared(plan_zshrc, a.home)
418
+ for name in ("settings.json", "settings.local.json"):
419
+ plan_settings(plan, os.path.join(proj, ".claude", name), cmds, keys)
420
+ plan_claude_local(plan, proj)
421
+ if fh != proj: # fh == proj: the clone is the project, already planned above
407
422
  for name in ("settings.json", "settings.local.json"):
408
- plan_settings(plan, os.path.join(d, ".claude", name), cmds, keys)
409
- plan_claude_local(plan, d)
410
- plan_hookspath(plan, fh)
423
+ plan_shared(plan_settings, os.path.join(fh, ".claude", name), cmds, keys)
424
+ plan_shared(plan_claude_local, fh)
425
+ plan_shared(plan_hookspath, fh)
411
426
  plan_sentinels(plan, a.home, os.path.basename(proj))
412
427
  plan_copies(plan, fh, proj)
413
428
  plan_rules_dir(plan, proj)
414
429
  if a.plugin:
415
430
  plan_plugin(plan)
416
- except HarnessError as e:
431
+ except (HarnessError, OSError, UnicodeDecodeError) as e: # a project file that cannot be READ is exit 10 too, not a traceback
417
432
  print("fh-detach: HARNESS-ERROR — %s" % e, file=sys.stderr)
418
433
  return 10
419
- steps = [l for l, _ in plan.actions if l]
434
+ steps =[l for l, _ in plan.actions if l]
420
435
  print("fh-detach %s — %d step(s)" % ("APPLY" if a.apply else "DRY RUN (nothing changed; add --apply)", len(steps)))
421
436
  for l in steps:
422
437
  print(" - " + l)
@@ -427,6 +442,13 @@ def main(argv=None):
427
442
  except (OSError, subprocess.CalledProcessError) as e:
428
443
  print("fh-detach: HARNESS-ERROR at «%s»: %s" % (label, e), file=sys.stderr)
429
444
  return 10
445
+ if shared is not plan:
446
+ for l in [l for l, _ in shared.actions if l]:
447
+ print(" kept (machine-wide — every project shares it; --machine removes it): " + l)
448
+ for l in shared.left:
449
+ print(" kept (machine-wide, not an exact FH match — --machine would leave it too; look at it): " + l)
450
+ for l in unread:
451
+ print(" kept (machine-wide, could not be read — not checked; --machine would stop with exit 10): " + l)
430
452
  for n in plan.notes:
431
453
  print(" note: " + n)
432
454
  for l in plan.left:
@@ -644,6 +644,23 @@ if [ -x "$FH/scripts/mapped_tracks.sh" ]; then
644
644
  esac
645
645
  fi
646
646
 
647
+ # 5b) Companion-store sync refused a bulk intake (sync-to-be.sh rc=14). Under launchd that refusal is
648
+ # written only to a log nothing reads, and every later sync with changes refuses again — so the store
649
+ # silently stops receiving anything until a person acts. The marker is cleared by the next committed sync.
650
+ _SBR="$FH/tracks/_meta/logs/.sync_bulk_refused"
651
+ if [ -f "$_SBR" ]; then
652
+ IFS="$(printf '\t')" read -r _sbr_at _sbr_n _sbr_max _sbr_be < "$_SBR" 2>/dev/null || true
653
+ # Only for the store this session syncs to (a refusal against another store is not this store's state).
654
+ _sbr_here=1
655
+ if [ -n "${_sbr_be:-}" ] && [ -n "${BE:-}" ]; then
656
+ [ "$(cd "$_sbr_be" 2>/dev/null && pwd -P)" = "$(cd "$BE" 2>/dev/null && pwd -P)" ] || _sbr_here=0
657
+ fi
658
+ fi
659
+ if [ -f "$_SBR" ] && [ "${_sbr_here:-1}" = 1 ]; then
660
+ echo "🚫 [sync] 컴패니언 스토어 동기화가 멈춰 있다 — ${_sbr_at:-?} 에 새 파일 ${_sbr_n:-?}개(한도 ${_sbr_max:-?})를 거부(rc 14). 그 뒤 변화가 있는 동기화는 계속 거부된다."
661
+ echo " → bash scripts/sync-to-be.sh 로 가장 큰 폴더를 보고: 제외(scripts/sync_excludes.txt) · 스토어에서 삭제 · 의도한 양이면 FH_SYNC_BULK_OK=1 로 한 번."
662
+ fi
663
+
647
664
  # 6) Substrate-jump detection (structure-enforcing — version drift lives outside any session's
648
665
  # context boundary; silent when nothing changed). Detector, never a gate.
649
666
  [ -x "$FH/scripts/substrate_jump_detector.sh" ] && bash "$FH/scripts/substrate_jump_detector.sh" "$FH" 2>/dev/null
@@ -1102,6 +1102,22 @@ def main():
1102
1102
  say('CANNOT JUDGE: subject not found or not a regular file: %s' % a.subject, err=True)
1103
1103
  return 2
1104
1104
  orig = read_bytes(subj)
1105
+ # Test seam (lane R7-1 only; unset = no effect): announce «read» and wait for «go» so a lane can change the
1106
+ # subject between this read and the lock below by OBSERVATION, not a timed guess that one runner's speed
1107
+ # breaks (downstream report 2026-10-27: a measured half-time window landed after the lock on another runner).
1108
+ seam = os.environ.get('MUTATION_PROBE_TEST_AFTER_READ')
1109
+ if seam:
1110
+ try: # exclusive + no-follow: a pre-existing file or link at <seam>.read is never written (codex R1)
1111
+ os.close(os.open(seam + '.read', os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, 'O_NOFOLLOW', 0), 0o600))
1112
+ except OSError as exc:
1113
+ say('CANNOT JUDGE: test seam %s.read cannot be created (%s)' % (seam, exc), err=True)
1114
+ return 2
1115
+ deadline = time.time() + 60
1116
+ while not os.path.exists(seam + '.go'):
1117
+ if time.time() > deadline:
1118
+ say('CANNOT JUDGE: test seam %s.go never appeared' % seam, err=True)
1119
+ return 2
1120
+ time.sleep(0.02)
1105
1121
  try:
1106
1122
  text = orig.decode('utf-8')
1107
1123
  except UnicodeDecodeError:
@@ -112,9 +112,14 @@ install() { # install <world> [gate-consent | unset]
112
112
  mkdir -p "$W/hub/.claude/rules" && cp "$W/hub/templates/local_fh_context.md" "$W/hub/.claude/rules/"
113
113
  echo ".claude/rules/local_fh_context.md" >> "$W/hub/.git/info/exclude"
114
114
  }
115
- detach() { # detach <world> [args…] → rc
115
+ detach() { # detach <world> [args…] → rc (machine-wide: the lanes below check the whole install comes off)
116
116
  local W="$1"; shift
117
- ( cd "$W/hub" && python3 "$DETACH" --project "$W/hub" --fh-dir "$W/hub" --home "$W/home" "$@" ) > "$W/detach.out" 2>&1
117
+ ( cd "$W/hub" && python3 "$DETACH" --project "$W/hub" --fh-dir "$W/hub" --home "$W/home" --machine "$@" ) > "$W/detach.out" 2>&1
118
+ echo $?
119
+ }
120
+ detach_p() { # detach_p <world> <project> [args…] → rc (default scope: the project only)
121
+ local W="$1" P="$2"; shift 2
122
+ ( cd "$P" && python3 "$DETACH" --project "$P" --fh-dir "$W/hub" --home "$W/home" "$@" ) > "$W/detach.out" 2>&1
118
123
  echo $?
119
124
  }
120
125
  fhhooks() { python3 -c '
@@ -232,6 +237,50 @@ chk "Q4b … and detach removes it" "$([ -d "$W/home/.cc_sentinels" ] && echo p
232
237
  W="$T/w13"; mkworld "$W"; install "$W"
233
238
  chk "Q5 a write between plan and apply is not overwritten (LEFT instead)" "$(python3 "$T/race.py" "$DETACH" "$W")" "late=1 left=1"
234
239
 
240
+ echo "── M: default scope is the project; --machine adds what every project shares ──"
241
+ W="$T/w14"; mkworld "$W"
242
+ PRE="$(snap "$W/home" "$W/hub")"
243
+ install "$W"
244
+ ZB="$(shasum "$W/home/.zshrc")"
245
+ chk "M0 the install wrote the companion section (known-positive)" "$(grep -c 'Companion-store session-start read' "$W/hub/CLAUDE.local.md")" 1
246
+ chk "M1 project-only --apply: rc 0" "$(detach_p "$W" "$W/hub" --apply)" 0
247
+ chk "M1a … the project's companion section is gone" "$(cat "$W/hub/CLAUDE.local.md" 2>/dev/null | grep -c 'Companion-store session-start read')" 0
248
+ chk "M1f … ~/.zshrc is byte-for-byte untouched" "$([ "$(shasum "$W/home/.zshrc")" = "$ZB" ] && echo same)" same
249
+ chk "M1b … the project's FH hooks are gone" "$(fhhooks "$W/hub/.claude/settings.json" 2>/dev/null || echo 0)" 0
250
+ chk "M1c … the zshrc block stays" "$(grep -c 'forge-harness (install-wizard)' "$W/home/.zshrc")" 2
251
+ chk "M1d … core.hooksPath stays" "$(git -C "$W/hub" config --get core.hooksPath)" "templates/.git-hooks"
252
+ chk "M1e … and both are named as kept (machine-wide)" "$(grep -c '^ kept (machine-wide' "$W/detach.out")" 2
253
+ chk "M2 then --machine --apply: rc 0" "$(detach "$W" --apply)" 0
254
+ chk "M2b … tree is byte-equal to before install" "$([ "$(snap "$W/home" "$W/hub")" = "$PRE" ] && echo equal)" equal
255
+ W="$T/w15"; mkworld "$W"; install "$W"
256
+ mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/.claude/settings.json" "$W/proj/.claude/settings.json"
257
+ cp "$W/hub/CLAUDE.local.md" "$W/proj/CLAUDE.local.md"
258
+ echo '{"hooks": {}, "mine": 1}' > "$W/hub/.claude/settings.local.json"
259
+ HUBN="$(fhhooks "$W/hub/.claude/settings.json")"; HUBS="$(snap "$W/hub")"; ZB="$(shasum "$W/home/.zshrc")"
260
+ chk "M3 another project: rc 0" "$(detach_p "$W" "$W/proj" --apply)" 0
261
+ chk "M3b … its FH hooks go (file held only FH hooks + user keys)" "$(fhhooks "$W/proj/.claude/settings.json" 2>/dev/null || echo 0)" 0
262
+ chk "M3c … the FH clone's own hooks are untouched" "$(fhhooks "$W/hub/.claude/settings.json")" "$HUBN"
263
+ chk "M3e … its companion section goes" "$(cat "$W/proj/CLAUDE.local.md" 2>/dev/null | grep -c 'Companion-store session-start read')" 0
264
+ chk "M3f … the FH clone's tree is byte-for-byte untouched (settings · settings.local · CLAUDE.local.md · config)" "$([ "$(snap "$W/hub")" = "$HUBS" ] && echo same)/$([ "$(shasum "$W/home/.zshrc")" = "$ZB" ] && echo same)" "same/same"
265
+ chk "M3d … and the clone's settings are named as kept" "$(grep -c "^ kept (machine-wide.*$W/hub/.claude/settings.json" "$W/detach.out")" 1
266
+ chk "M4 dry run with --machine lists the zshrc step; without it, does not" "$(detach "$W" >/dev/null; grep -c '^ - ~/.zshrc' "$W/detach.out")/$(detach_p "$W" "$W/proj" >/dev/null; grep -c '^ - ~/.zshrc' "$W/detach.out")" "1/0"
267
+
268
+ W="$T/w16"; mkworld "$W"; install "$W"
269
+ mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/.claude/settings.json" "$W/proj/.claude/settings.json"
270
+ printf '{ "hooks": ' > "$W/hub/.claude/settings.local.json"
271
+ chk "M5 a broken FH-clone settings file does not stop a project detach (rc 0)" "$(detach_p "$W" "$W/proj" --apply)" 0
272
+ chk "M5b … the project is cleaned and the broken file is named as kept" "$(fhhooks "$W/proj/.claude/settings.json" 2>/dev/null || echo 0)/$(grep -c '^ kept (machine-wide, could not be read.*settings.local.json' "$W/detach.out")" "0/1"
273
+ chk "M5c … with --machine the same file is an error (rc 10)" "$(detach_p "$W" "$W/proj" --machine)" 10
274
+ W="$T/w17"; mkworld "$W"; install "$W"
275
+ mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/.claude/settings.json" "$W/proj/.claude/settings.json"
276
+ chmod 000 "$W/hub/.claude/settings.json"
277
+ chk "M5d an unreadable FH-clone settings file: project detach rc 0 · --machine rc 10" "$(detach_p "$W" "$W/proj" --apply)/$(detach_p "$W" "$W/proj" --machine)" "0/10"
278
+ chmod 644 "$W/hub/.claude/settings.json"
279
+ W="$T/w18"; mkworld "$W"; install "$W"
280
+ mkdir -p "$W/proj/.claude" && git -C "$W/proj" init -q && cp "$W/hub/CLAUDE.local.md" "$W/proj/CLAUDE.local.md"
281
+ printf '\xff\xfe not utf-8\n' >> "$W/proj/CLAUDE.local.md" # deterministic read failure (chmod 000 does not bind root — codex)
282
+ chk "M6 an unreadable PROJECT file (invalid UTF-8) → exit 10 with HARNESS-ERROR, not a traceback" "$(detach_p "$W" "$W/proj" --apply)/$(grep -c 'HARNESS-ERROR' "$W/detach.out")/$(grep -c 'Traceback' "$W/detach.out")" "10/1/0"
283
+
235
284
  echo "── G: the wizard's 4-axis gate block needs explicit consent ──"
236
285
  W="$T/w5"; mkworld "$W"; install "$W" unset
237
286
  chk "G1 FH_WIZARD_GATE_CONSENT unset → hooksPath not set" "$(git -C "$W/hub" config --get core.hooksPath || echo unset)" unset
@@ -245,6 +294,7 @@ chk "P1 --plugin uninstalls fh-meta and removes the marketplace" "$(cat "$T/cla
245
294
 
246
295
  echo "── W: wiring ──"
247
296
  chk "W1 package.json ships fh_detach.py" "$(grep -c '"scripts/fh_detach.py"' "$ROOT/package.json")" 1
297
+ chk "W3 install-wizard SKILL.md names --machine" "$(grep -c 'fh_detach.py" --project . --machine' "$ROOT/plugins/fh-meta/skills/install-wizard/SKILL.md")" 1
248
298
  chk "W2 install-wizard SKILL.md points at the detach command" "$(grep -q 'scripts/fh_detach.py" --project . --apply' "$ROOT/plugins/fh-meta/skills/install-wizard/SKILL.md" && echo yes)" yes
249
299
 
250
300
  echo
@@ -126,6 +126,22 @@ case "${R7}" in
126
126
  *) ng "F7 엉뚱한 곳으로: ${R7}" ;;
127
127
  esac
128
128
 
129
+ echo "== package.json 없는 트리에서도 말하고 계속 가나 (7a9f701 의 수리 — 2026-10-28 전까지 앵커 0) =="
130
+ # 🟥 7a9f701 은 «package.json 없는 트리 → 출력 0줄 · rc=1» 무음 사망을 고쳤고 이 파일을 앵커로 적었는데,
131
+ # 이 파일은 그 경우를 한 번도 안 돌렸다 — 2026-10-28 플로어 재검에서 수리 전 두 줄로 되돌려도 PASS 7 였다.
132
+ # 여기서 그 경우를 직접 돈다: 스크립트 사본만 두고 package.json 은 두지 않는다(plugins 는 링크로 빌린다).
133
+ _F8=$(mktemp -d)
134
+ mkdir -p "$_F8/scripts" && cp "$HERE/scripts/fh-run.sh" "$_F8/scripts/" && ln -s "$HERE/plugins" "$_F8/plugins"
135
+ R8=$(_ttl 60 env FH_DRY_RUN=1 bash "$_F8/scripts/fh-run.sh" --backend codex --skill preprep 2>&1); R8rc=$?
136
+ /bin/rm -rf "$_F8"
137
+ if [ "$R8rc" -eq 0 ] && /usr/bin/grep -q 'WARN: package.json not readable at .* — version reported as UNKNOWN-no-package-json' <<<"$R8" \
138
+ && /usr/bin/grep -qx 'FH RUNTIME ADAPTER vUNKNOWN-no-package-json' <<<"$R8" \
139
+ && /usr/bin/grep -q 'plugins/fh-preprep/skills/preprep/SKILL.md' <<<"$R8"; then
140
+ ok "F8 package.json 없음 → 경고 한 줄 · 버전 UNKNOWN-no-package-json · 해석은 계속 (rc 0)"
141
+ else
142
+ ng "F8 package.json 없는 트리: rc=$R8rc · 출력 $(printf '%s' "$R8" | wc -l | tr -d ' ')줄 (수리 전 = 0줄 · rc 1)"
143
+ fi
144
+
129
145
  echo
130
146
  echo "════════════════════════════════════════"
131
147
  printf ' PASS %s FAIL %s\n' "$PASS" "$FAIL"
@@ -693,45 +693,27 @@ echo "── R7: blind review of v7 (2026-10-08) — each lane red on fbfe773"
693
693
  # lane wrote the subject during the control run) and this lane went red on a correct probe. Now the
694
694
  # delay is measured on this machine: one undisturbed run times its «subject:» header (printed after
695
695
  # the lock), and the restore fires at half of that. Twice the lines makes that window seconds wide.
696
+ # 🟥 2026-10-28 (downstream report 2026-10-27): the measured half-time window was still a timed guess — on another
697
+ # downstream runner the second run was faster than the calibration run and the restore landed after
698
+ # the lock. Now the window is OBSERVED: MUTATION_PROBE_TEST_AFTER_READ makes the probe touch
699
+ # <seam>.read right after it reads the subject and wait for <seam>.go before it goes on to lock, so the
700
+ # restore lands inside the window on any runner. No timing, no calibration run, no UNMEASURED arm.
696
701
  printf '#!/usr/bin/env bash\n[ "$a" -ne 1 ] && echo x1\n' > r71.orig
697
- for k in $(seq 2 12000); do printf '[ "$a" -eq %d ] && echo x%d\n' "$k" "$k"; done >> r71.orig
698
702
  printf 'grep -q "exit 113" r71.sh && exit 1\nexit 0\n' > lane_r71.sh
699
- cp r71.orig r71.sh
700
- _ms(){ python3 -c 'import time; print(int(time.time() * 1000))'; } # BSD date has no %N
701
- c71=$(_ms); h71=""; _c71out=""
702
- while IFS= read -r l; do
703
- _c71out="$_c71out$l
704
- "
705
- case "$l" in subject:*) [ -n "$h71" ] || h71=$(( $(_ms) - c71 )) ;; esac
706
- done < <(python3 "$PROBE" r71.sh lane_r71.sh --max 1 --timeout 30 2>&1)
707
- cmp -s r71.sh r71.orig || cp r71.orig r71.sh
708
- # no header = the calibration run never reached the lock: the delay is unknown.
709
- # 🟥 2026-10-26: that used to be ONE outcome — the lane ran anyway with d71=0 and went red. Measured
710
- # here, the common cause is not a defect in the probe at all: the probe's state directory
711
- # /tmp/mutation_probe-$uid is MACHINE-GLOBAL and its inode key is (st_dev, st_ino), so a fixture this
712
- # suite creates fresh can land on an inode whose backup an EARLIER run left behind (the suite's own
713
- # kill/timeout lanes leave backups by design — 26 of them after one round of runs in this container).
714
- # The probe then answers `CANNOT JUDGE: a previous run left a backup …` BEFORE printing the header,
715
- # the calibration is unknown, and this lane called that a FAILURE. It is not: it is UNMEASURED, which
716
- # is neither a pass nor a fail, and the suite already has that counter. Any OTHER reason for a
717
- # missing header still falls through to the old behaviour — the point is a typed verdict, not a
718
- # looser one. The aliasing itself lives in scripts/mutation_probe.py (the subject, and the recovery
719
- # path for a subject's original bytes) and is a NAMED RESIDUAL here, not something a lane may patch.
720
- if [ -z "$h71" ] && grep -q 'a previous run left a backup' <<<"$_c71out"; then
721
- echo " ⚠️ R7-1 UNMEASURED — the probe refused the calibration run: a previous run's backup is still in"
722
- echo " the machine-global state dir and its inode key aliases this fixture. Not a pass, not a failure."
723
- printf ' %s\n' "$(grep -m1 'a previous run left a backup' <<<"$_c71out")"
724
- echo " Inspect those backups, restore anything real by hand, remove them, then re-run."
725
- UNMEASURED=$((UNMEASURED+1))
726
- else
727
- [ -n "$h71" ] || echo " ⚠️ R7-1 calibration: no «subject:» header — time-to-lock unknown on this machine"
728
- d71=$(awk -v ms="${h71:-0}" 'BEGIN { printf "%.3f", ms / 2000 }')
729
703
  sed '2s/-ne 1/-eq 1/' r71.orig > r71.sh # the other probe's mutant is live
730
- python3 "$PROBE" r71.sh lane_r71.sh --max 1 --timeout 30 > r71.out 2>&1 & pb=$!
731
- sleep "$d71"; cat r71.orig > r71.sh # … and now it restores (same inode)
704
+ _r71s="$PWD/r71.seam"; rm -f "$_r71s.read" "$_r71s.go"
705
+ MUTATION_PROBE_TEST_AFTER_READ="$_r71s" python3 "$PROBE" r71.sh lane_r71.sh --max 1 --timeout 30 > r71.out 2>&1 & pb=$!
706
+ _r71w=0; while [ ! -e "$_r71s.read" ] && kill -0 "$pb" 2>/dev/null && [ "$_r71w" -lt 600 ]; do sleep 0.1; _r71w=$((_r71w+1)); done
707
+ _r71seen=no; [ -e "$_r71s.read" ] && _r71seen=yes
708
+ cat r71.orig > r71.sh # … the other probe restores (same inode) — after the read
709
+ : > "$_r71s.go" # … and only now may this probe go on to lock
732
710
  wait "$pb"; rc=$?
733
- grep -q 'changed between reading it and locking it' r71.out && [ "$rc" -eq 2 ] && cmp -s r71.sh r71.orig && [ ! -e "$(bkpath r71.sh)" ] ; chk $? "R7-1 a subject that changed between read and lock → 2, the original stays (fbfe773: the stale mutant was backed up as «original» and written back)"
734
- fi
711
+ [ "$_r71seen" = yes ] && grep -q 'changed between reading it and locking it' r71.out && [ "$rc" -eq 2 ] && cmp -s r71.sh r71.orig && [ ! -e "$(bkpath r71.sh)" ] ; chk $? "R7-1 a subject that changed between read and lock → 2, the original stays (fbfe773: the stale mutant was backed up as «original» and written back)"
712
+ [ "$_r71seen" = yes ] || printf ' R7-1: the probe never signalled «read» (exit before reading?): %s\n' "$(head -2 r71.out | tr '\n' ' ')"
713
+ # R7-1c (codex R1) — the seam never writes through something already at <seam>.read: a link there → 2, target intact
714
+ printf 'keep\n' > r71c.target; ln -sf "$PWD/r71c.target" r71c.seam.read; cp r71.orig r71c.sh
715
+ MUTATION_PROBE_TEST_AFTER_READ="$PWD/r71c.seam" python3 "$PROBE" r71c.sh lane_r71.sh --max 1 --timeout 30 > r71c.out 2>&1; rc=$?
716
+ [ "$rc" -eq 2 ] && grep -q 'test seam .*cannot be created' r71c.out && [ "$(cat r71c.target)" = keep ] && cmp -s r71c.sh r71.orig ; chk $? "R7-1c a link already at <seam>.read → 2, the link's target is not truncated, the subject untouched"
735
717
 
736
718
  # R7-1b (2026-10-26) — the known pair for the UNMEASURED arm above. The claim it rests on is that a
737
719
  # leftover backup under either key makes the probe refuse BEFORE it prints its header; if that is not
@@ -77,7 +77,7 @@ EOF
77
77
  }
78
78
  remote_ref() { git -C "$1/remote.git" rev-parse -q --verify "$2" 2>/dev/null || echo ABSENT; }
79
79
  fired() { wc -l < "$1/fired" | tr -d ' '; }
80
- stdin_has() { cat "$1"/stdin.* 2>/dev/null | grep -qE "$2"; }
80
+ stdin_has() { grep -qE "$2" "$1"/stdin.* 2>/dev/null; } # no pipe: grep -q exiting early cannot SIGPIPE a producer (downstream report 2026-10-27)
81
81
 
82
82
  # run_lane <name> <ref-to-watch> <stdin-regex> <push args...>
83
83
  run_lane() {