@lannguyensi/harness 0.44.0 → 0.45.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 (231) hide show
  1. package/CHANGELOG.md +1213 -0
  2. package/dist/cli/adopt/derive.d.ts +16 -7
  3. package/dist/cli/adopt/derive.js +19 -2
  4. package/dist/cli/adopt/derive.js.map +1 -1
  5. package/dist/cli/adopt/index.js +18 -3
  6. package/dist/cli/adopt/index.js.map +1 -1
  7. package/dist/cli/apply/apply.d.ts +1 -0
  8. package/dist/cli/apply/apply.js +62 -6
  9. package/dist/cli/apply/apply.js.map +1 -1
  10. package/dist/cli/apply/generate-codex-config.js +5 -6
  11. package/dist/cli/apply/generate-codex-config.js.map +1 -1
  12. package/dist/cli/apply/generate-opencode-config.d.ts +58 -0
  13. package/dist/cli/apply/generate-opencode-config.js +210 -0
  14. package/dist/cli/apply/generate-opencode-config.js.map +1 -0
  15. package/dist/cli/apply/generate-settings.d.ts +90 -32
  16. package/dist/cli/apply/generate-settings.js +133 -10
  17. package/dist/cli/apply/generate-settings.js.map +1 -1
  18. package/dist/cli/apply/index.d.ts +2 -1
  19. package/dist/cli/apply/index.js +2 -1
  20. package/dist/cli/apply/index.js.map +1 -1
  21. package/dist/cli/approve/stdin-report.d.ts +15 -0
  22. package/dist/cli/approve/stdin-report.js +1 -1
  23. package/dist/cli/approve/stdin-report.js.map +1 -1
  24. package/dist/cli/approve/understanding.d.ts +75 -0
  25. package/dist/cli/approve/understanding.js +150 -2
  26. package/dist/cli/approve/understanding.js.map +1 -1
  27. package/dist/cli/audit.d.ts +1 -1
  28. package/dist/cli/audit.js +3 -2
  29. package/dist/cli/audit.js.map +1 -1
  30. package/dist/cli/doctor/claude-mcp.d.ts +19 -1
  31. package/dist/cli/doctor/claude-mcp.js +36 -10
  32. package/dist/cli/doctor/claude-mcp.js.map +1 -1
  33. package/dist/cli/doctor/codex.d.ts +3 -1
  34. package/dist/cli/doctor/codex.js +6 -9
  35. package/dist/cli/doctor/codex.js.map +1 -1
  36. package/dist/cli/doctor/format.js +94 -8
  37. package/dist/cli/doctor/format.js.map +1 -1
  38. package/dist/cli/doctor/index.d.ts +23 -0
  39. package/dist/cli/doctor/index.js +106 -2
  40. package/dist/cli/doctor/index.js.map +1 -1
  41. package/dist/cli/doctor/opencode.d.ts +24 -0
  42. package/dist/cli/doctor/opencode.js +107 -0
  43. package/dist/cli/doctor/opencode.js.map +1 -0
  44. package/dist/cli/doctor/target-checks.d.ts +11 -0
  45. package/dist/cli/doctor/target-checks.js +25 -0
  46. package/dist/cli/doctor/target-checks.js.map +1 -0
  47. package/dist/cli/doctor/toolchain-parity.d.ts +63 -0
  48. package/dist/cli/doctor/toolchain-parity.js +154 -0
  49. package/dist/cli/doctor/toolchain-parity.js.map +1 -0
  50. package/dist/cli/doctor/types.d.ts +85 -1
  51. package/dist/cli/doctor/types.js +1 -1
  52. package/dist/cli/doctor/types.js.map +1 -1
  53. package/dist/cli/doctor/understanding-mode-env.d.ts +39 -0
  54. package/dist/cli/doctor/understanding-mode-env.js +83 -0
  55. package/dist/cli/doctor/understanding-mode-env.js.map +1 -0
  56. package/dist/cli/dry-run.js +32 -17
  57. package/dist/cli/dry-run.js.map +1 -1
  58. package/dist/cli/explain.d.ts +1 -1
  59. package/dist/cli/explain.js +1 -1
  60. package/dist/cli/explain.js.map +1 -1
  61. package/dist/cli/index.js +58 -4
  62. package/dist/cli/index.js.map +1 -1
  63. package/dist/cli/init/composer.js +36 -13
  64. package/dist/cli/init/composer.js.map +1 -1
  65. package/dist/cli/init/interactive.d.ts +7 -4
  66. package/dist/cli/init/interactive.js +79 -27
  67. package/dist/cli/init/interactive.js.map +1 -1
  68. package/dist/cli/init/profiles.d.ts +2 -2
  69. package/dist/cli/init/profiles.js +32 -1
  70. package/dist/cli/init/profiles.js.map +1 -1
  71. package/dist/cli/init/templates.d.ts +2 -1
  72. package/dist/cli/init/templates.js +130 -20
  73. package/dist/cli/init/templates.js.map +1 -1
  74. package/dist/cli/pack/approve-escape.js +69 -8
  75. package/dist/cli/pack/approve-escape.js.map +1 -1
  76. package/dist/cli/pack/hook-branch-protection.js +1 -1
  77. package/dist/cli/pack/hook-branch-protection.js.map +1 -1
  78. package/dist/cli/pack/hook-codex-pre-tool-use.js +27 -1
  79. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
  80. package/dist/cli/pack/hook-post-merge-gate.js +1 -1
  81. package/dist/cli/pack/hook-post-merge-gate.js.map +1 -1
  82. package/dist/cli/pack/hook-pre-tool-use.js +91 -4
  83. package/dist/cli/pack/hook-pre-tool-use.js.map +1 -1
  84. package/dist/cli/pack/hook-solution-acceptance.js +19 -2
  85. package/dist/cli/pack/hook-solution-acceptance.js.map +1 -1
  86. package/dist/cli/pack/understanding-report-schema-hint.d.ts +13 -0
  87. package/dist/cli/pack/understanding-report-schema-hint.js +52 -3
  88. package/dist/cli/pack/understanding-report-schema-hint.js.map +1 -1
  89. package/dist/cli/pause/index.js +1 -1
  90. package/dist/cli/pause/index.js.map +1 -1
  91. package/dist/cli/policy/intercept.d.ts +148 -0
  92. package/dist/cli/policy/intercept.js +379 -48
  93. package/dist/cli/policy/intercept.js.map +1 -1
  94. package/dist/cli/session-start/index.d.ts +12 -3
  95. package/dist/cli/session-start/index.js +67 -11
  96. package/dist/cli/session-start/index.js.map +1 -1
  97. package/dist/cli/session-start/stale-base-check.d.ts +71 -0
  98. package/dist/cli/session-start/stale-base-check.js +379 -0
  99. package/dist/cli/session-start/stale-base-check.js.map +1 -0
  100. package/dist/cli/session-start/toolchain-parity.d.ts +142 -8
  101. package/dist/cli/session-start/toolchain-parity.js +244 -36
  102. package/dist/cli/session-start/toolchain-parity.js.map +1 -1
  103. package/dist/cli/smoke/assertions.d.ts +9 -2
  104. package/dist/cli/smoke/assertions.js +9 -2
  105. package/dist/cli/smoke/assertions.js.map +1 -1
  106. package/dist/cli/uninstall/index.js +18 -2
  107. package/dist/cli/uninstall/index.js.map +1 -1
  108. package/dist/cli/validate/checks.d.ts +3 -1
  109. package/dist/cli/validate/checks.js +298 -3
  110. package/dist/cli/validate/checks.js.map +1 -1
  111. package/dist/io/claude-mcp.d.ts +122 -1
  112. package/dist/io/claude-mcp.js +214 -12
  113. package/dist/io/claude-mcp.js.map +1 -1
  114. package/dist/io/duration.js.map +1 -0
  115. package/dist/io/expand-home.js.map +1 -0
  116. package/dist/io/extract.js.map +1 -0
  117. package/dist/io/harness-lock.js +1 -1
  118. package/dist/io/harness-lock.js.map +1 -1
  119. package/dist/{runtime → io}/ledger-record.d.ts +1 -1
  120. package/dist/io/ledger-record.js.map +1 -0
  121. package/dist/policies/index.d.ts +2 -2
  122. package/dist/policies/index.js +2 -2
  123. package/dist/policies/index.js.map +1 -1
  124. package/dist/policies/ledger-client.js +10 -6
  125. package/dist/policies/ledger-client.js.map +1 -1
  126. package/dist/policies/producers.js +1 -1
  127. package/dist/policies/producers.js.map +1 -1
  128. package/dist/policies/requires.js +2 -2
  129. package/dist/policies/requires.js.map +1 -1
  130. package/dist/policy-packs/builtin/branch-protection.js +28 -3
  131. package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
  132. package/dist/policy-packs/builtin/post-merge-gate.js +45 -9
  133. package/dist/policy-packs/builtin/post-merge-gate.js.map +1 -1
  134. package/dist/policy-packs/builtin/solution-acceptance-runtime.d.ts +139 -8
  135. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +246 -12
  136. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
  137. package/dist/policy-packs/builtin/solution-acceptance.js +17 -3
  138. package/dist/policy-packs/builtin/solution-acceptance.js.map +1 -1
  139. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.d.ts +25 -0
  140. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js +89 -0
  141. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js.map +1 -0
  142. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +13 -0
  143. package/dist/policy-packs/builtin/understanding-before-execution/index.js +39 -0
  144. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +1 -0
  145. package/dist/policy-packs/builtin/understanding-before-execution/ledger.d.ts +25 -0
  146. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js +56 -0
  147. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js.map +1 -0
  148. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.d.ts +20 -0
  149. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js +79 -0
  150. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js.map +1 -0
  151. package/dist/policy-packs/builtin/understanding-before-execution/markers.d.ts +103 -0
  152. package/dist/policy-packs/builtin/understanding-before-execution/markers.js +203 -0
  153. package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +1 -0
  154. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +177 -0
  155. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +309 -0
  156. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +1 -0
  157. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.d.ts +106 -0
  158. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +209 -0
  159. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +1 -0
  160. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.d.ts +78 -0
  161. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js +185 -0
  162. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js.map +1 -0
  163. package/dist/policy-packs/builtin/understanding-before-execution-runtime.d.ts +1 -536
  164. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js +9 -1095
  165. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js.map +1 -1
  166. package/dist/policy-packs/builtin/understanding-before-execution.d.ts +109 -1
  167. package/dist/policy-packs/builtin/understanding-before-execution.js +183 -15
  168. package/dist/policy-packs/builtin/understanding-before-execution.js.map +1 -1
  169. package/dist/policy-packs/registry.d.ts +11 -0
  170. package/dist/policy-packs/registry.js +1 -1
  171. package/dist/policy-packs/registry.js.map +1 -1
  172. package/dist/policy-packs/runtime.d.ts +1 -1
  173. package/dist/policy-packs/runtime.js +10 -1
  174. package/dist/policy-packs/runtime.js.map +1 -1
  175. package/dist/runtime/agent-facing.js +1 -1
  176. package/dist/runtime/agent-facing.js.map +1 -1
  177. package/dist/runtime/bash-match-facts.d.ts +9 -7
  178. package/dist/runtime/bash-match-facts.js +9 -7
  179. package/dist/runtime/bash-match-facts.js.map +1 -1
  180. package/dist/runtime/bash-match-registry.d.ts +75 -38
  181. package/dist/runtime/bash-match-registry.js +279 -232
  182. package/dist/runtime/bash-match-registry.js.map +1 -1
  183. package/dist/runtime/bash-prefix-parse.d.ts +7 -0
  184. package/dist/runtime/bash-prefix-parse.js +205 -17
  185. package/dist/runtime/bash-prefix-parse.js.map +1 -1
  186. package/dist/runtime/command-normalize.d.ts +112 -0
  187. package/dist/runtime/command-normalize.js +411 -38
  188. package/dist/runtime/command-normalize.js.map +1 -1
  189. package/dist/runtime/hermetic-spawn-guard.js +6 -0
  190. package/dist/runtime/hermetic-spawn-guard.js.map +1 -1
  191. package/dist/runtime/index.d.ts +2 -2
  192. package/dist/runtime/index.js +2 -2
  193. package/dist/runtime/index.js.map +1 -1
  194. package/dist/runtime/intercept.d.ts +78 -3
  195. package/dist/runtime/intercept.js +151 -39
  196. package/dist/runtime/intercept.js.map +1 -1
  197. package/dist/runtime/ledger-add.js +1 -1
  198. package/dist/runtime/ledger-add.js.map +1 -1
  199. package/dist/runtime/read-only-bash.js +303 -24
  200. package/dist/runtime/read-only-bash.js.map +1 -1
  201. package/dist/schema/doctor.d.ts +25 -0
  202. package/dist/schema/doctor.js +23 -0
  203. package/dist/schema/doctor.js.map +1 -0
  204. package/dist/schema/extract.js +1 -1
  205. package/dist/schema/extract.js.map +1 -1
  206. package/dist/schema/index.d.ts +76 -0
  207. package/dist/schema/index.js +9 -0
  208. package/dist/schema/index.js.map +1 -1
  209. package/dist/schema/requires.js +2 -2
  210. package/dist/schema/requires.js.map +1 -1
  211. package/dist/schema/risk.d.ts +7 -0
  212. package/dist/schema/risk.js +23 -0
  213. package/dist/schema/risk.js.map +1 -1
  214. package/dist/schema/stale-base-check.d.ts +18 -0
  215. package/dist/schema/stale-base-check.js +37 -0
  216. package/dist/schema/stale-base-check.js.map +1 -0
  217. package/dist/schema/toolchain-parity.d.ts +3 -0
  218. package/dist/schema/toolchain-parity.js +13 -0
  219. package/dist/schema/toolchain-parity.js.map +1 -1
  220. package/package.json +3 -2
  221. package/dist/policies/duration.js.map +0 -1
  222. package/dist/policies/extract.js.map +0 -1
  223. package/dist/runtime/expand-home.js.map +0 -1
  224. package/dist/runtime/ledger-record.js.map +0 -1
  225. /package/dist/{policies → io}/duration.d.ts +0 -0
  226. /package/dist/{policies → io}/duration.js +0 -0
  227. /package/dist/{runtime → io}/expand-home.d.ts +0 -0
  228. /package/dist/{runtime → io}/expand-home.js +0 -0
  229. /package/dist/{policies → io}/extract.d.ts +0 -0
  230. /package/dist/{policies → io}/extract.js +0 -0
  231. /package/dist/{runtime → io}/ledger-record.js +0 -0
@@ -0,0 +1,154 @@
1
+ // Toolchain-parity doctor section (task 13919613, doctor companion to
2
+ // `harness session-start toolchain-parity`). Reuses the Collector +
3
+ // Comparator core straight from src/cli/session-start/toolchain-parity.ts
4
+ // (`collectLocalSnapshot`, `compareToPeer`, `parseSnapshotJson`,
5
+ // `formatSnapshotAge`, the real collectors, `sanitizeProfileName`,
6
+ // `defaultMachineStateDir`) — see that module's header for the full
7
+ // rationale of what each collected field means and how a peer comparison
8
+ // is computed. No comparison logic is re-implemented here.
9
+ //
10
+ // Unlike the SessionStart producer, this check is READ-ONLY: it never
11
+ // writes a snapshot file (that stays the producer's job — the thing that
12
+ // actually keeps the machine-state directory populated for every OTHER
13
+ // machine to compare against) and never touches the ledger. It only
14
+ // answers "if I compared my current live toolchain against whatever peer
15
+ // snapshots already exist, right now, what would I see?" — an on-demand
16
+ // read of the same comparison SessionStart runs automatically.
17
+ //
18
+ // Advisory only: drift is always a warning, never an error, and this is
19
+ // not any kind of gate (constraint carried over verbatim from the
20
+ // producer's own contract).
21
+ import * as fs from "node:fs";
22
+ import * as os from "node:os";
23
+ import * as path from "node:path";
24
+ import { collectLocalSnapshot, compareToPeer, defaultMachineStateDir, formatSnapshotAge, parseSnapshotJson, realNodeVersionSpawn, realNpmGlobalsSpawn, realReadMcpServerNames, realReadOwKitVersion, sanitizeProfileName, } from "../session-start/toolchain-parity.js";
25
+ // Same ceilings as the producer's own defaults (see that module's
26
+ // timeout-constants comment for the full budget derivation) — doctor
27
+ // pays the same worst-case spawn cost when it actually collects.
28
+ const DEFAULT_NODE_TIMEOUT_MS = 2_000;
29
+ const DEFAULT_NPM_GLOBALS_TIMEOUT_MS = 4_000;
30
+ /**
31
+ * A peer JSON filename (minus its `.json` suffix) is untrusted,
32
+ * cross-machine-synced content (agent-memory-sync populates this
33
+ * directory from other machines) — the same class of content the
34
+ * producer's `note()` choke point CR/LF-strips before ever reaching a
35
+ * stderr line (task c1b5ade5 R2b). This module hands its section back as
36
+ * STRUCTURED data (profile strings, drift `message` strings assembled by
37
+ * the reused `compareToPeer`), so the equivalent choke point lives at the
38
+ * doctor FORMAT layer (`formatToolchainParitySection` in format.ts) —
39
+ * every string this section produces that could carry a peer-controlled
40
+ * value gets CR/LF-stripped there, at the point it actually becomes
41
+ * terminal output, not here.
42
+ */
43
+ function peerLabelFromFileName(fileName) {
44
+ return fileName.replace(/\.json$/, "") || fileName;
45
+ }
46
+ export async function runDoctorToolchainParity(manifest, opts = {}) {
47
+ const config = manifest.toolchain_parity;
48
+ const now = opts.now ?? new Date();
49
+ const cwd = opts.cwd ?? process.cwd();
50
+ const machineStateDir = config.machine_state_dir ?? defaultMachineStateDir();
51
+ const profile = config.profile ?? sanitizeProfileName(os.hostname());
52
+ const sanitizedProfile = sanitizeProfileName(profile);
53
+ const ownFileName = `${sanitizedProfile}.json`;
54
+ const workspaceRoot = config.workspace_root ?? cwd;
55
+ const noPeers = (message) => ({
56
+ status: "no-peers",
57
+ message,
58
+ profile,
59
+ peers: [],
60
+ driftTotal: 0,
61
+ unparseablePeers: [],
62
+ });
63
+ // Peer-existence check runs BEFORE any collection: there is nothing to
64
+ // compare the local live snapshot against without at least one peer
65
+ // file, so this order avoids paying the node/npm spawn cost (and, in
66
+ // `--shallow` mode, avoids the spawn-skip branch entirely having to be
67
+ // reached) in the common "first machine, no peer has run session-start
68
+ // toolchain-parity yet" case.
69
+ let entries;
70
+ try {
71
+ entries = fs.readdirSync(machineStateDir);
72
+ }
73
+ catch {
74
+ return noPeers(`no peer snapshots found (machine-state dir ${machineStateDir} does not exist yet); ` +
75
+ "normal for the first machine, or before any peer has run `harness session-start toolchain-parity`");
76
+ }
77
+ const peerFiles = entries.filter((name) => name.endsWith(".json") && name !== ownFileName).sort();
78
+ if (peerFiles.length === 0) {
79
+ return noPeers(`no peer snapshots found in ${machineStateDir}; nothing to compare (normal for the first ` +
80
+ "machine, or before any peer has run `harness session-start toolchain-parity`)");
81
+ }
82
+ if (opts.shallow) {
83
+ return {
84
+ status: "skipped",
85
+ message: "harness doctor --shallow does not collect a live toolchain snapshot to compare",
86
+ profile,
87
+ peers: [],
88
+ driftTotal: 0,
89
+ unparseablePeers: [],
90
+ };
91
+ }
92
+ const runNodeVersion = opts.runNodeVersion ?? realNodeVersionSpawn;
93
+ const runNpmGlobals = opts.runNpmGlobals ?? realNpmGlobalsSpawn;
94
+ const readOwKitVersion = opts.readOwKitVersion ?? realReadOwKitVersion;
95
+ const readMcpServerNames = opts.readMcpServerNames ?? realReadMcpServerNames;
96
+ const { snapshot: localSnapshot } = await collectLocalSnapshot({
97
+ profile,
98
+ now,
99
+ workspaceRoot,
100
+ nodeTimeoutMs: opts.nodeTimeoutMs ?? DEFAULT_NODE_TIMEOUT_MS,
101
+ npmTimeoutMs: opts.npmTimeoutMs ?? DEFAULT_NPM_GLOBALS_TIMEOUT_MS,
102
+ runNodeVersion,
103
+ runNpmGlobals,
104
+ readOwKitVersion,
105
+ readMcpServerNames,
106
+ });
107
+ const peers = [];
108
+ const unparseablePeers = [];
109
+ let driftTotal = 0;
110
+ for (const fileName of peerFiles) {
111
+ const filePath = path.join(machineStateDir, fileName);
112
+ let raw;
113
+ try {
114
+ raw = fs.readFileSync(filePath, "utf8");
115
+ }
116
+ catch {
117
+ unparseablePeers.push(peerLabelFromFileName(fileName));
118
+ continue;
119
+ }
120
+ const parsed = parseSnapshotJson(raw);
121
+ if (!parsed.ok) {
122
+ unparseablePeers.push(peerLabelFromFileName(fileName));
123
+ continue;
124
+ }
125
+ const comparison = compareToPeer(localSnapshot, parsed.snapshot, now);
126
+ driftTotal += comparison.drift.length;
127
+ peers.push({
128
+ peerProfile: comparison.peerProfile,
129
+ status: comparison.drift.length === 0 ? "ok" : "drift",
130
+ driftCount: comparison.drift.length,
131
+ ageMs: comparison.ageMs,
132
+ ageLabel: formatSnapshotAge(comparison.ageMs),
133
+ drift: comparison.drift,
134
+ });
135
+ }
136
+ if (peers.length === 0) {
137
+ return {
138
+ ...noPeers(`no comparable peer snapshots (all ${peerFiles.length} peer file(s) in ${machineStateDir} ` +
139
+ "were unreadable/corrupt)"),
140
+ unparseablePeers,
141
+ };
142
+ }
143
+ return {
144
+ status: driftTotal === 0 ? "ok" : "drift",
145
+ message: driftTotal === 0
146
+ ? `toolchain parity ok against ${peers.length} peer(s)`
147
+ : `${driftTotal} drift item(s) found across ${peers.length} peer(s)`,
148
+ profile,
149
+ peers,
150
+ driftTotal,
151
+ unparseablePeers,
152
+ };
153
+ }
154
+ //# sourceMappingURL=toolchain-parity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolchain-parity.js","sourceRoot":"","sources":["../../../src/cli/doctor/toolchain-parity.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0EAA0E;AAC1E,iEAAiE;AACj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C,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACtE,UAAU,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC;YACT,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;YACtD,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM;YACnC,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,KAAK,CAAC;YAC7C,KAAK,EAAE,UAAU,CAAC,KAAK;SACxB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,GAAG,OAAO,CACR,qCAAqC,SAAS,CAAC,MAAM,oBAAoB,eAAe,GAAG;gBACzF,0BAA0B,CAC7B;YACD,gBAAgB;SACjB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;QACzC,OAAO,EACL,UAAU,KAAK,CAAC;YACd,CAAC,CAAC,+BAA+B,KAAK,CAAC,MAAM,UAAU;YACvD,CAAC,CAAC,GAAG,UAAU,+BAA+B,KAAK,CAAC,MAAM,UAAU;QACxE,OAAO;QACP,KAAK;QACL,UAAU;QACV,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
@@ -4,8 +4,11 @@ import type { Manifest } from "../../schema/index.js";
4
4
  import type { Diagnostic } from "../validate/types.js";
5
5
  import type { ClaudeMcpRegistrationSection } from "./claude-mcp.js";
6
6
  import type { CodexTargetReport } from "./codex.js";
7
+ import type { OpencodeTargetReport } from "./opencode.js";
7
8
  import type { NpmBinReport } from "./npm-bin-path.js";
8
9
  import type { RogueLedgerDb } from "./rogue-ledger.js";
10
+ import type { UnderstandingModeEnvDivergence } from "./understanding-mode-env.js";
11
+ import type { ToolchainParitySection } from "./toolchain-parity.js";
9
12
  /**
10
13
  * Phase 6 #6 follow-up — doctor target identifier. Distinct from
11
14
  * `Runtime` (which gates `harness apply --runtime`): doctor only adds
@@ -14,7 +17,7 @@ import type { RogueLedgerDb } from "./rogue-ledger.js";
14
17
  * `--target claude-code` and do nothing, since there is no
15
18
  * claude-code-specific doctor module today.
16
19
  */
17
- export declare const KNOWN_DOCTOR_TARGETS: readonly ["codex"];
20
+ export declare const KNOWN_DOCTOR_TARGETS: readonly ["codex", "opencode"];
18
21
  export type DoctorTarget = (typeof KNOWN_DOCTOR_TARGETS)[number];
19
22
  export declare function isDoctorTarget(value: unknown): value is DoctorTarget;
20
23
  export interface ManifestSection {
@@ -218,6 +221,42 @@ export interface GroundingSection {
218
221
  /** Wiring warnings; each rolls into the doctor `warningCount`. */
219
222
  warnings: string[];
220
223
  }
224
+ /**
225
+ * Template-policy drift (task adf037c1). `errors` names shipped
226
+ * `operator_only` (kill-switch / security) policies this installed
227
+ * manifest either lacks entirely or carries in a DOWNGRADED (no longer
228
+ * operator_only) shape — a defense an aged manifest never received or
229
+ * silently weakened, since `harness apply` does not retroactively add or
230
+ * repair default policies. Each rolls into `errorCount` (a real defense
231
+ * gap, doctor-convention exit failure). `warnings` names stale
232
+ * `doctor.ignore_template_drift` entries that match no shipped policy and
233
+ * therefore suppress nothing; each rolls into `warningCount`. Names
234
+ * acknowledged via a valid `doctor.ignore_template_drift` entry are
235
+ * filtered out of `errors` upstream.
236
+ */
237
+ export interface TemplateDriftSection {
238
+ /** Missing-or-downgraded shipped operator_only policies (each → errorCount). */
239
+ errors: string[];
240
+ /** Stale/typo'd ignore_template_drift entries that suppress nothing (each → warningCount). */
241
+ warnings: string[];
242
+ }
243
+ /**
244
+ * Hook-budget-vs-ledger-timeout margin (task d20a7e0c, follow-up to
245
+ * f1aea826/7bf47554): blocking, ledger-consulting hooks (both directly
246
+ * declared `harness policy intercept` hooks and enabled policy-pack
247
+ * blockers) whose `budget_ms` does not clear
248
+ * `requiredHookBudgetMs(health.timeout_ms)` — see
249
+ * `checkHookBudgetLedgerMargin` in `validate/checks.ts` for the full
250
+ * derivation. Every entry is a real fail-open gap (a merely SLOW ledger
251
+ * can get the hook killed before it can write its fail-closed verdict),
252
+ * so each rolls into `errorCount`, mirroring `templateDrift.errors`
253
+ * above. Always present; empty when every such hook clears the margin
254
+ * (or none exist, or grounding-mcp is not wired).
255
+ */
256
+ export interface HookBudgetLedgerMarginSection {
257
+ /** Each entry names an under-budgeted hook; rolls into errorCount. */
258
+ errors: string[];
259
+ }
221
260
  export interface DoctorReport {
222
261
  manifestPath: string;
223
262
  manifestVersion: number;
@@ -233,6 +272,15 @@ export interface DoctorReport {
233
272
  * doctor / harness probes. See task 4ddd78ed.
234
273
  */
235
274
  npmGlobalBin?: NpmBinReport;
275
+ /**
276
+ * Understanding-gate mode env/config divergence (task 24abdecb).
277
+ * Present only when `UNDERSTANDING_GATE_MODE` is set in the operator
278
+ * environment AND diverges from
279
+ * `policy_packs[understanding-before-execution].config.mode`. Always
280
+ * advisory (rolls into `warningCount`, never `errorCount`) — see
281
+ * `understanding-mode-env.ts` for the full rationale.
282
+ */
283
+ understandingModeEnv?: UnderstandingModeEnvDivergence;
236
284
  memory: MemoryReport;
237
285
  hooks: HookEntryReport[];
238
286
  policies: PolicyEntryReport[];
@@ -246,6 +294,21 @@ export interface DoctorReport {
246
294
  workflows: WorkflowsSectionReport;
247
295
  /** Phase 7 #6 — Risk Gate wiring health (classifiers / resolvers / `when:`). */
248
296
  riskGate: RiskGateSection;
297
+ /**
298
+ * Template-policy drift (task adf037c1): shipped operator_only security
299
+ * policies missing-or-downgraded in this installed manifest (`errors`)
300
+ * and stale `doctor.ignore_template_drift` entries (`warnings`). Always
301
+ * present; both arrays empty when the manifest carries every shipped
302
+ * kill-switch policy in operator_only form (or has acknowledged the gap
303
+ * via a valid doctor.ignore_template_drift entry).
304
+ */
305
+ templateDrift: TemplateDriftSection;
306
+ /**
307
+ * Hook-budget-vs-ledger-timeout margin (task d20a7e0c). Always
308
+ * present; `errors` empty when every blocking, ledger-consulting hook
309
+ * clears the derived margin.
310
+ */
311
+ hookBudgetLedgerMargin: HookBudgetLedgerMarginSection;
249
312
  /**
250
313
  * Grounding wiring health (task 129e1b94). Absent when no enabled
251
314
  * grounding-mcp entry is declared.
@@ -260,6 +323,17 @@ export interface DoctorReport {
260
323
  * isn't further scoped by runtime.
261
324
  */
262
325
  claudeMcp?: ClaudeMcpRegistrationSection;
326
+ /**
327
+ * On-demand toolchain-parity comparison (task 13919613), reusing the
328
+ * Collector/Comparator core from `harness session-start
329
+ * toolchain-parity` (src/cli/doctor/toolchain-parity.ts). Present only
330
+ * when `toolchain_parity.enabled` is true in the manifest — absent
331
+ * otherwise, mirroring `grounding`'s "only when the feature is in use"
332
+ * gating. Always read-only: never writes a snapshot file or a ledger
333
+ * fact. Only `"drift"`-status peers roll into `warningCount`; the
334
+ * section is never an `errorCount` source (advisory, not a gate).
335
+ */
336
+ toolchainParity?: ToolchainParitySection;
263
337
  /**
264
338
  * Phase 6 #6 follow-up: present when `--target codex` is passed.
265
339
  * Aggregates harness-side codex adapter health checks (binary
@@ -268,6 +342,14 @@ export interface DoctorReport {
268
342
  * errorCount / warningCount.
269
343
  */
270
344
  codexTarget?: CodexTargetReport;
345
+ /**
346
+ * Batch 18 / task f34eb233: present when `--target opencode` is
347
+ * passed. Aggregates harness-side opencode adapter health checks
348
+ * (generated config presence + banner, projected MCP server command
349
+ * resolution). Counts roll into the top-level errorCount /
350
+ * warningCount, same as `codexTarget`.
351
+ */
352
+ opencodeTarget?: OpencodeTargetReport;
271
353
  /**
272
354
  * Leftover `<parent>/~/.evidence-ledger/ledger.db` files from the
273
355
  * literal-tilde `EVIDENCE_LEDGER_DB` env leak (agent-tasks/42d224a6,
@@ -281,4 +363,6 @@ export interface DoctorReport {
281
363
  }
282
364
  export type { NpmBinReport } from "./npm-bin-path.js";
283
365
  export type { ClaudeMcpRegistrationSection, ClaudeMcpEntryReport } from "./claude-mcp.js";
366
+ export type { UnderstandingModeEnvDivergence } from "./understanding-mode-env.js";
367
+ export type { ToolchainParitySection, ToolchainParityPeerReport } from "./toolchain-parity.js";
284
368
  export type { Manifest, McpProbeResult, MemoryReport, StaleMemory, CodexTargetReport, RogueLedgerDb, };
@@ -6,7 +6,7 @@
6
6
  * `--target claude-code` and do nothing, since there is no
7
7
  * claude-code-specific doctor module today.
8
8
  */
9
- export const KNOWN_DOCTOR_TARGETS = ["codex"];
9
+ export const KNOWN_DOCTOR_TARGETS = ["codex", "opencode"];
10
10
  export function isDoctorTarget(value) {
11
11
  return typeof value === "string" && KNOWN_DOCTOR_TARGETS.includes(value);
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/doctor/types.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,CAAU,CAAC;AAGvD,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClG,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/doctor/types.ts"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC;AAGnE,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClG,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { type Mode } from "../../policy-packs/builtin/understanding-before-execution.js";
2
+ import type { Manifest } from "../../schema/index.js";
3
+ export interface UnderstandingModeEnvDivergence {
4
+ /** `UNDERSTANDING_GATE_MODE`, normalised (trim + lowercase, mirrors `resolveMode`'s own normalisation). */
5
+ envMode: Mode;
6
+ /** `policy_packs[understanding-before-execution].config.mode`, resolved via the config-only (GENERATION-path) resolver. */
7
+ configMode: Mode;
8
+ /**
9
+ * Short headline, rendered as the `⚠` line itself. Mirrors the
10
+ * npm-global-bin-off-PATH advisory's rendering idiom (`format.ts`'s
11
+ * Environment section): a one-line headline plus indented {@link detail}
12
+ * lines underneath, instead of one long sentence crammed onto the `⚠`
13
+ * line.
14
+ */
15
+ message: string;
16
+ /**
17
+ * 2-3 indented lines rendered directly under {@link message} by
18
+ * `format.ts`. Carries the explanation and remediation the old
19
+ * single-line `message` used to carry inline.
20
+ */
21
+ detail: string[];
22
+ }
23
+ /**
24
+ * Pure: manifest + env in, a divergence report out (or `undefined` when
25
+ * there is nothing to flag). Only fires when:
26
+ * - the `understanding-before-execution` pack is declared AND enabled
27
+ * (a pack that never runs has no live mode for the env to diverge
28
+ * from — mirrors the enabled-gate other doctor sections use, e.g.
29
+ * `buildGrounding`'s `groundingServer` lookup in `index.ts`);
30
+ * - `UNDERSTANDING_GATE_MODE` is set to a non-empty value AND, once
31
+ * trimmed/lower-cased the same way `resolveMode` normalises it,
32
+ * resolves to a recognised {@link Mode}. An env value the live
33
+ * runtime would itself reject (unset, empty, or unrecognised) cannot
34
+ * diverge from anything — the live resolver falls back to
35
+ * `config.mode` in that case too, so there is no enforcement gap to
36
+ * warn about.
37
+ * - the normalised env mode differs from the resolved `config.mode`.
38
+ */
39
+ export declare function checkUnderstandingModeEnvDivergence(manifest: Manifest, env: NodeJS.ProcessEnv): UnderstandingModeEnvDivergence | undefined;
@@ -0,0 +1,83 @@
1
+ // Advisory check (task 24abdecb): warn (never error) when the operator's
2
+ // process environment carries `UNDERSTANDING_GATE_MODE` and it diverges
3
+ // from `policy_packs[understanding-before-execution].config.mode`.
4
+ //
5
+ // Context (Batch 11 verification round, reviewer finding on task
6
+ // 5d73d78d): after that fix, `resolveModeFromConfig` (config-only, no env
7
+ // read) drives every GENERATION-path artefact — `harness apply`'s
8
+ // settings.json / instructions.md, and `resolveBuiltinDefaultConfig` in
9
+ // `../../policy-packs/registry.ts` (consumed by this doctor's own
10
+ // UX-drift comparison). Only the LIVE runtime path — `resolveMode` in
11
+ // `approve/understanding.ts`'s stdin-report gap-fill, and the Codex
12
+ // `UserPromptSubmit` injector — still reads `UNDERSTANDING_GATE_MODE`
13
+ // (Env > config.mode > default), by design: it is the documented one-off
14
+ // override mechanism, mirroring `@lannguyensi/understanding-gate`'s own
15
+ // "env wins because operators set it consciously" rule (see `MODE_ENV`'s
16
+ // doc comment in `understanding-before-execution.ts`).
17
+ //
18
+ // The gap this check closes: an operator who carries the variable in
19
+ // their shell profile (rather than a one-off inline override) silently
20
+ // downgrades enforcement relative to what `harness.yaml` declares, with
21
+ // no signal anywhere that generation and the live path have diverged.
22
+ // Live-verified: `harness approve understanding` accepted a
23
+ // `fast_confirm`-shaped report against a `grill_me`-configured manifest
24
+ // with no warning. The divergence is agent-unreachable (it only bites at
25
+ // approve time, run from the operator's own shell), so `harness doctor`
26
+ // — which already reads `process.env` for env-dependent checks, e.g.
27
+ // `checkNpmBinPath` (`npm-bin-path.ts`) and the dead-settings.json-block
28
+ // lookup (`claude-mcp.ts`) — is the right place to surface it.
29
+ //
30
+ // Deliberately advisory, never an error: the env override is a
31
+ // legitimate, documented escape hatch, not a misconfiguration. The gap is
32
+ // visibility (the operator may not remember the variable is still
33
+ // exported), not validity.
34
+ import { isMode, MODE_ENV, PACK_NAME as UNDERSTANDING_PACK_NAME, resolveModeFromConfig, } from "../../policy-packs/builtin/understanding-before-execution.js";
35
+ /**
36
+ * Pure: manifest + env in, a divergence report out (or `undefined` when
37
+ * there is nothing to flag). Only fires when:
38
+ * - the `understanding-before-execution` pack is declared AND enabled
39
+ * (a pack that never runs has no live mode for the env to diverge
40
+ * from — mirrors the enabled-gate other doctor sections use, e.g.
41
+ * `buildGrounding`'s `groundingServer` lookup in `index.ts`);
42
+ * - `UNDERSTANDING_GATE_MODE` is set to a non-empty value AND, once
43
+ * trimmed/lower-cased the same way `resolveMode` normalises it,
44
+ * resolves to a recognised {@link Mode}. An env value the live
45
+ * runtime would itself reject (unset, empty, or unrecognised) cannot
46
+ * diverge from anything — the live resolver falls back to
47
+ * `config.mode` in that case too, so there is no enforcement gap to
48
+ * warn about.
49
+ * - the normalised env mode differs from the resolved `config.mode`.
50
+ */
51
+ export function checkUnderstandingModeEnvDivergence(manifest, env) {
52
+ const pack = manifest.policy_packs.find((p) => p.name === UNDERSTANDING_PACK_NAME && p.enabled !== false);
53
+ if (!pack)
54
+ return undefined;
55
+ const envRaw = env[MODE_ENV];
56
+ if (envRaw === undefined || envRaw === "")
57
+ return undefined;
58
+ const normalizedEnv = envRaw.trim().toLowerCase();
59
+ if (!isMode(normalizedEnv))
60
+ return undefined;
61
+ const { mode: configMode, warning: configWarning } = resolveModeFromConfig(pack);
62
+ if (normalizedEnv === configMode)
63
+ return undefined;
64
+ // `configMode` is the RESOLVED (effective) value, not necessarily what's
65
+ // literally written in harness.yaml: when `resolveModeFromConfig` itself
66
+ // had to fall back (an unset or unrecognised `config.mode`, signalled by
67
+ // a non-null `configWarning`), attributing it to "(from harness.yaml)"
68
+ // would be a false verbatim claim. Drop the parenthetical in that case;
69
+ // the value is still the correct effective mode, just not YAML-sourced.
70
+ const attribution = configWarning ? "" : " (from harness.yaml)";
71
+ return {
72
+ envMode: normalizedEnv,
73
+ configMode,
74
+ message: `${MODE_ENV}=${normalizedEnv} diverges from config.mode=${configMode}`,
75
+ detail: [
76
+ "live runtime consumers (`harness approve understanding`'s stdin-report gap-fill, the " +
77
+ `Codex UserPromptSubmit injector) read the env, so enforcement is effectively "${normalizedEnv}"`,
78
+ `effective config.mode=${configMode}${attribution}`,
79
+ `if this is not a deliberate one-off override, unset ${MODE_ENV} in your shell profile`,
80
+ ],
81
+ };
82
+ }
83
+ //# sourceMappingURL=understanding-mode-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"understanding-mode-env.js","sourceRoot":"","sources":["../../../src/cli/doctor/understanding-mode-env.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,mEAAmE;AACnE,EAAE;AACF,iEAAiE;AACjE,0EAA0E;AAC1E,kEAAkE;AAClE,wEAAwE;AACxE,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,yEAAyE;AACzE,wEAAwE;AACxE,yEAAyE;AACzE,uDAAuD;AACvD,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,wEAAwE;AACxE,sEAAsE;AACtE,4DAA4D;AAC5D,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,qEAAqE;AACrE,yEAAyE;AACzE,+DAA+D;AAC/D,EAAE;AACF,+DAA+D;AAC/D,0EAA0E;AAC1E,kEAAkE;AAClE,2BAA2B;AAE3B,OAAO,EACL,MAAM,EACN,QAAQ,EACR,SAAS,IAAI,uBAAuB,EACpC,qBAAqB,GAEtB,MAAM,8DAA8D,CAAC;AAwBtE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mCAAmC,CACjD,QAAkB,EAClB,GAAsB;IAEtB,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,uBAAuB,IAAI,CAAC,CAAC,OAAO,KAAK,KAAK,CACjE,CAAC;IACF,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAE5B,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7B,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5D,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,OAAO,SAAS,CAAC;IAE7C,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACjF,IAAI,aAAa,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IAEnD,yEAAyE;IACzE,yEAAyE;IACzE,yEAAyE;IACzE,uEAAuE;IACvE,wEAAwE;IACxE,wEAAwE;IACxE,MAAM,WAAW,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAEhE,OAAO;QACL,OAAO,EAAE,aAAa;QACtB,UAAU;QACV,OAAO,EAAE,GAAG,QAAQ,IAAI,aAAa,8BAA8B,UAAU,EAAE;QAC/E,MAAM,EAAE;YACN,uFAAuF;gBACrF,iFAAiF,aAAa,GAAG;YACnG,yBAAyB,UAAU,GAAG,WAAW,EAAE;YACnD,uDAAuD,QAAQ,wBAAwB;SACxF;KACF,CAAC;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { stringify as stringifyYaml } from "yaml";
2
2
  import { evaluateExtract, substituteTemplate, } from "../policies/index.js";
3
- import { normalizeCommand, normalizeCommandAmpAware } from "../runtime/command-normalize.js";
3
+ import { normalizeCommand, normalizeCommandAmpAware, normalizeCommandQuoteAware, } from "../runtime/command-normalize.js";
4
4
  import { resolveGitContext } from "../runtime/git-context.js";
5
5
  import { EX_USAGE, HarnessExitError } from "./exit-codes.js";
6
6
  import { loadManifest } from "./loader.js";
@@ -53,24 +53,39 @@ function policyMatchesTool(policy, tool, toolInput) {
53
53
  catch {
54
54
  return { matched: false, reason: `trigger.bash_match is not a valid regex` };
55
55
  }
56
- // Raw-OR-normalised-OR-amp-normalised, mirroring `policyMatchesEvent`'s
57
- // real evaluation path exactly (third arm added task aabbad63): dry-run
58
- // used to test only the RAW command, so it predicted `env -C /tmp git
59
- // status` as NOT matching `preflight-before-investigation` while
60
- // `policy intercept` actually blocks it — a debug verb contradicting the
61
- // runtime it exists to predict (its own comment above and
62
- // docs/okf/debug-verb-selection.md both assert parity). Leaving out the
63
- // amp-aware third arm here would reintroduce that SAME class of
64
- // contradiction for the bare-`&` family (`A=x&env -C /tmp git status`,
65
- // `echo hi & nice git status`): `policy intercept` now blocks those via
66
- // `normalizeCommandAmpAware`, so dry-run must try it too. The REPO/
67
- // BRANCH half of this file (`builtinsFor`, cwd-only) stays in parity
68
- // with the runtime, which is also cwd-only for `${REPO}`/`${BRANCH}` —
69
- // see `src/cli/policy/intercept.ts`'s comment above `cwdGitContext` for
70
- // why a per-command target directory is deliberately not consulted.
56
+ // Raw-OR-normalised-OR-amp-normalised-OR-quote-normalised, mirroring
57
+ // `policyMatchesEvent`'s real evaluation path exactly (third arm added
58
+ // task aabbad63; fourth arm added task f561e44c): dry-run used to test
59
+ // only the RAW command, so it predicted `env -C /tmp git status` as NOT
60
+ // matching `preflight-before-investigation` while `policy intercept`
61
+ // actually blocks it — a debug verb contradicting the runtime it exists
62
+ // to predict (its own comment above and docs/okf/debug-verb-selection.md
63
+ // both assert parity). Leaving out the amp-aware third arm here would
64
+ // reintroduce that SAME class of contradiction for the bare-`&` family
65
+ // (`A=x&env -C /tmp git status`, `echo hi & nice git status`): `policy
66
+ // intercept` now blocks those via `normalizeCommandAmpAware`, so dry-run
67
+ // must try it too. The REPO/BRANCH half of this file (`builtinsFor`,
68
+ // cwd-only) stays in parity with the runtime, which is also cwd-only for
69
+ // `${REPO}`/`${BRANCH}` — see `src/cli/policy/intercept.ts`'s comment
70
+ // above `cwdGitContext` for why a per-command target directory is
71
+ // deliberately not consulted.
72
+ //
73
+ // FOURTH ARM (task f561e44c, closes the cf3dff51 follow-up): task
74
+ // cf3dff51 wired `normalizeCommandQuoteAware` (a quote-aware BOUNDARY_RE
75
+ // segmenter closing `VAR='a; b' git push origin master` and its
76
+ // `|`/`&&`/`(`/newline siblings — task 13e55484's pinned gap) as
77
+ // `policyMatchesEvent`'s FOURTH arm, but deliberately left this function
78
+ // untouched (scope was narrowed to `src/runtime/intercept.ts` alone),
79
+ // reintroducing EXACTLY the parity contradiction this comment's first
80
+ // sentence describes, for that one family. Closed here by adding the
81
+ // same fourth OR-arm, literally duplicated rather than extracted to a
82
+ // shared helper — mirroring the amp-aware arm's own literal-duplication
83
+ // shape immediately above (no shared-helper precedent exists yet for
84
+ // this OR-chain to follow instead).
71
85
  if (!re.test(args.command) &&
72
86
  !re.test(normalizeCommand(args.command).normalized) &&
73
- !re.test(normalizeCommandAmpAware(args.command).normalized)) {
87
+ !re.test(normalizeCommandAmpAware(args.command).normalized) &&
88
+ !re.test(normalizeCommandQuoteAware(args.command).normalized)) {
74
89
  return {
75
90
  matched: false,
76
91
  reason: `bash_match "${policy.trigger.bash_match}" did not match`,
@@ -1 +1 @@
1
- {"version":3,"file":"dry-run.js","sourceRoot":"","sources":["../../src/cli/dry-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,eAAe,EACf,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAmD/D,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC,CAAC;AAEpE,SAAS,WAAW,CAAC,IAAmB,EAAE,IAAmB;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACrC,uEAAuE;IACvE,sEAAsE;IACtE,8CAA8C;IAC9C,MAAM,GAAG,GAAG,QAAQ,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 @@
1
1
  import { type LedgerQueryResult } from "../policies/index.js";
2
- import { type PolicyDecisionPayload } from "../runtime/ledger-record.js";
2
+ import { type PolicyDecisionPayload } from "../io/ledger-record.js";
3
3
  import { type ResolveReadSessionOptions } from "../runtime/session-id.js";
4
4
  import { type LoaderOptions } from "./loader.js";
5
5
  export type ExplainDecisionFilter = PolicyDecisionPayload["outcome"];
@@ -1,6 +1,6 @@
1
1
  import { stringify as stringifyYaml } from "yaml";
2
2
  import { buildRecordHint, queryLedgerByTag, } from "../policies/index.js";
3
- import { decisionSortKey, decodeLedgerContent, } from "../runtime/ledger-record.js";
3
+ import { decisionSortKey, decodeLedgerContent, } from "../io/ledger-record.js";
4
4
  import { resolveReadSessionId, } from "../runtime/session-id.js";
5
5
  import { EX_FAIL, EX_USAGE, HarnessExitError } from "./exit-codes.js";
6
6
  import { loadManifest } from "./loader.js";
@@ -1 +1 @@
1
- {"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/cli/explain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,eAAe,EACf,gBAAgB,GAGjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,eAAe,EACf,mBAAmB,GAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,oBAAoB,GAErB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAqE/D,SAAS,cAAc,CAAC,IAAoB;IAC1C,OAAO,KAAK,EAAE,SAAiB,EAA8B,EAAE;QAC7D,MAAM,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE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