@lannguyensi/harness 0.59.1 → 0.60.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 (88) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/README.md +1 -1
  3. package/dist/cli/apply/apply.d.ts +20 -0
  4. package/dist/cli/apply/apply.js +13 -7
  5. package/dist/cli/apply/apply.js.map +1 -1
  6. package/dist/cli/apply/install-codex-config.d.ts +113 -2
  7. package/dist/cli/apply/install-codex-config.js +651 -69
  8. package/dist/cli/apply/install-codex-config.js.map +1 -1
  9. package/dist/cli/approve/understanding.js +34 -28
  10. package/dist/cli/approve/understanding.js.map +1 -1
  11. package/dist/cli/doctor/format.js +22 -0
  12. package/dist/cli/doctor/format.js.map +1 -1
  13. package/dist/cli/doctor/index.js +60 -31
  14. package/dist/cli/doctor/index.js.map +1 -1
  15. package/dist/cli/doctor/types.d.ts +17 -0
  16. package/dist/cli/dry-run.js +7 -0
  17. package/dist/cli/dry-run.js.map +1 -1
  18. package/dist/cli/index.js +46 -144
  19. package/dist/cli/index.js.map +1 -1
  20. package/dist/cli/pack/auto-approve-path.js +25 -11
  21. package/dist/cli/pack/auto-approve-path.js.map +1 -1
  22. package/dist/cli/pack/hook-codex-post-tool-use.js +2 -2
  23. package/dist/cli/pack/hook-codex-post-tool-use.js.map +1 -1
  24. package/dist/cli/pack/hook-codex-pre-tool-use.js +32 -5
  25. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
  26. package/dist/cli/pack/hook-post-merge-gate-record.d.ts +7 -0
  27. package/dist/cli/pack/hook-post-merge-gate-record.js +39 -2
  28. package/dist/cli/pack/hook-post-merge-gate-record.js.map +1 -1
  29. package/dist/cli/pack/hook-post-tool-use.js +2 -2
  30. package/dist/cli/pack/hook-post-tool-use.js.map +1 -1
  31. package/dist/cli/pack/hook-pre-tool-use.js +60 -15
  32. package/dist/cli/pack/hook-pre-tool-use.js.map +1 -1
  33. package/dist/cli/policy/intercept.js +5 -1
  34. package/dist/cli/policy/intercept.js.map +1 -1
  35. package/dist/cli/record/index.d.ts +11 -2
  36. package/dist/cli/record/index.js +18 -5
  37. package/dist/cli/record/index.js.map +1 -1
  38. package/dist/cli/session-start/branch-check.d.ts +3 -29
  39. package/dist/cli/session-start/branch-check.js +7 -37
  40. package/dist/cli/session-start/branch-check.js.map +1 -1
  41. package/dist/cli/session-start/index.d.ts +16 -30
  42. package/dist/cli/session-start/index.js +72 -26
  43. package/dist/cli/session-start/index.js.map +1 -1
  44. package/dist/cli/session-start/shared-options.d.ts +92 -0
  45. package/dist/cli/session-start/shared-options.js +109 -0
  46. package/dist/cli/session-start/shared-options.js.map +1 -0
  47. package/dist/cli/session-start/stale-base-check.d.ts +3 -28
  48. package/dist/cli/session-start/stale-base-check.js +7 -37
  49. package/dist/cli/session-start/stale-base-check.js.map +1 -1
  50. package/dist/cli/session-start/toolchain-parity.d.ts +5 -21
  51. package/dist/cli/session-start/toolchain-parity.js +6 -38
  52. package/dist/cli/session-start/toolchain-parity.js.map +1 -1
  53. package/dist/cli/smoke/index.d.ts +1 -1
  54. package/dist/cli/smoke/index.js +8 -11
  55. package/dist/cli/smoke/index.js.map +1 -1
  56. package/dist/policy-packs/builtin/post-merge-gate-runtime.d.ts +11 -0
  57. package/dist/policy-packs/builtin/post-merge-gate-runtime.js +11 -0
  58. package/dist/policy-packs/builtin/post-merge-gate-runtime.js.map +1 -1
  59. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +1 -1
  60. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
  61. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.d.ts +36 -0
  62. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js +73 -0
  63. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js.map +1 -0
  64. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +3 -2
  65. package/dist/policy-packs/builtin/understanding-before-execution/index.js +5 -2
  66. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +1 -1
  67. package/dist/policy-packs/builtin/understanding-before-execution/markers.js +1 -0
  68. package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +1 -1
  69. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +205 -1
  70. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +360 -3
  71. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +1 -1
  72. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.d.ts +1 -1
  73. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +2 -2
  74. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +1 -1
  75. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.d.ts +36 -0
  76. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js +50 -0
  77. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js.map +1 -1
  78. package/dist/runtime/bash-prefix-parse.js +319 -126
  79. package/dist/runtime/bash-prefix-parse.js.map +1 -1
  80. package/dist/runtime/intercept.d.ts +38 -0
  81. package/dist/runtime/intercept.js +224 -5
  82. package/dist/runtime/intercept.js.map +1 -1
  83. package/dist/runtime/read-only-bash.js +11 -1
  84. package/dist/runtime/read-only-bash.js.map +1 -1
  85. package/dist/runtime/shell-word.d.ts +16 -1
  86. package/dist/runtime/shell-word.js +82 -1
  87. package/dist/runtime/shell-word.js.map +1 -1
  88. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.60.0] - 2026-10-01
11
+
12
+ ### Upgrade notes
13
+
14
+ - A live understanding-gate approval written by an earlier release is denied once after upgrading (its marker signed the report's raw bytes, not the new canonical content hash): run `harness approve understanding` again; the deny reason names it.
15
+ - After approval, deleting the approved report while other report files remain now denies until you re-approve; `harness gc --apply` can do this when it removes an approved report whose marker is still live. Reports larger than 1 MiB or nested deeper than 64 levels can no longer be approved without `--force`.
16
+ - `${REPO}`/`${BRANCH}`-tagged gates now block from a cwd outside every git repository and from a detached HEAD instead of matching any fact; the message names the way forward (`cd <repo>` or `git -C <repo> ...`, `git switch <branch>`).
17
+
18
+ ### Added
19
+
20
+ - **`harness record review-subagent --adhoc` records a review for work without an agent-tasks task** (task `bc97a697`). `--task` is no longer a `requiredOption`: exactly one of `--task <id>` or `--adhoc` is required, so a task-based flow still writes both `review-subagent:<task>` and `review-subagent:<branch>` exactly as before and cannot silently skip the task tag the MCP-surface `review-subagent-before-pr-create` gate keys on. With `--adhoc` the fact carries `review-subagent:<branch>` and the verdict only (no task token, and no invented id), which satisfies `review-subagent-before-pr-create-bash` for the recorded branch (tag matching is substring-based, see "Substring matching and the advisory trust model" in docs/CLI.md). Neither option, or both together, exits `64` with a message naming both options; `--adhoc` on a detached HEAD without `--branch` refuses with the existing no-branch reason instead of writing a blank tag. The MCP-surface gate is unchanged: an ad-hoc fact carries no task tag (a branch name that contains a task id can still match it, by the same substring rule).
21
+
22
+ - **The understanding gate's block message now says why an approval lapsed** (task `20ebf935`). A PostToolUse boundary (`expire_on_tool_match` / `expire_on_bash_match`) deletes the marker and used to leave only `approvalStatus=expired` on the persisted report, so the next block read `no approval marker for session <id>` with no cause. `expirePersistedReport` now also stores the triggering event next to `expiredAt` as an optional `expiredBy` field (`tool:<tool_name>` or `bash:/<regex>/`), and both PreToolUse hooks (Claude and Codex) render `approval expired because <event> at <time>` in the engine reason on stderr and, on Claude, as a closing sentence of the agent-facing block text after the `ux:` envelope the way the malformed-sections notice is (stdout `reason` / `permissionDecisionReason`, which omits the engine reason); the Codex agent reads the whole stderr diagnostic, so there the engine reason carries it once and nothing is appended; a `max_age` expiry, where the marker stays on disk, renders `approval expired because max_age <n>m elapsed (approved at <time>)`, so the two are textually distinct. A report without `expiredBy` (written before this field, or by a package producer) renders as before, and `harness approve understanding` drops `expiredBy` together with `expiredAt` on a re-approve. Message text and one optional report field only: no gate decision changes, the forged-marker, in-flight and task-binding reasons keep precedence, report values pass through the same sanitizer as the existing detail fields, and the shipped lifecycle defaults are untouched. `docs/policy-packs/understanding-before-execution.md` gains the expiry trigger matrix (which event expires which marker, what stays on disk, the `task_finish` to `review` exception, `mode: session`), and a test pins merge-before-finish under the shipped lifecycle as intended behaviour.
23
+
24
+ ### Changed
25
+
26
+ - **The `session-start` producers share one options helper** (task `11bd2b97`, refactor only). `preflight`, `branch-check`, `toolchain-parity` and `stale-base-check`, and the CLI wiring of those subcommands and of the top-level `preflight` alias, each carried a copy of the options type, the stdin read, the cwd and session-source resolution and the `--config`/`--project`/`--session`/`--cwd`/`--ledger-timeout` commander options. They now use `src/cli/session-start/shared-options.ts`. CLI help text, option names, defaults, stderr output, exit codes and ledger writes are unchanged (the `--help` output of the four subcommands and of `harness preflight` is byte-identical before and after), and the existing tests are unchanged. The `preflight` producer keeps its own idle-bounded stdin read. The `check:duplication` pin drops from 113 to 92 (109 clones measured before, 92 after).
27
+
28
+ ### Fixed
29
+
30
+ - **An approval marker's report hash is verified at gate read, so editing the approved report after approval no longer leaves a valid marker behind** (task `fa423e9b`, closes the "valid marker plus swapped report still allows" residual named under 0.50.0). Both PreToolUse hooks (Claude and Codex) apply one rule after a task-scoped or session marker matched: a marker with a non-null signed `reportContentHash` is valid only while at least one parseable report file in the reports directory (any session, any `approvalStatus`) has that canonical hash. The signed hash proves that the content the operator approved is still on disk unmodified; editing that file in place, replacing it, swapping in a symlink or rewriting it as unparseable JSON removes the only match, and the call is denied with `no report in the reports directory matches the content the <task|session> approval marker was signed for (the approved report was changed or removed after approval); re-run \`harness approve understanding\``. The rule deliberately does not compare against the session's newest approved report: that would deny legitimate approvals (a newer report approved for the same claim, two sessions sharing a claim, a standalone approve writing a new file) and would let a swap pass by moving the swapped report out of the selection. When the task-scoped marker fails the check, the session marker is checked the same way before the call is denied. Null-hash markers (no report resolved, or `--force` over a report the producer could not hash: too deeply nested or over the size cap) and a reports directory with no `*.json` entry at all behave as before (a forced approval of a hashable report signs its hash and is checked), and the read-only Bash carve-out and the `harness approve understanding` command stay reachable. The hash is `canonicalReportHash`: sha256 over a key-sorted JSON serialisation of the parsed report without the lifecycle fields `approvalStatus`, `approvedAt`, `approvedBy`, `expiredAt`, `expiredBy` and `sessionId`, so it survives the approval rewrite and a later expiry rewrite; `harness approve understanding` and the auto-approval path both sign it through that one function. The signed payload shape and `SIGNING_ALG` are unchanged. Hashing is total and its input is bounded: every `*.json` entry is opened once, read-only and non-blocking, typed and sized by `fstat` on the open descriptor and read through it (`readReportFileBounded`), and only a regular file of at most 1 MiB (`MAX_HASHED_REPORT_BYTES`) that parses as a JSON object nested at most 64 levels deep is hashed; anything else (a FIFO, a directory, a device, a symlink to one of them, a file over the cap or one that grows while read, an unreadable, unparseable or too deeply nested file) counts as a report file that matches nothing. Planted next to the reports, each of these used to make the hash scan die, overrun or hang instead of deciding (a non-blocking error for the runtime, so the call went through): a file nested a few thousand levels deep overflowed the stack, a wide array of a few hundred megabytes ran it out of heap, a file of millions of keys overran its time budget, and a symlink flipped to a FIFO between a stat and the read blocked the read. Over the cap a file now costs one open and one fstat (1000 files of 2 MiB: about 13 ms); the largest of 358 real reports measured on one machine was 12 KB. Both producers refuse a report the gate could not hash, the same way for depth and size: the auto-approval path declines it as `report invalid`, `harness approve understanding` fails validation on field `report`, and `--force` overrides with a marker that binds no report. Removing the approved report while other report files remain is a deny, and `harness gc --apply` can do that in a legitimate flow (it ages reports out by `createdAt`, approval markers by mtime); run `harness approve understanding` again. Cost: linear in the number of report files, and the usual allow path scans nearly all of them (name-ordered listing, newest report last); measured at about 4 ms for 100 and about 27 ms (full scan) for 1000 report files of 4 KB. **Residuals, not closed here:** (1) any regular `*.json` file in the reports directory within the size cap whose content equals the approved content keeps a match, whether it was kept before the edit or re-created after it, so the marker still allows; a reports directory that is empty, unreadable or holds no `*.json` entry at all falls back to the "no report file" allow, as before; (2) `hook-subagent-start.ts` mints the in-flight subagent record without this check, so a record written while the approval is refused can open the gate for that subagent after the parent marker stops matching (this predates the change and is unchanged); (3) the size cap bounds each file, not their number: 160 planted files of 1 MiB in the costliest shape measured (an object of about 110,000 keys, about 100 ms each to hash) took 15.9 s to scan, past the hook's 15 s budget, which the runtime treats as a non-blocking error (the same allow as before the check existed); only a session whose approval marker already matched reaches the scan; (4) once the marker is refused, both hooks fall through to the evidence read shared with the no-marker path (`checkPersistedReport` and `listPersistedReports`), which still reads every report file without a bound, so a FIFO swapped in during that read or a single file of a few hundred megabytes can still keep the hook from deciding, the same allow as before the check existed. **Back-compat, strict and without a migration window:** a marker written by an earlier release signed the report's raw-bytes hash, which never equals the canonical one, so a live approval whose report files exist is denied once after upgrading; run `harness approve understanding` again (the deny reason names it). The standalone `understanding-gate approve` CLI writes a new file, so an existing harness approval stays valid as long as the approved content file is unmodified. `hook-subagent-start.ts` and the auto-approval path's own post-mint re-check call `checkOperatorApprovalMarkers` without the cross-check and are unchanged; delegation markers were already verified at gate time.
31
+
32
+ - **An empty `${REPO}` or `${BRANCH}` no longer renders a blank ledger tag that any fact satisfies** (task `6c8ebd37`). A cwd outside every git repository, a detached HEAD, or an empty `HARNESS_REPO`/`HARNESS_BRANCH` override resolved the builtin to an empty string, so `preflight:${REPO}` became `preflight:`, a substring of every preflight fact (any `preflight:<other-repo>` fact let `preflight-before-investigation` through), and `preflight-before-push` told the agent "You cannot push branch yet.". When a policy's `requires.ledger_tag` references `${REPO}` or `${BRANCH}` and the value resolved for that context is empty (or only whitespace), `harness policy intercept` now decides from the policy's own `enforcement:` (`block` denies, `require_approval` requires approval, `warn` warns and does not block) with its own reason and no ledger query; an empty override counts as empty, a non-empty one stays effective. Behaviour change: from a cwd outside a git repository a blank `git status` (and every other `${REPO}`-tagged gate) is now blocked with a hint instead of passing on an unrelated preflight, and a push from a detached HEAD (for example `git push origin HEAD:refs/heads/x`) is blocked until a branch is checked out; `review:${BRANCH}` and `review-subagent:${BRANCH}` (the `gh pr merge` and `gh pr create` gates) are affected the same way. The way forward is in the message and names only a state the agent can establish: `cd <repo>` or `git -C <repo> ...` when no repository is found, `git switch <branch>` (or `git switch -c <branch>`) on a detached HEAD, then create the evidence for that branch and retry; it asks for no tag and names no opt-out. The agent envelope renders this reason instead of the policy's `ux:` and `producers:` text, and it is not the `deny-degraded` outcome (that envelope blames an unreadable ledger). A policy whose `ledger_tag` has neither builtin behaves as before, and the substring match is unchanged. For a command that also names a foreign target (`git -C <repo> ...`), each evaluated context is guarded on its own: a foreign repository on a detached HEAD denies even when the cwd context is satisfied. The named remedy itself passes: when the working directory is outside every git repository (a blank `${REPO}` as the guard sees it, after the policy's own `trigger.extract`) and a segment's own target (`git -C <repo> ...`, or `cd <repo> && ...`) resolved to a real repository, the cwd context is not demanded next to the target's own context, which is still demanded in full. That skip relies on two static models: the target attribution, whose known misattribution (a `GIT_DIR=` prefix or a third repository reached through another construct) exists for every cwd, and the check that the cwd is outside every repository, which errs toward inside: the skip applies only when neither the cwd's real path nor any ancestor up to the filesystem root holds an entry named `HEAD` or `.git` (any type, valid or not) and no lookup there failed with an error other than ENOENT. Every git directory holds a `HEAD` entry, so the cwd context stays demanded wherever git can find a repository from the cwd's own directories: below a `.git` directory without `HEAD`, at any depth below a repository, in a bare repository, and in (or below) a directory holding only `HEAD` and a `commondir` file; a stray entry named `HEAD` also keeps it (a conservative deny with the hint). The check runs at most once per event. What remains outside both models: a third repository the command really runs in (a `GIT_DIR=` prefix, or a `cd` into another repository before the misattributed segment), state the command itself creates while it runs (for example a `.git` it links before the git verb), and an ambient `GIT_DIR` or `GIT_COMMON_DIR` in the environment git runs with. A detached cwd keeps its cwd context: `git -C <repo> push` from a detached HEAD is denied until a branch is checked out in the working directory's repository, and the hint names that repository (control characters blanked, at most 200 characters, since the name can come from a `HARNESS_REPO` override or a `REPO` extract). Every other non-blank cwd context still demands both contexts as before, and a segment without a resolved target (a bare `git status` or `git push` from a cwd outside a repository, or the second command of `git -C <repo> status && git status`) still denies with the hint. `harness dry-run` shows the same hint (prefixed `(no ledger query: ...)`) in `ledgerQuery` instead of a blank tag, and no pending-approval marker is staged for a `require_approval` decision of this kind, since no approval tag could unblock it. Pinned in `tests/runtime/intercept.test.ts` (including the `risk.degraded_fail_posture: fail_open` interplay: an empty identifier still denies, with no ledger query), `tests/runtime/intercept-cli.test.ts` and `tests/cli/dry-run.test.ts`.
33
+
34
+ - **The post-merge-gate recorder fires on every `gh pr merge` spelling the gate recognises** (task `68b73413`). `harness pack hook post-merge-gate-record` tested its trigger regex against the raw command only, while the `gh pr merge` gate policies also test `normalizeCommand`, `normalizeCommandAmpAware` and `normalizeCommandQuoteAware`; a merge the gate had checked (`nice gh pr merge 1`, `env`/`command`/`time` wrappers, `echo hi & nice gh pr merge 1 --squash`, `VAR='a; b' gh pr merge 1`) wrote no `post-merge-gate:merged:...` fact, so the blocker had no merged tip to compare against. The recorder now tests the raw command first and, only if that misses, the three normalised forms in the gate's order, each computed lazily (a raw match normalizes nothing); strictly additive, so no spelling that matched before stops matching. Only the trigger widened: the fact is still written only when the merge is confirmed, and the PR number is still read from the raw command. Measured on a 36-command corpus (28 of which the gate's `review-before-merge-bash` pattern matches): the raw-only recorder missed 21 gate-matched spellings, the four-arm recorder misses 0. Cost on a command that is not a merge (all four arms run): about 5 to 12 microseconds for a typical command, about 11 ms at the 100,000-character normalisation bound (raw alone: about 0.5 ms); a command above that bound is not normalised and stays raw-only, the one named residual. Pinned in `tests/cli/pack-hook-post-merge-gate-record.test.ts`.
35
+
36
+ - **A command with a NUL-decoding ANSI-C escape is no longer classified read-only** (task `241d9e9e`). bash truncates a `$'...'` run at a NUL and drops a NUL between two runs, and reads `\c@` the same way, so `find . -name c $'-delete\0XYZ'`, `find . -name c -$'\0'delete`, `sort $'--output\0' o.txt data.txt` and `file $'--compile\0X' -m magic`, plus the same through `env` and `command`, wrote or deleted while `isReadOnlyBashCommand` and `isReadOnlyBashPipeline` called them read-only (measured on GNU bash 3.2.57; the first report measured 5.1.16). The decoder emitted a literal U+0000 and kept going, so neither the decoded value nor the raw token matched a write flag in the read-only checks. Fail closed, no bash truncation is modelled: `src/runtime/shell-word.ts` exports `hasAnsiCNulEscape`, true for any `$'...'` run with an escape that decodes to NUL (`\0`, `\00`, `\000`, `\x0`, `\x00`, `\u0` to `\u0000`, `\U0` to `\U00000000`) or any `\c` escape (not modelled, so counted), and `isReadOnlyBashCommand` refuses such a command string before classifying tokens; `isReadOnlyBashPipeline` checks the whole string too, so a `|` inside a run cannot split an escape from its opening `$'`. The check over-reports on purpose: `\u`/`\U` count although bash 3.2.57 does not decode them, so an exotic read with such an escape now needs an approved report. Decoding is unchanged: `readAnsiC` and `decodeShellWord` return exactly what they returned before for such a word (a literal U+0000 where the escape stands), so every deny-side caller of `decodeShellWord` (the destructive-shell floor, the deletion-target resolver, the read-only write-flag checks) keeps its verdict; a raw-token return was measured to drop deny-side floor and resolver detections (`dd $'of=/dev/sda\0'`, `git push $'-f\0'`, `rm $'-rf\0' /home/x` and others) and was not shipped. Pinned in `tests/runtime/read-only-bash.test.ts` (the five spellings over find, sort and file, the `env` and `command` recursions, the pipeline classifier, `\c@`, and non-NUL controls that stay read-only), `tests/runtime/shell-word.test.ts` (the predicate and the unchanged decoded values), `tests/runtime/destructive-shell-floor.test.ts` and `tests/runtime/deletion-target-resolve.test.ts` (the floor and resolver verdicts for these spellings, plus one end-to-end critical case).
37
+
38
+ - **The Bash prefix parser reads quoted values, `cd` paths and branch tokens as whole shell words, and no longer drops a `__proto__=` assignment** (task `b093911d`). `src/runtime/bash-prefix-parse.ts` ended a quoted word at the first matching quote character, so `VAR="say \"hi\"" cd /tmp && x` kept `say \` and lost the real `cd`, and `VAR='it'\''s fine'` kept `it`; a lost `cd` target or a cut value can hide a production indicator from the Risk Gate resolver (`env_var_patterns`, `branch_patterns`). A word is now read the way bash reads it: unquoted text, backslash escapes, single- and double-quoted parts joined up to unescaped whitespace (so `p'r'od` and `pro\d` are `prod`). A word whose quote only an escaped quote could close keeps the old first-quote reading; a quote with no closing quote still falls through. A `git switch`/`checkout` branch word that does not start with a quote but has a `$` in a double-quoted part (`release/"$V"`) is read raw as before, so the `release/*` match, a later `cd` and the kubectl remainder stay reachable; one that starts with a quote and interpolates stays unresolved. An inline env word that does not start with a quote swallows unquoted `;`, `&`, `|` and `||` as a plain value always has. Not covered, pinned by tests: ANSI-C `$'...'` (kept raw) and `$VAR`/`$(...)` (literal text). `inlineEnv` is now a null-prototype object, so `__proto__=/prod cd /x && ...` keeps the assignment (a plain `{}` ignored it) and `constructor=` still works. Acceptance is signal-level, not "nothing extracted before is lost" (a reader that changes word boundaries cannot promise that): measured against the previous parser, a 44-shape high-risk set (plain, quoted and escaped env values and `cd` paths, literal, quoted and `release/"$V"` branches followed by a `cd` or kubectl, `__proto__=`, the `'\''` idiom, `\"` in double quotes) loses no production signal and newly sees 13; on two fixed-seed generated corpora with bash 3.2 as referee (59,187 and 58,901 commands that ran) missed signals from a non-prod cwd drop from 1,258 to 825 and 1,254 to 786 (env), 4,626 to 3,494 and 4,622 to 3,500 (branch), 3,695 to 2,933 and 3,815 to 3,039 (`cd`); the 6 remaining new misses all belong to two named residual classes whose plain twin the previous parser also misses (an env word that swallows an operator, so a later assignment overrides the value bash keeps; a branch word followed by more words, now including an escaped `;`). The trade: from a prod cwd, wrong `cd` downgrades (a non-prod `cd` that bash does not end in) rise from 485 to 854 and 475 to 824, all in pre-existing classes the parser now reaches more often (first `cd` read while a later one wins, a `cd` in an and-list a later `&` backgrounds, a phantom `cd` behind an operator an env word swallowed, a plain path read across `|`); end to end, `harness policy intercept` from a prod cwd now allows `A=a\ b|| cd <non-prod repo> && terraform destroy` as it always allowed `A=x|| cd ...`. The same holds for an ambient production env signal that an inline assignment overrides: wrong env downgrades fall from 7,293 to 7,054 and 7,132 to 6,886 overall, but a quoted or escaped prefix such as `cd /tmp/my\ app && DATABASE_URL=dev ./seed.sh; terraform destroy` now allows as its plain spelling always has. `npm run measure:bash-prefix-parse` reports 0 lost honest cd targets against master and the shipped release (11 of 17 arms prove nothing and are excluded, not counted as zero). Residual classes are listed in the module header.
39
+
40
+ - **`harness preflight` / `harness session-start preflight` no longer waits forever on a stdin that never closes** (task `dda77b46`). The producer awaited stdin's end of input on every run, even with `--session`, so a backgrounded compound command with no terminal (stdin an open, never-closed pipe) left the process idle indefinitely. With `--session <id>` stdin is no longer read (the process cwd is then used, not the event's). Without it the read is idle-bounded (3000 ms with no new data, restarted on each chunk, so a slow live pipe is not cut off): on a timeout a stderr note names the bound (when nothing was read the run falls back to the default session resolution; when data arrived but stdin stayed open, the note says so and the bytes read are used), exit code 0 as before. The SessionStart hook path (event JSON piped, stdin closed) is unchanged. Side effect: an interactive run in a terminal waits the 3000 ms unless `--session` is given. The other `session-start` producers keep their own unbounded read. Pinned in `tests/cli/session-start/preflight-stdin.test.ts` (a real child process with an open, never-closed stdin exits 0 with the note; the never-ending-stream case with `--session` records zero read attempts).
41
+
42
+ - **`harness smoke` no longer rewrites the operator's `harness.generated/`, and `harness doctor` expands policy packs against the runtime `harness apply` selects** (task `04b8abcf`, follow-up to the review of task `b9e6d63c`). smoke applied the `claude-code` variant into the operator's generated tree, so between a smoke run and the next plain apply a codex machine's audit copies were the claude-code variant. It now generates into its own `<output-dir>/harness.generated/` (kept with the other run artifacts): the apply output (generated files and `.last-apply`) of the operator's tree stays byte-identical and the `runtime: claude-code for smoke; ...` line is gone because nothing is left to restore; runtime state (the delegation marker unless `--no-delegate`, and the spawned session's hook state) is still written into the operator's tree, where the child's gates and hooks read it. `harness apply` gains an internal `generatedDir` option for this, which moves only the apply output: the pause sentinel in the rendered settings and the signing-key path in the opencode config and grounding-mcp registration stay anchored to the operator's generated dir; the runtime-reuse selection itself is unchanged. `harness doctor` expanded packs against the default `claude-code` regardless of the recorded runtime, so on a codex machine it reported claude-code hook floors the machine never runs. It now uses apply's own `selectRuntime` (recorded, inferred or default) for the pack hook-floor and declared-but-not-live checks, and names the runtime in a `Pack expansion runtime:` line and a `packExpansionRuntime` JSON field. A malformed `.last-apply` no longer aborts doctor's runtime selection: it falls back to the default runtime and warns, naming the file (the settings-drift check, which runs when the understanding pack is declared, still aborts on a malformed record). A codex-recorded machine no longer gets a spurious understanding-gate floor warning; `--target` still does not change the expansion.
43
+ - **The Codex install names and checks a hook table spelled without the `[[hooks.` prefix, and a legacy config no longer keeps a second END marker** (task `e8f4fc03`). A comment-less hook event table spelled `[[ hooks.Stop ]]`, `[["hooks".Stop]]` or `[[hooks . Stop]]` directly after the harness hook tables was read as a foreign table and kept as a foreign section, so a harness command in it ran next to the fresh block's. Such a table is now one of the kept operator hook tables, on the BEGIN path and on both legacy paths, with or without an END marker after it: it is named once (header and line numbers, never value text) in the plan's `keptOperatorHookTables`, `--dry-run` and the install summary, and the install refuses, file untouched, when its command is one harness writes; that refusal asks the operator to delete the table (or, with an END marker after it, to move an operator-owned table below it) rather than to restore a comment line, since the scan reads a respelled table as foreign with or without one. A legacy config (no BEGIN marker, source-prefix or generated-header path) whose harness tables are followed by a non-hook foreign table and then a surviving END marker is now handled like the BEGIN path: a harness-commented table before that END refuses through the split-block check, naming the foreign table and the marker's line number only, and an END orphaned after the foreign table is removed, so the install writes one END and a second install gives the same bytes; before, the install kept the later harness table (its hook ran twice) and the old END. That surviving END counts only as a whole line outside a multi-line string, indented or not, so END text inside a foreign table's string or in the middle of a value does not send a legacy config down this path. On a legacy path with no END marker whose scan ended at a respelled hook table, a harness marker in the run of hook tables from there (a `# harness hook:` comment line above the respelled table or above a later table) now refuses through the same split-block check, naming the respelled table and the marker's line number; the last release kept those tables silently, so a retired harness hook kept running or the Stop hook ran twice. The split-block refusal, on every path, now says the marker line sits above the named table when it does, and for a respelled hook event table offers deleting it if harness wrote it. Deliberate boundaries, unchanged and pinned by the existing fixtures: a hook table after the first foreign table of the zone after the harness tables is kept, not named and not checked (only the run of hook tables directly after the harness tables is examined); content below an END marker the install keeps is never read, so a harness-commented table there is kept and not named (moving an operator table below END is the fix the refusals offer, and relies on this); a legacy config whose scan ended at a foreign table with no END marker anywhere after it keeps its old reading of the rest of the file (no split-block check) past the run of hook tables directly after the block. Two more deliberate boundaries, pinned by new tests: a `hooks` root key spelled with an escape sequence (`[["ho\u006fks".Stop]]`) is not resolved, so its table is kept as a foreign section, not named and not checked, and a harness command in it runs next to the fresh block's; and the split-block check on the legacy paths matches its markers as substrings, like the BEGIN path's, so a value in the checked zone that holds marker text (`# harness hook:`) refuses too (file untouched, line number only). The 0.59.2 entry's qualifier on the header order match also holds for element lines spelled `[["hooks"]]` and `[[ 'hooks' ]]`: each such line's first key resolves to `hooks`, so the order match runs the top-level check (a parse) on it, like on `["hooks"]`. Pinned in `tests/cli/apply/apply-codex-install-boundaries.test.ts`, which also pins three exact comparisons no fixture held before: a nested `hooks` sub-key compared case-sensitively (`[[hooks.Stop.HOOKS]]` under a kept entry with two inline hooks is not the nested hooks array), a `hooks` root compared without trimming (`[[ " hooks" . Stop ]]` above BEGIN is outside `hooks`), and an END marker compared as a whole line (a comment that starts with the END text, inside the block or past a foreign table, ends nothing), plus every CLI output mode for these shapes carrying no config value text.
44
+ - **The Codex install user doc describes kept operator hook tables and their refusal** (task `35eb287b`, docs only). `docs/policy-packs/understanding-before-execution.md` said `--dry-run` and the install summary name "every foreign section it preserves" and did not mention an operator-authored hook table kept after the harness block. It now says which tables are kept and named (a comment-less hook event table directly after the harness hook tables, in any spelling whose first key resolves to `hooks`), how the dry-run and the summary print one (the `preserving foreign section:` / `preserved foreign section:` prefix with the header and both line numbers, no value text; no label of its own, the printer is unchanged), when the install refuses (a kept table's command equals one of the fresh block's or starts with `harness `, a table it cannot match to its parsed entry, a harness marker in the zone) and the documented boundaries (a hook table after the first non-hook foreign table, a harness-commented table below a kept END marker, an escaped `hooks` root key, substring marker matching). The splice logic is unchanged.
45
+
46
+ ## [0.59.2] - 2026-09-30
47
+
48
+ ### Security
49
+
50
+ - **`fast-uri` 3.1.8 in the lockfile** (transitive under ajv; lockfile-only, no source change), closing GHSA-hrr3-gc8f-f4qj (inconsistent host case normalization via percent-encoded octets; moderate).
51
+
52
+ ### Fixed
53
+
54
+ - **The Codex install keeps an operator-authored `[[hooks.<Event>]]` table that sits after the harness hook tables** (task `01053b27`). In a config with a drifted END marker, or a BEGIN marker, a legacy source prefix or a legacy generated header but no END marker, the ownership scan folded such a table into the replaced block and deleted it without naming it in `removedHookIds`; the TOML-semantic safety net does not compare hook event arrays, so it did not catch this either. The scan now tells a harness hook table from an operator one by the `# harness hook: <id> (budget_ms=N)` comment the generator writes above every hook table: a `[[hooks.*]]` header without that comment above it, after at least one header that has it, ends the owned range like a foreign table, together with a comment run attached to it, and the table is kept byte for byte after the fresh END marker (apply twice gives the same bytes). Failure modes, both by design: a block whose hook tables never carried the comment (older generator output) has no commented table before its first hook table and is still replaced whole; a harness table whose comment the operator deleted ends the range there, so a later harness table that still has its comment makes the install refuse through the split-block check with the file untouched, while a deleted comment on the last harness table leaves that table in place after the fresh block as if it were an operator table, so the install names every kept operator hook table (header and line number, never value text) among the preserved sections, in `--dry-run` (`preserving foreign section: [[hooks.Stop]] (line 14 before the install, line 40 after it)`) and in the install summary (`preserved foreign section: ...`), and in the plan's `keptOperatorHookTables`, and it refuses, file untouched, when a kept table's hook command equals a command of the fresh block or starts with `harness `, asking the operator to restore the comment line or delete the table, or, when an END marker follows the kept table, to move an operator-owned table below it. A retired hook whose command does not start with `harness ` (an environment-prefixed report-dir wrap, the memory-router hook, a custom manifest hook) is kept and named, not refused. The kept tables' commands are read from the parsed whole config (the parser the safety net uses), each table matched to its parsed entry by the order of the `[[hooks.<Event>]]` headers, so no part of the file is parsed on its own and the parser's code frame never reaches the output; the kept-table scan and the header order match read each line with the same line classifier as the managed-range scan and the foreign-section listing, so a header-shaped array element on its own line inside a kept table's multi-line value (`["x"]`, `['x']`, `[1979-05-27]`) counts as a header only where it starts at the top level of the document (never, for an element; see the task `6b56d735` entry), and it neither hides that table's own commands, nor ends the run of kept tables, nor is printed: a hook table after it is still named and still refused when it looks harness-generated; the order match reads a header-shaped line as a header only when its root key resolves to `hooks`, checked before the top-level check, so the element lines of a large array add no parse there, other than an element that is the string `hooks` (`["hooks"]`), which reads as a `hooks` root and is probed like a header (the preserved-section listing still checks each element line of a foreign table after the kept tables, as the task `6b56d735` entry measures), and a same-event table spelled another way anywhere in the file (`[[ hooks.Stop ]]`, `[["hooks".Stop]]`, `[[hooks . Stop]]`) is counted, so the kept table is still matched to its own entry; only hook commands count (`hooks.<Event>[].command` and `hooks.<Event>[].hooks[].command`), not any other key named `command`; a kept table the order match cannot place exactly (an escape sequence in a quoted header key of that event, or a nested `hooks` table with no entry before it) refuses with its header and line number only. The split-block refusal for an uncommented table in the middle of the block now offers both fixes: restore the comment line, or move an operator-owned table below the END marker. In the two legacy paths (no BEGIN marker) a harness-commented table after such an operator table, before the END marker when one follows, now refuses through the same split-block check instead of being kept beside the fresh block; content below that END is left untouched, so a harness-commented table there is kept and not named, as on the BEGIN path. There the split-block refusal names the lines between the source-prefix line and the END marker, or, on the generated-header path, every line from the generated header through the END marker line, both included (a generated header left alone above END no longer marks a harness block, so the install would add a fresh block and leave that pair behind), not a BEGIN marker the config does not have. In those legacy paths an END marker that survived its deleted BEGIN line and follows the kept tables is handled like a drifted END: the install removes it (the written config holds one END, the fresh block's, before the kept tables), the preserved-section listing stops at it, and the kept-table refusal offers moving an operator-owned table below it. A bare `key =` line directly under a harness table cannot be told from that table's own fields and is still consumed with it; bare keys under an operator table follow that table. Pinned in `tests/cli/apply/apply-codex-runtime.test.ts` (drifted END, no END with a foreign table after it, the legacy source-prefix and legacy generated-header paths, idempotency, the uncommented-block control, the deleted-comment cases including the refusal clauses, the naming in the plan, the dry-run and the summary with both line numbers, the multi-line array value, an array element line followed by a named, a duplicate and a retired harness table, the hook-command-only reading, the order-match refusals, a multi-line string holding a hook header line and the literal-quoted header, the END-marker option, the legacy paths with a surviving END and their split-block text, that text's delete fix followed literally, a harness-commented table below the END marker, END-marker text inside a harness table's multi-line string, same-event tables spelled another way above BEGIN or below END, tables whose root only starts with `hooks` or differs from it in case and a `[[hooks.<Event>.hooks2]]` sub-table (not counted), a `[[hooks]]` array-of-tables root and a kept header whose comment holds U+2028 (a refusal, not a crash), a deeper array of tables under a kept nested hooks table, an escaped event key next to an event named `null`, and the quoted-key, indented-header, indented-comment and CRLF spellings; the order match's parse count in `tests/cli/apply/apply-codex-hook-header-map-cost.test.ts`; output parsed to show the operator table survives semantically): the drifted-END and no-END fixtures fail against the previous implementation and pass now. Mutation probes (`agent-primitives probe --pre 'npm run build'`) reverting each clause of the new condition are killed by those fixtures.
55
+
56
+ - **The Codex install no longer takes an array element on its own line for a table header** (task `6b56d735`). A multi-line array whose element sits on its own line (`["x"]`, `['x']`, `[1]`, `[1979-05-27]`) has the shape of a table header, and the install's header recognition accepted it. `harness apply --runtime codex --install --dry-run` printed such an element as `preserving foreign section: ...` (a token inside an `args` array leaked into the plan, the install summary and `--json`), an element inside a hook table ended the harness-owned region early so the install refused a config that parses, and the split-block refusal named the element as the foreign table on stderr and in `--json`. A header candidate now counts only when the document text before it parses on its own, so a line inside an open array, inline table or multi-line string is never a header, even when a real table of the same name exists elsewhere. The refusal names a header-shaped line that is not a header by its line number, never by its text. A line counts as top level exactly when the text before it parses (the full-prefix verdict); as a fast path the check first parses only the text since the last confirmed top-level line and confirms the line when that parses, and when it does not, the full prefix decides. So a config with thousands of ordinary tables stays fast, and a table after an array-of-tables element whose sub-table was confirmed before it is still listed. Any candidate whose segment fails costs a full-prefix parse as well, quadratic in the number of such candidates: a foreign array with many element lines each on its own line (measured in-process: about 0.8 s for 2000 such lines, 12 s for 8000), or many sub-tables that each follow a later element of the same array of tables (about 1.5 s for 2000). In a config that does not parse, the install now refuses with the parse-error message instead of the split-block refusal, since header recognition stops at the parse error. No other splice behaviour changes.
57
+
58
+ - **The solution-acceptance null-verdict deny now opens with a reason that states only what the gate observed** (task `8e9d7333`, follow-up to the note-line fix of task `8fe0f633`; agent-facing text and tests only, no gate decision changes). `evaluateGate`'s reason for a missing verdict read `no solution-acceptance verdict recorded for "<id>" (run mcp__grounding-mcp__solution_evaluate first)`; "recorded" is falsified by a marker recorded then deleted, an attempt finishing between the marker read and the lock read, and an `lstat` failure folded into `missing`, and "run ... first" contradicted the live-attempt deny, whose converge step says to poll the same attempt. It now reads `no usable solution-acceptance verdict for "<id>"`: the gate only knows that it received no usable verdict, so the line makes no claim about a read: the unusable-id state reads nothing and the invalid-record state reads a marker that is not a valid record. What was read stays in the note line, and the next-action guidance stays in the note line and the converge steps below it. The tests that pinned the old wording were updated; the state table now asserts on every state's deny that the first line carries no "recorded", no "first" and no read claim, against a state list the test owns and compares to the source list, and absence tests cover the plain reason and the never-evaluated and live-attempt denies.
59
+
10
60
  ## [0.59.1] - 2026-09-29
11
61
 
12
62
  ### Fixed
@@ -64,7 +114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
64
114
 
65
115
  Also hardened in the same change (task `6a037359`): a dedicated fixture in `tests/cli/apply/apply-codex-runtime.test.ts` for each guard that previously had no fixture exercising it -- an operator comment sitting directly above the first foreign table (stays attached to that table, not folded into the replaced block, and appears exactly once); two harness-managed BEGIN markers (refused, file untouched); a BEGIN with no END where a foreign table is followed further down by a real `# harness hook:` comment (refused, since the block boundaries can no longer be read as a plain line scan); a managed block whose END marker is followed by a trailing operator comment at EOF (kept, not silently replaced away; a config with no END marker keeps a trailing operator comment too, unless the trailing run holds a harness-authored line, see the task `b34ed105` entry above); exact (not `arrayContaining`) equality on `foreignSectionsPreserved` and `removedHookIds`, plus one exact byte-for-byte equality on the whole installed output for the drifted fixture. A CLI-level test (through the built program, not only the library function) asserts `--dry-run`'s and the applied install's own stdout for the removed-hook-block and preserved-foreign-section lines. The refusal itself is more actionable: it names the RESOLVED config path (never a hard-coded `~/.codex`), the first foreign table (its bracketed header only) and the line number of the first line beyond it that still looks like harness content (never that line's own text), and either tells the operator to move that table below the END marker or delete the lines between BEGIN and END (when one exists), or, when there is no END marker at all, to add one after the last harness hook table or move the foreign table below it instead (telling the operator to move something below a marker that does not exist would be nonsensical); a duplicate-BEGIN refusal tells the operator to delete the entire unwanted BEGIN/END pair, including its own marker lines and source-prefix comment, not just the lines between them. Either refusal offers the `.harness-backup-*` restore only as a last resort with an explicit warning that it discards any Codex state (hook trust, marketplaces, plugins) written since that backup; it throws a dedicated `CodexInstallRefusalError` (a `HarnessExitError` at `EX_FAIL`) instead of a plain `Error`, and `--json` emits a structured `{ outcome: "codex-install-refuse", configPath, error }` object on stdout the same way `target-exists-refuse`/`drift-refuse` already do, instead of only the plain-text message reaching stderr. The install's own permissions no longer widen a secret-bearing config: it preserves the EXISTING file's mode for both the rewritten config and its `.harness-backup-*` copy (0640 as well as 0600, pinned), defaulting to `0600` (not `atomicWriteFile`'s own `0644`) only when creating a config that did not exist before. `foreignSectionsPreserved` prints a namespace's ROOT with a wildcard and its table count when more than one table collapses into it (e.g. `[marketplaces.*] (2 tables)`), instead of silently representing several preserved tables as one indistinguishable header; a single table under a root still prints its own full header. The namespace is the header's first key, or its first two keys under `hooks` (e.g. `[hooks.state.*] (27 tables)`, so Codex's trust table is not reported as `hooks`, which also holds the harness-managed hook arrays), with keys split quote-aware and a trailing comment never part of the namespace or of a printed header. Table-header recognition is a full single-line TOML header shape, quote-aware so a key containing `[`, `]`, `.` or `#` (a real path used as a TOML key, e.g. `[projects."/Users/x/Photos [2024]"]`) is still recognized as one header on every managed-range detection path (a drifted END, no END, and the legacy no-BEGIN path), instead of being misread as ending the header early or as still-owned content; a multi-line array's own continuation line inside a still-owned hook table (e.g. ` [1, 2],`) is never misread as a foreign table header ending the region early. The stray-END search matches a whole trimmed line, not a raw substring, so a foreign single-line value that merely contains the END marker text as a substring is never mistaken for the real stray END. A TOML multi-line string is now tracked by its own opening delimiter (`"""` or `'''`), closed only by that same delimiter, with an escaped quote and a delimiter inside a comment or a single-line string ignored, so a foreign table's own multi-line string value (or a still-owned hook table's own multi-line matcher) can contain a line that reads exactly like a comment, a table header, or even the END marker without corrupting the scan.
66
116
 
67
- A TOML-parsing safety net now runs after the byte-preserving splice above computes its output, before anything is written: both the current and the about-to-be-written config are parsed with `smol-toml` (a new runtime dependency, pinned `~1.8.0`) and compared. The invariant: both must parse, and once every harness-managed hook event array (`[[hooks.<Event>]]`) is removed from both documents, everything else must come out identical: `[hooks.state]` and every other single-table `hooks.*` key, plus all non-hooks content (`[projects.*]`, `[plugins.*]`, `[marketplaces.*]`, `[mcp_servers.*]`, top-level keys). Any difference refuses via `CodexInstallRefusalError`, naming the first differing key path, with the file left untouched (a `--dry-run` plan hits the same check and reports the same refusal). For that content the net is independent of the header-recognition and multi-line-string fixes above, so a future scanner regression there refuses instead of silently dropping content. It does not cover the hook event arrays themselves: an operator-authored `[[hooks.<Event>]]` entry that the line scan counts as part of the harness-managed block (for example one sitting between the block and a drifted END marker, or after a BEGIN with no END marker) is still replaced without a refusal; tracked as follow-up task `01053b27`. An operator hook entry outside the managed block is kept whatever its header spelling (a trailing comment, a quoted event key). A leading UTF-8 byte order mark is ignored for parsing (the splice keeps it exactly once, also when the harness block starts on the file's first line, see the task `b34ed105` entry above), and an integer beyond 2^53 (TOML integers are 64-bit) is compared exactly instead of failing the parse. A config the harness parser cannot read refuses with "the TOML parser used by harness could not read this file", the parser's line, column and one-line reason, not a claim that the operator's syntax is wrong; a would-be output that does not parse names an operator-defined inline `hooks` table or inline hook-event array as the likely cause before a harness defect. No refusal quotes a value line of the config or the parser's code frame; only table headers and key paths are named: parse refusals carry only that position and reason (never the parser's code frame, which would echo neighbouring lines such as an API token), and the split-block and duplicate-BEGIN refusals name a line number instead of that line's text.
117
+ A TOML-parsing safety net now runs after the byte-preserving splice above computes its output, before anything is written: both the current and the about-to-be-written config are parsed with `smol-toml` (a new runtime dependency, pinned `~1.8.0`) and compared. The invariant: both must parse, and once every harness-managed hook event array (`[[hooks.<Event>]]`) is removed from both documents, everything else must come out identical: `[hooks.state]` and every other single-table `hooks.*` key, plus all non-hooks content (`[projects.*]`, `[plugins.*]`, `[marketplaces.*]`, `[mcp_servers.*]`, top-level keys). Any difference refuses via `CodexInstallRefusalError`, naming the first differing key path, with the file left untouched (a `--dry-run` plan hits the same check and reports the same refusal). For that content the net is independent of the header-recognition and multi-line-string fixes above, so a future scanner regression there refuses instead of silently dropping content. It does not cover the hook event arrays themselves: an operator-authored `[[hooks.<Event>]]` entry that the line scan counts as part of the harness-managed block would be replaced without a refusal. The scan no longer counts one that sits after the harness hook tables without the `# harness hook:` comment above it, whether between the block and a drifted END marker or after a BEGIN with no END marker (named scope of task `01053b27`, see its entry above); the remaining cases, still replaced silently, are entries the scan cannot tell apart: an operator table before the first harness table inside the block, an operator table under a comment run that holds a `# harness hook:` line, bare key lines directly under a harness table, and an operator table after an old block that never carried the comments. An operator hook entry outside the managed block is kept whatever its header spelling (a trailing comment, a quoted event key). A leading UTF-8 byte order mark is ignored for parsing (the splice keeps it exactly once, also when the harness block starts on the file's first line, see the task `b34ed105` entry above), and an integer beyond 2^53 (TOML integers are 64-bit) is compared exactly instead of failing the parse. A config the harness parser cannot read refuses with "the TOML parser used by harness could not read this file", the parser's line, column and one-line reason, not a claim that the operator's syntax is wrong; a would-be output that does not parse names an operator-defined inline `hooks` table or inline hook-event array as the likely cause before a harness defect. No refusal quotes a value line of the config or the parser's code frame; only table headers and key paths are named: parse refusals carry only that position and reason (never the parser's code frame, which would echo neighbouring lines such as an API token), and the split-block and duplicate-BEGIN refusals name a line number instead of that line's text.
68
118
 
69
119
  ## [0.58.0] - 2026-09-23
70
120
 
package/README.md CHANGED
@@ -98,7 +98,7 @@ steps).
98
98
 
99
99
  ## Status
100
100
 
101
- The current release is `v0.59.1`. All seven planned phases have
101
+ The current release is `v0.60.0`. All seven planned phases have
102
102
  shipped; phase acceptance criteria are in
103
103
  [`docs/ROADMAP.md`](docs/ROADMAP.md), and what shipped in each version
104
104
  is in [`CHANGELOG.md`](CHANGELOG.md).
@@ -1,4 +1,5 @@
1
1
  import { type DriftedAsset } from "../../io/harness-lock.js";
2
+ import { type LastApplyRecord } from "../../io/last-apply.js";
2
3
  import { type ThreeStateVerdict } from "../../io/three-state.js";
3
4
  import { type Runtime } from "../../policy-packs/index.js";
4
5
  import { GENERATED_DIRNAME } from "../../io/generated-dir.js";
@@ -96,6 +97,18 @@ export interface ApplyOptions {
96
97
  * stays absent.
97
98
  */
98
99
  preserveRecordedRuntime?: boolean;
100
+ /**
101
+ * Generate into this directory instead of the `harness.generated/` next
102
+ * to the manifest. For a diagnostic apply (`harness smoke`) that must
103
+ * leave the operator's generated tree and its `.last-apply` record
104
+ * untouched; the runtime selection then reads the `.last-apply` of THIS
105
+ * directory, not the operator's. Resolved to an absolute path. Only the
106
+ * apply output (generated files, audit copies, `.last-apply`) moves;
107
+ * the settings' pause sentinel and the opencode/grounding-mcp signing-key
108
+ * path stay anchored to the operator's generated dir, since the
109
+ * operator's hooks and grounding-mcp resolve them there.
110
+ */
111
+ generatedDir?: string;
99
112
  }
100
113
  export type ApplyOutcome = "no-changes" | "applied" | "drift-refuse" | "drift-discarded" | "would-apply" | "lock-drift-refuse" | "target-exists-refuse";
101
114
  export interface FileApplyOutcome {
@@ -207,6 +220,13 @@ export type RuntimeSource = "explicit" | "target" | "last-apply" | "inferred" |
207
220
  * previous one).
208
221
  */
209
222
  export declare function formatRuntimeLine(result: Pick<ApplyResult, "runtime" | "runtimeSource" | "previousRuntime" | "runtimeCandidates">): string | null;
223
+ export interface RuntimeSelection {
224
+ runtime: Runtime;
225
+ runtimeSource: RuntimeSource;
226
+ previousRuntime?: Runtime;
227
+ runtimeCandidates?: Runtime[];
228
+ }
229
+ export declare function selectRuntime(explicit: Runtime | undefined, lastApply: LastApplyRecord | null, hasTarget: boolean): RuntimeSelection;
210
230
  declare const DRIFT_HINT_MESSAGE = "run \"harness adopt <file>\" to capture changes, or re-run with --overwrite-drift to discard them";
211
231
  export declare function apply(opts?: ApplyOptions): Promise<ApplyResult>;
212
232
  export { DRIFT_HINT_MESSAGE };
@@ -204,7 +204,7 @@ function inferRuntimeFromFiles(record) {
204
204
  // instead of reusing another runtime. A record without the field (or with
205
205
  // an unknown value) falls back to inferring from its files map, then to
206
206
  // the default; the caller names every non-explicit choice in its output.
207
- function selectRuntime(explicit, lastApply, hasTarget) {
207
+ export function selectRuntime(explicit, lastApply, hasTarget) {
208
208
  const recorded = lastApply?.runtime;
209
209
  const recordedRuntime = isRuntime(recorded) ? recorded : undefined;
210
210
  const inference = recordedRuntime === undefined && lastApply !== null
@@ -313,7 +313,12 @@ async function readlinePrompt(message) {
313
313
  rl.close();
314
314
  }
315
315
  }
316
- function buildExpectedFiles(manifest, opts, manifestPath, generatedDir) {
316
+ function buildExpectedFiles(manifest, opts, manifestPath, generatedDir,
317
+ // The operator's generated dir. It differs from `generatedDir` only when
318
+ // the caller redirected apply's output (`opts.generatedDir`); values that
319
+ // name runtime state the operator's hooks and grounding-mcp consult (the
320
+ // pause sentinel, the verdict signing key) stay anchored here.
321
+ stateDir = generatedDir) {
317
322
  // Phase 6 #2: expand policy_packs[] into hook contributions + extra
318
323
  // generated files BEFORE settings projection. Pack hooks flow through
319
324
  // generate-settings unchanged (they're just additional Hook entries
@@ -344,7 +349,7 @@ function buildExpectedFiles(manifest, opts, manifestPath, generatedDir) {
344
349
  // sentinel harness's own hooks resolve via generatedDir at runtime. See
345
350
  // `ResolvePackOptions.pauseFile`'s doc comment for why only that one hook
346
351
  // needs it.
347
- const pauseFile = sentinelPath(generatedDir);
352
+ const pauseFile = sentinelPath(stateDir);
348
353
  const packExpansion = expandPolicyPacks(manifest, runtime, {
349
354
  reportsDir,
350
355
  solutionVerdictDir,
@@ -408,7 +413,7 @@ function buildExpectedFiles(manifest, opts, manifestPath, generatedDir) {
408
413
  // grounding-mcp entry gets a real, resolved SOLUTION_VERDICT_SIGNING_KEY
409
414
  // instead of no projection at all (generateOpencodeConfig's extras have
410
415
  // no safe default for this -- see GenerateOpencodeConfigExtras).
411
- const opencodeConfig = generateOpencodeConfig(augmentedManifest, { generatedDir });
416
+ const opencodeConfig = generateOpencodeConfig(augmentedManifest, { generatedDir: stateDir });
412
417
  const opencodeWarnings = [...opencodeConfig.warnings];
413
418
  if (packExpansion.permissions) {
414
419
  // See generate-opencode-config.ts's header ("permission -> NOT
@@ -436,7 +441,7 @@ function buildExpectedFiles(manifest, opts, manifestPath, generatedDir) {
436
441
  // why this projection is not itself observable in settings.json.
437
442
  const settingsResult = generateSettingsWithWarnings(augmentedManifest, {
438
443
  ...(packExpansion.permissions && { packPermissions: packExpansion.permissions }),
439
- generatedDir,
444
+ generatedDir: stateDir,
440
445
  });
441
446
  const settings = `${JSON.stringify(settingsResult.root, null, 2)}\n`;
442
447
  return {
@@ -531,7 +536,8 @@ export async function apply(opts = {}) {
531
536
  if (!fs.existsSync(manifestPath)) {
532
537
  throw new HarnessExitError(`harness manifest not found at ${manifestPath}; run \`harness init\` first`, EX_NOINPUT);
533
538
  }
534
- const generatedDir = resolveGeneratedDir({ homeDir: opts.homeDir, manifestPath });
539
+ const operatorGeneratedDir = resolveGeneratedDir({ homeDir: opts.homeDir, manifestPath });
540
+ const generatedDir = opts.generatedDir !== undefined ? path.resolve(opts.generatedDir) : operatorGeneratedDir;
535
541
  const lockPath = path.join(path.dirname(manifestPath), LOCK_BASENAME);
536
542
  const loaderOpts = {
537
543
  configPath: manifestPath,
@@ -574,7 +580,7 @@ export async function apply(opts = {}) {
574
580
  const lastApply = readLastApply(generatedDir);
575
581
  const runtimeInfo = selectRuntime(opts.runtime, lastApply, Boolean(opts.target));
576
582
  const { runtime } = runtimeInfo;
577
- const { files: expected, warnings } = buildExpectedFiles(manifest, { ...opts, runtime }, manifestPath, generatedDir);
583
+ const { files: expected, warnings } = buildExpectedFiles(manifest, { ...opts, runtime }, manifestPath, generatedDir, operatorGeneratedDir);
578
584
  // The runtime this apply records: its own, or with
579
585
  // `preserveRecordedRuntime` the previous one (recorded or inferred, else
580
586
  // whatever the field held), so a diagnostic apply leaves the operator's
@@ -1 +1 @@
1
- {"version":3,"file":"apply.js","sourceRoot":"","sources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WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,SAAS;YACrD,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC;QACD,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -64,6 +64,23 @@ export interface CodexConfigInstallPlan {
64
64
  * preserved byte-for-byte instead.
65
65
  */
66
66
  foreignSectionsPreserved: string[];
67
+ /**
68
+ * Operator-authored `[[hooks.<Event>]]` tables (no `# harness hook:`
69
+ * comment above them) that the managed-range scan ended the harness block
70
+ * at and that are kept after the fresh block, one entry per table: its
71
+ * header and its 1-based line number in the config before the install and
72
+ * in the config the install writes (for example
73
+ * `[[hooks.Stop]] (line 14 before the install, line 40 after it)`), never
74
+ * any value text. A hook event table spelled without the `[[hooks.` prefix
75
+ * (`[[ hooks.Stop ]]`, `[["hooks".Stop]]`) directly after the harness
76
+ * tables is one of these too (task e8f4fc03). Named because the
77
+ * scan cannot tell such a table from a harness table whose comment line an
78
+ * operator deleted (task 01053b27); a kept table that looks
79
+ * harness-generated is refused instead (see `assertKeptHookTablesAreOperatorOwned`).
80
+ * The same entries are appended to `foreignSectionsPreserved`, which is
81
+ * what `--dry-run` and the install summary print.
82
+ */
83
+ keptOperatorHookTables: string[];
67
84
  }
68
85
  export interface CodexConfigInstallResult extends CodexConfigInstallPlan {
69
86
  backupPath?: string;
@@ -77,6 +94,96 @@ export interface CodexConfigInstallOptions {
77
94
  now?: Date;
78
95
  }
79
96
  export declare function defaultCodexConfigPath(homeDir?: string): string;
97
+ /** Answers, for a line start in `text`, whether that line sits at the top
98
+ * level of the document, that is, not inside a multi-line array, a multi-line
99
+ * inline table or a multi-line string opened by an earlier line. The document
100
+ * parser is the oracle: the text before the line parses on its own exactly
101
+ * when nothing is still open there, whereas a prefix that ends inside an
102
+ * array is an unterminated array and fails. A line that merely LOOKS like a
103
+ * table header (an array element on its own line such as `["x"]`, `['x']`,
104
+ * `[1]` or `[1979-05-27]`) is therefore told apart from a real header even
105
+ * when a real table of the same name exists elsewhere in the document, which
106
+ * a lookup of the header's key path in the parsed document could not do.
107
+ * A line inside an open construct never has a prefix that parses, so such a
108
+ * line is never taken for a header.
109
+ *
110
+ * The verdict is the full-prefix verdict: a line is top level when
111
+ * `text.slice(0, lineStart)` parses. The probe first tries a fast path: it
112
+ * remembers the last line start it confirmed as top level and parses only
113
+ * the text from there; when that segment parses, the line is confirmed
114
+ * without parsing the full prefix. When the segment fails, the full prefix
115
+ * decides, and a line it accepts is confirmed too. The segment is not
116
+ * claimed to agree with the full prefix: a segment can fail where the full
117
+ * prefix parses (a sub-table `[hooks.Stop.meta]` confirmed, then the next
118
+ * `[[hooks.Stop]]` element, which is never a candidate and so stays in the
119
+ * segment, redefines `hooks.Stop` as seen from the segment alone), and then
120
+ * the full prefix is what answers. So a line is reported as not top level
121
+ * only when the full prefix fails, and a line whose full prefix parses is
122
+ * always reported as top level. The fast path can only answer "top level"
123
+ * where the full prefix fails if the prefix holds a conflict of its own (a
124
+ * table defined twice); such a document does not parse as a whole, and the
125
+ * install refuses it through the parse check on the config either way. Even
126
+ * then the segment starts at a confirmed line with nothing open, so a line
127
+ * inside an open array, inline table or multi-line string still fails it.
128
+ *
129
+ * Cost: a real table confirmed on the fast path costs a segment parse. Any
130
+ * candidate whose segment fails costs a full-prefix parse too: an array
131
+ * element on its own line, or a sub-table after a later element of the same
132
+ * array of tables. Many of those are quadratic in their number (seconds at
133
+ * thousands; the CHANGELOG entry for this change has the measurements).
134
+ * Both scans query non-decreasing line starts. A query
135
+ * before the last confirmed line start throws instead of answering; a line
136
+ * reported as not top level is never confirmed, so it never moves that
137
+ * bound (task 6b56d735). Exported for direct tests only. */
138
+ export declare function createTopLevelProbe(text: string): (lineStart: number) => boolean;
139
+ /**
140
+ * Refuses loudly (mirror case of the stray-END bug) when the zone between
141
+ * `from` and `to` still contains a recognizable fragment of a harness
142
+ * hook block: a second BEGIN/source-prefix marker, or a `# harness hook:`
143
+ * comment. Either means a foreign table was wedged between two harness
144
+ * hook tables, or the BEGIN marker moved, and the true block boundaries
145
+ * can no longer be determined by a line scan; guessing risks reordering
146
+ * or dropping harness- or foreign-owned bytes, so this throws instead. The
147
+ * message names the resolved config path (never a hard-coded `~/.codex`),
148
+ * the foreign table header the scan found (usually `from` itself, see
149
+ * `scanOwnedContentEnd`; when only blank or comment lines precede the found
150
+ * marker in the zone -- so the pre-marker lookup finds no content line to
151
+ * report -- the header is looked up again just past that marker's own
152
+ * line, since the wedged table then sits after it, not before, and the
153
+ * message says the marker line sits above the table (task e8f4fc03); printed
154
+ * through `describeTableHeader`, so only the header's own bracketed key
155
+ * path appears, never a trailing comment), and
156
+ * the line number and marker of the first line beyond it
157
+ * that still looks like harness content. That line's own text is never
158
+ * echoed: the marker is found by a substring search, so the line may be
159
+ * foreign content (a value holding an API token, say) that merely contains
160
+ * the marker text, and the refusal is printed to stderr and into `--json`
161
+ * output. `hasEndMarker` distinguishes the two callers: when `to` was
162
+ * derived from a real stray `CODEX_MANAGED_END` line, the fix guidance can
163
+ * point at that marker; when there is no END marker anywhere in the
164
+ * document (`to` is `text.length`), telling the operator to move something
165
+ * below a marker that does not exist would be nonsensical, so a different
166
+ * fix (add one, or move the table below the last harness hook table) is
167
+ * offered instead (task 6a037359). When the named table is a hook event
168
+ * table spelled without the `[[hooks.` prefix, the guidance offers deleting
169
+ * it if harness wrote it, since the scan reads such a table as foreign with
170
+ * or without a comment line above it (task e8f4fc03). The legacy paths call
171
+ * this too, so the substring matching above applies there as well: a value
172
+ * holding marker text refuses. `blockOpening` names the line the block
173
+ * starts at in the delete-the-lines fix: the BEGIN marker by default; a
174
+ * legacy config (no BEGIN marker) whose END marker survived passes its
175
+ * source-prefix line or generated header instead, since a BEGIN marker it
176
+ * does not have is no line to delete from (task 01053b27). For the generated
177
+ * header the fix deletes that line and the END marker line too: a generated
178
+ * header left alone above END no longer marks a harness block
179
+ * (`findManagedRange` needs a `[[hooks.` line after it), so the install
180
+ * would add a fresh block and leave that pair behind as an orphan. Exported for
181
+ * direct tests only: the scan
182
+ * that feeds it never hands it a line that is not a real header, so its own
183
+ * naming rule is reachable in isolation only by calling it directly (task
184
+ * 6b56d735).
185
+ */
186
+ export declare function assertNoSplitBlock(text: string, from: number, to: number, configPath: string, hasEndMarker: boolean, blockOpening?: string): void;
80
187
  export declare function validateCodexManagedConfig(content: string): void;
81
188
  /**
82
189
  * The TOML-semantic safety net (task 6a037359). The byte-preserving text
@@ -101,8 +208,12 @@ export declare function validateCodexManagedConfig(content: string): void;
101
208
  * from a harness-written one would need the same line-level reading of the
102
209
  * file this net is meant to be independent of. An operator-authored
103
210
  * `[[hooks.<Event>]]` entry that the line scan wrongly counts as part of
104
- * the harness-managed block is therefore replaced without a refusal
105
- * (follow-up task 01053b27).
211
+ * the harness-managed block is therefore replaced without a refusal (task
212
+ * 01053b27 covers the operator table after the harness tables, which the scan
213
+ * now keeps and names; still replaced silently are an operator table before
214
+ * the first harness table inside the block, one under a comment run that
215
+ * holds a `# harness hook:` line, bare keys directly under a harness table,
216
+ * and one after an old block that never carried the comments).
106
217
  *
107
218
  * Parsing goes through `parseToml` (a leading byte order mark ignored,
108
219
  * 64-bit integers kept as `bigint`). A document that does not parse refuses