@sema-agent/core 7.57.0 → 7.59.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 (399) hide show
  1. package/CHANGELOG.md +1161 -0
  2. package/README.md +6 -4
  3. package/dist/agents/cc-peer-directory.js +8 -8
  4. package/dist/agents/child-model-seat.d.ts +4 -2
  5. package/dist/agents/child-model-seat.js +5 -3
  6. package/dist/agents/peer-directory.d.ts +9 -0
  7. package/dist/agents/peer-directory.js +6 -2
  8. package/dist/agents/send-message-tool.js +21 -12
  9. package/dist/agents/subagent-steps.js +2 -4
  10. package/dist/agents/subagent.js +33 -34
  11. package/dist/brain/anthropic.js +161 -45
  12. package/dist/brain/errors.d.ts +9 -3
  13. package/dist/brain/errors.js +7 -1
  14. package/dist/brain/failover.js +2 -1
  15. package/dist/brain/open-responses.js +3 -3
  16. package/dist/brain/openai.js +103 -53
  17. package/dist/brain/provider-dialect.d.ts +11 -0
  18. package/dist/brain/provider-dialect.js +5 -2
  19. package/dist/brain/reasoning-request.js +5 -4
  20. package/dist/brain/reasoning.d.ts +19 -0
  21. package/dist/brain/reasoning.js +17 -2
  22. package/dist/brain/request-route.d.ts +4 -1
  23. package/dist/brain/request-route.js +4 -1
  24. package/dist/brain/route-adjudicator.d.ts +84 -18
  25. package/dist/brain/route-adjudicator.js +89 -22
  26. package/dist/brain/route-conformance.js +1 -1
  27. package/dist/brain/stream-engine.js +84 -49
  28. package/dist/brain/stream-shared.d.ts +30 -0
  29. package/dist/brain/stream-shared.js +34 -1
  30. package/dist/brain/timeout.d.ts +62 -5
  31. package/dist/brain/timeout.js +93 -6
  32. package/dist/core/a2a.d.ts +2 -1
  33. package/dist/core/a2a.js +23 -10
  34. package/dist/core/account-row.d.ts +61 -0
  35. package/dist/core/account-row.js +51 -0
  36. package/dist/core/advisor-verdict.d.ts +2 -1
  37. package/dist/core/advisor-verdict.js +1 -1
  38. package/dist/core/allow-entry.d.ts +20 -7
  39. package/dist/core/allow-entry.js +18 -9
  40. package/dist/core/approval-object.d.ts +29 -15
  41. package/dist/core/approval-object.js +47 -19
  42. package/dist/core/ask-origin.d.ts +21 -2
  43. package/dist/core/ask-origin.js +5 -1
  44. package/dist/core/auto-compaction.d.ts +4 -0
  45. package/dist/core/auto-compaction.js +2 -2
  46. package/dist/core/auto-mode-directive.d.ts +29 -5
  47. package/dist/core/auto-mode-directive.js +38 -8
  48. package/dist/core/background-agent-store.d.ts +16 -3
  49. package/dist/core/checkpoint-requirements.d.ts +19 -1
  50. package/dist/core/checkpoint-requirements.js +5 -1
  51. package/dist/core/checkpoint-store.d.ts +85 -23
  52. package/dist/core/checkpoint-store.js +31 -9
  53. package/dist/core/child-clamp-seats.d.ts +29 -0
  54. package/dist/core/child-clamp-seats.js +56 -1
  55. package/dist/core/compliance.d.ts +2 -2
  56. package/dist/core/compliance.js +1 -1
  57. package/dist/core/effective-path-target.d.ts +8 -2
  58. package/dist/core/effective-path-target.js +8 -3
  59. package/dist/core/engine-notice.d.ts +99 -9
  60. package/dist/core/engine-notice.js +19 -5
  61. package/dist/core/fs-write-gate-policy.d.ts +4 -2
  62. package/dist/core/fs-write-gate-policy.js +7 -3
  63. package/dist/core/gate-fold.js +7 -4
  64. package/dist/core/gate-lanes.js +19 -6
  65. package/dist/core/gate-outcome.d.ts +32 -3
  66. package/dist/core/gate-outcome.js +19 -1
  67. package/dist/core/git-worktree-env.d.ts +53 -11
  68. package/dist/core/git-worktree-env.js +96 -12
  69. package/dist/core/governance-codes.d.ts +9 -1
  70. package/dist/core/governance-codes.js +13 -0
  71. package/dist/core/hooks.d.ts +35 -4
  72. package/dist/core/hooks.js +17 -11
  73. package/dist/core/human-input-projection.d.ts +1 -0
  74. package/dist/core/human-input-projection.js +3 -0
  75. package/dist/core/image-admission.d.ts +6 -5
  76. package/dist/core/image-admission.js +18 -14
  77. package/dist/core/locked-config.d.ts +20 -3
  78. package/dist/core/locked-config.js +40 -3
  79. package/dist/core/mailbox-store.d.ts +45 -1
  80. package/dist/core/mailbox-store.js +53 -9
  81. package/dist/core/mcp-call-meta.d.ts +66 -0
  82. package/dist/core/mcp-call-meta.js +103 -0
  83. package/dist/core/mcp-connection-pool.d.ts +3 -1
  84. package/dist/core/mcp-connection-pool.js +3 -1
  85. package/dist/core/mcp-failure.d.ts +117 -15
  86. package/dist/core/mcp-failure.js +71 -3
  87. package/dist/core/mcp-probe.d.ts +4 -0
  88. package/dist/core/mcp-probe.js +1 -1
  89. package/dist/core/mcp-server-link.d.ts +27 -3
  90. package/dist/core/mcp-server-link.js +25 -1
  91. package/dist/core/mcp-server-spec.d.ts +46 -18
  92. package/dist/core/mcp-server-spec.js +1 -18
  93. package/dist/core/mcp.d.ts +16 -20
  94. package/dist/core/mcp.js +112 -55
  95. package/dist/core/memory-engine/consolidation-driver.d.ts +2 -4
  96. package/dist/core/memory-engine/consolidation-driver.js +3 -3
  97. package/dist/core/memory-engine/consolidation.d.ts +4 -0
  98. package/dist/core/memory-engine/consolidation.js +1 -0
  99. package/dist/core/memory-engine/delegation-settlement.js +5 -12
  100. package/dist/core/memory-engine/distiller.js +2 -2
  101. package/dist/core/memory-engine/dual-root.d.ts +50 -1
  102. package/dist/core/memory-engine/dual-root.js +44 -1
  103. package/dist/core/memory-engine/engine.d.ts +67 -14
  104. package/dist/core/memory-engine/engine.js +384 -212
  105. package/dist/core/memory-engine/export-bundle.d.ts +23 -0
  106. package/dist/core/memory-engine/export-bundle.js +23 -4
  107. package/dist/core/memory-engine/file-backend.d.ts +128 -55
  108. package/dist/core/memory-engine/file-backend.js +290 -117
  109. package/dist/core/memory-engine/index.d.ts +1 -1
  110. package/dist/core/memory-engine/layout.d.ts +59 -11
  111. package/dist/core/memory-engine/layout.js +190 -40
  112. package/dist/core/memory-engine/memory-backend-contract.d.ts +1 -1
  113. package/dist/core/memory-engine/memory-backend-contract.js +39 -2
  114. package/dist/core/memory-engine/scope-contract.d.ts +45 -4
  115. package/dist/core/memory-engine/scope-contract.js +80 -11
  116. package/dist/core/memory-engine/sync-client.d.ts +9 -1
  117. package/dist/core/memory-engine/sync-client.js +31 -8
  118. package/dist/core/memory-engine/sync.d.ts +5 -0
  119. package/dist/core/memory-engine/types.d.ts +6 -0
  120. package/dist/core/mode-policy.d.ts +8 -5
  121. package/dist/core/mode-policy.js +5 -4
  122. package/dist/core/mods/classic-events.d.ts +5 -1
  123. package/dist/core/mods/host.js +1 -1
  124. package/dist/core/mods/kernel/dispatch.d.ts +3 -0
  125. package/dist/core/mods/kernel/dispatch.js +12 -9
  126. package/dist/core/mods/kernel/events.d.ts +6 -1
  127. package/dist/core/mods/kernel/events.js +2 -2
  128. package/dist/core/mods/kernel/registration.d.ts +9 -1
  129. package/dist/core/mods/kernel/registration.js +3 -0
  130. package/dist/core/mods/kernel/site-rules.d.ts +3 -0
  131. package/dist/core/mods/kernel/site-rules.js +10 -0
  132. package/dist/core/mods/package.d.ts +23 -0
  133. package/dist/core/mods/package.js +118 -0
  134. package/dist/core/mods/stations.d.ts +33 -12
  135. package/dist/core/mods/stations.js +45 -11
  136. package/dist/core/mods/tool-call.d.ts +5 -1
  137. package/dist/core/mods/tool-call.js +13 -4
  138. package/dist/core/parent-spec-seat.d.ts +8 -3
  139. package/dist/core/parent-spec-seat.js +2 -0
  140. package/dist/core/park-selfcheck.js +6 -0
  141. package/dist/core/path-guard-rows.d.ts +20 -0
  142. package/dist/core/path-guard-rows.js +11 -0
  143. package/dist/core/peer-seat.d.ts +248 -0
  144. package/dist/core/peer-seat.js +439 -0
  145. package/dist/core/permission-rule-consent.js +10 -4
  146. package/dist/core/permission-rule-model.d.ts +16 -0
  147. package/dist/core/permission-rule-model.js +1 -1
  148. package/dist/core/present-plan-tool.d.ts +20 -3
  149. package/dist/core/present-plan-tool.js +48 -4
  150. package/dist/core/protocol-http-auth.d.ts +40 -29
  151. package/dist/core/protocol-http-auth.js +30 -32
  152. package/dist/core/redaction-marks.d.ts +16 -0
  153. package/dist/core/redaction-marks.js +16 -0
  154. package/dist/core/redaction-passes.js +8 -9
  155. package/dist/core/resume-startup-cause.js +1 -0
  156. package/dist/core/retention.d.ts +41 -15
  157. package/dist/core/retention.js +59 -12
  158. package/dist/core/rewrite-rejudge.d.ts +38 -0
  159. package/dist/core/rewrite-rejudge.js +42 -2
  160. package/dist/core/roles.d.ts +34 -2
  161. package/dist/core/roles.js +43 -4
  162. package/dist/core/run-origin.d.ts +40 -0
  163. package/dist/core/run-origin.js +37 -0
  164. package/dist/core/runner/advertised-writable-dirs.d.ts +57 -38
  165. package/dist/core/runner/advertised-writable-dirs.js +126 -0
  166. package/dist/core/runner/announce-once-ledger.d.ts +5 -4
  167. package/dist/core/runner/announce-once-ledger.js +4 -2
  168. package/dist/core/runner/call-hook-stations.js +2 -2
  169. package/dist/core/runner/compaction-restate.d.ts +15 -6
  170. package/dist/core/runner/compaction-restate.js +28 -2
  171. package/dist/core/runner/contracts.d.ts +33 -21
  172. package/dist/core/runner/credential-origin-seat.js +4 -3
  173. package/dist/core/runner/cwd-alignment-probe.d.ts +20 -0
  174. package/dist/core/runner/cwd-alignment-probe.js +21 -0
  175. package/dist/core/runner/decide-continuation.d.ts +2 -2
  176. package/dist/core/runner/gate-exit.d.ts +30 -8
  177. package/dist/core/runner/gate-exit.js +15 -8
  178. package/dist/core/runner/image-removed-seat.d.ts +12 -0
  179. package/dist/core/runner/image-removed-seat.js +19 -0
  180. package/dist/core/runner/inline-image.js +1 -1
  181. package/dist/core/runner/memory-consolidation-driver.js +3 -3
  182. package/dist/core/runner/park-commit.d.ts +1 -1
  183. package/dist/core/runner/park-commit.js +3 -0
  184. package/dist/core/runner/prepare-ask-lane.d.ts +1 -1
  185. package/dist/core/runner/prepare-ask-lane.js +2 -1
  186. package/dist/core/runner/prepare-boundary-parks.js +2 -2
  187. package/dist/core/runner/prepare-caps-and-workflow.d.ts +5 -5
  188. package/dist/core/runner/prepare-caps-and-workflow.js +3 -1
  189. package/dist/core/runner/prepare-config-doors.d.ts +8 -5
  190. package/dist/core/runner/prepare-config-doors.js +14 -10
  191. package/dist/core/runner/prepare-context-lane.js +2 -0
  192. package/dist/core/runner/prepare-delegation-surface.d.ts +8 -0
  193. package/dist/core/runner/prepare-delegation-surface.js +16 -18
  194. package/dist/core/runner/prepare-gate-stations.js +1 -1
  195. package/dist/core/runner/prepare-hands-readface.d.ts +11 -3
  196. package/dist/core/runner/prepare-hands-readface.js +9 -1
  197. package/dist/core/runner/prepare-inherited-gate.d.ts +1 -3
  198. package/dist/core/runner/prepare-inherited-gate.js +14 -27
  199. package/dist/core/runner/prepare-memory.d.ts +3 -0
  200. package/dist/core/runner/prepare-memory.js +26 -37
  201. package/dist/core/runner/prepare-park-ask.d.ts +1 -1
  202. package/dist/core/runner/prepare-park-ask.js +2 -1
  203. package/dist/core/runner/prepare-policy-chain.d.ts +7 -7
  204. package/dist/core/runner/prepare-policy-chain.js +18 -15
  205. package/dist/core/runner/prepare-project-context.d.ts +2 -2
  206. package/dist/core/runner/prepare-project-context.js +2 -2
  207. package/dist/core/runner/prepare-prompt-inputs.d.ts +1 -1
  208. package/dist/core/runner/prepare-prompt-inputs.js +8 -19
  209. package/dist/core/runner/prepare-protocol-tools.d.ts +4 -2
  210. package/dist/core/runner/prepare-protocol-tools.js +11 -3
  211. package/dist/core/runner/prepare-run-refs.d.ts +2 -3
  212. package/dist/core/runner/prepare-run-refs.js +4 -1
  213. package/dist/core/runner/prepare-suspend-saga.d.ts +2 -0
  214. package/dist/core/runner/prepare-suspend-saga.js +2 -1
  215. package/dist/core/runner/prepare-task.js +28 -13
  216. package/dist/core/runner/prepare-wiring-manifest.d.ts +2 -1
  217. package/dist/core/runner/prepare-wiring-manifest.js +4 -3
  218. package/dist/core/runner/prepare-workspace-restore.d.ts +3 -0
  219. package/dist/core/runner/prepare-workspace-restore.js +4 -4
  220. package/dist/core/runner/reply-pricing.d.ts +30 -0
  221. package/dist/core/runner/reply-pricing.js +19 -0
  222. package/dist/core/runner/resume-admission.js +5 -3
  223. package/dist/core/runner/resume-apply.js +6 -1
  224. package/dist/core/runner/resume-checkpoint-screen.js +2 -0
  225. package/dist/core/runner/resume-policy-outcome.js +5 -5
  226. package/dist/core/runner/role-seat-defaulted.d.ts +44 -0
  227. package/dist/core/runner/role-seat-defaulted.js +40 -0
  228. package/dist/core/runner/run-brain-sinks.js +2 -0
  229. package/dist/core/runner/run-harness-handlers.d.ts +3 -4
  230. package/dist/core/runner/run-harness-handlers.js +1 -8
  231. package/dist/core/runner/run-identity-wiring.d.ts +2 -5
  232. package/dist/core/runner/run-identity-wiring.js +6 -4
  233. package/dist/core/runner/run-leg.d.ts +2 -0
  234. package/dist/core/runner/run-leg.js +42 -29
  235. package/dist/core/runner/run-notification-lane.js +3 -0
  236. package/dist/core/runner/run-stop-and-final-verify.js +2 -2
  237. package/dist/core/runner/run-terminal-adoption.d.ts +2 -5
  238. package/dist/core/runner/run-terminal-adoption.js +9 -3
  239. package/dist/core/runner/run-turn-boundary.js +77 -70
  240. package/dist/core/runner/runtask.d.ts +1 -1
  241. package/dist/core/runner/runtask.js +2 -2
  242. package/dist/core/runner/side-call-account.d.ts +1 -1
  243. package/dist/core/runner/side-call-account.js +3 -18
  244. package/dist/core/runner/sub-agent-deny-lists.d.ts +24 -0
  245. package/dist/core/runner/sub-agent-deny-lists.js +10 -0
  246. package/dist/core/runner/terminal-account.js +3 -3
  247. package/dist/core/runner/tool-end-body.js +2 -1
  248. package/dist/core/runner/tool-occurrence.d.ts +5 -2
  249. package/dist/core/runner/tool-occurrence.js +4 -3
  250. package/dist/core/runner/turn-attachments.d.ts +26 -22
  251. package/dist/core/runner/turn-attachments.js +24 -26
  252. package/dist/core/runner/write-protection-station.d.ts +8 -2
  253. package/dist/core/runner/write-protection-station.js +2 -0
  254. package/dist/core/runner-deps.d.ts +3 -3
  255. package/dist/core/secret-env.d.ts +32 -2
  256. package/dist/core/secret-env.js +65 -3
  257. package/dist/core/sensitive-path-policy.js +9 -10
  258. package/dist/core/session-log-transfer.d.ts +24 -0
  259. package/dist/core/session-log-transfer.js +166 -0
  260. package/dist/core/session-policy-store.d.ts +3 -1
  261. package/dist/core/session-policy-store.js +13 -9
  262. package/dist/core/session-store.d.ts +86 -24
  263. package/dist/core/session-store.js +162 -24
  264. package/dist/core/session.d.ts +92 -1
  265. package/dist/core/shell-read-silence.js +1 -0
  266. package/dist/core/side-query.d.ts +11 -1
  267. package/dist/core/side-query.js +9 -0
  268. package/dist/core/skill-grant-binding.d.ts +31 -2
  269. package/dist/core/skill-grant-binding.js +31 -1
  270. package/dist/core/skill-grant.d.ts +8 -5
  271. package/dist/core/skill-grant.js +6 -6
  272. package/dist/core/steer-replay.d.ts +4 -2
  273. package/dist/core/steer-replay.js +2 -1
  274. package/dist/core/store-contracts/background-agent-store-contract.js +27 -0
  275. package/dist/core/store-contracts/checkpoint-store-contract.js +20 -2
  276. package/dist/core/store-contracts/mailbox-store-contract.js +31 -1
  277. package/dist/core/store-contracts/session-repo-contract.js +112 -5
  278. package/dist/core/store-contracts/session-store-contract.d.ts +4 -1
  279. package/dist/core/store-contracts/session-store-contract.js +236 -2
  280. package/dist/core/synthetic-read-verdict.js +2 -1
  281. package/dist/core/task-event.d.ts +92 -8
  282. package/dist/core/task-notification.js +16 -10
  283. package/dist/core/task-registry-agent.js +1 -0
  284. package/dist/core/task-registry-shared.d.ts +7 -1
  285. package/dist/core/task-spec.d.ts +49 -1
  286. package/dist/core/task-stream.d.ts +2 -1
  287. package/dist/core/terminal-cause.d.ts +11 -1
  288. package/dist/core/tool-catalog-entries.js +1 -0
  289. package/dist/core/tool-check-reading.d.ts +1 -0
  290. package/dist/core/tool-check-reading.js +3 -3
  291. package/dist/core/tool-policy.d.ts +16 -0
  292. package/dist/core/tool-result-store.d.ts +17 -10
  293. package/dist/core/tool-result-store.js +3 -1
  294. package/dist/core/tool-roster.d.ts +112 -5
  295. package/dist/core/tool-roster.js +42 -1
  296. package/dist/core/tool-spec.d.ts +3 -1
  297. package/dist/core/types.d.ts +3 -3
  298. package/dist/core/types.js +1 -1
  299. package/dist/core/untrusted-egress.d.ts +0 -2
  300. package/dist/core/untrusted-egress.js +10 -14
  301. package/dist/core/user-attachment.js +1 -1
  302. package/dist/core/wiring-manifest.d.ts +18 -6
  303. package/dist/core/wiring-manifest.js +4 -3
  304. package/dist/core/workspace-snapshot.d.ts +44 -0
  305. package/dist/core/workspace-snapshot.js +34 -0
  306. package/dist/core/write-protect.d.ts +43 -3
  307. package/dist/core/write-protect.js +43 -16
  308. package/dist/engine/compaction/compaction.js +29 -3
  309. package/dist/engine/execution-env/node-execution-env.d.ts +4 -3
  310. package/dist/engine/execution-env/node-execution-env.js +24 -23
  311. package/dist/engine/execution-env/symlink-chain.d.ts +7 -5
  312. package/dist/engine/harness/agent-harness.d.ts +30 -2
  313. package/dist/engine/harness/agent-harness.js +43 -12
  314. package/dist/engine/harness/messages.d.ts +3 -1
  315. package/dist/engine/harness/messages.js +3 -2
  316. package/dist/engine/harness/types.d.ts +56 -7
  317. package/dist/engine/harness/types.js +5 -1
  318. package/dist/engine/llm/rejected-images.d.ts +46 -0
  319. package/dist/engine/llm/rejected-images.js +54 -0
  320. package/dist/engine/llm/tool-turns.d.ts +2 -1
  321. package/dist/engine/llm/types.d.ts +30 -10
  322. package/dist/engine/llm/types.js +1 -1
  323. package/dist/engine/loop/agent-loop.d.ts +8 -0
  324. package/dist/engine/loop/agent-loop.js +52 -15
  325. package/dist/engine/loop/types.d.ts +3 -1
  326. package/dist/engine/session/import-validate.js +3 -0
  327. package/dist/engine/session/memory-repo.d.ts +17 -9
  328. package/dist/engine/session/memory-repo.js +44 -34
  329. package/dist/engine/session/path-to-root.d.ts +38 -0
  330. package/dist/engine/session/path-to-root.js +39 -0
  331. package/dist/engine/session/repo-utils.d.ts +22 -4
  332. package/dist/engine/session/repo-utils.js +49 -1
  333. package/dist/engine/session/storage-base.d.ts +10 -1
  334. package/dist/engine/session/storage-base.js +11 -22
  335. package/dist/index.d.ts +29 -16
  336. package/dist/index.js +21 -11
  337. package/dist/internal/harness-types.d.ts +2 -2
  338. package/dist/internal/harness.d.ts +3 -2
  339. package/dist/internal/harness.js +2 -2
  340. package/dist/internal/llm.d.ts +1 -0
  341. package/dist/orchestration/workflow-observe.d.ts +17 -1
  342. package/dist/orchestration/workflow-observe.js +20 -0
  343. package/dist/orchestration/workflow-types.d.ts +32 -7
  344. package/dist/orchestration/workflow.js +739 -489
  345. package/dist/shell/counting-pass.d.ts +50 -0
  346. package/dist/shell/counting-pass.js +502 -0
  347. package/dist/shell/lex.d.ts +4 -2
  348. package/dist/shell/lex.js +93 -34
  349. package/dist/shell/shell-words.d.ts +1 -1
  350. package/dist/shell/shell-words.js +7 -6
  351. package/dist/stores/file/index.d.ts +4 -1
  352. package/dist/stores/file/index.js +4 -1
  353. package/dist/stores/file/mailbox-store.js +6 -10
  354. package/dist/stores/file/session-store.d.ts +15 -8
  355. package/dist/stores/file/session-store.js +28 -13
  356. package/dist/tools/fs/fs-bash.d.ts +6 -0
  357. package/dist/tools/fs/fs-bash.js +6 -3
  358. package/dist/tools/fs/fs-write.d.ts +6 -3
  359. package/dist/tools/fs/fs-write.js +8 -7
  360. package/dist/tools/fs/index.d.ts +3 -0
  361. package/dist/tools/fs/index.js +7 -3
  362. package/dist/tools/fs/program-read-model.d.ts +13 -0
  363. package/dist/tools/fs/program-read-model.js +15 -0
  364. package/dist/tools/fs/program-read-model.rows.js +1 -1
  365. package/dist/tools/fs/read-deny.d.ts +13 -10
  366. package/dist/tools/fs/read-deny.js +25 -5
  367. package/dist/tools/fs/read-floor.d.ts +19 -0
  368. package/dist/tools/fs/read-floor.js +23 -0
  369. package/dist/tools/fs/safety.js +40 -8
  370. package/dist/tools/fs/search.js +6 -24
  371. package/dist/tools/fs/shell-read-check.d.ts +9 -2
  372. package/dist/tools/fs/shell-read-check.js +61 -16
  373. package/dist/tools/fs/shell-read-establish.js +2 -1
  374. package/dist/tools/fs/shell-read-identity.js +1 -1
  375. package/dist/tools/fs/shell-read-judge.d.ts +26 -9
  376. package/dist/tools/fs/shell-read-judge.js +10 -6
  377. package/dist/tools/fs/shell-read-plan.d.ts +6 -1
  378. package/dist/tools/fs/shell-read-plan.js +22 -15
  379. package/dist/tools/fs/shell-read-start.js +1 -0
  380. package/dist/tools/fs/shell-reentry-text.d.ts +15 -1
  381. package/dist/tools/fs/shell-reentry-text.js +25 -3
  382. package/dist/tools/monitor.d.ts +4 -0
  383. package/dist/tools/monitor.js +2 -0
  384. package/dist/tools/worktree.d.ts +42 -15
  385. package/dist/tools/worktree.js +60 -32
  386. package/package.json +5 -2
  387. package/test/export-surface.snapshot.json +149 -1
  388. package/wire-changes/core-stores-sql@7.58.0.json +29 -0
  389. package/wire-changes/core-stores-sql@7.59.0.json +29 -0
  390. package/wire-changes/core@7.58.0.json +2188 -0
  391. package/wire-changes/core@7.59.0.json +2459 -0
  392. package/wire-changes/mods-kernel@7.58.0.json +81 -0
  393. package/wire-changes/mods-kernel@7.59.0.json +29 -0
  394. package/wire-changes/primitives@7.58.0.json +29 -0
  395. package/wire-changes/primitives@7.59.0.json +29 -0
  396. package/dist/primitives/credential-ref.d.ts +0 -89
  397. package/dist/primitives/credential-ref.js +0 -125
  398. package/dist/primitives/index.d.ts +0 -2
  399. package/dist/primitives/index.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,1157 @@
1
+ ## 7.59.0 — 2026-10-27
2
+
3
+ ### A model call waiting on a gateway gives up within 599 s however large the request, and a host that slept through a wait reconnects at the first second after waking — `sleptMs` on the reconnect frame, `waitSegment` on the wait frame (#2870; behavior narrowing: the first-byte window's upload allowance is capped; hard-breaking: none; closed sets: one new, `BrainStatus.waitSegment`; exports: none; members: +2 optional on `BrainStatus` / the `status` event) (@cli @server @client-core)
4
+
5
+ - **Before.** The first-byte window was `knob + 1 s per 32 KiB of body` with no bound but the timer ceiling: a 40 MB request (a context full of screenshots) armed 300 s + ~1 280 s and its retry 600 s + ~1 280 s — about 26 minutes of silence before the first retry. And no wait looked at the wall clock: a host that slept (a laptop closed over lunch) woke up still waiting on the connection the sleep took, until a TCP error happened to arrive or the window armed before the sleep ran out.
6
+ - **Now.** The upload allowance grows a window up to `FIRST_BYTE_WINDOW_CAP_MS` = 599 000 and no further (40 MB: 599 000, retry 600 000; 2 KB unchanged at 301 000; a knob already at or above the cap is the window as set). While any of the three engine waits is armed — response headers, first token, the silence between deltas — the wall clock is read once a second; a gap over five seconds is counted as slept, and at the first reading where a wait's sleep exceeds half its window the attempt ends and is re-sent on a fresh connection (shared retry budget; in the stream, the mid-stream tiers), announced as `reconnecting` / `errClass: "stall"` with `detail: "the host was suspended for <s>s during the <…> wait, reconnecting on a fresh connection"`.
7
+ - **Consumers.** wire +2, additive and optional: `sleptMs` — present exactly on a retry-wait frame for an attempt a host suspend ended (absent on a deadline's stall); `waitSegment` — present on every `waiting_first_token` frame (`response_headers` | `first_token`), absent on every other phase. @cli: render the wake line off `sleptMs` and the wait row's segment off `waitSegment`; @server / @client-core: project both members on the `status` face.
8
+ - **Pins.** `test/backlog2870-first-byte-sleep.test.ts` (the cap pure and at the call: 40 MB cut at 599 s, 2 KB at 301 s; a 15-minute suspend in each of the three waits ⇒ the frame within 1 s of waking and the new request within 1 s of the frame, text already streamed kept as incomplete; a deadline that runs before the next reading names the suspend; half-window threshold from both sides (200 s / 100 s of 301 s); five-second gaps never add up to a suspend; both members on the task stream's `status` event). KL-1121e retired; KL-2870-a (a forward wall-clock step, or an event loop blocked for more than five seconds at a time, reads as a suspend once it adds up past half the window: one reconnect).
9
+
10
+ ### An MCP server the user must authorize is one failure word, `unauthorized`, with one authorization fact that every face reads — the status record, the wiring manifest, a refused call's error and `tool_end`, a `mcp.authorization_required` notice, and the model's needs-authorization line (#2295, slice S2 of the MCP credential seat, design/1494; hard-breaking, open to veto; closed sets: `MCP_FAILURE_KINDS` +1 (`unauthorized`), `ENGINE_NOTICE_CODES` +1 (`mcp.authorization_required`), new `MCP_AUTHORIZATION_REASONS`; exports: +1 root value, +2 root types) (@server @cli @client-core @connectors)
11
+
12
+ - **Before.** A 401 from an MCP server's HTTP endpoint was `errorCode: "http_status"` with `httpStatus: 401` — read like a gateway outage, with the endpoint's `WWW-Authenticate` challenge dropped — and a refused call told the model that the endpoint "answered 401 instead of an MCP response" and that the request "may or may not have executed". A 403 whose challenge said `insufficient_scope` was the same status word. A deployment seat answering `unauthorized` (#2294) was `credential_unavailable`, the deployment's-fault word. The model was never told a server needed authorization: the needs-authorization arm of the reference's tool-delta notice had no state to read.
13
+ - **Now.** One word, `unauthorized`, carries `authorization: { reason, authorizeUrl?, resourceMetadataUrl? }` (`McpAuthorization`; `reason` ∈ `MCP_AUTHORIZATION_REASONS`): `rejected` — the endpoint answered 401 and the seat's re-ask did not answer a credential that passed (`delivered: "unknown"`); `scope` — a 403 with `Bearer error="insufficient_scope"` (the seat is not asked again, nothing is sent again; `"unknown"`); `none` — the seat answered `unauthorized` (nothing sent; `"no"`, no liveness observation). A 403 without that challenge stays `http_status`. `authorizeUrl` comes only from the seat — its answer to the send or to the re-ask after a 401 — and must be an absolute http(s) URL (≤ 2048, no control character) or the answer is refused (`credential_unavailable`); `resourceMetadataUrl` comes only from the endpoint's challenge, kept under the same URL law as the parser serializes it, and is never rendered to the model. The engine's one HTTP fetch reads the challenge off the 401 / scope-403 response and raises the refusal itself (the SDK's own error keeps no header). The faces: the status record (`MaterializedMcp.statuses`, a re-dial's `status`) and the manifest's `mcp[]` row carry `authorization` (no `httpStatus`), through the record's one projection; a refused call's `details.authorization` and its `tool_end.errorCode`; the notice `mcp.authorization_required` (user audience; `detail: { server, reason, authorizeUrl?, principal?, sessionId, runId }`) once per (leg, server); the `mcp_unavailable` frame on the leg's first request lists a server whose dial failed `unauthorized` in its own needs-authorization arm — the reference's `needsAuthMcpServers` sentence (CC 2.1.309, minted `cli309.js:265582`, read and worded `cli309.js:267398-267401`), always its cannot-start-the-flow form, `<where>` = the seat's URL or the deployment's connector settings, "Do not ask the user for authorization codes, tokens, or callback URLs" — and never in the failed-to-connect arm; a refused call's line says the user needs to authorize the server (and where), with the delivery tail its verdict owes. A refusal is announced when it is the request's answer: a repeat-safe call refused 401 and sent once more on a renewed credential announces only if that second send is refused too; a write-class 401 after which the seat answered another credential is announced, and its line says a new call carries that credential and that only its refusal is the user's (a seat that answers a fresh assertion on every ask must still reach the user). Nothing parks on it and a resume replays nothing (C-R725 加注 4: a deployment that waits keys on the notice).
14
+ - **Hard-breaking (open to veto) — sentence 3 of design/1494 §8.3.** *What changed:* an MCP 401, and a 403 with an `insufficient_scope` challenge, are no longer `errorCode: "http_status"` + `httpStatus`; they are `errorCode: "unauthorized"` + `authorization` on every face (status, manifest, error `details`, `tool_end`), and a seat's `unauthorized` answer is no longer `credential_unavailable`; a write-class call answered 401 is still sent again by no layer (#2294). *Who is hurt:* every consumer that branches on `errorCode === "http_status" && httpStatus === 401` (or 403) — @server's MCP status face, @client-core's `engineErrorCodes.ts` 401 classification, @cli's rendering — and every `switch` over `MCP_FAILURE_KINDS` (one more word; the "previously only" 401 reading moved to it). *How to migrate:* read `errorCode === "unauthorized"` and `authorization.reason`; send the user to `authorization.authorizeUrl` when present (your seat's own URL), else to your connector settings; treat `resourceMetadataUrl` as the remote's untrusted claim; key a wait-for-authorization flow on `mcp.authorization_required`.
15
+ - **Closed sets.** `MCP_FAILURE_KINDS` +1 `unauthorized` (its delivery and liveness rows read the status class's: `"unknown"`, kept at the dial); a refusal by the engine's own seat is `"no"` / no observation by one rule over both seat words. `ENGINE_NOTICE_CODES` +1 `mcp.authorization_required` (audience `user`, minter `engine`). New `MCP_AUTHORIZATION_REASONS` (`rejected` / `scope` / `none`). Consumers that pin these sets closed: @server (notice whitelist, MCP status projection), @client-core, @cli.
16
+ - **Consumers.** @server: project `unauthorized` + `authorization` on the MCP status face; forward `mcp.authorization_required` to the user (route by `sessionId`; `authorizeUrl` is your seat's) and, for a managed wait, key the authorization callback on it — no park gate exists for it; your `peerSeat` answering `{ kind: "unauthorized", authorizeUrl }` (to a send or to the `rejected` re-ask) is how the user is sent to your authorization page. @client-core: `engineErrorCodes.ts` reads `unauthorized`; your local seat's `unauthorized` answer is the same. @cli: render `unauthorized` and the notice. @connectors: answer 401 with `WWW-Authenticate: Bearer resource_metadata="…"` per RFC 9728 and it rides `resourceMetadataUrl`; a scope shortfall as 403 `error="insufficient_scope"`.
17
+ - **Exports.** +1 root value `MCP_AUTHORIZATION_REASONS`, +2 root types `McpAuthorization` / `McpAuthorizationReason`; `McpServerStatus` / `WiringManifestMcpEntry` +`authorization`; `McpFailure` +`authorization`; `materializeMcpTools` +1 trailing parameter (`onAuthorizationRequired`).
18
+ - **Pins.** `test/backlog2295-unauthorized.test.ts` (W: 401 not renewed ⇒ rejected / unknown with the challenge's resource_metadata and the user's line; 403 scope ⇒ scope, no re-ask, not sent again; 403 without the challenge stays a status; the seat's `unauthorized` ⇒ none / no, nothing sent; the re-ask's URL on a 401's record; a renewed write 401 ⇒ the same word, the "a new call carries it; if refused too, the user" line, announced; a re-send that passes announces nothing; a seat renewing on every ask still announces. T: the challenge never supplies `authorizeUrl`, its resource_metadata is percent-encoded, a non-http(s) one dropped; a seat URL off the URL law refused loudly; a Bearer challenge after another scheme is read, `not_error=` and an `error=` inside a quoted description are not its error; markup in a seat URL percent-encoded, user-info refused; a control character in resource_metadata dropped. F: the status record and the announcer one fact; the seat's dial refusal no observation; through the Runner the manifest row, the needs-authorization arm with the server in it only, one notice; two refused calls ⇒ two frames, one notice; a listing refresh refused for scope announces; a changed authorize URL is told again on the session's next run, the same one is not; the receipt files the told pair only; the closed sets. P: a durable leg that parked after a refused call does not send it again on resume — a control, green before and after). Re-pinned to the new word: `backlog2294-peer-seat` (R2 / R3 / R4; F's `unauthorized` row moved here), `backlog562-manifest-mcp-face`, `backlog610-connect-delivery`, `backlog874-mcp-liveness`, `mcp-failure-record`.
19
+ - **Known limits.** A write-class call refused 401 once with a credential the seat then renewed still tells the user to authorize (it is the call's answer; a seat that renews on every ask must still reach the user) — KL-2295-a; a 403 scope refusal never re-asks the seat, so it carries no `authorizeUrl` — KL-2295-b; an unauthorized dial still raises the operator's `mcp.server_unavailable`, and A2A peers have no `unauthorized` word — KL-2295-c.
20
+
21
+ ### A frame's delivery record advances on the receipt of the message that carried it, never at collection — every turn-boundary attachment and the limit-approach notice (#565, design/565 slice S1, ruled C-R882; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none; members: none) (@server @cli @test)
22
+
23
+ - **Before.** The turn boundary collects its attachment bundle, then awaits the postToolBatch dispatch and the instructions probe, then issues one steer that the next request drains. Several frames recorded "delivered" at collection: the `mcp_dropped_tools` batch (its entries left the lane and their once-per-session digests joined the session's announced record), the post-compaction `background_tasks` latch, the `tools_delta` pending lists, the `instructions_change` / `workflow_size_guideline_change` announced values, the `changed_files` surfaced marks, the todo / task / tool-search reminder windows and the limit-approach threshold. Every bundled frame's `steering_injected` echo and `stats.mechanisms.attachmentsInjected` count went out at collection too. A stop landing after the collection (`TaskStream.halt()` or a tool's stop-after-turn, inside the postToolBatch dispatch or the probe) still let the steer be issued, and the loop exited before draining it: the session never heard the dropped MCP tool again (its digest was recorded), and the background-task restatement vanished without its settle-time `compaction.announce_dropped` disclosure.
24
+ - **Now.** One rule: collection records nothing; each frame registers a receipt on the steer that carries it, and the run loop's `message_end` walk settles it when the drained steer is in the transcript — the frame's echo, its count and its record step run there (the rule the listings, the date and the leg's first-request frames already followed). A frame on its way is not collected again. A steer that never drains, or is refused, records nothing: the frame is said again at the next quiet boundary, or the next run on the session (`mcp_dropped_tools`), or — the background-task latch — it is still owed when the run settles and the loss is disclosed. A frame the bundle cap drops is due again at the next quiet boundary (it used to spend its reminder window or its latch). An empty background-task registry still consumes the latch at collection (nothing to deliver).
25
+ - **Open to veto — the echo.** `steering_injected` for a turn-boundary frame (and for `limit_approach`) is now emitted when the drained steer's message is committed — after that message's `message_committed`, at the next request — not at collection; a frame that never reached the transcript emits none, and `stats.mechanisms.attachmentsInjected` counts delivered frames only. Who is hurt: a consumer that rendered the echo as "injected" at the boundary, or a test that expected an echo for an undelivered frame. Migrate: read the echo as delivered; order it after the message it rode.
26
+ - **Not in this slice (stated).** The `mcp_instructions` frame still records at collection (its told-ledger is written by asynchronous MCP lifecycle events and needs an in-flight state); a background-task restatement lost to an undrained steer is disclosed but not re-armed on the session's next run (the re-arm seed reads "an assistant message follows the compaction" as consumed); the LSP diagnostics drain and the memory announcement queue (drained at prepare into the system prompt) record before delivery. Each has its own design ticket.
27
+ - **Consumers.** @cli: the boundary lane's `steering_injected` rows arrive with the next request, not at the boundary; none for a frame a stop swept. @server: `announced_listing.advisories` (the dropped-tool digest arm) is written later — at the leg's exit after a delivered batch — and not at all for an undelivered one; the key shape is unchanged. @test: a halted boundary's frames are announced again by the next run.
28
+ - **Pins.** `test/backlog565-commit-on-receipt.test.ts` (real Runner: a halt inside the postToolBatch dispatch ⇒ the dropped-tool batch is not recorded and the next run announces it; a drained batch is recorded; the post-compaction restatement swept by the same halt is disclosed; a drained one is seen once; unit: the producers' record steps ride their frames, a cap-dropped frame hands nothing over, a clipped one keeps its step).
29
+
30
+ ### A parked approval covers the tool its roster row was, read whole: one classification of every roster member (identity / face / declaration / unbound), the declaration bound as one digest, a row that does not carry a whole tool member refused before the claim (#639 / #2345, C-R883; BREAKING — behavior narrowing, open to veto)
31
+
32
+ - **Before.** The tool member of a parked approval was a hand-picked subset of its roster row, and each member added later had its own reading of absence: a row with none of the four identity members bound the tool's NAME alone (a replacement wearing the name ran on resume); one with some of them reopened as a replacement after the claim; a path target without its resolution members was compared as `cwd` / `none` by a second statement of those defaults (a row parked before #635 by a tool that resolved against the root was read as a face it never had, and vetoed with "the face changed" after its approval was spent); the recorded mount site (`engineMounted`) was never compared; and the tool's declaration — its effect, egress, irreversibility, content origin, boundary legs, rule face, model gate (an MCP server's `destructiveHint` folds into `irreversibility`) — was not part of the approval: a tool re-declared between the park and the resume ran under the new declaration.
33
+ - **Now.** `ROSTER_APPROVAL_BINDING` classifies every member of `ToolRosterEntry` once (a new roster member is a compile error until it is classified; the judge's identity and face lists are fenced to it at compile time). Unbound, each with its reason: aliases, the server's declaring origin, the two value provenances no decision reads (`egressProvenance`, `contentOriginProvenance`), the card id, the wire schema's prose and the input keys (the schema's shape is identity), result storage and transcript handling, the preview / validator flags, loading, render hints. The park writes the identity (the four members and the mount site) and the face by value, and the declaration members as one digest, `pendingAction.declarationDigest` (`toolDeclarationDigestOf`, requirement word `tool_declaration`). `judgeApprovalObject` reads the tool member whole or not at all: at the claim station (now `["tool", "grants"]`) a row missing any member the park always writes (the four identity members, `family`, `declarationDigest`) is refused — `checkpoint.unsupported_version`, `detail.reason: "tool_identity_missing"`, the row pending, a deny is not judged by it (a member present in another shape — `engineMounted` not `true`, a slot that is not a record naming its `param` — is read as damage the same way; past the claim the same reading vetoes); with a whole member, another identity (the mount site included) reopens (`resume.tool_contract_mismatch`) and another face or declaration vetoes (`resume.target_moved`). A face is compared as it resolves, through the one reader of a slot's silences (`pathTargetResolutionOf`): a definition that spells its default base matches one that states none.
34
+ - **What changes / who is hurt / how to migrate.** (1) Every tool approval parked before 7.59.0 carries no declaration digest: an allow of it is refused before the claim — deny it so the model can re-issue the call and its new card is asked (a row that also predates the ask's origin, 7.5.x, refuses a deny too), finish it on a worker of the release that parked it, or expire it. (2) A deployment that writes its own `tool_approval` rows must mint the tool member as the park does (`ROSTER_APPROVAL_BINDING` / `toolDeclarationDigestOf`), or its rows bind no tool. (3) A tool re-declared after the approval (a caller axis; an MCP annotation the engine folds into an axis — `destructiveHint`, `openWorldHint`) no longer runs on that approval: the call is vetoed and the model may re-issue it. (4) Consumers listing `CheckpointErrorReason` gain `tool_identity_missing`; those listing the requirement words gain `tool_declaration` (a 7.58.x worker refuses a 7.59.0 approval row `version_newer`, pre-CAS, retryable on a newer worker).
35
+ - **Consumers.** @server: the row gains `pendingAction.declarationDigest` and the word `tool_declaration` (a store that drops the member fails `probeParkRoundTrip`, whose representative row now carries the whole tool member, and every such row reads `requirements_damaged`); pending approvals across the upgrade must be re-asked (three exits above); the reason closed set +1. @dgx: the same through the server's store. @cli / @client-core: the new veto sentence rides the existing `resume.target_moved`; the reason word +1 where the error-code tables list it.
36
+ - **Exports.** +3: `ROSTER_APPROVAL_BINDING`, `type RosterApprovalBinding`, `toolDeclarationDigestOf`. `APPROVAL_STATION_MEMBERS.claim` is `["tool", "grants"]`; `ApprovalObject.tool` is the whole member or `{ missing }`; `ApprovalTool`'s always-written members are required.
37
+ - **Pins.** `test/backlog639-parked-identity-face.test.ts` (real Runner: base-only face move vetoed; a row before the resolution members, a row with no identity and a replacement, a row with a lost member — each refused before the claim, pending, nothing ran; a deny settles; a caller tool re-declared irreversible and an MCP tool re-listed `destructiveHint` — vetoed, never run; the controls; the classification covers every roster member, the digest moves with each declaration member and with no unbound one, the mount site is identity, the face resolves its silences once, a member present in another shape is damage at every station).
38
+
39
+ ### A revived background agent runs under the restrictions it was born with — the durable row records the clamp table's projection of the child's spawn spec (`policyFloor`), and a cross-process revival folds it with the waker's own clamps; a row that states no floor is not revived (#887, design/887; behavior narrowing and security fix; hard-breaking, open to veto; closed sets: none; exports: none — one optional member `BackgroundAgentRecord.policyFloor`, one on `RegisterBackgroundAgentInput`) (@server @dgx)
40
+
41
+ - **Before.** A background child woken across processes (SendMessage's durable rung, or a host's parked-approval drive through `ctx.reviveClaim.parkedResume`) had its spec rebuilt from the WAKER's mount: every tighten-only seat of the clamp table — `handsReadOnly`, `interactiveTools`, `approvalReach`, both containment faces, the three add-only deny lists, `oneShot`, `memoryPersistenceCapable`, `memory.enabled`, `fileHistory`, `projectMemory`, `promptForm` — came from whoever woke it, and the row carried none of the spawning run's. A child spawned by a read-only parent and woken after a restart by its unclamped root wrote files. The in-process wake already folded the spawn snapshot with the waker's clamps; the two wakes followed two rules.
42
+ - **Now.** One rule for both wakes: a woken cycle runs under the table's fold of the floor it was born under and the waker's clamps — a restriction either side carries stands, add-only lists union, the waker can narrow and never widen. The registration that creates a row writes `policyFloor` (`{}` when nothing was clamped) and nothing rewrites it. `readClampFloor` (internal) is the one reader: a floor that is absent, not plain data, names a seat this build's table lacks, states a non-restricting value, or carries an entry its seat's law refuses is unreadable. A revived cycle's interaction posture is read under the folded clamps (a floor that brings the hard-headless clamp onto a cycle woken by an interactive caller, or by a host's bare drive that states no posture, runs it headless instead of tripping the posture door). A parked-resume refusal's receipt names its cause (`configuration`). "A clamp leaves nobody to ask" is one predicate (`clampsReachNoPerson`, internal) that `postureUnderClamps` and the revival read; the two other lanes that read `postureUnderClamps` (the in-process wake, the workflow lane) are unchanged — an absent posture under such a clamp still falls through to the deployment default there (a known gap, #2748: the workflow lane's spec is a journal key, so its fix is its own design).
43
+ - **Hard-breaking (open to veto).** *What changed:* a revival of a row without a readable `policyFloor` — rows written by 7.58.x and earlier, or by a host store that does not persist the member — is refused `revive.policy_floor_unreadable` instead of running under the waker's clamps: SendMessage refuses before its claim (the row is untouched, nothing is charged), the Agent tool's revive arm refuses before any allocation, and a parked-resume drive refuses before the consume and rolls its claim back (the approval stays pending). *Who is hurt:* a deployment with its own `BackgroundAgentStore` that maps columns by hand (server's SQL twin) — without a column for the member every revival is refused; rows in flight across the upgrade cannot be revived by the new engine. *How to migrate:* persist `policyFloor` verbatim (JSON; `{}` must read back as `{}`, absent as absent) and run the contract kit's new case; for in-flight rows, let them finish, start a new agent, or continue them on an older worker during a rolling deploy; a parked old row is expired.
44
+ - **Consumers.** @server: add the column to the SQL `BackgroundAgentStore` and its local twin; the contract kit's new case names a store that drops it; `revive.policy_floor_unreadable` is a new `details.error` on the SendMessage receipt and the Agent tool's not-started result. @dgx: a deployment store persists the member.
45
+ - **Not in this release.** The inherited gate chain (permission-mode ceiling, `shellGate`, ancestor rules and constraints) and the tool-selector ceiling of a cross-process revival still come from the waker (#2739).
46
+ - **Pins.** `test/backlog887-revive-policy-floor.test.ts` (the floor recorded at spawn, `{}` for an unclamped spawn; six tier-3 shapes over a real Runner — write hands with a real `Write`, `oneShot`, both faces, memory off, the add-only union, posture — and a second wake still held to the birth floor; the waker's own clamp lands and an unclamped floor tightens nothing (positive control: the probe observes a write); an old-shape row refused before the claim with the row untouched, the Agent arm's own refusal of a directly handed claim, a parked-resume drive's refusal with the claim rolled back; the reader's accepted shape and sixteen refusals, one read per accessor; `clampsReachNoPerson` row by row; a waker that states no posture on an interactive-default deployment); the store contract kit's round-trip case (each CAS on a floor-bearing row must land and keep the floor). Re-pinned: `agent-revive-tier3` (a hand-built row states its floor), `flaky-guard` (the new file's bounded effect poll declared). `gate:error-surface` `src/agents` 92 → 93 (the floor refusal names the agent like its sibling receipts).
47
+
48
+ ### A call an extension refused names that extension on the gate's record — `tool_end.gate.disposition.extension` (#2810), one reading for every hook-layer refusal
49
+
50
+ - **Before.** An extension's refusal at `tool.check` — and its failure, which the engine fails closed — told the model "denied by extension "<n>": <reason>" and recorded `{ kind: "denied", deniedBy: "hook" }`: the registration name lived in the sentence alone, so a card or an audit trail stripped it back out of prose. A `classic.PreToolUse` deny and a `tool.call` refusal had the same gap (the latter only on `answeredBy`).
51
+ - **Now.** The denied arm of `GateDisposition` gains `extension?: string`: the registration whose handler refused the call at the hook layer — its `deny` answer at `tool.check`, `classic.PreToolUse` or `tool.call`, or its failure. Present exactly when `deniedBy` is `hook` and the refusing handler's registration is known; absent beside every other layer word, beside an ask a person refused, and beside a `hook` refusal that names no registration (the engine's own failed raise, a cancel, the engine's refusal of a form an extension rewrote). The record is the gate's one mint: the `tool_end` frame, the `classic.PermissionDenied` observer and the durable row hold the same value. Invariant I12 screens it against one table (`DENIED_BY_MAY_NAME_EXTENSION`) the mint and the archive reading both read.
52
+ - **Consumers.** wire +1 (additive, present-iff the hook layer refused through a named registration): @cli the "denied by" line reads the member instead of the sentence; @server projects `gate` whole (no key to add); @client-core reads it where it renders a refusal. `answeredBy` (and `gate.disposition.extension`) names the handler whose run produced the answer — when a `.catch` hands back the very answer the run below it already produced, the producer below keeps the name (`src/core/mods/kernel/dispatch.ts:830`; before, the `.catch`'s handler was named); otherwise the `.catch`'s own handler is named, as before. A `tool.call` refusal carries both, the same name.
53
+ - **Exports.** none (a member of an exported type).
54
+ - **Pins.** `test/backlog2810-hook-layer-extension.test.ts` (a `tool.check` deny, a deny beside an allowing bystander, a throwing handler, a `classic.PreToolUse` deny and throw, a `tool.call` refusal, the approved edit's re-screen, a resumed leg's re-screen, the observer's record equal to the frame's; policy / ask-refused / allow carry none; I12 in both readings).
55
+
56
+ ### A call the loop refuses after its gate let it go is `notExecuted` — and keeps its `rewrite` (#2817; hard-breaking: two wire invariants reversed, open to veto; closed sets: none; exports: none) (@cli @client-core @server)
57
+
58
+ - **Before.** When an extension (or the policy, or an approver) replaced the arguments and the loop then refused the form the gate cleared — its re-validation, the tool's own input check, its re-reading of the bytes, a run aborted before the body — the frame was `isError` with no `notExecuted`: the body had not run and the frame did not say so.
59
+ - **Now.** The loop marks the end of such a call `notExecuted` on the same loop-authored channel a batch-halted sibling uses, and the runner projects it (frame and persisted row). The same mark covers a call the host's execution station (`tool.call`) settled without running the body. No member and no status word is added. `tool_end.rewrite` now stays beside the mark: it is dropped only on the engine's own evidence that the call was never let go or was answered in place. A call refused before any gate saw it (an unknown tool, arguments the model's own call got wrong) carries no mark.
60
+ - **Consumers.** `notExecuted` is now present on frames whose `gate.disposition` is `allowed` and `isError` is true (it was always present only beside a gate refusal or an answer in place): @cli @client-core read it as "the body did not run", never as "the gate refused"; the persisted row repeats it as `details.notExecuted`, so a reloaded transcript agrees. Such a call no longer arms the final-verification gate (`wroteThisRun`) and no longer enters the post-tool batch.
61
+ - **Hard-breaking, open to veto (@cli @client-core @server).** What changed: two invariants of the 7.58.0 wire are reversed — `tool_end.notExecuted` was present only beside a gate refusal, a halted batch, a reconcile close or an answer in place, and is now also present on a frame whose `gate.disposition` is `allowed` with `isError`; and `tool_end.rewrite` was present only on a frame that carried no `notExecuted` (the contract sentence 7.58.0 shipped with C-R922, `src/core/task-event.ts`), and now stands beside `notExecuted` on a call the loop refused after the gate let it go with other arguments. Who is hurt: a consumer that reads `notExecuted` as "the gate refused" (a card or audit line worded as a refusal, a replay guard that treats the mark as a gate verdict) or that infers whether `rewrite` is present from the mark's absence (a "the arguments were changed" line dropped whenever `notExecuted` is on). What to read instead: the two keys independently — `notExecuted` as "the body did not run", `gate.disposition` for who decided, `rewrite` for whether the gate replaced the arguments — and never infer one key from the other's absence.
62
+ - **Pins.** `test/backlog2817-loop-refusal-not-executed.test.ts` (a rewrite the schema refuses, a rewrite the tool's input check refuses — both with `rewrite` beside the mark; the row; controls: a body that runs and fails, a gate refusal, a pre-gate refusal, an answer in place; the loop's own end event for a gate that throws / blocks / is absent, a station that runs or does not run the body, a run aborted before the body).
63
+
64
+ ### A parked entry has one identity, the one its producer minted — a mailbox record carries an `id` and a store's `append` is a compare-and-set on it, the session park seat re-asks a store whose reply was lost instead of keeping a second copy, and a wake message under a parked steer's `inputId` is judged by the parked queue's own rule (#988, #2705; design/988, ruled C-R886; behavior change; hard-breaking, open to veto: the store contract gains the id obligation; closed sets: +2 mailbox store codes; exports: +8 root values, +1 type) (@server @dgx @cli @test)
65
+
66
+ - **Before.** When the session park seat's durable append was rejected, it read the rejection as "nothing was written" and parked the frame in process too. A store can commit and lose its reply, so the box then held the record AND the process held a copy under a different key (`task_notification:<child>:event:<seq>` beside `session.<id>`/box seq): the session's next run read the message twice — once as `<cross-session-message>`, once as an `<agent-message>` twin — and the worker's receipt said "parked in process … a restart of this process loses it" for a message the box held. A second seat (another process, or this one restarted) parking the same frame wrote a second record. A wake message sent under the `inputId` of a steer the row already held was delivered as a second instruction (identical) or delivered beside it (different), where `setPendingSteer` replays the first and refuses the second.
67
+ - **Now — one rule, two seats, one judge each.** An identical write under an identity the seat holds is a replay (one entry, one delivery); a different record under it is refused by name; it is never a second entry.
68
+ - `MailboxAppendMessage.id` / `MailboxMessage.id` (optional): the record's producer-minted identity, persisted and handed back on `claimLease`. While a box holds a record under that id, `append` answers through `judgeMailboxAppendById`: identical on `MAILBOX_REPLAY_FACETS` (`from`, `content`, `hopChain`, `peerMeta` — what the record says; `sentAt` is when a write happened) ⇒ the held `seq`, nothing written; any facet different ⇒ `mailbox.duplicate_record_id` naming the facets. A malformed id (not a 1–1024 character string) ⇒ `mailbox.invalid_record_id`, before any side effect. After the record is acked its id is free again: a box answers for what it holds. Both bundled backends run the judgment inside their write critical section; an absent id is a new record each time (unchanged).
69
+ - The park seat's two record forms (the peer-words `peer_message` record and the `engine_frame` record) carry the frame's key as `id`. A rejected append is disclosed once and asked again with the same record; only a second fault parks the frame in process (`parked`).
70
+ - The in-process receipt says what the seat knows: "this copy does not survive a restart of this process" (it no longer asserts that nothing else holds the message).
71
+ - The wake entrance reads `judgeParkedSteerRepeat`, the parked queue's identity judgment now shared with `appendPendingSteer` (which calls it; no change there): an identical repeat of a parked entry is that entry, delivered once; a different one is `steering.duplicate_input_id` (`detail.differs`) before the claim, the row pending and byte-identical.
72
+ - **Limits, stated.** A box answers for the records it HOLDS. Two paths still deliver one message twice (KL-969j, narrowed): the re-ask faults too while the first append had committed (the box and the process each hold it); and a consumer drains and acks the record between the first ask's commit and the re-ask (the re-ask then writes a new record) — a store whose rejection arrives a whole turn after its commit. A record the producer re-parks after it was consumed is a new record (at-least-once, unchanged). A different record under a held id is kept, not folded: the seat parks it in process (it is not lost, and the receipt says in process).
73
+ - **A replayed wake message is screened as the entry it replays.** When the wake message folds into the parked entry, the deployment's prompt screen runs once, on the parked entry's redelivery (post-claim), not on the wake message (pre-claim) — exactly what `setPendingSteer` of the same steer followed by a message-less wake does.
74
+ - **Hard-breaking (open to veto).**
75
+ - **The store contract gains the record-id obligation** — changed: every `MailboxStore` persists `id` and, inside the append's critical section, answers an id it holds through `judgeMailboxAppendById` (held seq / `mailbox.duplicate_record_id`) and refuses a malformed id with `mailbox.invalid_record_id`; who is hurt: a backend outside this package (@server's SQL store, @dgx if it ships one) — `mailboxStoreContract` has a new T1 case that is red until it does; migration: read the caller's record once with `readMailboxAppend` (it validates `peerMeta` and `id`), store the `id` column, constrain `(scope, handle, id)` among held rows, read the held rows in the append's transaction and call `judgeMailboxAppendById`.
76
+ - **The park seat re-asks** — changed: a rejected session-box append is appended again with the same record; who is hurt: a backend that has not met the obligation above writes a second record where today a second copy waited in process (the delivery count is the same, the twin moves into the box); migration: meet the obligation first.
77
+ - **A wake message under a parked `inputId`** — changed: identical ⇒ delivered once; different ⇒ `steering.duplicate_input_id` from `resume` before the claim; who is hurt: a host that resends a parked steer's id on a wake to deliver it again, or that branches on the wake's refusal codes; migration: a new instruction takes a new `inputId` (the `setPendingSteer` rule).
78
+ - **Exports.** +8 root values: `MAILBOX_INVALID_RECORD_ID_CODE`, `MAILBOX_DUPLICATE_RECORD_ID_CODE`, `MAILBOX_RECORD_ID_MAX_CHARS`, `MAILBOX_REPLAY_FACETS`, `readMailboxRecordId`, `readMailboxAppend` (one read of a caller's record: validated, detached — what a backend judges and stores), `judgeMailboxAppendById`, `judgeParkedSteerRepeat`; +1 type `MailboxReplayFacet`; `MailboxStoreErrorCode` +2 members. None removed.
79
+ - **Consumers.** @server: the SQL mailbox store implements the obligation (the kit case names it); the daemon's wake handler gets `steering.duplicate_input_id` from `resume` for a colliding wake message. @dgx: a store you ship runs the kit. @cli / @test: the `parked` receipt sentence changed; a wake that replays a parked steer delivers it once.
80
+ - **Pins.** `test/backlog988-park-idempotent.test.ts` — both bundled backends behind a store that loses the reply of a committed append: the seat answers `parked_durably` with one record under the frame's key and nothing in process (peer-words and engine-frame forms); a genuine fault parks in process with one disclosure; a second seat parking the same frame writes no second record; two frames keep two ids; the store's id judgment facet by facet, the malformed ids, the round trip and the acked-id-is-free cell; end to end over a real Runner per backend: the worker's receipt is durable and the leader's next run reads one cross-session frame and no `<agent-message>` twin; #2705 — replay delivered once, a different record refused pre-claim with the row untouched, a fresh id delivers both in order. `test/backlog969-main-park-seat.test.ts` re-pinned on the receipt sentence.
81
+
82
+ ### What a literal printer spells for a shell is read for what it refuses — `echo 'cat ~/.ssh/id_rsa' | bash` is refused by the deny table again; nothing that text reads clears the produced-text question (#1539 S1, design/1539, ruled C-R872; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: no new name — the exported type `ShellReadSegment` gains the optional member `printed`, and each entry of its `stdin` the optional member `printed`) (@server @cli @test)
83
+
84
+ - **Before.** Since 7.49.0 (#1505) a text a program produces for a shell — what a pipe carries, what a `<(…)` prints, a `< <(…)`
85
+ input — is not read at all: the call is one `unverifiable_shell_text` card (bypass-immune; a person may confirm it), whatever
86
+ the text says. 7.47.0 – 7.48.0 read a literal printer's text and refused `echo 'cat ~/.ssh/id_rsa' | bash` by the deny table;
87
+ that refusal became a card a person can approve. The literal reading was removed because it was used to EXEMPT harmless text,
88
+ and a redefined printer, a second writer on another descriptor or an inherited DEBUG trap made the stream differ from what the
89
+ printer's words say.
90
+ - **Now.** The read station also reads what a LITERAL PRINTER spells for the shell — one simple `echo` / `printf` of literal
91
+ words with no redirection (no backslash; a `printf` format with no `%` and no option), as the producer before a pipe, the body
92
+ of a `<(…)` script file or of a `< <(…)` input — and only a deny hit in it counts: that refuses the call; whatever else the
93
+ text finds, or fails to find, counts for nothing. The text is never known to be what the shell receives, so it is planned
94
+ beside the texts that run (`ShellReadSegment.printed`), never among them (`nested`), and judged on its spelling alone (no
95
+ environment is asked about it: a lookup it cannot finish cannot make the command's answer silence). The removal guard, the
96
+ standard-device marks, the kill guard, the write guards and the card do not read it, and the produced-text question stands
97
+ whatever it finds. The reading is monotone: it can only refuse — making the text look more dangerous only gets the call
98
+ refused. (The command's own re-entered texts — a `-c` string, a here-document, a here-string — keep their reading: their deny
99
+ relation, a hit or an unanswered lookup, counts.)
100
+ - **Behavior narrowing (open to veto).** *What changed*: `echo 'cat ~/.ssh/id_rsa' | bash`, `printf 'cat ~/.ssh/id_rsa' | sh`,
101
+ `bash <(echo 'cat ~/.ssh/id_rsa')`, `bash < <(printf 'cat ~/.ssh/id_rsa')` — a literal printer's text naming a deny-listed
102
+ path, on either face — are refused by the deny table on every arm (no card; the 7.48.0 refusal) where they were one
103
+ approvable card. *Who is hurt*: a command whose printer is redefined or whose stream is something else than the printer's words
104
+ (a function or an alias of `echo`, a trap), or whose shell does not run what it reads (`… | bash -n`, `… | bash 0<&-`), and
105
+ that would not read the path is refused too — the reading is the printer's words, not the stream; a path the text spells
106
+ through a link is not followed (the spelling is judged). *Compensation*: a text that does not read the path need not spell
107
+ it (drop the path from what the printer prints); a check that runs nothing (`bash -n`) can be run on a file; the deny table
108
+ is the deployment's to edit.
109
+ - **Unchanged (pinned).** A harmless printed text keeps its card (`echo 'echo hi' | bash`); every form the literal exemption
110
+ could not close (a function of the printer's name, `enable -n`, `BASH_ENV`, a second writer on another descriptor, an
111
+ inherited DEBUG trap, a here-string in the substitution body, a named `coproc`) keeps exactly one card, bypass included;
112
+ `echo 'rm -rf ~' | sh` stays `unverifiable_shell_text` (the removal guard reads what runs); a format the reader does not read
113
+ (`printf 'cat %s' ~/.ssh/id_rsa | bash`) keeps the card; a printed deny path no shell runs (`… | cat`) is no refusal.
114
+ - **Limits (stated).** Only the three producers above are read; `bash -c "$(echo …)"` and `… | xargs -I{} bash -c '{}'` are
115
+ candidate slices. What a stream carries beyond the printer's words (a trap's output, a second writer, a file's content) is not
116
+ read, and the printed text is judged on its spelling (a link in it is not followed: `echo 'cat ./link' | bash` stays the card
117
+ where `bash -c 'cat ./link'` is refused; a pattern is judged by its spelling, as the rows judge any pattern — `echo 'cat
118
+ ~/.s*/id_rsa' | bash` is refused): such a call stays the approvable card (KL-1417-c). The printed
119
+ text rides where the shell's input goes, so it is also read where another reader drains the stream first (`… | { read l;
120
+ bash; }`), where a here-document stands beside the pipe (`… | bash <<'EOF'`), and in a `-c` child that reads it (`… | bash
121
+ -c 'bash'`) — refusals in the safe direction.
122
+ - **Consumers.** @server: the exported type `ShellReadSegment` gains the optional member `printed` (additive: a value built
123
+ without it is the same plan; no engine seat hands a plan to a host). @cli: a refusal now arrives
124
+ where a card did for the forms above — the deny refusal's sentence and `read_path_denied` details, as for `bash -c '…'`. @test:
125
+ `core-1505-streamfed-shell-recheck` keeps its must-judge cell (bypass × an unread produced text is still a card); add
126
+ `echo 'cat ~/.ssh/id_rsa' | bash` ⇒ refused, no card.
127
+ - **Pins.** `test/backlog1539-printed-text.test.ts` (① the refusal back, five forms × three arms × two faces; ② seven hole forms
128
+ keep one card on every arm; ③ controls) and `test/backlog1539-printed-plan.test.ts` (④ the plan: `printed`, never `nested`; the
129
+ producers not read; `printedText`). Re-pinned: `backlog1417` ⑧ (`echo 'cat ~/.ssh/id_rsa' | bash` refused by the deny table,
130
+ as through 7.48.0).
131
+
132
+ ### A delegated child opens on `classic.SubagentStart`, not `classic.UserPromptSubmit`: the prompt a parent's model wrote for its child is no longer screened as a person's prompt (#1500, design/1500, C-R888; behavior narrowing; hard-breaking: two readings, three sentences each below (the prompt screen; the mod-package contract), open to veto; closed sets: one station row; exports: +2 types)
133
+
134
+ - **Before.** A delegated child's objective — the prompt the parent's model handed the Agent tool (and a workflow, fork or retained child's next prompt) — passed the child leg's `classic.UserPromptSubmit` screen as `source: "objective"`. A deployment's intercepting prompt filter therefore refused every child whose prompt it did not like, and its context was injected into children; the reference runs that hook only on what a person submits (CC 2.1.309: the prompt-submit path and cross-session / poll intake; the subagent runner raises no UserPromptSubmit). `classic.SubagentStart` was named in the event table but had no station.
135
+ - **Now.** Both ends of a leg read one table (`legEventsOf`; `stopEventOf` is retired into it). The delegation fact picks the lifecycle: a delegated child opens on `classic.SubagentStart` and ends on `classic.SubagentStop`, a top-level leg ends on `classic.Stop`. Who wrote the objective picks the screen: a person's prompt passes `classic.UserPromptSubmit` — a top-level leg's objective, and a retained child's resume through its steer handle (the deployment routes an operator's words there; a trusted run fact, `RunInternals.operatorObjective`, says so; that leg is screened first and then opens on SubagentStart); a delegated objective its delegator wrote (a parent model's Agent prompt, a workflow script's, a peer's SendMessage resume) is not screened as a person's. `classic.SubagentStart` is raised on the child's own leg as it opens on its objective, before its first request — never on a top-level leg, never on a checkpoint resume. Its `e` carries `agentId` and `agentType` (both pinned; `agentType` is absent on a workflow-lane agent) and the base; no prompt. Its answer is `{ additionalContext? }`, delivered ahead of the child's prompt as a `<system-reminder>` (the shape UserPromptSubmit's context had). It never keeps a child from starting (CC: a SubagentStart hook "can't block subagent creation"): failure column `skip`, abort `immediate`; a handler that throws or overruns is skipped and reported on `onError` (`phase: "hook"`); an answer carrying `block` is an answer the station cannot take — skipped and reported, the sentence pointing at `classic.PreToolUse`; a cancel during it ends the child as any cancel does (no `prompt_blocked_by_hook`).
136
+ - **A resume's origin is its caller's.** `createSubagentResume` hands out one face per origin: the face it returns speaks for its creator (a SendMessage: a peer; otherwise an operator), and the steer handle a resumed cycle re-emits is always the operator's face. Before, a handle re-emitted by a SendMessage-woken cycle reused the peer's face, so an operator's words sent through it were framed as a teammate's (`teammate resume`) — and, with this change, would have skipped the person's-prompt screen; now they are framed `operator resume` and screened.
137
+ - **Where a child's prompt is refused.** The parent's `classic.PreToolUse` on the delegating `Agent` call reads `input.prompt`; its deny keeps the child from starting and answers the parent, and a throwing handler refuses the call (fail-closed) — the reference's seat, unchanged here, now the documented one. A workflow agent's individual prompt has no such seat until `agent.spawn` (#2457).
138
+ - **Hard-breaking, open to veto (@server @cli @client-core).** What changed: `classic.UserPromptSubmit` no longer sees a delegated objective its delegator wrote (an operator's resume of a retained child is still screened). Who is hurt: a deployment that screened or refused child prompts, or injected context into children, through UserPromptSubmit (a settings-hook bridge mapping the reference's `UserPromptSubmit` command hooks onto `classic.UserPromptSubmit` now matches the reference's own reach; a probe pinning `source: "objective"` on a child leg turns red). What to read instead: refuse at `classic.PreToolUse` with `tool === "Agent"` (`input.prompt`); inject at `classic.SubagentStart` (`agentType` is the reference's `agent_type` matcher word) — a bridge carrying the reference's `SubagentStart` hooks has a station to land on from this release.
139
+ - **Closed sets / contract.** `MOD_EVENT_TABLE["classic.SubagentStart"]` gains its station (`skip` · `immediate` · pinned `agentId`, `agentType`); `ClassicEventMap` gains the key; `KERNEL_CONTRACT_VERSION` 4 → 5 (`@sema-agent/mods-kernel`: a host comparing two kernel copies for equality sees the raise; 7.58.0 shipped 4). A consumer holding the set of raised events (client-core's generated table) gains one row.
140
+ - **Hard-breaking, open to veto: a mod package written against contract 4 is refused (@server @cli @test @client-core).** What changed: `loadModPackage` loads only a package whose `hooks.json` states `"contract": 5` — any other value is refused with `config.mods_invalid` naming `hooks.json` and the contract (`src/core/mods/package.ts:72-73`); the 7.58.0 engine's kernel was contract 4, so every package written for it is now a refused one. Who is hurt: every mod package written for 7.58.0 on 7.59.0 — a deployment loading a real package (server S-2388), the CLI's package leg (MODS155) and test's real-package L1 fixtures (C-R915); this repo's own three fixtures (`test/fixtures/mods/{diff,sec-default,telemetry}/hooks/hooks.json`) were raised to 5 for the same reason. What to do instead: set `"contract": 5` in the package's `hooks.json`; contract 5 adds only the `classic.SubagentStart` station (`src/core/mods/kernel/events.ts:28-29`), so a package whose handlers do not name that event needs no other change.
141
+ - **Exports.** +2 types: `SubagentStartEvent`, `SubagentStartResult`.
142
+ - **Known limit.** KL-1500-a: a retained child's every new leg re-raises SubagentStart and prepends its context again (the reference injects once while the copy is still in the child's context) — the same count UserPromptSubmit gave those legs before.
143
+ - **Pins.** `test/backlog1500-subagent-prompt-hooks.test.ts` — real Runner, a parent delegating once: an intercepting UserPromptSubmit filter screens the root only and the child starts (base: it screened and refused `CHILD go`); the root's screen still fails closed; SubagentStart raised once for the child with its id, type and identity, never for the root; its context ahead of the child's prompt and never in the root's; `agentType` pinned; `block`, a throw and an overrun each skipped and reported with the child started; a cancel ends the child as an aborted run, never as a held prompt; PreToolUse on the Agent call reads the prompt and its deny or throw keeps the child from starting; a fork child opens on SubagentStart unscreened; an operator's resume through the steer handle is screened (its block keeps the words from the child and the leg never opens) and, let through, opens the leg on SubagentStart again — screen first, start second, the start's context leading; a SendMessage-woken background child opens on SubagentStart unscreened, and the handle that cycle re-emits screens an operator's words; the table's ends; the station's columns and the contract number. `test/mods-classic-redo.test.ts` S3 reads the stop end off the same table; `test/delegation-lifecycle-seat.test.ts` makes its non-completed child fail at the model instead of blocking it with a UserPromptSubmit filter.
144
+
145
+ ### A stream frame is read once, by the wire's shape, at the parser's door — a member in no shape is absent and said, never coerced, dereferenced or run (#1529, design/1529; behavior change and security narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none — the reader lives in `src/brain/stream-shared.ts`, not index-exported) (@server @cli @test)
146
+
147
+ - **Before.** Each read site of an OpenAI-family chunk and an Anthropic event guarded (or did not guard) its own member: a `data: null` frame, a `content_block_delta` with no `delta`, a `content_block_start` with no block or `tool_calls: [null]` threw inside the parser and the turn failed with its streamed text and usage lost — after the stream's end too, losing a finished turn; a `choices` object, a `tool_calls` object, a `usage` number were dropped in silence; `delta.content` as an array became `"[object Object]"` in the answer, a `text_delta` number became digits; a usage count that was a string reached the usage seats as a string (`totalTokens` `"1002"`); an argument fragment that was a number or an object was coerced into the call's arguments — a numeric fragment between two string fragments ran the call with arguments the model never sent (both wires); an Anthropic `stop_reason` that was not a string ended the turn as a silent clean stop.
148
+ - **Now.** The OpenAI-family parser reads each chunk once (`readChunk`), the Anthropic parser each event once (`readEvent`), through one member reader: an object, an array, a string, a count — `null` and absent state nothing; any other value reads as absent and its loss is said where that member's loss is already said. A content-bearing member in no shape (or a frame that is not an object) counts the frame with the unparseable ones — the one dropped-frame note to the model (its sentence now reads "were not valid JSON or not in the stream's frame shape; what could not be read was dropped") and the person's `task.tool_turn_incomplete` (`bad_frame`). A call-stream member in no shape — or a container of the call stream (`choices`, the choice, its `delta`; an Anthropic block frame not placed on a text / thinking block, an event object with no `type` word) — leaves none of the response's still-open calls runnable: a call that closed in full before keeps its cached call, every call still open lands in the invalid-arguments drop. An Anthropic `error` event's envelope members are read as words (a member in no shape no longer throws while the error is worded). A usage in no shape makes the turn's usage unknown (`usageMissing`). An ending seat holding a non-word is an ending in no word (`?`) on both wires — the Anthropic wire now carries `finishReasonUnknown: "?"` and the run announces `route.finish_reason_unknown`. After the stream's first ending a frame that offered nothing readable and held a member in no shape is refused like any late frame (`route.stream_end_ignored`, content `?`); a late offer is still named by what it offered. A falsy `finish_reason` still states no ending, and a provider that spells its stop word `?` is a word, not a non-word; a stream whose every frame is in its shape reads as before (pinned on both wires, including the nulls real gateways send).
149
+ - **Behavior change (open to veto).** More turns carry the dropped-frame note and `task.tool_turn_incomplete` (`bad_frame`); more turns carry `usageMissing`; the Anthropic wire can now raise `route.finish_reason_unknown` (`?` only — an unknown `stop_reason` WORD still folds to a stop, a named follow-up). **Security narrowing (open to veto).** A tool call whose argument stream held a fragment in no shape no longer runs.
150
+ - **Consumers.** No new code, key or detail member: `task.tool_turn_incomplete`, `route.finish_reason_unknown`, `route.stream_end_ignored` and `turn_end.usageMissing` carry their existing shapes on more occasions. @server @cli: a pin or renderer that matched the old note words in full (`"were not valid JSON and were dropped"`) reads the new sentence; the first words (`"N provider stream frame(s) were not valid JSON"`) are unchanged. @test: the fake-gateway cells below are the black-box forms.
151
+ - **Pins.** `test/backlog1529-chunk-decoder.test.ts` — a local fake gateway fed frame by frame through the real `fetch`: O1–O14 (OpenAI-family: `data: null` before / after the end, the r4 / r7 controls, `choices` / `tool_calls` / `usage` / `delta.content` / a usage count / an argument fragment in no shape, one note for many frames and one person notice per run, an all-in-shape control, the gateway nulls control) and A1–A12 (Anthropic: `data: null`, a missing `delta` / `content_block`, a numeric `text`, a numeric `stop_reason`, a numeric usage, a numeric `partial_json`, a typeless event carrying a fragment, an `error` envelope in no shape, a late `message_delta` in no shape, a late `data: null`, a reference-endpoint control, a control); S1 the reader, the ending word and the one sentence. Re-pinned: `test/backlog7490-brain.test.ts` (a `tool_calls: {}` frame — the turn still goes on and nothing runs; it now carries the note).
152
+
153
+ ### A credential-origin refusal names the no-credential door — the request's fix hint and the run's announcement carry one clause: an endpoint that takes no credential is handed none (#1853; no behaviour change — the wording of two refusal texts; hard-breaking: none; closed sets: none; exports: none in the package root)
154
+
155
+ - **Before.** `route.credential_origin_mismatch` told an operator two ways out — change the entry's credential reference together with its `baseUrl`, or point the entry back at the bound origin — and, for a provider that only moved domains, a restart. A local multi-node catalog that hands every node the placeholder word `EMPTY` met the refusal on its second node and neither way applied: the nodes need no credential, and the way out the law serves (hand the node an empty key; the integration guide says "none where the endpoint needs none", the refusal said nothing) was in neither text. The run's announcement was worse: it said the deployment "has to give the model a credential for" the new host.
156
+ - **Now.** One clause, `KEYLESS_EXIT` (`src/brain/route-adjudicator.ts`), is in both texts: the verdict's `fixHint` — the text of the request's own failure (`[invalid_request] route.credential_origin_mismatch: …`) and the `fixHint` (and the sentence that ends the message) of a derived seat's fallback notice — reads "…or point the entry back at <origin>; if the endpoint takes no credential, hand it none — answer an empty apiKey and no credential header (this works under any brain; a brain configured with neither a baseUrl nor a credential of its own also accepts no apiKey at all), because a placeholder word handed in its place is still a credential and binds like any other; a binding lasts as long as the engine process, …"; the run's announcement (`src/core/runner/credential-origin-seat.ts`) ends its advice with "If <origin> takes no credential, <the same clause>." The three older suggestions are unchanged word for word.
157
+ - **What it does not say.** The clause is the same for every refusal of this code: the engine cannot tell a placeholder from a real key by its spelling and does not try (a short real key and `EMPTY` bind alike), so the text is advice, not a diagnosis. The door it names is read off the law: an empty `apiKey` is a per-model answer with no secret, so it binds nothing, never falls back to the brain's own key or root, and none of the three lanes writes a key header for it; leaving the answer out reaches the same door only under a brain with no credential of its own whose `baseUrl` is absent or is the endpoint itself — under a brain with a root on another host it is refused `route.credential_missing`, under one with a key or credential header meant for another host `route.credential_mismatch`, and under one whose key or credential header is paired with this very endpoint it is the brain's own credential that goes out. The entry and the hook's answer must carry no credential header either: a placeholder carried in a header binds like one carried in the key. The other pairing refusals (`route.credential_mismatch`, `route.credential_missing`, `route.credential_answer_conflict`) keep their hints.
158
+ - **Known limits.** KL-1821-c stays: a value handed over on two origins still refuses the one sent second, `EMPTY` included — that is the law, unchanged; the row now says the refusal names the door.
159
+ - **Consumers.** No one is asked to change. @server @cli @web-admin: a program that matches `fixHint` or the announcement's `message` as text matches each older sentence still (kept word for word and in order; one clause is inserted, so a program that compares the whole text sees it); `detail` is unchanged (`{ modelId, boundOrigin, requestOrigin, sessionId, runId }`).
160
+ - **Pins.** `test/backlog1821-credential-origin-binding.test.ts` K1 – K5 (the second `EMPTY` node's request fails naming the door, and both doors the text names serve it under a bare brain with no credential header on the wire; the hint holds the clause beside the three older suggestions verbatim and the other three pairing hints do not hold it; the real Runner's failure and its one user-audience notice carry the same clause, the notice's `detail` keys unchanged; K4 — under seven brain configurations (bare; a root on another host, alone / with a key / with a credential header; the endpoint itself as the root, alone / with a key / with a credential header), with the placeholder carried in the hook's `apiKey`, in its `Authorization` header and in the entry's own — the second node is refused naming the door, the empty key serves it under every brain with no credential header and none of the brain's own, and leaving the answer out does what the law says for that brain; K5 — the same seven configurations on the openai, anthropic and open-responses lanes against a stubbed transport).
161
+
162
+ ### A blank credential is the keyless door, one reading for every source — a key or a credential header with nothing but white space in it is no credential: its source keeps its rank and nothing of it goes out, and the route a refused request states is what it carried (#1882, ruled C-R894 and its note 1; behavior change, open to veto; hard-breaking: none — one exported function's output shape narrows, open to veto; closed sets: none; exports: +1 root value `isBlankCredential`) (@server @dgx @web-admin)
163
+
164
+ - **Before.** Three readings of "an empty credential". The empty `apiKey` (`""`) was the keyless door: the hook answer or `config.apiKey` that held it kept its rank, no key header went out, nothing was bound. A key of white space only (`" "`, `"\t\n"`) was a key: the lanes' truthy lock wrote it (`Authorization: Bearer <spaces>`, which `fetch` sends as `Authorization: Bearer`; `x-api-key: <spaces>`, sent empty; a non-Latin-1 space made `fetch` throw and the request failed), and beside the lane's own key header it was a conflict (`route.credential_answer_conflict`). A credential header whose value was blank rode as an empty header. The withheld table's entry rule already read white space only as no credential, and the memory distiller's chat seat refused `""` but took a white-space key.
165
+ - **Now.** One predicate, `isBlankCredential` (a string `String.prototype.trim` empties — the empty string, white space only), read everywhere the question is asked. `resolveRouteCredential` reads what was handed ONCE: the rank is still the source's presence (a key handed, a credential header named — no fall-through), and the credential it returns holds only what rides — a blank key is no `apiKey`, a bag whose credential headers are all blank is no `headersBorne` (`{ source: "per-model" }` carries nothing). So every first-party lane's key lock writes no header for a blank key, no identity is bound, a blank key beside the lane's own key header conflicts with nothing (the header is the credential and rides), the header strip keeps a blank credential header off the wire whichever source it came from, and the route a request states (`requestRouteOf` → `AssistantMessage.apiErrorRoute`, `terminal.detail.route`) is `{ credentialSource: "absent" }` when nothing went out. The withheld table's entry rule, the credential intake (a blank value is not said: no request carries it) and the distiller's chat seat (a blank key is no key) read the same predicate. A key that is not blank rides as written, padding included. The published conformance corpus is unchanged except the `per-model-empty-string-key` intent sentence; its expectations are the same.
166
+ - **Who sees a difference.** A request handed a white-space key (per-call, from the hook, or as `config.apiKey`) now goes out with no key header instead of a junk one; a white-space key beside the key header now rides the header instead of being refused; a blank credential header no longer goes out empty; a provider refusal after a blank key or a blank credential header states the absent route (it said `carrier: "apiKey"` / `"header"`); the distiller's chat seat refuses a white-space key as it refuses `""`; a white-space `config.apiKey` no longer prints the `config.credential_not_withheld` line. `resolveRouteCredential({ optionsApiKey: "" })` returns `{ source: "per-model" }` (it returned `{ source: "per-model", apiKey: "" }`), and a blank `configApiKey` likewise loses its `apiKey` member (open to veto).
167
+ - **Consumers.** @server: `src/hooks/hook-llm.ts` writes `x-api-key` from `credential.apiKey ?? ""` for a per-model credential — the same empty value as before for a blank key; `model-route-gap.ts` reads `""` as unset but white space as set (`declaredValue`), and reading the same predicate (`isBlankCredential` from the root) makes its env reading the engine's. @dgx: the keyless door for several local nodes is unchanged — hand no key, or a blank one; white space now reads as `""` does. @web-admin: no action; a catalog field saved as white space is keyless, as an empty one is.
168
+ - **Pins.** `test/backlog1882-blank-credential.test.ts` — real Runner over real local listeners: a blank hook key (three spellings), a blank `config.apiKey`, a blank hook credential header and a blank `config.headers` credential header are served with no credential header and no deployment key; a blank key beside the key header rides the header; a blank key and a blank credential header bind nothing (the entry moves origin and is served keyless twice); controls: no key ⇒ the deployment key rides, `""` reads as white space does, a padded key rides; every lane's lock and every lane's stated route after a 401 (OpenAI, Anthropic, Open Responses); the predicate from the package root, `keyCarriedBy`, resolution's rank and carried shape, `requestRouteOf` on a hand-built credential, the withheld table's refusal and the distiller seat's. Re-pinned: `route-adjudication` (a blank per-call key resolves to `{ source: "per-model" }`), `backlog1754-held-values` (a blank construction key is not said). `backlog1399-terminal-detail-projection`'s "a route that is not absent leaked a credential" cell now holds for blank keys too.
169
+
170
+ ### A host moves a per-model credential's origin binding without a restart — `rebindCredentialOrigin(model, perModelAuth, config, onNotice?)`, announced to the operator as `route.credential_rebound` (#1844; additive verb; hard-breaking: one notice word, two sentences reworded; open to veto)
171
+
172
+ - **Before.** (7.52.0, #1821) A per-model credential (the per-model hook's key, a credential header on the entry) is bound to the origin of the first request the engine sends carrying it; a catalog that moves the entry to another host with the same credential is refused there (`route.credential_origin_mismatch`). Inside a process nothing could move a binding: a provider that only changed domains and accepts the same key on the new one needed an engine restart — also after the control plane's audited "this key is valid for the new address" (web-admin `rebindCredential: true`), which the engine never saw.
173
+ - **Now.** `rebindCredentialOrigin(model, perModelAuth, config, onNotice?)` (package root) is the one way a binding moves inside a process. The host hands the entry as it is in force now (`id`, `baseUrl`, `headers`), the per-model hook's answer the request will get for it (`{ apiKey?, headers? }`, or `undefined` when the entry's own credential header is the credential) and the brain's pairing config (`{ baseUrl?, laneDefault? }`, as for `admitRouteRequest`). The engine resolves the credential itself, by the request's own resolution (the answer outranks the entry's headers; the brain's deployment credential is never the verb's), and binds every secret it carries — the key and each credential header of the winning bag — to the origin the entry's request goes to: the root judged by the brains' own root judge (`resolveRequestRootOf`), the origin folded as the request gate folds it. It returns `{ origin, previous, changed }` (display spellings). A call that changed the table announces `route.credential_rebound` once — audience `operator`, minter `engine`, `detail: { modelId, origin, previous, occurrenceId }`, through `onNotice` (else as the notice's line on `console.warn`), never a credential or a digest of one; a call that finds every secret already there writes and announces nothing. Refused with `config.invalid_argument`, nothing written: an entry with no per-model credential, an answer that carries no secret (the keyless door), an entry whose request has no servable root (none at all, a non-http(s) root, a fragment, userinfo — the lane default the host hands judged like the entry's and the brain's roots when it is the root chosen). A non-string id, URL half or key is a `TypeError`. The notice is delivered just before the write, in the same synchronous step: a console that throws in the no-sink arm leaves the table as it was and the call throws (a retry rebinds). The rebind moves the credential, not the entry: another entry carrying the same value and still targeting the old host is refused from then on (one credential, one root, KL-1821-c). A request the gate judged before the rebind and commits after it is judged again at its commit and refused there.
174
+ - **Unchanged.** Nothing a request, a catalog swap or an entry's own members carry moves a binding: re-publishing the moved catalog stays refused (the #1821 W2 shape, kept as this change's control). `adjudicateModelRoute` and `routePairingStatus` stay reads. `__resetCredentialOriginBindings()` stays the test seam (it empties the whole table; the rebind moves one credential). A restart still empties the table.
175
+ - **Hard-breaking.** (1) *What changed:* `EngineNoticeCode` gains `route.credential_rebound`. *Who is hurt:* a consumer that keys a record by `EngineNoticeCode` — a notice allowlist or router, an audience table, a renderer — gets a compile error until it gives the word a row. *Migration:* add the row (operator; minted outside any run, so it carries no `sessionId` / `runId`). (2) *What changed:* two sentences say the binding's other source and the new way out: the refusal's fix (`route.credential_origin_mismatch`'s `fixHint`, carried in the request's failure text) now reads "bound to X, the origin it was first sent to or the host rebound it to … needs the host's explicit rebind (rebindCredentialOrigin) where the host offers one, otherwise an engine restart", and the run's `route.credential_origin_mismatch` notice sentence says "(the host it was first sent to, or the one the deployment rebound it to)". *Who is hurt:* a test or reader that pins those sentences' words. *Migration:* re-pin; codes, audiences and every `detail` member are unchanged.
176
+ - **Consumers.** @server: when applying a catalog whose control plane recorded an audited rebind for an entry, call `rebindCredentialOrigin(entry, keyResolver(entry), { baseUrl: declaredRoot })` with the entry of the catalog generation in force (dedupe by the control plane's own event; the verb's target is the entry as handed, so a stale copy rebinds to a stale host, KL-1844-a), and give `route.credential_rebound` its notice-wire row (operator, logs only). @web-admin: publish the audited `rebindCredential` act as a signal the server can read beside the catalog (which cell is the control plane's to choose); until the server consumes it, the console's "confirm rebind" is still met by the engine's refusal until restart. @dgx: a host that runs the engine directly can call the verb; `EngineNoticeCode` +1.
177
+ - **Exports.** +2 root names: `rebindCredentialOrigin` (function, tier advanced), `CredentialRebind` (type). Nothing removed.
178
+ - **Limits (stated).** KL-1844-a (ordering and replay are the host's), KL-1844-b (the notice is the table's account, not an audit of attempts; the call's return value is the result), KL-1844-c (the rebind shares the table's one write, so it refreshes and, at the 16 384 bound, evicts like a send). KL-1821-a (no in-process rebind) is closed.
179
+ - **Pins.** `test/backlog1844-credential-rebind.test.ts` (real Runner, real OpenAI brain, real local listeners: R1 moved → refused → rebound → served at Y with the key, X untouched, one operator notice; R2 a rebind moves, pointing back is refused naming Y; R3 control: no explicit act, three re-publishes stay refused, nothing announced; R4 a second rebind changes and announces nothing; R5 rebind ahead of the first send; R6 the refusal arms and the `TypeError`s write nothing; R7 a shared key moves for both entries; R8 the fix names the rebind and the restart; R9 key + gateway header both move; R10 judged before, committed after ⇒ refused at commit; R11 an entry with no root rebinds to the brain's declared root; R12 the `console.warn` arm, the audience and minter rows; R13 an entry's own credential header; R14 the hook's answer outranks the entry's header; R15 a console that throws in the no-sink arm leaves the table unmoved and a retry rebinds; R6 also refuses a lane default that is not servable). Fourteen of the fifteen are red on the base tree (the verb did not exist); R3 is green there by design — it is the positive control for the rule this change must not move (a mutation that lets a request move its binding turns it red).
180
+
181
+ ### Where the shell releases end a substitution body is read off their own parsers: the 4.0 – 5.1 counting pass is ported, every `$( )` / `<( )` / `>( )` / `${ list; }` body is compared, and an arithmetic command reads no here-document (#2792, #2787, #2788, #2789; behavior narrowing and security narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
182
+
183
+ - **Before.** The previous section's comparison read the counting pass of bash 4.0 – 5.1 through four approximations, and a reading that ran off the end of the text counted as agreement — so where an approximation was wrong the text was read as data although a release closes the body elsewhere and runs what follows (a document line ending in a backslash, a comment line right after a comment that followed a word, a comment right after a nested substitution, a quote in a here-document header's comment — that last one introduced by the previous section). A body holding no here-document was not compared at all, and the same comment rule leaves such bodies open to the same split. Bash 3.2 – 5.2 read `${ list; }` as a parameter expansion ending at its first `}` and run the lines after it; a `$((` that is not arithmetic was delimited with comments read, where 4.2 and later count none; a `<( )` was not compared with the scanner 3.2 – 4.2 re-read it with as the word expands; `((…))` was read as holding here-documents. Separately, the previous section refused texts every release delivers alike (a `#` comment after a word holding a `)`, a pair of quotes after a commented `)` in double quotes).
184
+ - **Now.** One rule, every body: a body is read only where each release's reading closes it at the same place, or never closes it (that release refuses the whole command). Bash 4.0 – 5.1's counting pass is ported state for state from their parsers (`src/shell/counting-pass.ts`, one flag row per release; a state it does not follow claims no close), 3.2's count and its expansion-time scanner, the count with no comment where a release reads so (`$((`, `<( )` / `>( )`), and the releases before 5.3 for `${ list; }`; bash 5.2 and later are the lexer's own reading. Two places the releases rewrite a body before it runs are refused outright: a backslash-newline in a here-document line of the body, and a comment ending in one. An arithmetic command — bash's own test, its matched pair followed by `)` — reads no here-document and no comment (two subshell parentheses still do). In double quotes, 3.2's early close is harmless only while its double-quoted word runs on to the same close. A refusal where the readings split a body the full reading reads a here-document in carries `undelimited_substitution_heredoc` (now also for `${ list; }`), whose sentence says the way out; a comment ending in a backslash-newline keeps `undelimited_substitution`.
185
+ - **Measured.** Ten binaries (3.2.57, 4.0 – 4.4, 5.0 – 5.2 built from the GNU releases with every published patch, 5.3.15) over the review's shapes, this change's table (`test/fixtures/backlog2792-measured.json`) and three random generators: no text the lexer reads has a release run what the reading holds as data (counts in the car receipt); the baseline reads such texts on every generator. Limits: KL-2792-a (the two rewrite places are refused even where every release agrees), KL-2792-b (the model's boundary). KL-1547-a is closed.
186
+ - **Who is hurt.** A command whose substitution body the releases split differently is refused where it was read; a commit message with a line ending in a backslash inside `$(cat <<'EOF' … )` is refused (way out: `git commit -F -`). In the loosening direction, the previous section's refusals of a comment after a word and of quote pairs after a commented `)` in double quotes read again; `((x<<2))` and `for ((…<<…))` read as arithmetic. @server @cli: the `unverifiable_shell_text` card text (the heredoc sentence is reworded, still naming `git commit -F -`). @test: the table is the differential to re-run on another host's bash.
187
+ - **Pins.** `test/backlog2792-lexer-shapes.test.ts` (the measured table, the host's bashes live, what every release delivers read, the release table and its merging, structure, a 1 MiB body in linear time, a seeded random differential); `test/backlog1547-heredoc-prefix.test.ts` re-pinned where the previous section's approximations pinned the wrong reading (its `${ list; }` block, a double-quoted row) and its structure cell; `test/backlog994-s2-one-lexer.test.ts` FIX4 re-pinned (the `${ list; }` forms the releases before 5.3 end at an earlier `}` are refused; 5.3's own reading of them is unchanged); `test/backlog1504-shell-words.test.ts` +1 role of the one word table (`pass_keeps_reserved`, the four-letter words the 4.4 – 5.1 pass keeps its reserved-word state after; internal, not on the package root); the #1102 equivalence ledgers' one entry re-hashed for the reworded sentence; the per-mutation table is in the car receipt.
188
+ - **Linear time (#2867).** The comparison first asked about the rest of the text once per adjacent `((` (where the pair it opens closes) and once per body (which releases read the rest alike, whether a `#` follows): a run of 9 999 `(` took 2 s where it took 4 ms. Each text is now read once for all of them, for as long as the lexer reads it (a compound value or a here-document opens its own; nothing is kept afterwards); no reading changes (the lexer's output is byte-identical to the previous head on 3 182 texts). Pins: `test/backlog2792-lexer-shapes.test.ts` Z (a run of `(`, a `((` that opens no arithmetic command, many bodies, and bodies between compound values: each under a ratio bound for a text four times longer and under three times the earlier tree's time) and R (the per-text answers equal a fresh read, three places where something is carried over, a trigger a backslash-newline splits).
189
+
190
+ ### A here-document in a substitution body is read by every bash version it can run under — a line that merely begins with the delimiter is data unless a `)` follows it, the counting passes of bash 4.0 – 5.1 are compared with the full reading, and the refusal says the way out (`git commit -F -`) (#1547, #2777; behavior narrowing and security narrowing, open to veto; hard-breaking: none; closed sets: +1 `ParseFailureReason` member `undelimited_substitution_heredoc` (not on the package root); exports: none) (@server @cli @test)
191
+
192
+ - **Before.** Any line in a here-document body inside `$( )` / `<( )` / `>( )` that began with the document's delimiter without being it made the whole command text unreadable, whatever the line said (`EOF marker handling changed`), and the card for it (`unverifiable_shell_text`) did not say how to write the text so it is read. Separately, a body whose here-documents share one header line was read as data by the lexer where bash 4.1 – 5.1 execute part of it.
193
+ - **Now.** The rule is measured, not assumed: ten real binaries (3.2.57, 4.0 – 4.4, 5.0 – 5.2 built from the GNU releases with every published patch, 5.3.15) were run over 61 body shapes and the table is the pin fixture (`test/fixtures/backlog1547-heredoc-measured.json`). A substitution body that holds a here-document closes only where every reading closes it at the same `)` — bash 5.x's full reading, bash 4.0 – 5.1's counting passes (as ported by the section above, which replaces this section's approximations of them), and bash 3.2's count — or where one of them never closes it (that bash refuses the text). In a body in double quotes the bash 3.2 parser reads no comment, and that count is compared too (its early close is harmless only while its double-quoted word runs on to the same close; the section above). A line that begins with the delimiter and holds a `)` anywhere after it stays refused (bash 5.2 and 5.3 end the document there and run the rest of the line); a line that begins with the delimiter and holds none is data and is read as data. In a `${ list; }` body (bash 5.3) a line that begins with the delimiter and is followed, after blanks, by a `}` is refused too (reason `undelimited_substitution_heredoc`, since the section above). A text no reading can place is refused, never read as data. The security narrowing holds as measured with the section above (its generators and shapes: no text the lexer reads runs on any release); what is left is KL-2792-a / b.
194
+ - **The refusal's own reason.** Every refusal of a here-document in a substitution body now carries `undelimited_substitution_heredoc` (the other undelimited forms — a `case` pattern, a body nested past the bound — keep `undelimited_substitution`), and its sentence — the card's account — says the way out: feed the text as stdin outside the substitution (`git commit -F -`), or reword the line / change the delimiter. It fits the card's 200-character cut.
195
+ - **Consumers.** @server @cli: the `unverifiable_shell_text` card text for these texts changes (it now names `git commit -F -`); a commit written `git commit -m "$(cat <<'EOF' … EOF)"` whose message has a line beginning with the delimiter and no `)` after it is read and no longer draws that card. @test: the pin fixture's table is the differential to re-run on another bash if your host has one the table lacks.
196
+ - **Pins.** `test/backlog1547-heredoc-prefix.test.ts` — the measured table (every shape × every version, one cell per shape: the lexer reads a text only where no measured version runs its marker), the same differential live on every bash the host has (versions it lacks skip with their column recorded), the lexer's reading of the shapes, the way out (reads, and runs as data on every host bash), the card through the real Runner lane in three arms, and a seeded random differential; the 1542 and 753 pins read the new reason.
197
+
198
+ ### The store that carries a memory scope has one reader, and the root exports it — a host's sync leg and a session now read and write a typed personal scope in the same store (#2818, #900 C2b; additive export; exports: +1 `resolveMemoryScopeStore`, +2 types)
199
+
200
+ - **Before.** On a deployment whose backend is a directory-pinned File store (`<root>/memory`), a session under the v2 scope contract runs its personal-plane scopes (`user:` / `userproj:` / `org:`) on a SECOND File store, `<root>/personal/memory` (the in-repo projection guard: personal memory must never be projected under a repo root). That choice was a closure inside the session assembly. A host leg working outside a session (the single-user sync executor, the operator faces) had no way to ask it and read "the deployment's backend" instead: with `MEMORY_SCOPE=user:<P>` and sync on, a round pushed nothing the sessions wrote into the global layer (or an older copy, if the pinned store held one), and pulled entries landed in the store no session reads. There is no workaround: sync on requires a typed `MEMORY_SCOPE`.
201
+ - **Now.** `resolveMemoryScopeStore({ scope, scopeContract, backend, memoryEngineDir, onIncident? })` → `{ plane: "project" | "personal", backend }` answers "which store holds this scope's entries", and the session assembly uses the same reading: `src/core/memory-engine/dual-root.ts` holds the plane reading (`scopePlanesOf`) and the plane's store (`memoryPlaneStore`), and `prepare-memory.ts` builds no store of its own any more. The session face and the sync leg resolve a scope to one store from now on. `backend` and `memoryEngineDir` are the values given as `RunnerDeps.memoryBackend` / `RunnerDeps.memoryEngineDir`; `scopeContract` is a required key (`undefined` written out), because it is what moves a typed key to the personal plane. On a directory-pinned deployment a personal-plane answer is a freshly constructed File store over the personal mount (resolve once per scope and keep it); every other answer is the deployment's backend itself.
202
+ - **Bad input is refused, never folded to the deployment's backend** (`config.memory_scope_key`): a blank or non-string key, a contract other than `"v2"` / `undefined`, a left-out `scopeContract` or `memoryEngineDir` key (`undefined` written out is the statement of absence), an engine dir that is not a non-empty string, and under v2 a typed key the scope contract cannot read (its own refusal kept as `cause`). The key is read through the Runner's own normalization, so a spelling a session trims and runs with resolves to the store that session uses. Without the opt-in a typed-looking key stays opaque and on the project plane — the same no-sniffing rule the session applies. Two values the Runner itself still reads silently — a `scopeContract` other than `"v2"` (read as no opt-in) and an empty `memoryEngineDir` (read as the working directory) — are refused here and recorded for the Runner's own door.
203
+ - **Not changed (stated).** Where a session's planes live (`<root>/personal/memory` + `<root>/personal/.engine`), which scopes route where, and every byte a session writes; the untyped default scope (`local`) keeps living in the deployment's backend.
204
+ - **Consumers.** @server S-2394: the sync executor (`createMemorySyncRunner`, today `backend: memoryEngine.backend`) and the three operator faces read the store per layer from `resolveMemoryScopeStore` — the global layer `user:<P>` resolves to the personal store, a host-minted project layer (`userrepo:…`, opaque under v2) to the deployment's backend; the layer enumeration of project layers keeps reading the deployment's backend (the plane they live on). Switching a layer's store relies on #2836 (next section, same release): the layer's old cursor is refused, and the round runs from no cursor. Until S-2394 lands, typed-scope sync stays broken on a pinned File deployment.
205
+ - **Pins.** `test/backlog2818-typed-scope-sync-store.test.ts` (the real Runner over a pinned File store laid out as a single-user host does: a typed session's write lands in the store the reader names, its ledger is that store's, a sync round over it pushes the entry and a pulled entry is served by the next session; the deployment's backend pushes nothing; untyped and both-planes layouts, the personal plane as the write face of a two-plane session; a store without a directory, through a real session; fifteen bad inputs refused with nothing constructed, padded spellings read as the Runner reads them; the session assembly holds no store construction of its own).
206
+
207
+ ### BREAKING — a memory sync cursor is bound to the local store it was taken against, and a round refuses a cursor from any other store (#2836; `MemorySyncCursor.store` required; behavior narrowing; hard-breaking: yes)
208
+
209
+ - **Before.** `MemorySyncCursor` was `{ scope, peer, baseRevs, updatedAtMs }`, and `syncMemoryScope` checked only scope and peer. A host that moved a layer to another local store (the typed global layer moving from the deployment's pinned store to the personal store, #2818) and kept the layer's persisted cursor ran the new store against the old store's baseline: every baselined id the new store lacks is "deleted here" to the push half (`src/core/memory-engine/sync-client.ts`, the baseline-stub reconcile), so the round sent DELETEs for entries the user still has on other devices.
210
+ - **Now.** A cursor carries `store` — the local File store's physical root (`file:<path>`, the path its root anchor records; minted once, by `memorySyncStoreOf`). `syncMemoryScope` mints the store identity of the backend it is given, binds every cursor it returns to it, and refuses a cursor for another scope, peer or store — or one with no store binding — with `config.memory_sync_cursor_mismatch`, before any read or transport call. The scope and peer checks are the same judge and now carry the same code (their sentences keep their opening words). A store without a directory has no root to bind a baseline to and is refused as a sync plane (`config.memory_sync_store`); the sync client's documented plane was always the File store. The store identity never goes on the wire. The pull half commits pinned to the root the cursor was judged against (`applyPatches(…, { anchoredRoot })`, the session engine's own discipline): a store re-pointed and re-anchored during the transport takes no entry (`memory.target_outside_store`). Known limit (stated): the identity is the root's physical path, so a different store later created at the very same path — the old one moved away with its cursor left behind — reads as the same store.
211
+ - **The host's answer to a refusal is a round from no cursor** (then persist the cursor that round returns). It pushes what the store holds and no deletes. Its one cost: a delete made locally since the last completed round has no baseline to travel on, so that entry comes back from the peer.
212
+ - **Hard-breaking, three sentences.** *What breaks*: `MemorySyncCursor` gains a required `store` member; a cursor persisted by an earlier release (no `store`) is refused once; a round over a backend without a directory is refused. *Who is hurt*: a host that rebuilds cursors from a fixed key list (it drops `store`, so every later round is refused) and any host that syncs a non-File backend. *Migration*: persist the returned cursor verbatim, `store` included; on `config.memory_sync_cursor_mismatch` run the round with no cursor and replace the persisted file with what it returns.
213
+ - **Consumers.** @server S-2394: `cursorOf` in `src/memory-sync-client.ts` rebuilds `{ scope, peer, baseRevs, updatedAtMs }` and must carry `store` through (shape check: a string; the comparison stays in core); the layer round answers the code by running from no cursor. After the upgrade each layer's first round is refused once (its cursor predates the binding), and the global layer's switch to the personal store (#2818) is refused for the same reason — both are the same one-time fresh round.
214
+ - **Pins.** `test/backlog2836-sync-cursor-store-binding.test.ts` (a minted cursor names its store and is accepted over that store, also through a linked spelling; the old cursor over the personal store is refused with zero transport calls and a fresh round pushes no deletes; an unbound or garbage `store` is refused; a refusal reads nothing from the store; a pull that arrives after the store was re-pointed and re-anchored lands nowhere; scope / peer mismatches carry the same code; a store without a directory is refused). `test/memory-sync-client.test.ts` re-pinned: its cursors are minted over the test's own store.
215
+
216
+ ### The store boundary is written down once — INTEGRATION-CORE §5.11–§5.13 say what core ships and what a deployment ships, list what a store-owning deployment reads from core at 7.58.0, and read the four packages against each other; four claims of a shipped database store are corrected (#2770; documentation only, no behaviour change; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
217
+
218
+ - **Before.** The line was implied across INTEGRATION-CORE §5.2–§5.7 and the CHANGELOG sections of #1468 S4, S4b and T4; no sentence said what core ships. Four places said more than was true: `docs/sdk/10-extension-points.md` §3 named `src/stores/pg.ts` (no such file) as ready-made PostgreSQL implementations, the root README offered Postgres as a `CheckpointStore` and `MemoryBackend` backing and counted two runtime dependencies (the package declares four), and `docs/ARCHITECTURE.md` drew `src/stores/pg` in its diagram. INTEGRATION-CORE carried two sections numbered 5.7.
219
+ - **Now.** §5.11 draws the line once: core owns the seat contracts, the facts a backend must not restate and the kits that accept a backend; it ships the in-memory defaults and the file family (`FileStorageBackend`) and **no database store** — the PostgreSQL / TiDB adapters under `src/examples/adapters/` are repository examples (not a root export, not in `dist/`), and `@sema-agent/core-stores-sql` carries the neutral factories without stores. §5.12 is the one list of what a deployment that owns session and checkpoint stores reads from core — each export with the reading it retires — followed by the five readings that changed in 7.58.0 (the owner-only import, the head an import answers and the conditional write, the two kit report words, the required `executor`, the retention word as a construction argument) and what a deployment that implements `SessionStore` itself, a local lane and the startup call each do. §5.13 reads the four packages against each other: one boundary sentence and one install form each, the exact-version rule between them, and that core does not depend on `@sema-agent/mods-kernel`. The second §5.7 heading is §5.7a. The four stale claims above are corrected, and the `@sema-agent/core-stores-sql` and `@sema-agent/mods-kernel` READMEs each gain the one sentence that places them against core.
220
+ - **Consumers.** @server: §5.12 is the list to read the 7.58.0 store faces from; its hard-breaking readings are stated, with migrations, in the #1468 S4 / S4b / T4 sections in the 7.58.0 notes below, which this does not restate; 7.59.0's own store-face changes are in the #2818 / #2836 sections. @dgx: the File lane's two readings (`FileSessionRepo.importEntries` as the row's owner, `FileStorageBackendOptions.sessions.beforeSessionDelete`) are in §5.12 and §5.5. No code, export or behaviour moves.
221
+ - **Pins.** None added (documentation). The existing document pins (`test/docs-contract-pins.test.ts`, `test/backlog1009-store-read-back-shape.test.ts`) read headings and anchors this change leaves in place; the package README pins (`test/backlog2104-mods-kernel-publish.test.ts`, `test/backlog2673-core-stores-sql-publish.test.ts`) read their READMEs' install lines, forbidden words and Exports tables, none of which moved; the front-door export tiers (`test/export-surface.test.ts` reads the root README) are unchanged — no root export name enters or leaves that file.
222
+
223
+ ### Seven gaps the 7.58.0 release found in its own chain are closed — `scripts/release/` and `scripts/verify-tmp-hygiene.mjs` (#2852, #2853, #2856, #2857, #2858, #2859, #2860; release tooling only, `src/` untouched; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
224
+
225
+ - **#2852.** A live stamp and `RC_GREEN_SHA` now vouch for a commit only when its build inputs are the same too — every `package.json` with its dependencies, the lockfile, `tsconfig*.json`, `.npmrc` and the scripts the build runs — with the version cells a bump writes as the only thing allowed to move; before, only the source trees were compared.
226
+ - **#2853.** A `tag-push` whose push exits non-zero keeps the local tag and reads the destination's `main` and tag through the push URL: both there is a lost acknowledgement and the step goes on, neither is a refusal whose rerun pushes the same tag object, anything else is refused by name.
227
+ - **#2856.** `r-commit --dry-run` now runs the re-window half (nothing written) and prints its moved / refused / kept counts, on the CHANGELOG as the release commit would leave it.
228
+ - **#2857.** `gate:tmp-hygiene` prints every failed test file of a red run with its failing tests (it kept the last lines of the output before) and `--full` takes `--workers N`.
229
+ - **#2858.** The re-window keeps a car row only when the row's own car is in the release — the first car name of its status head, judged by the car's own head named in its `DONE` clause (before or after the word) when it has one — a sha that is the stage commit the row waits to be merged onto, or not the car's work, is passed over; a neighbour car named later in the head no longer counts.
230
+ - **#2859.** `gate:criteria` is one of `r-commit`'s heading-sensitive gates, and each gate's exit is kept in the step's chain-state record.
231
+ - **#2860.** The chain gains `post-publish` after `ship-post-lint`: the ship post, the criteria post and the pickup list reach the board only after the lint passed, in the body it passed; `ship-number` only claims the number.
232
+ - **Pins.** `test/release-chain-gaps.test.ts` and `test/backlog2857-tmp-hygiene-failed-files.test.ts`; `test/release-chain-steps.test.ts` re-pinned (a failed push keeps the tag; the step order).
233
+ - **Who is hurt.** The R operator: `post-publish` is a new step between `ship-post-lint` and `post-ship` (`--with-posts` names the extra posts), `r-commit` runs `gate:criteria`, and a stamp taken before a dependency change no longer carries over it.
234
+
235
+ ### An inherited screening entry carries its installation on the minted policy; one frozen regime per installing leg (#2428; structure only, no behaviour change; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core)
236
+
237
+ - **Before.** The bus a screening constraint was minted over (`createPreToolUseConstraintPolicy`) lived in a module-level side table keyed by the minted policy object. The mint wrote it, and the installation identity (`sameInstallation`), the carrier check (`screeningInstallationsOf` / `unraisableGuardsOf`) and the inherited `tool.check` raise (`inheritedToolChecks`) looked it up there. A leg's frozen regime (its approver, its two durable mandates, its classifier) was spread twice when the leg handed its chain down: once onto its screening entry and once onto its caller-policy entry.
238
+ - **Now.** The minted policy carries its installation as a member of its own. The member is fixed and not enumerable, the mint is its only writer and one reader (`installationOf`) reads it, so the side table is retired. A copy, a wrapper, a prototype heir or a Proxy of the minted policy carries none, which is what the side table recognised before. That includes a clone that copies every own descriptor, and a deep clone as well, because the member holds the object it was minted on in a closure that no clone can redirect. The regime is minted once each time a leg hands its chain down, and both of the leg's entries carry that same regime. As a result the two entries' `autoMode` containers are now one object; the engine never mutates them, and the `decider` and the denial tracker inside were already shared.
239
+ - **Unchanged.** What runs, what asks and what is refused. The entry's keys and the policy's enumerable face (`Object.keys` is `["check"]`) are the same. Hosts rebuild the entry the same way: `createPreToolUseConstraintPolicy(chain, env)` over the same registrations. What a park records about the chain is unchanged too: `constraintChain` and `constraintDigest` are byte-equal to what the previous tree writes (pin K1).
240
+ - **Consumers.** @server (S-2388; `createParkedReviveInheritedGate`), @cli (MODS155) and @client-core (CC-1042) have nothing to change for this entry. **Announced, not in this entry (#2429):** inherited `classic.PreToolUse` will be raised in the gate's first phase on each installation's own bus, and the screening entry's folded-policy form will retire. The constraint channel stays, as the carrier of each installation's obligations. That change is a hard-break candidate for hosts that rebuild the screening entry with `createPreToolUseConstraintPolicy`, and its three sentences ship with it.
241
+ - Pins: `test/backlog2428-mods-w3-s2a.test.ts` (M / R / C / W / U / S / K).
242
+
243
+ ### Wording only: a recursive shell read's contract sentences say what 7.52.0 made of it, the program-text deny reading is written down (KL-1102-n), and four notes of 7.56.0 are corrected (#2499, #2504, #1714; no behaviour change; hard-breaking: none; closed sets: none; exports: none; members: none)
244
+
245
+ - **Recursive reads.** Five statements still described the tree walk that 7.52.0 retired (its #1714 section, which says it right, is unchanged). The `shell.read_boundary.friction_floor` contract sentence (`src/tools/fs/shell-read-judge.ts`, mirrored in `docs/CONTRACT-SENTENCES.md`) said "traversal roots enumerated, each within a bound"; the `traversal_root` line of `docs/CLOSED-SETS.md` said "enumerated within a bound"; the header of `src/tools/fs/read-deny.ts` called the active rows "the floor of EVERY read face … and their traversals"; and two JSDoc lines (`ReadEstablishment` in the judge, the account of what `env` answers in `shell-read-check.ts`) spoke of a traversal that is enumerated or cannot be. They now say what the code does and has done since 7.52.0: a recursive read's root is judged by what the command names, the root itself and the placed rows it contains, never by a tree walked below it; a credential row that is only spelled (`.netrc`, `.ssh/`) and lies below a root is met where a command names it, not on the walk (KL-r2-a); only a glob root's own expansion keeps its bound. Comments and documents only, the reading is unchanged. #2499 reported a client fence written for the refusal before 7.52.0; whether the walk should be judged again is a separate question, and #2505 is the filed direction (a credential floor in a sandboxed `ExecutionEnv`).
246
+ - **Program text (KL-1102-n, #2504).** The text of an inline program (`python3 -c "…"`, `perl -e '…'`, an `awk` program) meets the read deny rows as ONE spelling, not as the paths written inside it: it is one deny-only candidate (`src/tools/fs/shell-read-argv.ts`, `programTextReads`) resolved like an operand (`src/tools/fs/shell-read-establish.ts`, `lexicalReadsOf`; `src/tools/fs/bash-readonly-classifier.ts`, `resolveOperandSpellings`), so a text that starts with `/` is that absolute path (the working directory plays no part), one that starts with `~/` is judged both at its literal spelling under the working directory and expanded against the declared home, and any other text is placed under the working directory and judged together with the directory's own segments (a program run inside a guarded directory is refused whatever its text: under a `.ssh` directory even `open('.netrc')` is). The judge reads those spellings' segments, splitting at `/` and `\`, and a row is a run of whole segments (`segmentRowMeets`, `src/tools/fs/read-deny.ts`; the ends of the text are boundaries, and a quote, parenthesis or letter touching a segment makes it another segment). So (1) an unanchored spelled row (a built-in `.netrc` / `.ssh/` / `.aws/` / `.git-credentials`, a deployment's `secrets/**`) meets the text only where one of its segments stands whole: `open('<home>/.ssh/id_rsa')`, `open('<home>/.netrc/')` and `perl -e '/.netrc'` are refused; `open('<home>/.netrc')` (the closing `')` touches the last segment) and `open('.netrc')` are not, under an ordinary working directory and the default rows. (2) An anchored row (a home-anchored built-in such as `~/.npmrc`, a rooted deployment row `/abs/x`, a `Read(/…)` rule) meets it only where the resolved spelling really lies under the anchor: a text placed under the working directory only when the directory itself lies under it, a text that starts with `/` only when it lies under it itself; a path written inside the text does not. A home-anchored row compiled with no known home is read as unanchored. (3) When no row meets it, only a text that may open a file (any text of a language the station does not name, such as `python3`, `perl`; a token language's text, `awk` or `jq`, only with an opening token, so `awk 'BEGIN {print 1}'` is not) is `unestablishable`, and only where the read or the write face guards something; with both faces open and no deny row at all it is let through (`foldShellReadFindings`, `src/tools/fs/shell-read-judge.ts`; `programTextMayOpen`, `src/tools/fs/program-read-model.ts`). The question is mandated on the full shell's roots read face and ordinary on its open read face (a deny row wired, or a guarded write face); the read-only and the re-judging seats refuse it. This is how it has read; nothing changed. Whether program text should meet the operand judge, or the scan should be retired, is #2504.
247
+ - **Four 7.56.0 sentences, corrected.** The released notes stand as published; these replace the sentences named.
248
+ - #2302, *Before*: "the default mode handed the call to the classifier and `bypassPermissions` ran it". The classifier is auto mode's (`src/core/classifier-unavailable-arm.ts`). A misspelled deny read as "no rule speaks", so the call went on as if no rule had spoken: in `default` it took its ordinary path (a question a policy had raised reached the approver as an ordinary question), and `bypassPermissions` ran it.
249
+ - #1329, *Who is hurt*: "A policy that caches an ASK answer across calls and returns it for another call id has that call refused." Only an ask that carries the engine's record of another call (a guard policy's or a fold's record, bound to its `toolCallId` and `toolName`, `src/core/engine-attestation.ts`) is refused. A cached ask with no such record is asked or released as it was before. The *Behavior narrowing* paragraph of that section states it right.
250
+ - #971, *Now*: "So a socket is dialed and a pid probed for a local process and nothing else." That holds for a row of plain data members. `readPeerSessionRecord` does not snapshot an accessor member, so a getter that answers differently on each read can pass the check without it (the JSDoc of `PEER_SESSION_WHERE_VALUES` and `docs/sdk/07-multi-agent.md` already say so).
251
+ - #1551, *How to migrate*: "the switch rides the parent spec seat, so the request's engine-built child legs are switched off with it". True because an engine-built child authors no `attachments`. A delegation path that authors its own `attachments` keeps exactly what it authored (`src/core/parent-spec-seat.ts`; the *Behavior change* bullet of the same 7.56.0 section says it), so the parent's switch does not reach its legs: a lane its declaration leaves out takes the default, `mcp_unavailable` on (`mcpUnavailableOn`, `src/core/runner/turn-attachments.ts`), and an explicit `mcpUnavailable: false` of its own stays off.
252
+
253
+ ### A path segment is compared by canonical equivalence, not by code points: a deny row meets the other spelling of its own name (#2577; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @client-core)
254
+
255
+ - **Before.** The segment engine behind the read deny rows and the sensitive-path write list folded case and separators but
256
+ composed nothing. A filesystem that compares names by canonical equivalence (APFS, HFS+) serves `ü` written as one code
257
+ point and `u` plus a combining diaeresis as one file, so a credential row `schlüssel/**` judged the composed spelling of a
258
+ path and answered `null` for the decomposed one — the same file, read or written past the row. The same held for a
259
+ home-anchored or rooted row whose home or run carried such a name, and for a configuration root with a non-ASCII name.
260
+ - **Now.** Both sides of every comparison are composed (NFC) before the fold of the row applies — the pattern at compile,
261
+ the anchors a placed row carries (a home, a rooted location, a configuration root) and the path's segments — under every
262
+ fold (`caseSensitive: true` rows and the write list's host-keyed fold included), by the one fold table
263
+ (`SEGMENT_FOLDS`) every consumer already read. Nothing else changes: ASCII case still folds, non-ASCII case does not
264
+ (the deny set's documented contract), a compatibility form (a ligature) is another name, and a canonical singleton is the
265
+ letter it decomposes to (the Kelvin sign is `K`, which the ASCII fold then lowers).
266
+ - **Behavior narrowing (open to veto).** *What changed*: a deny row or write-list entry with a non-ASCII name now also
267
+ refuses the other composition of that name; the write list and the read set share the compiler, so both widen the same way.
268
+ *Who is hurt*: a deployment whose directory holds two distinct files that differ only in composition (possible on a
269
+ filesystem that does not fold them, such as ext4) and guards one of them — the twin is now guarded too; one extra
270
+ refusal, never a missed one. *How to migrate*: nothing; list the name once, in either spelling.
271
+ - **Limits (stated).** ripgrep compares bytes: its exclusion globs stay spelled as the row is written, and a path it returns
272
+ under the other spelling is caught by the output tripwire (the judge now names it), which hands the search to the JS
273
+ scanner that prunes with the same judge. The data-root exemption's comparison stays byte-exact on purpose (an exemption
274
+ widened by a fold is a guard bypassed). Composition costs what the platform's NFC costs on the spelled segment: a name a
275
+ filesystem can hold (at most 255 units) takes well under a millisecond, but a hostile spelling of tens of thousands of
276
+ combining marks takes seconds (it grows with the square of the segment's length) — the same cost the tool gate's own path
277
+ normalization already pays; the judgment memoizes it per spelling and does not bound it.
278
+ - **Consumers.** @server @cli @client-core: no API or wire change; a deployment's non-ASCII deny entries and write patterns
279
+ now cover both compositions of a name.
280
+ - **Pins.** `test/backlog2577-segment-names-canonical-equivalence.test.ts` (N1 a row against the other spelling of its own
281
+ name under the ASCII and the case-sensitive fold, both directions, deeper paths, a wildcard row, and the names that only
282
+ start like the row; N2 what does not change: ASCII case, separators, dot segments, non-ASCII case, a ligature; N3 a
283
+ home-anchored and a rooted row, any spelling of the home; N4 the target judgment, a recursive read's root, a row at or
284
+ below a path; N5 the write list under all three folds and through `createSensitivePathPolicy`; N6 a configuration root with
285
+ a non-ASCII name still guards its own settings file). `backlog2117-read-deny-star-fold` F5 re-pinned: the `unicode` fold's
286
+ reference is the engine's own `i` flag over the composed name.
287
+
288
+ ### The read-deny table travels with every shell start — an environment that confines processes keeps those bytes from every program the command runs (#2505; behavior change only for a library-direct band: its shell starts wait for the band's deny placement; new field for environment adapters) (@server)
289
+
290
+ - **Before.** The shell read station judges what a command NAMES — its operands, its expansions, a recursive read's root (since 7.52.0 never the tree below a root: `grep -r x .` reads a `.netrc` the root holds, KL-r2-a ①). The documented hard floor under it — "a sandboxed ExecutionEnv" — had no way to learn which paths to keep: nothing handed the environment the table.
291
+ - **Now.** Every command start the shell faces make (Bash foreground and background, the read-only Bash, Monitor) carries `readFloor` in its exec options: the read-deny table in force for that call (built-in tiers, deployment and task rows, a person's `Read(...)` deny rules — the call's own pinned table), as `rows` (the strings the engine's refusals cite) and `denies(absolutePath)` (the same judgment the read station asks). One table, two readers: the station judges names, the environment judges bytes; the station does not loosen when an environment keeps the floor. A library-direct band (no Runner) whose own deny placement is still settling now holds its shell starts until it settles, as its read tools always did. New root type export `ReadFloor`.
292
+ - **Contract for an adapter that confines processes** (sandbox / container / microVM / remote agent): every program the command runs must be unable to read a path `denies` answers non-null for, judged where the environment resolves it; an environment that cannot keep the whole table for a start refuses the start (`spawn_error`, naming the row) rather than run with fewer rows — a runtime configured from the static `rows` that cannot place a row (one with no anchored directory) refuses too. An environment that cannot confine a process (the host, ssh, a device) ignores the field — no byte floor there, KL-r2-a unchanged. `NodeExecutionEnv` ignores it.
293
+ - **Consumers.** @server: the sandboxed lanes (e2b / k8s / local-docker) can now implement the deny floor from `ExecutionEnvExecOptions.readFloor` (and `BackgroundSpawnOptions.readFloor`); no change is needed to keep compiling — the field is optional.
294
+ - **Pins.** `test/backlog2505-read-floor-lane.test.ts` (real Runner; a confining environment's test double: `grep -r` / `find -exec cat` / `tar` keep the credential file's bytes out, a command naming the file is still refused by the station and never starts, deployment rows travel and an excluded built-in row does not, background and Monitor starts carry the floor, the host env reads nothing new), `test/backlog2505-read-floor-seat.test.ts` (the seat: rows = the refusals' strings, the table's own judgment, fail-closed on an unreadable path, the call's pinned table).
295
+
296
+ ### A role seat that names a model the catalog does not hold is read as an unset seat and said once, where it refused every turn (#2571; behavior change, open to veto; follows the reference implementation's split — the main model's seat refuses, helper and subagent seats retreat and say so; hard-breaking: the notice catalog, open to veto; closed sets: `ENGINE_NOTICE_CODES` 102 → 103, +`model.role_defaulted` (audience `operator`, minted by the engine); exports: none; members: none) (@cli @server @client-core)
297
+
298
+ - **Before.** A deployment that named a model its catalog does not hold at a role seat — the field shape is a host that maps
299
+ `MODEL_CHEAP_ID` onto `roles.summarize` / `roles.subagent` while the id it names is not a catalog key — had every run refused:
300
+ the compaction seat (`roles.summarize`) is read at every prepare, so each turn ended `failed` with `config.unknown_role`
301
+ (`detail { field: "roles.summarize", reason: "unknown_model_ref" }`) and no answer; a `roles.subagent` word failed each
302
+ delegation the same way. *Erratum:* this is not a 7.53.0 change. The refusal is older — in 7.52.0 and before the same read threw
303
+ `Unknown model ref "<id>". Provide it in RunnerDeps.models or pass a Model object.` (uncoded) from the same seat at every
304
+ prepare; 7.53.0 made it coded and gave it `detail`, and 7.55.0 (#2152) built it in one place. What a shell saw change between
305
+ its builds was the code and the text, not whether the run was refused.
306
+ - **Now.** One reading, `seatRead` in `src/core/roles.ts`: a seat other than `default` and `classifier` whose word the catalog
307
+ does not hold supplies no model and is read as the same seat without its `model` member — a `select` beside it still answers,
308
+ then the role's tier default, then its fallback chain (`summarize` → `default`, `subagent` → the parent run's model,
309
+ `verifier` → `default`). The walk (`resolveTaskModel`), the compaction seat (`roleModelIfSet`), the subagent seat
310
+ (`deploymentStatesSubagentModel` / `deploymentSubagentTierModel`, which now take the catalog) and the consolidation chain read
311
+ it through the one test `unheldSeatWord`. The person is told: at the root leg's prepare the engine says `model.role_defaulted`
312
+ for each such seat of the deployment's own map and of the merged deployment-and-task map, **once per session per (seat, word)** (the session's announced
313
+ record, as `model.capability_downgraded` is), with the seat, the word and what stands in. Still refused, by the seat's own
314
+ `config.unknown_role`: `roles.default` (the main model's seat), `TaskSpec.model`, `TaskSpec.compactionModel`, a value that is
315
+ no model reference (`not_a_model_ref`), and a chain that ends with no model (the first unheld seat's refusal, not "no model for
316
+ role"; the memory-consolidation chain `consolidate` → `summarize` reads the same way: a written-but-unheld `consolidate` now falls to
317
+ a held `summarize`, and with neither the refusal is still `config.unknown_role` naming the first). The `classifier` seat keeps its existing stand-in and its line,
318
+ `classifier.role_defaulted`; this line is not minted for it.
319
+ - **Behavior change (open to veto).** *What changed*: a run, a compaction and a delegation whose role seat names an unknown word
320
+ now go on (on the fallback model) and say it once, where they were refused at every prepare. *Who is hurt*: a deployment that
321
+ relied on the refusal to find a typo in a role seat — it now sees one operator notice per conversation instead of a failed run
322
+ (the cost of the fallback model is the deployment's to watch; `summarize` falls to the run's own model, `subagent` to the
323
+ parent's). *How to migrate*: fix the seat or declare the word in `RunnerDeps.models`; a host that wants the old refusal reads
324
+ `model.role_defaulted` and fails the session itself.
325
+ - **Limits (stated).** The line is said at a leg's prepare, from the catalog that prepare reads. A word that becomes unheld afterwards — a
326
+ catalog swap during a run, then a delegation that reads the live catalog — takes the retreat at once (the child runs on the parent's
327
+ model) and is said at the session's next prepare, not before; the old behaviour there was the spawn's refusal. A `subagent` seat is
328
+ read, at a spawn, from the deployment's own role map, so a task's own `roles.subagent` does not change which model its children use
329
+ (it never did); the line names the deployment's seat for that reason.
330
+ - **Hard-breaking (open to veto) — the notice catalog.** What changed: `ENGINE_NOTICE_CODES` gains `model.role_defaulted` (audience
331
+ `operator`, minted by the engine; it always carries `sessionId`). Who is hurt: a consumer switching exhaustively over the catalog
332
+ or holding a whitelist of notice codes. How to migrate: add the row; show the message by code (`detail.seat`, `detail.model`).
333
+ - **Consumers.** @cli (L-1984): read `model.role_defaulted` for the start-up line about a role seat that names a model outside the
334
+ catalog (`MODEL_CHEAP_ID` and the like) — the engine now falls back and says so once, so the shell's own pre-flight can drop its
335
+ copy of the refusal. @server: no change; `roles.summarize` / `roles.subagent` written from `MODEL_CHEAP_ID` now fall back with a
336
+ line instead of failing every task. @client-core: show the notice by code like any operator row.
337
+ - **Pins.** `test/backlog2571-role-seat-unheld-word.test.ts` (R1 the cheap seat unheld: the run completes and says it once; R2 once
338
+ per session per (seat, word), a re-pointed seat again, a task's own seat on the merged map; R3 the subagent seat: the child runs on
339
+ the parent's model and one line is said; R4 held words and a bare deployment say nothing; R5 `roles.default` still refuses, also with a tier table bound; R6 the
340
+ walk, the tier stand-in and the compaction seat read, and the end of a chain; R7 the listing and the one test; R8 the classifier seat keeps its stand-in; R9 the consolidation
341
+ chain; R10 what still refuses; R11 the closed sets). Re-pinned to the new reading: `backlog641-child-model-seat` (a dead tier
342
+ word is an unset seat), `backlog1279-child-undrained-to-parent` (the catalog count).
343
+
344
+ ### `TaskSpec.classifyAllShell` — in auto mode no shell allow entry clears a call, whichever source holds it: the classifier judges (#2558; behavior narrowing, opt-in)
345
+
346
+ - **Before.** The engine had no counterpart of the reference implementation's `autoMode.classifyAllShell` (KL-1327-c, retired by this entry). In `auto`, the allow layer's strip removed only the shell entries that hand over arbitrary code (the whole shell, an interpreter or launcher prefix); a narrow rule such as `Bash(git:*)` kept clearing its calls with no classifier — from a person's stored rules, a skill's `allowed-tools`, the request's `allowedTools` and the deployment's `RunnerDeps.allowedTools` alike. A host that honours the setting had no engine seat to say so: its shell allow lists reached the engine and cleared calls the person had asked the classifier to judge.
347
+ - **Now.** `TaskSpec.classifyAllShell?: boolean`. `true` ⇒ while the leg's mode is `auto`, no shell allow entry clears a call: the whole shell tool, a tool name that reaches the shell and every `Bash(…)` command rule stand down whatever they name, in all four allow members (one predicate, `strippedInAuto`; the mode is read on every call, so a steer into or out of `auto` applies on the next call — a steer that lands while a call's stored rules are still being read applies from the call after it). Under the key no allow entry of any kind clears a call on the shell face: a path, name or host entry — a list's or a person's stored row (stored rows are now read as the entry kind of their grammar) — that a shell-face tool's declared path target reaches stands down too. The Skill card no longer names shell entries in `auto` under it. A command the read-only reader waves through still runs without the classifier, as before (it never reaches the allow layer). Outside `auto` nothing changes; deny and ask rules, a hook's allow, non-shell entries and every question an allow rule may not clear read exactly as before. A tighten-only seat (one more row of the clamp table): `tightenTaskSpec` keeps a baseline's `true`, an engine-built child inherits `true` and its own `false` cannot lift it, a governed workflow script may declare it for its child. A present value that is not a boolean refuses the run before it starts (`config.invalid_argument`). Absent or `false` ⇒ byte-identical to 7.58.0, but for one shape of the existing strip: a protocol-namespace entry (`mcp__srv` / `mcp__srv__*`) that reaches a shell call through an alias the deployment gave the shell tool now stands down in `auto` like the whole shell does under every other name (it used to clear the call unclassified; narrowing, with or without the key).
348
+ - **Behavior narrowing (opt-in).** Only a caller that sends `true` sees a change: its shell calls in `auto` are classified (more classifier calls; a classifier block where an allow rule used to clear; the denial limit is reached sooner). Measured on a real Runner, 7.56.0 vs this head, `auto` with a blocking classifier and `Bash(git:*)` + `git add -A`: request / stored / deployment / person-invoked skill rows each cleared the call unclassified and now each is classified (and blocked); the same with the key absent, the same under `default`, and a `Write` entry under the key read the same in both trees.
349
+ - **Consumers.** @client-core (CC-997): carry `classifyAllShell: true` when the user, flag or managed settings plane says `autoMode.classifyAllShell: true` — the reference reads it from those three only, never from a repository's project or local settings — and keep projecting the allow buckets (settings `permissions.allow`, `--allowedTools`, a skill's `allowed-tools`) unchanged; do not build an arm that drops shell entries from the request (it cannot reach the engine's own rule store or the deployment list, and cannot follow a mid-run mode change). @server: pass the request field through to `TaskSpec.classifyAllShell`; a managed policy that forces it = a `tightenTaskSpec` baseline carrying `true`. @cli: D-081 / L-1961's remaining difference retires once the bundled engine and client-core carry the bit; no shell code change. A test or a table that pins the clamp table's rows (`CLAMP_SEATS`) or `ParentSpecSeat`'s members sees one more.
350
+ - **Pins.** `test/backlog2558-classify-all-shell.test.ts` (real Runner quadrants Q1–Q4, the four members S1–S3 / S1′, a mid-run steer into `auto` M1, the namespace entry through an alias A1, the path / name / host arms and the stored row's grammar P1, the bad-value door D1, the Skill card K1–K3, the seat's travel U1–U4); the resume door table row in `test/backlog1950-resume-config-doors-preclaim.test.ts`; the strip's unit calls in `backlog1327-allow-entry-unit` / `backlog1517-b-bash-pattern-rules` / `backlog1303-skill-grant-unit` re-spelled for the new parameter (same readings).
351
+
352
+ ### An image the provider cannot process no longer poisons its session: admission checks each format's header, and a provider's image refusal removes the image from what the model sees and re-sends the turn (#2874; hard-breaking: one notice word (`ENGINE_NOTICE_CODES` +1 `context.image_removed`, the #1844 / #2571 reading); closed sets: three +1 (`ENGINE_NOTICE_CODES` `context.image_removed`, `AssistantMessage.errorKind` `image_unprocessable`, `LoopContinueReason` `image_refusal_retry`); behavior narrowing, open to veto — an Apple-optimized CgBI PNG (a PNG whose first chunk is not a 13-byte `IHDR` of non-zero size), a JPEG whose fourth byte is below 0xC0, a GIF of zero width or height and a WebP without a `VP8 ` / `VP8L` / `VP8X` chunk were all admitted before and are refused now) (@cli @server @client-core)
353
+
354
+ - **Now.** An image's bytes must open with their format's header (one table: PNG = signature + `IHDR` first chunk, so an Apple-optimized `CgBI` PNG is refused; JPEG = SOI + marker; GIF = version + screen descriptor; WebP = `RIFF`/`WEBP` + `VP8 `/`VP8L`/`VP8X`), same refusal word `magic_mismatch`. A provider 400/422 whose envelope says an image could not be processed (OpenAI- and Anthropic-form) types the failed turn `AssistantMessage.errorKind: "image_unprocessable"` (+1 member); that failure and its persisted record make every request view replace the images of the newest message still carrying any with `[image N removed: rejected by provider: image_unprocessable]` (the transcript keeps them), the turn is re-sent in-turn (≤ 3), and later turns / resumed sessions read the same removal. Closed sets: `ENGINE_NOTICE_CODES` +1 `context.image_removed` (audience `user`, `detail: { images, sessionId, runId }`, once per run per refusal); `LoopContinueReason` +1 `image_refusal_retry`. Consumers: @cli @server @client-core — a closed-set pin on notice codes or `errorKind` goes red; show `context.image_removed` to the person. Pins: `test/backlog2874-image-reject.test.ts`.
355
+
356
+ ### Erasure takes the import's scope authorization seat — `eraseMemoryEntries({ …, expectedScopes })` is judged after resolution, inside the store's lock, and a refusal names nothing (#2304; security fix; behavior narrowing, open to veto; hard-breaking: one type-only edge)
357
+
358
+ - **Before.** `importMemoryBundle(bundle, { expectedScopes })` let a service endpoint pin its principal's grant set; `eraseMemoryEntries` had no such seat, so the question "which scopes may this caller erase" had two answerers — the import seat in core and an envelope a service built for itself, which could only read a `{ scope }` selector's literal and had to refuse `ids` / `sessionId` selectors outright (it cannot see what they resolve to).
359
+ - **Now.** One seat, one shape rule (`expectedScopesInvalid`: an array of non-empty scope names) and one membership predicate (`firstOutsideExpectedScopes`), both in `src/core/memory-engine/export-bundle.ts`, read by both verbs. On erasure, present ⇒ the selector's own scope (a place selector, judged before anything is read) and the **binding scope of every resolved id** must be members; an id the store cannot attribute to a scope — no account row, an unbound row, a non-entry-id ledger key, an unledgered file on disk, an id that never existed — is not a member. Any violation refuses the whole request with the new code `config.memory_erasure_scope`: nothing deleted, nothing recorded, and the refusal carries no count, no id and no scope (an out-of-set id and a never-existing id answer the same text, so the refusal is no existence oracle). The evidence lane judges in the lock, records the canonical set (sorted, de-duplicated) on the request's anchor row, refuses a replay under another set first (absent and present differ), and judges what a replay deletes where it is now: an id still (or again) holding an account row is judged by its current binding — an erased id the host re-added in another scope is not deleted by a replay of the old request — while an id the request already erased (no row, no bytes) is judged by the scope its first execution recorded on the request's own projection rows (one assignment under the anchor's selector hash; a conflicting record attributes nothing), so a commit-then-crash replay converges without a live row. The recorded set is held to the shape rule by the row validator and judged only where it is used — a record no first execution could have written authorizes nothing at replay. The degraded lane (no evidence face, `allowUnevidenced`) runs the same predicate over the read faces' answer before its CAS'd deletes. The seat authorizes erasure only; it never changes a session's memory scopes or write scope.
360
+ - **A declaration, never duck-typing.** An evidence face honours the seat only when its backend declares `judgesErasureScopes: true` (the File backend does); the engine refuses a grant-bearing erasure over an evidence face that does not declare it (`config.memory_erasure_scope`, the face is never called) — a face that predates the seat would otherwise ignore the set and erase outside it. Without `expectedScopes` every path is byte-identical (the anchor row carries no new key).
361
+ - **Other behavior changes (every caller).** The `memory.erasure_selector_mismatch` text no longer prints the two selector hashes (the first request's hash stays on its anchor row). The degraded lane deletes only the ids it was asked about: a read face that returns extra entries no longer widens the delete set.
362
+ - **Behavior narrowing (open to veto).** *Import*: a malformed `expectedScopes` — a `Set` or other non-array iterable (accepted before), a string (read character by character before), an empty or non-string member — is refused as `config.memory_import_request` before the package is read; the pure `memoryBundleInvalid` answers the same violation for a direct caller. *Erasure*: under a grant, a `{ scope }` erase of a scope holding an unledgered file refuses until a read adopts the file (the host, with no set, erases it as before).
363
+ - **Hard-breaking (type-only).** *What changed*: `MemoryBackendContractHooks.onOptionalMember`'s `member` union gains `"judgesErasureScopes"` (the suite reports a backend without the declaration as `absent`, a declaring one as `verified` after its new case). *Who is hurt*: a TypeScript hook that switches exhaustively over `member` with a `never` default stops compiling. *How to migrate*: add the arm.
364
+ - **Downgrade, stated.** The anchor's `expectedScopes` key is tolerated by an older binary's row validator (it refuses only the keys it names), so an older engine replaying an authorized request does not judge the set.
365
+ - **What still stands (named, not closed; KL-2304-a).** The degraded lane holds no lock between its read and its delete: an entry moved to another scope with unchanged content in that window is not seen. Two principals that present the same grant set share the requestId namespace (the engine holds no principal; the set is the identity it can compare). Under a grant, a `{ scope }` erase of a scope holding an unledgered file refuses without saying which (the behavior narrowing above).
366
+ - **Consumers.** @server: `POST /v1/memory/erase` can pass the principal's set as `expectedScopes` and retire `erasureEnvelopeRefusal` (`memory-operator-faces.ts`), which today refuses every `ids` / `sessionId` selector under an envelope; add `config.memory_erasure_scope` to the compliance failure code table (unclassified, it would answer 500). The two SQL twins have no evidence face — they ride the degraded lane, judged by the engine, and need no declaration; a twin that gains `eraseWithEvidence` must declare `judgesErasureScopes: true` and pass the contract's new case. @dgx: a self-hosted backend certified through `memoryBackendContract` that offers `eraseWithEvidence` declares the seat and passes the same case.
367
+ - **Pins.** `test/backlog2304-erasure-scope-seat.test.ts`: the three selector forms out of set / unattributable / place selector including an empty scope, the ghost-file cost, the canonical anchor record, replay under same / other / no set with the set check ahead of the selector check, two commit-then-crash forms converging without a live row, forged authorization records authorizing nothing at replay and a malformed recorded set failing the row validator, the shape rule on both verbs, the undeclared evidence face, the direct File face call, the degraded lane, a host re-add in another scope surviving a replay, conflicting projection records, the hash-free selector-mismatch text, an over-returning degraded read face, and the three actor counterexamples (no memory path reads an actor; lineage keyed by session; the seat leaves no standing state). `memoryBackendContract` gains the seat case (File verified; it judges the refusal by code — its text is pinned for core's own lanes, which mint one refusal).
368
+
369
+ ### The erasure attestation is version 2 — `complete` means every carrier of an erased entry in this store is gone, each carrier class answers what it removed and what remains, and no slug reaches the attestation or the evidence chain (#1917 S1b-1; hard-breaking, open to veto; behavior change, open to veto; closed sets: +1 `ERASURE_CARRIER_CLASSES` (eight words); exports: +3 type names `ErasureCarrierClass`, `ErasureCarrierAnswer`, `ErasureCountAnswer`; `MemoryErasureAttestation` and `ErasedBinding` reshaped) (@server @dgx @test)
370
+
371
+ - **Before.** `complete` judged only the selected ids' account rows: a quarantined copy of an erased entry stayed in the quarantine directory ("preserve-not-delete") and was listed by file name; the consolidation archive and plan workbook kept the text untouched and unmentioned; the attestation (`erased[].binding.slug`, `erasedPreviously[].from`) and every delete row on the append-only evidence chain kept the entry's slug — a model-chosen file name that can restate what was erased; and the degraded lane (no evidence face, the two SQL twins) answered `complete` with an empty, unenumerated residual set.
372
+ - **Now.** `v: 2`. `erased[].binding` is `{ state: "bound", scope }` or `{ state: "unbound" }`; `erasedPreviously` rows are `{ id, ev, at }`. `residuals` is the carrier table — `carriers` answers each of `projection`, `shadow`, `indexLine`, `quarantineCopy`, `planArchive`, `planWorkbook`, `evidenceBinding`, `backendDerived` with `{ removed, remaining }` or `{ unverified: true }` — plus `quarantineUnattributed` and `derivedEntries` (store-level counts that do not decide status), `replay` (`"converges"` on the evidence lane, `"unsupported"` on the degraded lane) and `propagation`. `status` is one law for every lane (`erasureStatusOf`): the v1 conditions, and every carrier class answering `remaining: 0`. A quarantine file whose frontmatter id is erased is deleted under the request's lock; a file no id can be read from is counted and left. A new delete row lands on the chain with its `scope` and no slug (the transaction journal keeps the full binding for recovery and is deleted at close). The paths the derived-index sweep owes live only in a transient control-plane record (`erasure-sweeps.json`, by requestId; each path relative to the store root and read at the root the store is opened at now), written from the request's journal right after its commit point — and by recovery from any erasure journal it rolls forward, including one an older binary left; `MemoryEngine.eraseMemoryEntries` sweeps every MEMORY.md line naming one of those paths — whoever holds the path now, an occupant's line returns in mechanical form at the next materialize — fsyncs each rewritten index, and drops the record row, all under the store's transaction lock and the record's lock (two sweeps of one index never interleave, and a commit, a recovery or a re-anchor never lands inside a sweep). The engine answers the index class on its own copy of the face's attestation (a frozen third-party object can no longer keep a failed sweep `complete`). The degraded lane answers every store class `unverified` and is never `complete`.
373
+ - **Contract sentences (the attestation's JSDoc).** The evidence chain is append-only and a delete row never expires with any retention period; on the evidence lane a replay of the same requestId converges with no time limit (a ≥ 24 h replay window holds); the degraded lane promises no replay convergence and says so.
374
+ - **Behavior change, open to veto.** *Until S1b-2 lands (same window)*: a File store with any file under `distiller-plans/` or `consolidation-plans/` answers `planArchive` / `planWorkbook` `unverified`, so **every erasure on a store with consolidation history is `partial`** — true: the archive keeps the prompts and answers verbatim and the workbook keeps product text, and this lane does not read them yet. *Permanently*: an erased entry that was ever renamed or moved, or whose delete was recorded before this version, keeps `evidenceBinding.remaining > 0` (the chain keeps those rows — KL-1917-a) and stays `partial`, and a replay cannot clear it. The store face called directly (`eraseWithEvidence`) answers `indexLine: { unverified: true }` — `partial` — while its record waits for the engine's sweep. A failed index sweep keeps the request `partial` (v1 said `complete` and listed the file on `indexUncleared`).
375
+ - **Hard-breaking.** *What changed*: `MemoryErasureAttestation.v` is `2`; `ErasedBinding` loses `slug`; `erasedPreviously[].from` is gone; `residuals.quarantineHits`, `residuals.quarantineOpaque` and `residuals.indexUncleared` are replaced by `residuals.carriers`, `quarantineUnattributed`, `derivedEntries` and `replay`; quarantine copies of an erased entry are deleted; a delete row on the chain carries `scope` instead of `from`. *Who is hurt*: a host that reads the attestation's v1 fields — @server `memory-operator-faces.ts` / `memory-compliance.ts` read `erased[].binding` and `residuals.quarantineHits` — and a reader of `transfers.jsonl` that takes a delete row's projection path from `from`; an operator who relied on quarantine keeping a copy of an erased entry for forensics. *How to migrate*: dispatch on `v` (a reader of `v > 2` refuses); read the carrier table; locate an erased entry by `requestId` in your own task state, never by slug; read a delete row's scope as `scope ?? from.scope`; export a quarantined copy before erasing if you need it.
376
+ - **Downgrade, stated.** An older binary reads a chain-form delete row (it does not refuse the unknown `scope` key), and its own recovery of a journal this version wrote is unchanged (the journal keeps `from`). An older binary that appends a journal's rows writes the slug-bearing form again, and its scoped export reads a chain-form delete row as unbound (counted as unsliceable; a full-store export carries it).
377
+ - **What still stands (KL-1917-a, KL-1917-b).** Chain rows minted before this version and every move / migration-bind row keep their slugs (exit: the candidate ticket that gives move forms a slug-free chain form). The record is keyed by requestId alone: when two executions of one requestId overlap (a host retry over a still-running first call), the first sweep settles the whole row, and an index line an outside actor restores between that sweep and the second execution's own sweep is not seen by the second — which then answers `complete`. A record that cannot be read or written, or a row whose path is absolute or leaves the store root, refuses like every strict control-plane file (the erasure, or the recovery leg). A non-File evidence face keeps no record, so the engine sweeps no index line for it — its own `indexLine` answer stands.
378
+ - **A store move while a sweep is owed.** A record row binds no root, so a store moved and re-anchored with a sweep still owed (its erasure answered `partial` on `indexLine`) replays that erasure at the new location: the sweep removes the line there and the row goes only then. `reanchorMemoryStoreRoot` refuses what it refused in 7.58.0 — a committed transaction pending recovery — and nothing more; 7.58.0 kept no sweep record, so a re-anchor is not narrowed. The erasure's settlement does narrow one thing: it now waits for the store's transaction lock (15 s, extended to a held lock's 30 s stale line), and one that does not get it in time answers `partial` (7.58.0 did not wait). The row goes only if the store root is still the anchored one after the sweep (read at that act): an engine still open at the old root when another holder moves and re-anchors the store — between the store's commit and the engine's sweep, or while the sweep reads — keeps the row and answers `partial` (`indexLine: unverified`), and a replay at the new root settles it. The settlement proves the store's transaction lock is still its own before it sweeps and again before the row goes, the same check a commit and a re-anchor make: an engine that held the lock past its stale line and had it taken keeps the row and answers `partial` the same way. A row path is split into segments the way the platform splits paths, so on POSIX a file name holding `\..\` is one segment and its row is recorded; the row is derived before the commit point, so a target it cannot name refuses with nothing committed. Pins: `test/backlog1068-sweep-reanchor.test.ts` (move, damaged anchor in place, move behind a link; the absolute row form refused; the stale holder after a re-anchor, a transaction in progress, a move during the sweep, the lock taken during the sweep; a `\..\` file name). The degraded lane (a sweep with no request id) answers `indexLine: unverified` when its holder loses the transaction lock mid-sweep — it cannot vouch for `remaining: 0` — where it answered `{ removed: 0, remaining: 0 }` before.
379
+ - **Consumers.** @server: the two SQL twins ride the degraded lane — their attestations are now always `partial` with `replay: "unsupported"`; read `erased[].binding.scope` and the carrier table, retire the `quarantineHits` / slug reads, and take erased-entry location from `requestId`. @dgx: the core counterpart of ha's `source_tombstones (root, source_event, …)` is the attestation plus the chain's anchor / request / delete rows — request (`requestId`), subject (`expectedScopes`, `erased[].binding.scope`, `sessions`) and entry ids, never text or a hash; a self-hosted evidence face answers the eight classes and `replay: "converges"` (`memoryBackendContract` checks the shape and that no slug or text appears). @test: the S1b-1 cells below are the black-box handles.
380
+ - **Pins.** `test/backlog1917-erasure-attestation-v2.test.ts` (14 cells; baseline 13 red; 17 mutations, all killed): an older binary's pending erasure journal rolled forward with its record and swept on replay; every sweep under the record's lock; the clean table; projection copies; a quarantined copy erased and an unattributable file counted; the consolidation plane answered `unverified`; a rename keeping `evidenceBinding` and the request `partial` across a replay; `derivedEntries` counted; slug-free attestation and new chain rows on the engine and organic lanes (byte search); commit-then-crash with the path reused by a new entry, the replay removing every line naming the path and the next materialize restoring the occupant's; a record surviving a reopen until the engine settles it; recovery accepting a journal row the chain already holds in its older full form; the degraded lane never `complete`. `test/design178-v2b-erasure-evidence.test.ts` re-pinned to v2 (quarantine, index sweep, frozen third-party attestation); the neighbour cells `backlog1094` ⑥ (an erasure through a linked root of an entry renamed earlier in the cell: `evidenceBinding` 1, partial) and ⑲d (the index class, not a file name) and `backlog1103` ⑪ (the source scan's row for the sweep's new method) read v2. `memoryBackendContract`'s erasure case asserts v2: every class answered, `replay: "converges"`, no slug or text in the deliverable.
381
+
382
+ ### Memory notices are filed per scope — a session reads the notices of the scopes it mounts and no other (#1896 / #2423; hard-breaking, open to veto; security)
383
+
384
+ - **Before.** The memory notice queue was one queue per control plane. Every enqueue (harvest tail, read-side adoption, consolidation, erasure, challenges) appended to it with no scope, and a session's first injection drained the whole queue: a session that mounted only a shared `home` scope read another member's private-scope notices — the rejected file names (`write rejected [secret] <path>`) and the counts (`N added, M updated`) — and, because the drain is destructive, the session that owned those notices never saw them. The bound (20) and its fold count were shared too, so one scope flooding the queue pushed every other scope's notices out and the fold count told every reader how busy the others were.
385
+ - **Now.** One bounded queue per scope inside the same `announcements.json` (each with its own bound, fold count and standing-condition sweep). `MemoryAnnouncement.scope` is required: a notice is filed under the one scope it reports on. `drainMemoryAnnouncements(controlDir, scopes)` / `peekMemoryAnnouncements(controlDir, scopes)` take a required scope list and read only those queues; the engine's injection drains the scopes the session mounts plus its write scope, and every other queue stays for the session that mounts it. A harvest that reports on its write home and on a read-only layer at once files each line under the scope that owns the path (the write face's own facts — patch counts, a refused harvest, a conflict, a degraded run — under the write scope; a held entry's warnings under the hold's scope; a link is judged by the directory it sits in, never by what it points at); a count over several layers is split per layer, and a count over the whole control plane (expired settlement rows, unsettled lineage transactions) is the host's. A fact of the whole store that names no scope, path or count (a ledger reset, a torn evidence tail, a v1-compat window) is filed under every registered scope; a notice that names no single scope — a count or ids over the whole store (the v2 ledger upgrade line, the unbound-row disclosure, an ambiguous projection across scopes) — reaches no model face and goes to the host's incident sink as `memory.announcement_withheld`; a session-level event with no scope in hand (an external delegation settlement, a failed settlement write) reaches no model face either and is written only to the process log (`console.warn`), not to the incident sink. A challenge notice is filed under the challenged entry's scope, read from the committed store after the synchronous ledger append; each filing is bounded on its own (5 s — past it the lines go to the host and a late answer files nothing) and the next mount waits for the filings at most as long (a wait that runs out, and a filing that fails, are said as `memory.announce_failed`). A store-read fault that relays its error text is the host's (the text can name any scope's rows). A cross-scope move or duplicate-projection notice no longer names the other scope's path.
386
+ - **Hard-breaking (open to veto).** *What changed*: `MemoryAnnouncement.scope` is required; `drainMemoryAnnouncements` and `peekMemoryAnnouncements` take a required `scopes` array (no every-scope spelling) and answer `{ folded, queue, unscopedDiscarded }`; `enqueueMemoryAnnouncement` throws a `TypeError` on a line without a scope; a queue file written before this version is discarded unread at its first locked rewrite and its line count is said once to the incident sink (`memory.announcement_withheld`); the unbound-row disclosure, the v2 ledger upgrade line and the two delegation-settlement lines are no longer model notices. *Who is hurt*: a host that calls the package-root `drainMemoryAnnouncements` / `peekMemoryAnnouncements` / `enqueueMemoryAnnouncement` directly, and test fixtures that write queue lines or the queue file by hand. *How to migrate*: pass the session's scopes to the readers (`[...memory.scopes, memory.writeScope]`), add `scope` to every hand-built line, and read the host-only notices from the engine's `onIncident` sink (code `memory.announcement_withheld`; the two delegation-settlement lines are in the process log only).
387
+ - **Consumers.** @server: no call of the three queue functions was found in the server source read for this change (a local checkout, not the release head) — a host that does call them passes the session's scopes and adds `scope` to its fixtures; the incident sink gains `memory.announcement_withheld` (a posture code — not a governance verdict). Whether a multi-tenant deployment shares one control plane across tenants was not read here — with this version it no longer decides who reads a notice. @cli: no call site found either (same reading); no change.
388
+ - **Pins.** `test/backlog1896-announcement-scope.test.ts` (per-scope drain / flood / sweep / required scope / upgrade discard / transfer; HOME-only session reads none of the private scope's notices while their owner still does; every model face of a HOME-only session — injection index, `memory_search`, `memory_get`, `memory_index`, the notice block, the read-only notice — free of the private scope after a privileged read proves the private rows exist; one harvest's write-home and read-only-layer lines each in their own queue; a rejected link in the private home pointing at a HOME file stays the private scope's line; a transfer whose destination cannot be written leaves the source whole; challenge notices in the entry's scope, the unknown id to the host, a hung filing bounded on its own and not holding the next one, the mount's wait bounded however many are queued, a failed filing said); re-pinned to scopes: `memory-engine-s2-announce`, `rb495-t1-occurrence-identity` (the unbound-row disclosure is now the operator's: said once per reading, A→B→A included, never queued), `memory-ledger-v2`, `design383-slice1-security`, `design178-v2b-erasure-evidence`, `memory-dual-root` and the other queue readers (through `test/helpers/memory-announcements.ts`, a test-only reader of every registered scope).
389
+
390
+ ### The A2A lock key and the A2A capability are words of the closed sets — `LockedKey` gains `a2a`, `ComplianceCapability` gains `a2a_peers`, so a deployment's A2A veto can be written and a task that declares a peer is refused under it (#2500; additive; behavior narrowing for a deployment whose posture resolver can fault, open to veto; hard-breaking: none; closed sets: `LockedKey` / `LOCKED_KEY_REGISTRY` +1 word `a2a`, `ComplianceCapability` / `COMPLIANCE_CAPABILITIES` +1 word `a2a_peers`; exports: no root name added or removed) (@server)
391
+
392
+ - **Before.** The two words did not exist, so neither veto could be written. A lock declaration listing `a2a` was an unknown key: `config.locked_registry` on every prepare of that deployment (measured on a real Runner at the previous release: a task with no peer at all failed), not a lock on peers. A posture naming `a2a_peers` was an unparseable posture, which prepare treats as a resolver fault; that fault denies every capability the engine manages, and none of them was the peers, so a task declaring a peer completed under it (measured: a posture denying `a2a_peers` and a thrown resolver both ended `completed`, the recording listener hit twice). A task that added `a2a_peers` to its own `complianceAdditionalDenies` was refused as `config.invalid_argument` (an unknown word), not as a denial.
393
+ - **Now.** One registry row and one capability word, each read by the code that already reads its set. `LOCKED_KEY_REGISTRY.a2a = { specFields: ["a2a"] }` — the `mcp` row's twin: a task that carries `TaskSpec.a2a` under the lock is refused wholesale (`config.locked_key`) before any peer is contacted, and the preflight reads the peers seat once — the lock check's read — and resolves nothing from it under the lock (a seat that answers differently to a second read reaches nothing). `a2a_peers` is a member of `COMPLIANCE_CAPABILITIES`: a posture's `additionalDenies`, a task's `complianceAdditionalDenies` and a governed script's list accept it through the one array they already read; prepare's conflict check beside `mcp_servers` refuses a task whose preflight snapshot declares a peer while the capability is denied (`config.compliance_denied`; `config.compliance_required` when the denial is the resolver fault's) before any peer is dialed (the check sits in task preparation, which every leg — fresh run, resume, delegated child — enters). No builtin profile floor names it (`BUILTIN_COMPLIANCE_DENIES` follows the policy-limits table, which has no A2A row), so a deployment that asks for nothing sees nothing.
394
+ - **Behavior narrowing (open to veto).** A resolver that throws, or returns a posture the engine cannot parse, now also denies `a2a_peers` (the fault arm denies the whole closed set), so a task that declares an A2A peer is refused `config.compliance_required` where it used to run and dial the peer. Measured on a real Runner against a recording loopback listener, previous release vs this one: thrown resolver + `a2a: [peer]` — `completed`, listener hit twice (the card probes) → refused, listener not hit. The narrowing reaches only a task that declares a peer under a faulting resolver (the newly valid words are additive: a lock declaration listing `a2a` no longer fails every prepare, and a task or posture may now name `a2a_peers`). Hard-breaking: none; a consumer that switches or builds a `Record` exhaustively over `ComplianceCapability` or `LockedKey` sees one more word to handle at compile time.
395
+ - **Reach, stated.** The veto rides the task's preparation: the public library entrance `materializeA2aTools` (like `materializeMcpTools`) passes no prepare, so no posture and no lock reaches a host that calls it directly — the module header of `compliance.ts` now says so; a refresh re-dials the peers prepare admitted and admits no new one. `TaskSpec.a2a` is the only channel that declares peers (`RunnerDeps.a2a` carries only `isolatePeers`).
396
+ - **Consumers.** @server: `task-a2a.ts` (`a2aInjectionHonored`) reads both words as spelled strings (`lockedConfigKeys?.includes("a2a")`, `denies.has("a2a_peers")`) and says in its header that the env channel could not write them; with this release it can (`lockedConfigKeys` is read against `LOCKED_KEY_REGISTRY`, `complianceAdditionalDenies` against `COMPLIANCE_CAPABILITIES`) — read the typed members (`LockedKey`, `ComplianceCapability`) instead of spelling the words, and retire the "not in core yet" notes there; a request body that adds `a2a_peers` through the tighten-only seat is now accepted by the same array. Read in the server checkout, not run by this car. @test: a black-box cell for a deployment that locks `a2a` (a task carrying `a2a` is refused `config.locked_key`, a task without one runs) and for a posture that denies `a2a_peers` (refused `config.compliance_denied`; resolver fault refused `config.compliance_required`; no peer contacted).
397
+ - **Pins.** `test/backlog2500-a2a-closed-set-words.test.ts` (12 cells; 8 red on the previous release's tree, 4 controls green on both); `test/prepare-caps-and-workflow.test.ts` (the degraded deny set gains the word; the conflict check on the preflight snapshot, with the empty-list and no-denial controls). `docs/CLOSED-SETS.md` registers both sets (rows and notes); the governed-agent README, the `RunnerDeps.lockedConfig` JSDoc and KL-469-k list the registry by hand and now say `a2a`; `test/backlog1473-task-tighten-seat-family.test.ts` quotes the closed-capability sentence and now lists `a2a_peers`.
398
+
399
+ ### A parked workflow call is a call that has not been answered yet — a decision delivered to the still-running run drives the parked child on in place (`redeemWorkflowParks`), and the run suspends only when nothing but a person can move it (#2561; hard-breaking, open to veto)
400
+
401
+ - **Before.** The first workflow child to park at an approval gate threw `WorkflowAgentParkedError` into the script at once, every later spawn was refused (a call queued behind the concurrency slot included), and the run ended on that park after its in-flight siblings drained. The only way to apply a decision was a second run resuming from the first — which `startWorkflow` refuses while the source is still active in the process. So a decision taken while a sibling leg was still running could not be delivered: the card kept reading `parked: true` until the run ended.
402
+ - **Now.** The parked call waits. The run keeps running its other calls (siblings, chains, calls queued behind the slot). `redeemWorkflowParks(runId, scope, decisions)` (package root) hands decisions — the same `WorkflowParkedResume` a resume takes — to a run that is live in this process: each decision whose token names a park the run is waiting on is disposed exactly as a resume disposes a parked ordinal (the checkpoint store's word, then one disposition): a pending checkpoint with an outcome drives the parked child on the same record and ordinal and the call returns its result; an acknowledgement without an outcome keeps the park; a checkpoint the store no longer calls pending settles the call failed (`workflow.park_not_pending`). The answer says what the run did per decision (`driving` / `settled` / `kept_parked` / `already_taken` / `not_parked_here` / `unreadable`), or that it cannot take decisions: `suspending` (with `ended`, settling at the run's end), `not_active` (no run of that id and scope runs here), `not_armed` (no checkpoint store to prove a park against). The run suspends when every call it still has unanswered is a parked one — checked one macrotask after any change, so the script's own continuations run first — or at once when it is cancelled or its deadline fires; then each waiting call is answered with `WorkflowAgentParkedError`, later spawns are refused with it, and the park is the run's terminal, as before. A body that returns while a call of its run is parked or being driven from a park waits for the run to suspend or for every call to be answered. The parked row reads `running` again (its token cleared, a fresh `agent_start`) the moment the drive starts, so `WorkflowRunSummary.parked` goes absent while the run is still running. The fork guard on `resumeFromRunId` of an active run is unchanged.
403
+ - **One journal rule.** The entries of one call reach the journal store in the order they were issued (an append for a call waits for the store's answer to that call's previous append; calls are not ordered against each other) — a park entry whose bounded wait gave up but which commits late can no longer replace the result the same call was driven to.
404
+ - **Hard-breaking (open to veto).** *What changed*: `ctx.agent` / `ctx.agentStream().result()` of a call whose child parks no longer reject at the park; they wait for a decision delivered to the live run or for the run to suspend. Spawns made after a park and before the suspension run instead of being refused. *Who is affected*: scripts that use the park error as control flow (a `catch` that does something else right after the park — it now runs only at suspension); tests and criteria that pin "the sibling queued behind the slot is refused after a park". *Migration*: none for a script that lets the park error propagate (same error, same terminal); write work that should happen while a call is parked in parallel with it rather than in its `catch`.
405
+ - **What still stands (named, not closed).** Calls that chain off concurrent answers (`A → A2` beside `B → B2`) get ordinals in completion order — the existing reason `pipeline` forces divergence; a run that keeps spawning after a park makes it likelier that a later resume of that run finds a live call on another call's parked ordinal and refuses loudly (`workflow.parked_call_changed`) — nothing runs twice. A park-capable run that crashed while running is still not resumable (`record_not_terminal`). A run whose claim grant was superseded drives with its own holder and re-parks on the lost CAS. A revived wa* row restarts its `seq` at 1.
406
+ - **Consumers.** @server (S-2092): the decide route's workflow arm calls `redeemWorkflowParks(runId, scope, [{ token, outcome }])` first — `live` + `driving` / `settled` ⇒ accepted; `kept_parked` / `unreadable` ⇒ the card stays pending; `already_taken` ⇒ an idempotent repeat; `suspending` ⇒ await `ended`, then the existing resume lane; `not_active` ⇒ the existing resume lane. No new bit: `parked` is still `runParkedOf`. @test: G23 / TF3 ("absent after the decision") read as above.
407
+ - **Pins.** `test/backlog2561-in-run-park-redemption.test.ts` (real Runner, R1–R12: both lanes, acknowledgement, delivery answers, replay of a redeemed ordinal, late park append, seat before publish, body return, a resume's re-parked ordinal, chain continuations, an expired checkpoint, a cancel while a body-returned run waits on a driven park); re-pinned to the new law: `backlog642` (a sibling queued behind a park runs; a hung failed-entry append still does not hold a suspending run) and `backlog1514` C13 (a refused drive's slot goes back before its park record is waited on — the queued sibling's leg runs at once).
408
+
409
+ ### The card-edit face reads a command rule's content through the validator's one spacing fold — a stray blank inside the parentheses no longer lands another row than the clean spelling (#2564; behavior change, open to veto; closed sets: none; exports: none) (@server)
410
+
411
+ - **Before.** The edit face's muscle-memory rewrite (one trailing ` *` becomes the canonical `:*`) looked for the star in the text as typed, while the validator reads a command rule's content with its spacing folded — two readings of one spelling. So a stray blank inside the parentheses changed the outcome: `Bash(adb *)`, `Bash(adb *)` and `Bash( adb *)` persisted the prefix row `Bash(adb:*)`; `Bash(adb * )`, `Bash(adb<TAB>*)`, `Bash(adb *<TAB>)` and `Bash( adb * )` reached the validator unrewritten and persisted the wildcard row `Bash(adb *)`; on a chain card `Bash(cd /tmp && adb pull *)` was accepted as the compound prefix while `Bash(cd /tmp && adb pull * )` was refused `unsupported.wildcard`. Blanks AROUND the rule or before its `(` (` Bash(adb *)`, `Bash(adb *) `, `Bash (adb *)`) are not part of this: since 7.56.0 (padded rule names) they are refused `invalid.grammar` with the spelling to copy (`respelling`), on the edit face as everywhere the rule syntax is read.
412
+ - **Now.** One reading: the normalizer folds a command rule's content with the validator's own `foldSpacing`, then looks for the trailing ` *` — one sentence, one canonical row (`Bash(adb:*)`, `Bash(cd /tmp && adb pull:*)`). A blank inside quotes stays data (the rule admits only the command spelled that way); unbalanced quoting passes through to the validator's own refusal; a non-command tool's content is not folded (a path's blank is part of the path). Blanks around the rule stay refused as written — the reference's editor trims what a person typed before it validates, so a surface trims before it submits; `precheckEditedRuleText` and the confirmation answer the same. The settled-replay arm reads a retry through the same normalizer (a retry spelled with a stray inner blank is the same choice). Consequence of the form space probed (the pin states it by corpus, not proof): the card-edit face lands no `wildcard` row for a command text — `exact`, `prefix` and `pattern` remain; the store, import and sync doors read `wildcard` as before.
413
+ - **Behavior change (open to veto).** (1) *What changed:* the four inner-blank forms above that persisted the wildcard row `Bash(adb *)` persist the prefix row `Bash(adb:*)`; the chain form with a blank before the closing paren is accepted as the compound prefix instead of refused. (2) *Who is hurt:* a host whose test pins the wildcard row as reachable through the edit gate (server's `permission-rules-lane` G2w pins the 7.55.0 form, ` Bash(adb *)` → wildcard: on 7.56.0 that text is refused, and here the inner-blank forms land prefix); a wildcard row an earlier version stored from such an edit is not rewritten (it still reads as it did). A settled card edit minted before this version keeps its receipt on a byte-for-byte retry; a retry spelled differently (the same sentence with another blank) no longer recovers it from a stored wildcard row — it reads as the prefix row now, a different row (`selection_mismatch`). (3) *How to migrate:* read the edit gate's reachable matches as `exact` / `prefix` / `pattern`; trim what a person typed before submitting.
414
+ - **Consumers.** @server: the S-2071 question is answered — blanks around a rule: not accepted, since 7.56.0 (loud, `invalid.grammar` + `respelling`); the edit gate's `wildcard` reachability ends with this version — flip the G2w pin to the refusal and narrow the contract's reachable words (§968) to `exact` / `prefix` / `pattern`.
415
+ - **Pins.** `test/backlog2564-edit-spelling-one-fold.test.ts` (E1 seven spellings of `adb *`, each a confirmation on a real card and the redeemed row, one canonical spelling; E2 no wildcard row, the validator itself still reading it; E3 chain card, three spellings; E4 a blank inside quotes is data; E5 unbalanced quoting passes through; E6 a star the body carries is not rewritten; E7 a path rule is not folded; O1 five spellings with a blank around the rule, refused on both faces with the card left open; O2 the respelling is accepted; R1 a settled retry through the fold; R2 a record settled before the fold keeps its receipt on a byte-for-byte retry, and another spelling of its sentence is `selection_mismatch`) — nine cells red on the base, and each guard family red under its own mutation.
416
+
417
+ ### `thinkingOffSpelled` is the one answer to "can this model's thinking be turned off" — derived from the wire table, no catalog key for it; a completions model whose `thinkingFormat` names no dialect now answers `false`
418
+
419
+ - **What changed.** `thinkingOffSpelled(model)` (already on the package root) is the one reader of whether the wire carries a disable
420
+ key for a model, and the one answer a host that lists models serves. It is derived from the entry's wire table (API family,
421
+ `compat`, `thinkingLevelMap.off`, `reasoning`), so `Model` grows no key for it, the way `reasoningEffortLevelsOf` derives the
422
+ supported effort tiers (Claude Code derives its catalog row's `supportsThinkingOff` the same way — it declares nothing per row).
423
+ The reader's JSDoc states the contract, and `docs/sdk/03-brains-and-models.md` and `INTEGRATION-CORE.md` §1.10f say how a host
424
+ wraps it. The chat-completions dialect names are now ONE closed table (`completionsFormatOf`, `brain/reasoning.ts`) that both the
425
+ reader and the wire applier's dialect lookup read, so what the reader claims and what the wire carries are one judgement of the
426
+ name.
427
+ - **Behaviour change (a malformed `compat` corrected; open to veto).** What changed: a completions-family model whose
428
+ `compat.thinkingFormat` names no dialect — a string outside the closed set (`openai`, `openrouter`, `deepseek`, `together`,
429
+ `zai`, `qwen`, `qwen-chat-template`), or a value that is not a string (an array, an object, a boxed string) — answered `true`
430
+ ("the wire spells off") while its wire carried no thinking key of any tier; it now answers `false`. Who is hurt: a host that
431
+ handed the engine such a model object and relied on the `true` — the classifier's answer-only seat then takes the `low` tier with
432
+ the thinking allowance in its output cap where it took `off` before, the `classifier.role_defaulted` line says "cannot turn
433
+ thinking off" for it, and a listing that wraps the reader serves `false`. A server's catalog never reached this: its compat
434
+ reader drops a bad format before the engine sees the model. How to migrate: declare `compat.thinkingFormat` as one of the seven
435
+ names (or leave it undeclared for the stock `openai` rules); nothing else changes — an undeclared format and every well-formed
436
+ one answer as before.
437
+ - **Consumers.** @server: a model row served by `GET /v1/models` can carry `supportsThinkingOff` as `thinkingOffSpelled(model)`
438
+ (the same wrapping as `supportedEffortLevels` from `reasoningEffortLevelsOf`), next to the row's `reasoning`. @client-core: read
439
+ that key where it is served instead of probing, and a probe's `cannot_disable` verdict need not delete the entry's
440
+ `thinkingFormat` to be recorded. @test: the reader and the applier's `off` arm answer alike for every model of the reasoning wire
441
+ matrix.
442
+ - **Pins.** `test/backlog2566-thinking-off-reader.test.ts` (R1 the root carries the reader and a `supportsThinkingOff` on the entry
443
+ changes nothing; R2 reader ⇔ the applier writes a disable key, every matrix model; R3 the same through the real brains; R4 a
444
+ malformed `thinkingFormat` answers `false` from the shared judge; KL a malformed format is still accepted and writes nothing on
445
+ every tier).
446
+ - **Known limit.** A bad `thinkingFormat` is read as "no dialect" and accepted: nothing refuses it where the model enters the
447
+ catalog and nothing announces that no thinking key will go out for it.
448
+
449
+ ### A case twin stored in a session's rules can be taken out by its owner: the write judge and the tighten comparison read one roster (#2573; behavior change (one refusal retired), open to veto; hard-breaking: none; closed sets: none; exports: none) (@client-core @server)
450
+
451
+ - **Before.** A session's stored rules holding a case twin of an engine tool (`toolDeny: ["BASH"]` beside the catalog's `Bash`,
452
+ written past the write gate by an older release) could be neither kept nor removed by the session's owner. The write judge
453
+ read an entry's tool name against the engine's catalog ∪ the names the store declares (`mountedToolNames`) — `BASH` reads as
454
+ nothing there, so a write that kept it was refused `inert_entry` — while the tighten comparison (`loosenReasons`) read it
455
+ against the declared names alone, where `BASH` is a tool's name: taking it out was a loosening, so the owner's (non-operator)
456
+ write was refused `loosen_forbidden`. Every run of that session was refused at the policy audit (`config.legacy_tool_name`)
457
+ in the meantime; only an operator write cleared the row. Two readers answered one question two ways.
458
+ - **Now.** One roster, defined once (`storeRoster`: the engine's catalog ∪ the store's declared names) and read by both: the
459
+ write judge's refusal of an entry that reads as nothing and the comparison's effective set. A case twin of an engine tool is
460
+ nothing on both seats, like a retired name already was (#1156): the owner's write that drops it is accepted (the deny list
461
+ guarded nothing), and adding one to an allowlist widens nothing. A write that KEEPS the twin is still refused `inert_entry`
462
+ (the entry names nothing; the way out is to drop it). A twin the store declares is a real tool's name on both seats and
463
+ guards as before.
464
+ - **Behavior change (open to veto).** *What changed*: removing a case twin of an engine tool's name from a stored session deny
465
+ list is no longer a loosening (the exported `loosenReasons` and the write judge it feeds, both bundled stores). *Who is
466
+ hurt*: a deployment that mounts its own tool under a case twin of an engine tool's name (its own `BASH` beside `Bash`, or a
467
+ tool alias spelled so) and did not declare it in the store — the write judge already refused writing such a deny (it read the
468
+ name as nothing); a stored one (an operator's, written before the write gate read catalog twins) can now be removed by a
469
+ non-operator write, as a retired name's already could (KL-2573-a). The store has no run's roster, so only its declaration can
470
+ tell a live twin from a dead one. *How to migrate*: declare the name in the store's `mountedToolNames` (the store then guards it
471
+ as before).
472
+ - **Consumers.** @client-core: a removal write for a stored case twin (the `nothing_to_remove` class) is accepted now, in the
473
+ same write that may tighten; a write that keeps the twin is still refused. @server: no change — a durable backend calling
474
+ `judgeSessionRulesWrite` / `loosenReasons` reads the one roster with the new engine; a backend that re-implemented the
475
+ comparison keeps its own reading.
476
+ - **Pins.** `test/backlog2573-store-roster-one-reader.test.ts` (A the twin is removable through the write judge, the file
477
+ store on disk and the pure predicate, the allow side too; B a write that keeps the twin, a real loosening beside it, a
478
+ declared twin and a retired name keep their answers; C the one-answer law over a 28-entry corpus × five declarations: refused
479
+ as written ⟺ removal is no loosening / adding widens nothing). `test/backlog1930-near-miss-refuses.test.ts` D3 re-pinned to
480
+ the surviving reading (the owner takes the twin out and the session runs again).
481
+
482
+ ### The policy-name refusal carries its problems as data: `config.legacy_tool_name` `detail.problems` with the layer (#2574; additive; hard-breaking: none; closed sets: none; exports: none) (@client-core @server)
483
+
484
+ - **Before.** The prepare-time policy-name audit refused a run at the first entry it met (`config.legacy_tool_name`) with a
485
+ sentence and no `detail`; a shell that wanted to say which entries of which layer were refused had to parse the sentence,
486
+ and a layer with several refused entries showed one per rejected attempt.
487
+ - **Now.** The audit reads one layer's whole pass before it refuses. The sentence and the code are the first entry's, unchanged;
488
+ `detail` is `{ problems, total }`: one problem per refused entry in scan order (list by list, entry by entry), each
489
+ `{ code: "config.legacy_tool_name", field, entry, reason, layer }` — the four keys of an entry problem of a rejection body
490
+ plus the layer: `field` the policy list (`deny` / `ask` / `allow`), `reason` the name judgment's verdict word (`retired` ·
491
+ `unprefixed_namespace` · `unmintable_segment`, and `near_miss` for another spelling of a carried name), `layer` one of
492
+ `caller_policy` · `session_rules` · `ancestor_session_rules` (an ancestor's rules are not asked for case twins, as before).
493
+ At most 32 problems are listed and `total` is the real count; an entry longer than 128 characters (a sentence, not a name) is
494
+ counted in `total` and not listed — never shown cut (the failed terminal's `coded` snapshot drops a string past its bounds and
495
+ a list that does not fit whole, so the list is bounded where it is minted). A single refused entry is a list of one.
496
+ - **Limits (stated).** The layers are read in order (the run's own policy, then the session's rules, then each ancestor's):
497
+ the layer that refuses first is the one listed, and a later layer's entries show once it is fixed (KL-2574-a).
498
+ - **Consumers.** @client-core: read `detail.problems[].layer` instead of the sentence. @server: the same shape for the body
499
+ it mints (`detail.problems` of the rejection body, A.1f — `layer` is core's one addition: the layers are core's).
500
+ - **Pins.** `test/backlog2574-legacy-name-problems.test.ts` (A one pass lists every refused entry with its verdict word, the
501
+ ask list a list of its own, a list of one is the same shape; B the layer word on each of the three layers; C the sentence and
502
+ code are the first entry's; D the first refusing layer is the one listed; E through a real Runner the failed terminal carries
503
+ the detail, cut at 32 with `total` 40, thirty-two names of 128 characters all kept, an entry past 128 counted and not listed).
504
+
505
+ ### A halt reaches a compaction pass's summary call whatever the brain does with the signal (#2875; behavior change: a summary call that ignores the abort is no longer waited out)
506
+
507
+ - **Before.** Since 7.52.0 (#1828) every stop verb cuts every compaction pass, and the first-party brains end the summary call on the abort in every wait (connect, first byte, stream, a 429 / 503 `Retry-After` backoff). But the summary call itself trusted the brain to look at `options.signal`: a brain or gateway wrapper that did not held the pass — and `done` — until it answered (KL-1828-d).
508
+ - **Now.** The summary call is an await of the pass like the summary-provider consult and the credential callback: the pass signal firing first answers the call's abort outcome at once (a signal already fired dispatches nothing), the late answer is dropped, and the pass reads `compaction_outcome{outcome: "mooted", reason: "cancelled"}` with its `trigger` and the `pass` its `compaction_started` carried, as every cut pass does. One site (`completeSummarization`), every lane (turn boundary, prompt-too-long recovery, guard chain, end of task, `compactSession`). A halted run reads `haltedByUser: true`, `terminal.kind: "completed"`. KL-1828-d is closed.
509
+ - **Consumers.** @server @cli: no wire change, no new word. A halt landing while auto-compaction is summarizing ends the run within a second on every brain; where it landed is the open pass (`compaction_started` without its concluding frame until the `mooted` / `cancelled` one).
510
+ - **Pins.** `test/backlog2875-halt-compaction.test.ts` (① the turn-boundary auto pass: the summary request held open, a brain that ignores the signal; ② the recovery pass, both forms; ③ the summary call in a 429 backoff, a brain that sleeps a 429 out without the signal, the main call in a 429 backoff with its `gave_up` / "cancelled while retrying" status; ④ controls; ⑤ the call site: an already-fired signal dispatches nothing, a held call is cut, a stop inside the call's setup wins over the setup's throw, a late rejection goes nowhere, no listener per call); `test/backlog1828-stop-during-pass.test.ts` W1 re-pinned; `test/manual-compact-cancel.test.ts` ②c re-pinned to its own case — a real failure whose answer arrives before the cancel stays a failure (a cancel that fires before the answer is the call's abort outcome).
511
+ - **Limits.** A brain that ignores the signal keeps its call running after the cut, and its usage may be booked after the result is assembled (KL-2875-a). The main model call still trusts the brain to look at the signal (#2882).
512
+
513
+ ### Every refusal of an approval decide names where the fault is — a defect of the caller's payload carries `detail.field`, a damaged row carries `detail.reason`, and `detail.reason` on `checkpoint.invalid_outcome` is a row-integrity word and only that (#2592; additive wire words; hard-breaking for a host's total table over `CheckpointErrorField`, open to veto; closed sets: `CheckpointErrorField` 10 → 14 (+`outcome`, `updatedInput`, `decision`, `reason`), `CheckpointErrorReason` 29 → 30 (+`bound_input_hash_missing`); exports: none — two exported types gain members) (@client-core @server @cli @sdk)
514
+
515
+ - **Before.** Seven refusals on the approval decide's path carried no word at all: the resume's outcome that is not an object, a person's edit (`updatedInput`) that is not plain JSON data, a decision word outside `allow` / `deny`, a deny `reason` that is not a string, a deny `reason` carrying the engine's `<system-reminder>` tag — and a binding-version row whose pending call has no persisted `boundInputHash`, the one refusal of the seven that is a damaged row (the seventh, the admission's "no lane captured it" belt, is an engine invariant). A host that told a dead row from a fixable decide by "no `field` ⇒ row integrity" — a reading from absence — took the five payload defects for dead rows and hid cards a person could have fixed.
516
+ - **Now.** One rule. A refusal of an approval decide carries at most one of two words: `detail.field` when the decision, or the live state it was bound to, is what is at fault (`outcome`, `updatedInput`, `decision`, `reason` join `boundCallId` / `boundInputHash` / `boundGrantDigest` / `answer` / `hostDecision` / `approver` / `feedback` — each word's entry in the registry gives its recovery: correct the cell, re-fetch the pending list, deny and re-activate), or `detail.reason` when a facet of the stored row is damaged (`bound_input_hash_missing` joins the ten row-integrity words the resume screen already spelled — no re-decide of that row helps). `detail.reason` on `checkpoint.invalid_outcome` is therefore a row-integrity word and only that, which is what lets a host read "`reason` present, `field` absent" as positive evidence of a damaged row. A refusal with neither word is never a damaged row: it is a payload of a lane the set does not word yet (the review lanes' text payloads and the resource-limit lane's decision word) or an engine-invariant belt (the admission's lane-capture belt and the two post-claim belts of the resumed leg), and `docs/CLOSED-SETS.md` says so. The sentences are unchanged and a refused decide still leaves the row pending and redeemable.
517
+ - **Hard-breaking (open to veto).** *What changed:* `CheckpointErrorField` gains four words (`outcome`, `updatedInput`, `decision`, `reason`), 10 → 14; `CheckpointErrorReason` gains `bound_input_hash_missing`, 29 → 30. *Who is hurt:* a deployment that holds a `Record<CheckpointErrorField, …>` (the server's `CHECKPOINT_ERROR_FIELD_ROLE`) is tsc-red on the four new words until it places them, and a host that switches over `detail.field` without a default meets an unplaced word at run time; a host that read the missing `reason` of the damaged-row refusal as "not a row" now reads it as a row. *Migration:* add four rows — all four are cells of the decision whose recovery is the one `feedback` / `hostDecision` already have (re-decide the same token with the cell corrected); treat `reason: "bound_input_hash_missing"` like the other row-integrity words (no re-decide of that row helps, and no worker version redeems a row that lost its hash: expire it and start the task again).
518
+ - **Consumers.** @client-core: `refusedParkFromError` can delete its "no `field` ⇒ row integrity" inference and judge on the positive evidence — `field` present = an intact row whose decision is what to act on (by the word's own recovery), `reason` present and `field` absent = a damaged row, neither = not a row; the five payload refusals above stop reading as dead rows once the engine ships. @server: the HTTP 409 for `checkpoint.invalid_outcome` passes `detail.field` / `detail.reason` through unchanged (add the four field rows to the role table). @cli, @sdk: nothing to place; the two words are the ones the decision card already branches on.
519
+ - **Docs made true.** `docs/CLOSED-SETS.md`: the `CheckpointErrorReason` bullet said twenty-eight words while the union held twenty-nine (7.56.0's `skill_scopes_damaged` was not counted) and now says thirty and names every word, the three `installation_record_*` words by their full names; the one rule and the line of row-integrity words are registered there, and the pin reads them against the source.
520
+ - **Pins.** `test/backlog2592-policy-ask-refusal-words.test.ts` (F1–F5 each payload refusal on a real Runner over a durable park — `detail` exactly `{ field }`, the sentence as before, the row pending and then redeemed; R1 / R2 the damaged-row refusal `{ reason: "bound_input_hash_missing" }` against its control; C the words that already existed; T1–T4 the registry's counts and member names, the line of row-integrity words equal to what the source's `invalid_outcome` constructions spell, no construction spelling both words; Z1 / Z2 the census of constructions with neither word — the review lanes and the belts — exactly as registered); re-pinned: `backlog2240-feedback-refusal-field` T (the total table, 10 → 14 rows).
521
+
522
+ ### One composition for the environment a child spawned on this host starts with — the tool shell's children and a settings command hook's children read the same `hostChildEnv(policy, ...grants)`, so a hook starts from what the run's shell starts from (#2607; behavior narrowing, open to veto; the hook-runner widening it enables is a security widening, open to veto; hard-breaking: none; closed sets: none; exports: +3 `hostChildEnv`, `hostChildEnvProblem`, type `HostChildEnv`) (@server @cli @test)
523
+
524
+ - **Before.** The same settings hook saw two environments. A hook the engine host runs (the nine engine-owned events) started from a fixed list of twelve names (`PATH`, `HOME`, `SHELL`, `USER`, `LOGNAME`, `TERM`, `TZ`, `LANG`, `LC_ALL`, `LC_CTYPE`, `LC_MESSAGES`, `TMPDIR`) plus the request's `settings.env` and the hook's own variables — a list kept beside the server's hook runner, not by the engine; a hook the terminal client runs itself started from its whole process environment. The client documents the split as undecided (its KL0157). The engine composed its tool shell's child in `NodeExecutionEnv` alone (`inheritedHostEnv(policy)`, then `shellEnv`, then a per-exec `env`), so a hook runner that wanted the shell's reading had no function to call and wrote its own. A `shellEnv` / per-exec `env` entry whose value was not a string reached the child as Node's string of it (`[object Object]`, `8080`), and a name holding `=` became another name / value pair in the child.
525
+ - **Now.** `hostChildEnv(policy, ...grants)` (`src/core/secret-env.ts`, root export) is the one composition: `inheritedHostEnv(policy)` (a deployment's own credential is never inherited, under any policy, by name or by value), then each grant in order, each read once and after the inherited part (a later grant's value wins, names compared as the platform compares them — case-blind on Windows, the value landing under the spelling the name first had; an `undefined` value unsets; a grant is the host's explicit act and is not read against the declaration, as before), and `withheld` = the inheritance's findings the composed environment does not set. `NodeExecutionEnv` composes every shell and background-shell child through it, and its `withheldEnv` / `homeDir` / `cdPath` reads read it. The reading for a command hook (INTEGRATION-CORE §11, "A hook's child"): `hostChildEnv(<the run's inheritEnv>, <the run's settings-env grant>, <the hook's own variables>)` — the same policy the run's tool shell inherits under (absent ⇒ `"scrub"`; where no tool shell runs on the hook's host, the run's word applied there), never a hook-specific list; the one place that configures it is the run's `inheritEnv`; no hook-specific knob. The reference's ordinary command hook builds its child on the same base as its Bash tool (`cli309.js:266734`, `:266386`; base `:253905`: the process environment with the trusted settings env, its own credentials removed); its exceptions — a first-party plugin allowlist handed the reference's own token as an explicit grant (`:266738`), organization hooks composed over the pre-plugin settings env (`:266737`), a hook run inside a served sandbox — have no counterpart here. `hostChildEnvProblem(policy, ...grants)` answers the same judgment without throwing. A grant that is not an object or throws while read, a name that is empty or cannot keep its spelling in a child's environment (`=`, NUL, an unpaired surrogate), and a value that is not a string or cannot keep its spelling (NUL, an unpaired surrogate) are refused with a sentence that names the grant and the variable (never a value, nor a bad name).
526
+ - **Behavior narrowing (open to veto).** *What changed:* `NodeExecutionEnv` refuses a `shellEnv` that is not a map of variable names to strings at construction (`NodeExecutionEnv: env grant 1: X must be a string (got number)`), and a per-exec `env` or a `shellEnv` made bad later makes that spawn answer `spawn_error` with the same sentence (the reads answer "none"). *Who is hurt:* a JavaScript host passing a number, a boolean or an object as an environment value (it reached the child as Node's string of it), a name holding `=` (the child read another pair), or a name or value holding an unpaired surrogate (the child read U+FFFD); a `shellEnv` whose read throws. *How to migrate:* pass strings (`String(port)`) and names the platform keeps. Smaller changes, same direction (the account and the child now agree): a withheld name the child does not receive is counted withheld even when a grant mentions it — a per-exec `env` entry set to `undefined` over a `shellEnv` re-supply, or a grant property a spread never copies (non-enumerable, inherited), used to count as re-supplied; on Windows a later grant spelling a name in another case now sets that name's value (Node kept whichever spelling sorted first, so the earlier value could win); the inherited part is read before any grant, so a grant's getter cannot change what is inherited.
527
+ - **Security widening the hook runner adopts (open to veto).** *What changes when a hook runner reads it:* an engine-run hook sees what the run's tool shell sees — on the terminal client's interactive lane (`inheritEnv: "all"`) the host's whole environment less the deployment's own credentials, under the default `"scrub"` every variable whose name and value are not credential-shaped — instead of twelve names. A server runs settings hooks on its worker in every single-user deployment, whatever the tool lane, so the widening reaches a single-user sandbox or in-process lane too (the run's word there; `"all"` is refused outside the host lane, so `"scrub"`). *Who is hurt:* a deployment that relied on the short list to keep a non-credential variable of the worker from a request-supplied hook command — a capability or routing variable such as `DOCKER_HOST` pointing at an administrative daemon is neither a declared own credential nor credential-shaped, and reaches the hook as it reaches the shell (a hook is a command run on that host with the host's user; nothing here changes what such a command can otherwise reach). *How to migrate:* declare such a variable with `declareWithheldEnv` (it is never inherited by any child, the shell's included), or narrow the run's `inheritEnv` to a list.
528
+ - **Consumers.** @server: the hook runner (`src/hooks/hook-runner.ts`, `HOOK_ENV_ALLOWLIST` and its two readers) composes the command leg and the HTTP interpolation with the word the same request carries for its shell (bound when the request's hook registration is minted, not read later from the mutable session map) and the request's `settings.env` grant, the hook's own variables last — its `CLAUDE_PROJECT_DIR` rule (the request's value when it sets one, else the hook's directory) becomes how that last grant's value is computed, not an order; the twelve-name list retires; a `settings.env` name the composition refuses (`=`, NUL, an unpaired surrogate) is best refused at intake, where the request can be told; the host-lane shell's own composition (`composeHostSubprocessEnv` with `collapseWin32EnvKeys`) can read `hostChildEnv` so the shell and the hooks share one. @cli: the local executor (`localHookChildEnv`) and the HTTP hook's interpolation (it reads the raw process environment) compose with `hostChildEnv(<the word the session hands the engine>, <the settings env grant>, <the hook's variables>)`; the engine needs the same settings env grant for one reading (the default rules projection does not send `env`); the client process declares its own credentials (`declareWithheldEnv` — none is declared in the client today), which takes the place of the conditional subprocess list for hook children; on the interactive lane (`"all"`) the local hooks keep the whole environment less those, and where the client sends no word (non-interactive, missing capability evidence) the local hooks narrow to the scrub — the client's to rule on under C-R284 ④ (send the word, or accept); KL0157's environment half retires when both runners land (its compaction and run-placement halves stay). @test: one hook configuration run in the shell and in the engine reads the same terminal-exported variable and the same settings-env variable, and neither reads a declared own credential.
529
+ - **Pins.** `test/backlog2607-host-child-env.test.ts` (C1 the root export; C2–C4 the three policies with a declared own name and a value copy; C5 grant order, re-supply, unset and a `__proto__` name; C5b Windows name comparison, platform stubbed; C6 the hook composition = the shell's plus the hook's variables, the withheld account the composition's (a hook variable re-supplying a withheld name); C7 / C7b thirteen bad shapes, a throwing grant, a revoked Proxy, a throwing policy element and the problem reader; C8 a grant read once, after the inherited part, a non-enumerable property not composed; C9 / C9b a real shell child and a real background child print what `hostChildEnv` composed; C10 the shell's refusal at construction and at the spawn, the reads composing once; C11 the shell's composition site calls the one reading).
530
+
531
+ ### Every model call the engine prices has one account line, and a host reads its lines through one fold: `Runner.sideQuery`'s result carries its engine-priced `account` (origin `side_query`), `accountRowOfResult` derives a finished run's line, `foldAccount` is the only reading (#2608; additive; hard-breaking: none; closed sets: +1 `AccountOrigin` = `run` | `side_query`; exports: +7) (@server @cli @client-core)
532
+
533
+ - **Before.** A one-shot side query (`Runner.sideQuery`: an auto title, a recap) belongs to no run, so its spend never reached a run's `stats`, and the result carried only the provider's own `usage.cost` (an adapter amount: higher than the engine's figure whenever a cache hit is priced at the full rate). A host that kept a session total had nothing to add for it, and every host that summed run results wrote its own sum, with its own reading of an unpriced run.
534
+ - **Now.** One pricing function, `priceReply`, prices a reply for both readers: the run's side-call lanes (`recordSideCallUsage`: compaction, classifier, mods, advisor — same arithmetic, telemetry marks and trace row as before) and the side query. `SideQueryResult.account` is the query's line — `{ origin: "side_query", tokens, costMicroUsd?, usageMissing? }` — priced from the deployment's table (`RunnerDeps.pricing`, else the model's own `cost`) on the raw provider usage and the model that ANSWERED (a degraded reply is priced at the fallback). `costMicroUsd` is absent when that model has no price table (unknown, not a fabricated 0 — the run's law), and a reply that reported no usage gives `tokens: 0` with `usageMissing`. `accountRowOfResult(result)` is a finished run's line (`origin: "run"`): its own usage plus its delegated sub-agents' — the reconciled spend. `foldAccount(rows)` is the one reading: a total and one total per origin; an unknown cost makes every total containing it unknown; a malformed line (origin outside the closed set, a negative or non-finite number, a cost spelled as anything but an absent key) is refused with `TypeError` naming the line. The engine does not keep the lines: the host does.
535
+ - **Limits (stated, not exceptions).** A run's line is exactly what the result's `stats` says, and `stats` is not one interval across a durable resume chain, so the line is exact for a run that did not durably resume and that no background delegate outlived. (1) The lines of ONE durably resumed chain are not additive: a leg's own usage is per leg (a `resource_limit` chain folds the earlier slices into its result), its delegated usage is cumulative over the chain, so one line per result double-counts the delegates and one line per chain loses the earlier legs' own spend. (2) An unknown cost does not survive a `resource_limit` chain (the resource ledger folds a slice's cost as a number) or the delegation rollup (a delegate's `usageMissing` mark has no seat in the nested usage), so a line can read complete when it is a lower bound. (3) Spend a background delegate books after the parent's result settled is in no line. (4) The prompt-suggestion pass and memory consolidation book after the result on their own budget-excluded faces and are not in it. (5) A malformed price table prices at its arithmetic on a side query, as it does for a run whose deployment governs no money. The structural fix for (1)–(3), an account the engine keeps and mints at each interval, with persistence and restore on resume, is its own design ticket (#2620).
536
+ - **Consumers.** @server: a session-level aggregate is `foldAccount` over per-run `accountRowOfResult` lines plus the side-query lines you receive from your side-query verb (carry `account` through; a layer that rebuilds `SideQueryResult` must now supply it). @cli: the auto-title side query keeps the returned `account` line beside the run lines; the result frame field is the second section below. @client-core: the history-lines read port supplies rows, not transcript `usage.cost.total` (the adapter amount).
537
+ - **Pins.** `test/backlog2608-session-account.test.ts` (the line's price, the table read from the Runner, the model's own cost with a cache subset, parity with the run's side-call pricing, usageMissing, the degraded reply priced at the fallback, the run line before and after a side query, the fold's totals / unknown propagation / loud refusals, the import graph: one pricing function with two readers, one mint per origin).
538
+
539
+ ### A session's total is the fold of the lines the host kept: a result frame's `total_cost_usd` is the run lines including a resumed session's history, and a side query's line is in the session's cumulative figure but not in that field (#2610; behavior change for a host that adopts the reading, open to veto; hard-breaking: none; engine behavior unchanged) (@cli @server @client-core)
540
+
541
+ - **Before.** A `-p` result frame's `total_cost_usd` was this run's cost only: resuming a session showed the new run's number as if the session had spent nothing before, and a side query's spend was in no number.
542
+ - **Now.** The reading is fixed once, in `foldAccount`'s output, and every host maps its fields from it: a result frame's `total_cost_usd` = `byOrigin.run` over the history lines the host supplies plus this run's line (a new session = this run; a resumed session = history + this run; a fork's seed lines under the cli's fork ruling are ordinary `run` lines), `byOrigin.side_query` is kept apart, and a session's cumulative figure = the whole fold. This is the Claude Code 2.1.309 split: one cost ledger whose result-frame total is the main-loop total including the restored history, with a separate side-query line that enters only the cumulative metadata.
543
+ - **Behavior change (open to veto).** A host that adopts the reading shows a larger `total_cost_usd` on a resumed session than before (history is now in it). One erratum against the ticket wording "a side query's cost enters the session account": the line IS in the account; what differs from the wording is only which host field reads it (frame total = `byOrigin.run`, cumulative = the whole fold). The engine itself changes no behavior in this section: it supplies the lines and the fold.
544
+ - **Consumers.** @cli: map the frame field from `byOrigin.run`, the `/cost` cumulative from the whole fold, and supply fork / resume history as `run` lines; the numbers on resumed sessions grow. @server: the session-level aggregate states which total it serves ("includes fork inheritance" per the cli ruling). @client-core: the read port returns the lines.
545
+
546
+ ### The cwd-alignment observation asks the env's shell whether its directory is the task root instead of comparing two path strings — no misreport on a Windows Git Bash shell, and the sentence states only what was read (#1734; behavior change, open to veto; hard-breaking: none; closed sets: none; exports: none) (@test)
547
+
548
+ - **Before.** The env probe's `pwd -P` line and the task root were each passed through the env's `canonicalPath` and compared
549
+ as strings. On Windows the task root is a native path (`C:\Users\x\proj`) while a Git Bash shell reports the same directory
550
+ in its own POSIX spelling (`/c/Users/x/proj`, `/tmp/…`), which no engine-side canonicalizer maps — so every session (an
551
+ ordinary `C:\` root as much as a TEMP-mapped one, and a host-lane remote env) reported `execution-env cwd misalignment …`
552
+ through `onError` (`phase: "config"`) while the shell sat in the task root. The sentence also said an exec or an artifact
553
+ "can land outside the workspace root", which was untrue on every such report. A POSIX host has one spelling and never saw it.
554
+ - **Now.** The probe's plain `pwd -P` line becomes one self-framed line, `cwd-alignment:<word>:<the shell's pwd -P>`, found
555
+ by its marker (a banner a login shell prints first moves nothing, and a reading that holds the separator stays one
556
+ reading). The shell itself asks whether its working directory and the task root are one directory — `test . -ef <root>`,
557
+ the same filesystem object, links followed, spelling and case irrelevant — and the word is `same`, `differ` or `unknown`.
558
+ The engine reads only that word; no path mapping and no second canonicalizer exist on the engine side. `differ` reports;
559
+ `same` is silent (a symlinked root, a differently cased spelling on a case-insensitive volume and an msys-spelled pwd are
560
+ one directory to the shell); `unknown` — the root is not a directory in the shell's view, or its `test` has no `-ef` — and
561
+ an absent framed line are no judgment and report nothing. The sentence now states the two readings and the shell's
562
+ finding and nothing about where an exec or an artifact would land.
563
+ - **Behavior change (open to veto).** *What changed*: (1) the observation no longer fires on a spelling difference — only on
564
+ the shell's own `differ`; (2) a shell that cannot see the task root as a directory answers `unknown` and is silent (before:
565
+ any string difference reported); (3) the sentence lost its cause and landing clauses; (4) the guard no longer calls
566
+ `canonicalPath` (one round trip less per prepare on a remote lane); (5) the probe's ninth output line is the framed line, so
567
+ a scripted `exec` double that answers the probe with a bare `pwd` line yields no observation (before: it was compared).
568
+ *Who is hurt*: a deployment that matched the old sentence text beyond `cwd misalignment`, a test double of that shape,
569
+ and a lane whose real fall-through also happens to hide the root from its shell (the observation is advisory — the
570
+ sandbox fence is unchanged). *How to migrate*: match on `cwd misalignment` only; a double that wants the observation
571
+ answers the framed line.
572
+ - **Consumers.** @test (the Windows machine): run two shapes with Git Bash as the env shell — an ordinary `C:\` task root and
573
+ a TEMP-mapped one, expecting zero `cwd misalignment` observations; and a lane that starts the shell elsewhere, expecting
574
+ exactly one with the fact-only sentence. @server: the host-lane remote env needs no change — the question runs in the
575
+ host's own shell, in the same POSIX-`sh` family as the rest of the probe.
576
+ - **Limits (stated).** Pinned on a real bash with an msys-shaped `pwd` / `test` stand-in; the real Windows reading is the test
577
+ seat's. A shell that cannot parse a native `C:\…` root at all (a WSL bash) answers `unknown` — silent, not a false report.
578
+ The probe's earlier lines are still read by position, so a login banner shifts those facts as before; only the
579
+ alignment line is immune.
580
+ - **Pins.** `test/backlog1734-cwd-alignment-same-directory.test.ts` (Runner: one directory in two spellings is silent; the
581
+ shell's word is read, not two strings — `same` over unequal strings silent, `differ` over equal strings reports, `unknown`
582
+ and an absent framed line silent; a really different directory reports once with a fact-only sentence, also behind a login
583
+ banner; a symlinked root silent; the same two shapes behind the remote seam; the fragment on a real bash: Windows-style
584
+ root × msys-style shell `same`, different directories `differ`, unenterable root `unknown`, symlink `same`, a case alias
585
+ under an inherited `PWD` `same`, hostile spelling stays data, a reading holding the separator or a newline; the reader's
586
+ closed set); re-pinned: `env-git-probe` ([1451] drop-cwd sentence).
587
+
588
+ ### A store that copies a fork's rows as bytes picks them with the engine's own parent-chain walk: `selectForkRows` is exported from the package root (#2565; additive exports; behavior change: none; hard-breaking: none; closed sets: none; exports: +3 (1 runtime: `selectForkRows`; 2 types: `ForkPoint`, `ForkRowShape`); members: none; signatures: none) (@server)
589
+
590
+ - **Before.** A session store with no `SessionRepo.fork` to hand `settledForkOptions`' answer to (the two SQL stores move rows as bytes) had to pick the rows itself: the path from the root to the fork point, the loop refusal and the missing-parent refusal. Server wrote that walk a second time (`forkCopyOf`, copied from `getPathToRoot` and its `ParentChainGuard`, which is not a root export).
591
+ - **Now.** `selectForkRows(rows, sourceLeafId, point, { idOf, parentOf })` answers `{ rows, leafId }`: `{}` copies every row and keeps the source leaf; `{ entryId, position: "at" }` copies the rows on the path from the root to that entry (the path, not a prefix of the log) in the log's order, and the leaf is that entry. It runs the very walk `getPathToRoot` now runs (one `pathToRoot` in `src/engine/session/path-to-root.ts`; the storage keeps no parent-chain loop of its own), so a loop is refused `invalid_session` with the shared sentence, a parent the log does not hold is `invalid_session` naming it, and a fork point the log does not hold is `invalid_fork_target`. A fork point that names an entry with a `position` other than `at` is refused `invalid_fork_target` (a point with no entry id is the whole-log form, as `getEntriesToFork` reads it). `ForkPoint` (the answer `settledForkOptions` gives, now its declared return type) and `ForkRowShape` ride with it. No behavior change on any existing call: `getPathToRoot` answers as before, including an empty parent id reading as "no parent" there (a separate ticket makes that a refusal).
592
+ - **Who is hurt.** Nobody: one added runtime export and two types, no existing name or shape touched.
593
+ - **How to migrate.** *server*: delete the hand-written walk in `forkCopyOf` (`src/plugins/session-fork.ts:34-61` at `e1ea5bd2`, line numbers move) and answer it with `selectForkRows(rows, sourceLeafId, point, { idOf: (r) => r.entry_id, parentOf: (r) => r.parent_id })`; the two call sites (`tidb-session-store.ts`, `pg-session-storage.ts`) stay. The refusals are byte-identical (loop, missing parent, missing fork point, an empty `parent_id` refused as a missing parent); the one sentence that changes is a non-`at` position's (same code `invalid_fork_target`, worded for the reader rather than for a store), and one corner tightens: a row whose id is the empty string is no longer followed as the parent of a row whose `parent_id` is the empty string (the copy followed it; the reader refuses, as it does when no such row exists). `type ForkPoint = Awaited<ReturnType<typeof settledForkOptions>>` may become the root's `ForkPoint` (the same shape). Server deletes its copy on arrival.
594
+ - **Pins.** `test/backlog2565-fork-row-selection.test.ts` (R1 the root exports; R2 `{}`; R3 `at` copies the path not a prefix, log order kept, rows not cloned; R4 the sound / loop / broken shapes and a missing point answer as `getEntriesToFork` does over a storage holding the same log; R5 the refusals in full; R6 an empty parent id; R7 one walk — the storage takes it from the module and keeps no `ParentChainGuard` loop, a floor still ends its walk); `test/export-surface.snapshot.json` (+3).
595
+
596
+ ### A refused MCP call says what happened to this call and how a later one is judged, not that every later call is refused the same way (#2589; behavior change in the text the model reads, open to veto; hard-breaking: none; closed sets: none; exports: none; members: none) (@server @cli @test)
597
+
598
+ - **Before.** A call the connection's listing refuses before it is sent (`mcp.tool_declaration_changed`, `mcp.tool_listing_unreached`,
599
+ `delivered: "no"`) ended: "Every call to this tool is refused the same way until a listing of the connection reaches the tool, so
600
+ don't retry it." A host's re-dial or refresh lands between two calls, and the call after it runs: the sentence foretold the
601
+ opposite of what happened, and its advice made an agent give up a tool that worked again (reported by the black-box acceptance:
602
+ the next call after `reconnectMcpServer` ran).
603
+ - **Now.** The same two refusals end: "The server did not execute it. This refusal is for this call only: each later call to this
604
+ tool is checked again against the connection's latest listing." — the fact about this call, and the rule a later one meets (the
605
+ rule `reach` asks on every call), never its outcome and no advice. One mint (`listingRefusal`, `src/core/mcp-server-link.ts`) for
606
+ both refusals; the codes, `details`, `delivered` and `isError` are unchanged.
607
+ - **Behavior change (open to veto).** *What changed*: the closing sentence of the two refusals. *Who is hurt*: a host or a test that
608
+ matches the old sentence by its text. *How to migrate*: read `details.code`, as the refusals have always carried it.
609
+ - **The same shape elsewhere.** The four revoked-server refusals and the task-required refusal said the same thing and are closed
610
+ by the next section (#2616); the closing sentence is now one writer, `refusalScope`, for all six.
611
+ - **Consumers.** @server @cli: nothing to do; a surface that shows the tool result's text shows the new sentence. @test: the
612
+ refusal text now holds neither "refused the same way", "don't retry" nor "until a listing" (pin A).
613
+ - **Pins.** `test/backlog2589-2591-one-sentence-one-reader.test.ts` A1 (a re-listing that stopped before the tool: the fact, the rule,
614
+ none of the foretelling words; after the host's refresh the same object runs), A2 (a changed declaration: the same sentence; the
615
+ tool the refresh minted runs while the one minted before is still refused), A3 (the foretelling words are minted nowhere in `src`,
616
+ the new sentence once).
617
+
618
+ ### A directory fault is worded once: the fault states what is wrong with the directory, and the reader of the fault states what it does about it (#2590; behavior change in the text the model reads, open to veto; hard-breaking: none; closed sets: none; exports: none — one internal function, `peerRowFault` in `peer-directory`, not index-exported) (@server @cli @test)
619
+
620
+ - **Before.** The row reader's fault ended "; no peer row is used until its host fixes it", and ListAgents added "— no peer row is
621
+ listed until its host fixes it": one fact said twice in one line ("…(s-odd: name_invalid); no peer row is used until its host fixes
622
+ it — no peer row is listed until its host fixes it)"). The reference registry's vetting fault ended "— nothing was listed" under the
623
+ same suffix.
624
+ - **Now.** A fault states the fault: "the directory listed a row this engine cannot read (<id>: <reason>)" (one function,
625
+ `peerRowFault`, for a host's rows and for the reference registry's) and "the reference agent's session registry is not a
626
+ directory this engine can trust (<code>: <path>)". Whoever reads the fault states its own consequence once: ListAgents "— no peer
627
+ row is listed until its host fixes it", SendMessage its refusal frame "Message not sent:" (the arm no longer repeats it, #2617
628
+ below). The consequence tail of the row reader's fault and of the registry's vetting fault is gone.
629
+ - **Behavior change (open to veto).** *What changed*: the text of a directory fault, as thrown and as shown by ListAgents and SendMessage.
630
+ *Who is hurt*: a host that matches the thrown message for "no peer row is used" or "nothing was listed" (`CcPeerDirectoryError.code`
631
+ and `.path` are unchanged). *How to migrate*: match the code, or the first clause.
632
+ - **Pins.** `test/backlog2589-2591-one-sentence-one-reader.test.ts` B1 (ListAgents over a host's directory: the one fault sentence and the
633
+ tool's own line, "until its host fixes it" once), B2 (the same over the reference registry), B3 (a registry that fails its vetting: the
634
+ thrown fault, read whole, carries no consequence, and ListAgents states it once), B4 (SendMessage: the whole text is the frame and the
635
+ fault sentence, the fact that nothing was sent said once).
636
+
637
+ ### The reference registry's directory reads its rows through the engine's one row reader — a row the reader refuses faults the whole listing, as a host's rows do, instead of being repaired or skipped (#2591; behavior narrowing, open to veto; hard-breaking: none; closed sets: none; exports: none; members: none) (@server @cli @test)
638
+
639
+ - **Before.** One question, two answers. A host's directory hands its rows to the engine as written and the engine reads each through
640
+ `readPeerSessionRecord`: a row it refuses stops the listing (ListAgents lists no peer row and names the refusal, SendMessage sends
641
+ nothing). `createCcPeerDirectory` read the reference's registry file first and repaired what that reader judges: a name that reads as
642
+ nothing (only invisible characters, only blanks) became "(unnamed session)", an `agent` label over 120 characters was dropped, and
643
+ a row the reader still refused (a session id outside the address grammar) was skipped (`invalid_row`). The same row was listed by
644
+ one seat and refused by the other.
645
+ - **Now.** A string name and a string `agent` are carried as the row wrote them and the reader decides; a row it refuses throws the
646
+ same fault a host's row does (`peerRowFault`) out of `listPeerSessions`, so no seat holds half a set (refs are minted and names
647
+ resolved over the full set). `invalid_row` is left for a registry file that is not an object. What the registry directory keeps is the
648
+ reference's own reading of its own file: a row that states no name, or a name that is not a string, is the reference's unnamed
649
+ session, listed and addressed by "(unnamed session)" (the reference's rows for non-interactive sessions state none); a member of
650
+ another type is not carried; capability bits are read by the reference's grammar (`/^[a-z0-9_]{1,32}$/`, at most 16). Liveness
651
+ comes before validity: a row of a dead process, a file with no socket, a file that fails the ownership / mode / size check is skipped as before.
652
+ - **Behavior narrowing (open to veto).** *What changed*: a registry row whose name is only invisible characters or blanks, whose `agent`
653
+ label is over 120 characters, or whose session id is outside `^[A-Za-z0-9_-]{1,80}$` stops the listing of the whole registry
654
+ (ListAgents names the row, SendMessage sends nothing) until that row is fixed or its file removed; it used to be listed repaired or
655
+ skipped. *Who is hurt*: a deployment that reads the reference's registry beside a peer whose row states such a value (a row the
656
+ reference writes states a name only from a flag or a derived name, so the name cases come from another writer; the label and
657
+ session-id cases were not checked against the reference's writer) — for as long as the row stands, which the owning process's
658
+ exit ends. *How to migrate*: nothing in the engine; fix the writer of the row.
659
+ Divergence from the reference's tolerant reading of the same file (every ill-typed member read as nothing): candidate, registered under #2862 before the next release.
660
+ - **Consumers.** @server @cli: a host that composes `createCcPeerDirectory` beside its own directory now sees a thrown fault for these
661
+ rows where it saw a listing; its `onSkip` no longer reports `invalid_row` for a row the reader refuses. Which seat a given cli or
662
+ server mount uses is not checked here (inferred: both seats exist).
663
+ - **Pins.** `test/backlog2589-2591-one-sentence-one-reader.test.ts` C1 (five rows the reader refuses — a zero-width title, a
664
+ direction-mark title, a blank title, a 121-character label, and a session id outside the grammar — read from a host's directory and
665
+ from the reference registry: the same fault sentence, the whole listing, the directory itself throwing, ListAgents showing it and no
666
+ good sibling), C2 (the two seats' fault texts equal across every fixture), C3 (what is not a row's fault stays a skip: a non-object
667
+ file, a row with no socket, a dead process), C4 (what the reference reads is kept: no name / a non-string name is the unnamed session;
668
+ a 120-character label is the cap and reads). `design385-s3-cc-uds-channel` D1 no longer carries a bad-id row (it faults now, C1).
669
+
670
+ ### A revoked server's four refusals and the task-required refusal end as the listing's do — what happened to this call and what judges the next one, never "every call to it is refused the same way, so don't retry it" (#2616; behavior change in the text the model reads, open to veto; hard-breaking: none; closed sets: none; exports: none — one internal function, `refusalScope` in `mcp-server-link`, not index-exported; members: none) (@server @cli @test)
671
+
672
+ - **Before.** The four outlets of a server the operator revoked (the tool call, the resource read, the resource directory listing, the
673
+ aggregate resource listing) ended "This server stays on this run's tool roster — every call to it is refused the same way, so
674
+ don't retry it", and a tool that requires task-based execution ended "Every call to this tool is refused the same way, so don't
675
+ retry it." Both foretold the next call. The revocation ledger is asked on every call, and a server the operator un-revokes runs on
676
+ the very next call (`test/mcp-revocation.test.ts`, the first case); a tool's task-required declaration is the listing's as
677
+ mounted, and the tool a host's refresh mints from a listing that no longer requires tasks runs. The advice made an agent give up
678
+ a server that worked again.
679
+ - **Now.** Six call sites end with the one sentence `refusalScope` writes — the listing's refusal (#2589; its two codes), a revoked
680
+ server's four outlets and the task-required refusal: "This refusal is for this call only: <each later call to this tool is
681
+ checked again against the connection's latest listing | each later call to this server is checked again against the operator's
682
+ current revocation list | each later call to this tool is judged by the declaration of the listing it was mounted from, until a
683
+ refresh or reconnect of the server mints the tool anew>." A revoked server's sentence keeps the standing fact it carried, "This
684
+ server stays on this run's tool roster." (the roster is materialized once per run; a refresh of a revoked server does not unmount
685
+ its tools). The task-required rule is a re-read of a mount-time fact, not a re-evaluation, and the sentence says so: the same
686
+ mounted object is refused until something mints the tool anew. No site words any of it: `mcp.ts` calls the writer five times,
687
+ `listingRefusal` once; the codes, `details`, `delivered` and `isError` are unchanged.
688
+ - **Not changed here — the same shape, one more text.** The refusal of a call to a server whose transport is gone
689
+ (`throwDeadServer`, `src/core/mcp.ts`; the tool call, the resource read and the directory listing) and the HTTP "request was not
690
+ delivered" refusal end "will keep failing until the server is available again — do not retry them". For the tool call, a host's
691
+ re-dial replaces the live connection and the same tool object runs on it (`reach` reads the live connection on every call), so
692
+ that sentence is overturned the same way (the resource outlets were not checked here); it is a thrown error with its own pins and
693
+ is left for its own change.
694
+ - **Behavior change (open to veto).** *What changed*: the closing sentence of five refusals. *Who is hurt*: a host or a test that
695
+ matches the old sentence by its text. *How to migrate*: read `details.code` (`mcp.server_revoked`, `mcp.task_required`), as the
696
+ refusals have always carried it.
697
+ - **Consumers.** @server @cli: nothing to do; a surface that shows the tool result's text shows the new sentence. @test: the refusal
698
+ text now holds none of "refused the same way", "don't retry" or "every call to it is" (pin A).
699
+ - **Pins.** `test/backlog2616-2617-refusal-scope-one-writer.test.ts` A1 (each of the four revoked outlets: the sentence, the standing
700
+ roster, no foretelling words, no request of any kind reached the server; after the operator's un-revoke the same object runs and
701
+ reaches it), A2 (the task-required
702
+ tool: the sentence, the call never reaches the server), A2b (a host's refresh that takes in a listing without the requirement mints a
703
+ tool that runs), A3 (a run: revoked before the model's first call, un-revoked before its second — the first answer is the sentence,
704
+ the second call runs), A4 (the scope sentence is minted in one file and the foretelling words nowhere in the engine);
705
+ `test/up424-a-tier-ports.test.ts` A-5 now pins the roster clause in the writer, and the four outlets calling it.
706
+
707
+ ### A SendMessage refusal says once that the message was not sent — the frame says it, the arm states why (#2617; behavior change in the text the model reads, open to veto; hard-breaking: none; closed sets: none; exports: none; members: none) (@server @cli @test)
708
+
709
+ - **Before.** A refusal opens with the tool's frame "Message not sent:" and eleven arms closed with the same fact again: "Nothing was
710
+ sent." (the rebound-name refusal, the three socket-reached peer arms, the four `notify_when_idle` and cross-session addressing arms),
711
+ "Nothing was delivered." (a socket that refused the connection), "— nothing was sent." (the directory fault) and "— the message was
712
+ not delivered." (an agent that is still starting up). One fact, said twice in one sentence.
713
+ - **Now.** The frame says it and the arm does not: the arms state the reason alone. What stays is another fact — the state of the
714
+ mailbox ("nothing was parked", "the message was NOT queued") and the warning on a send that may have arrived ("It may have arrived:
715
+ do not resend the same content blindly") — because a refusal that leaves a message queued ("Message not sent now: … Your message
716
+ is queued") is a different answer from one that leaves nothing behind. One exception stays as it was: a socket send of uncertain
717
+ outcome (`peer_send.send_uncertain`) still opens with the frame "Message not sent:" and then says it may have arrived — an older
718
+ contradiction this change does not touch.
719
+ - **Behavior change (open to veto).** *What changed*: the text of those arms, and with it `details.verdict.message` of the peer arms
720
+ (the same text as the arm, minus the frame). *Who is hurt*: a host or a test that matches "Nothing was sent." in a SendMessage
721
+ result or in that field. *How to migrate*: read `details.code` / `details.error`, which the arms have always carried, or match the
722
+ frame.
723
+ - **Consumers.** @server @cli: nothing to do. @test: the reference's own rebound-name arm reads "Nothing was sent." (its text has no
724
+ frame); here the frame carries it.
725
+ - **Pins.** `test/backlog2616-2617-refusal-scope-one-writer.test.ts` B1 – B4 (a `notify_when_idle` with no directory mounted, a socket-
726
+ reached peer with no channel wired, a `notify_when_idle` to a socket-reached peer, a socket that refuses: each text is the frame and the
727
+ reason, the fact once), B5 (the mailbox fact stays, once, under the same frame), B6 (no arm of the tool says it again);
728
+ `send-message-name-rebind-guard`, `backlog971-session-where` W6 and `backlog2589-2591-one-sentence-one-reader` B4 read the arms they
729
+ covered without the tail.
730
+
731
+ ### The request a Runner hands a policy carries the call's grant-binding words — the members its cards carry, from the same factory, over the request's own args (#1955, design/1955, C-R896; no behaviour change; hard-breaking: none; closed sets: none; exports: none; members: `ToolCallRequest` +3 optional) (@server)
732
+
733
+ - **Before.** Every card of a call carried the engine's binding words — `boundGrantDigest` + `boundGrants` on an activation of the engine's
734
+ `Skill` tool, `boundGrantAbsence: "not_bindable"` on every other call — but the `ToolCallRequest` a deployment policy layer is handed carried
735
+ none, so a layer deciding before it asks whether an answer kept by tool name may answer the call had to infer the binding from the tool name.
736
+ - **Now.** `ToolCallRequest.boundGrantDigest?` / `.boundGrants?` / `.boundGrantAbsence?` — the `AskRequest` members by name and type, exactly one
737
+ arm. **Present** on every request a Runner hands a policy: the gate's adjudication (every gate request — the first look, the post-screen
738
+ re-mint, the approved-edit re-check), the resume belt, the park's stored-shape re-check, the pre-claim edit re-check (minted with the skills
739
+ that resume serves), the synthetic read / write probes (`not_bindable`), and every copy a composed policy, the inherited edit chain or the
740
+ inherited classifier makes over moved args — the copy carries the answer for ITS args. **Absent** on a bare request (a host driving a policy
741
+ outside a Runner). On a request `boundGrants` is a frozen copy. A copy whose digest the engine did not mint for that call (a clone, a
742
+ host-built request) keeps the digest over the same bytes and reads `boundGrantAbsence: "unreadable"` over moved ones.
743
+ - **Behaviour.** No change: no engine judgment reads the request's members (a parked approval is judged by its row's digest). The cards, the
744
+ parked row and the inbox projection are unchanged; `tool_start` / `tool_end` carry no binding (no consumer reads one there).
745
+ - **Consumers.** @server: the deployment-list gate and the workflow question gate can read the request through the card reader
746
+ (`grantBindingOf`) and retire `callGrantBindingOf` and the carrier choice in `questionGrantBindingOf`; a request you build yourself outside a
747
+ Runner carries no word — copy the row's members when you re-judge a parked call. The exemption list filter reads store rows that keep only a
748
+ tool name: this change does not reach it. @cli @client-core: nothing to render.
749
+ - **Pins.** `test/backlog1955-call-grant-binding.test.ts` (C1 card form, C2 no card, C3 park → edited resume, C4 a composed policy's rewrite,
750
+ C5 the probes, C6 the mover, C7 the inherited classifier's copies).
751
+
752
+ ### A plan-review pause names the call that presented the plan — `requestedByCallId` on the parked row, the paused cause and the inbox summary (#2593; additive; no behavior change for a consumer that ignores the key; hard-breaking: none; closed sets: none; exports: none) (@client-core @server)
753
+
754
+ - **Before.** A plan-review pause gated no call and named none: the parked row was `{ kind: "plan_review" }`, and the paused cause carried the gate, the token and the checkpoint id. A card that had to know which transcript call carried the plan under review joined the pause to the `ExitPlanMode` call by adjacency or by tool name.
755
+ - **Now.** The park mint writes `requestedByCallId` — the id of the call that asked for the review — onto the `plan_review` pending action, once. For the first-party plan tool that is the `ExitPlanMode` call's own id (the one its `tool_start` / `tool_end` frames carry); a caller tool's `ctx.requestReview()` is rebuilt per call, so the id is the calling call's and a tool cannot name another call's (a revive context's id is minted for the revival and names no transcript call, so it is not attributed). The paused cause (`terminal.requestedByCallId` on a `paused` cause) and the inbox summary (`CheckpointSummary.requestedByCallId`, also on `listByScope`) echo it through one reader (`planReviewRequesterOf`). First request in a batch wins, and so does its id; a plan re-presented after a reject parks a new row carrying the new call's id. The key is OMITTED, never `null`, on a row whose requester carried no call id (a row a deployment minted itself, a row from an earlier engine, a revive context) and on every other kind of pause.
756
+ - **What it is not.** Provenance, not a binding: the review still gates no call, so `toolCallId` (on the pending action and on the summary) and `gatedCallId` stay absent on a plan review, and nothing on the resume path reads the id — it is classified SHOWN in the reader-requirements table, so a lost or changed id damages no row. The distinct name is deliberate: `toolCallId` means "the call this pause gates", and a reader that tests its presence reads "this is a tool approval".
757
+ - **Limits (stated).** A store that whitelists the keys of a `plan_review` pending action drops the member on read-back (the in-memory and file stores keep it — pinned; the server's SQL store keeps the checkpoint row as one JSON column and reads `pendingAction` members out of it — read in that checkout, not exercised here); the live run's paused cause carries it regardless. The id names the FIRST requester of a batch only.
758
+ - **Consumers.** @client-core: join the pause to the plan card by `terminal.requestedByCallId` (live frame) or `CheckpointSummary.requestedByCallId` (inbox row) against the card's own `toolCallId` — equality, no adjacency. @server: the paused cause rides your seal unchanged (the token is the only key stripped); no store change; your `parkToolCallId` still answers absence for a plan review, by design.
759
+ - **Pins.** `test/backlog2593-plan-review-requester.test.ts` (① row / cause / summary / `listByScope` carry the `ExitPlanMode` call's id, the id on its own frames, `toolCallId` and `gatedCallId` absent; ①b the file store round-trips it; ② two gates, two ids; ③ a caller tool's id is the calling call's, a forged one is not honored; ④ first request wins; ⑤ the reader — absent / empty / non-string / other kinds; ⑥ an approval park carries none; ⑦ SHOWN: the row judges ok with the id lost or changed); `test/prepare-inherited-gate.test.ts` (the per-call ctx wrapper: own id bound, a forged option ignored, a revive context's and an empty id attribute nothing). Re-pinned: `prepare-boundary-parks-transcript` (the committed plan review's row now names its requester), `backlog1320-reader-requirements` (the SHOWN read-site registry gains the member).
760
+
761
+ ### The `leg_end` rows of the undrained-input notices name WHICH inputs they count — `detail.inputIds` (#2594; additive; no behavior change for a consumer that ignores the key; hard-breaking: none; closed sets: none; exports: none) (@client-core @server)
762
+
763
+ - **Before.** `task.user_steer_undrained` / `task.user_followup_undrained` said how many inputs were never consumed (`detail.steer` / `detail.followUp`) and not which. A client that tracks each input by the id its receipt carried could say only "something I sent was lost", and had to fold every unconfirmed input into "could not confirm".
764
+ - **Now.** The engine's own (`cause: "leg_end"`) rows carry `detail.inputIds`: the id of EACH counted input, in the order the run would have served them (queue order: an `immediate`-tier input leads the ones accepted before it) — the same value the live `human_input` frame carries as `inputId` and a parked entry as `inputId`, taken from the same queue frames the count is. It follows the account's own arithmetic: the live queue's inputs less the ones a durable park carried onto the checkpoint, plus a resumed leg's continuation frames the reopen did not bring back and the park did not carry (those lead: they were accepted first). A park that carries one entry and is refused another names only the refused one. The list rides only where it names exactly the counted inputs; a lane with an input that carried no id keeps its count and loses the list, so a reader never mistakes a partial list for the whole. A child leg's copy on the parent's session carries the same list. An `approval_feedback` row (the words an approving person wrote) never carries one — it is no input; the `crashed` arm is the serving layer's and is not minted here.
765
+ - **Behavior change.** None for a consumer that ignores the key; a notice's `detail` gains one array key on a real stranded input (an exact-`detail` comparison in a consumer's test would see it).
766
+ - **Consumers.** @client-core: key a stranded input by `detail.inputIds` against the receipt's `messageId` (the `inputId` you sent, or the one the `human_input` frame returned); where the key is absent the count is the whole account, as before. @server: the `crashed` arm you mint is unchanged and carries none; you may spell the same key for it when you can name the inputs.
767
+ - **Pins.** `test/backlog2594-undrained-input-ids.test.ts` (① real lane: two steers — one caller id, one minted — and a `later` steer cut by `interrupt()`, each family lists the ids the `human_input` frames carried; ①b the harness seam — the sink's park records are the same predicate's frames, person inputs only, an input with no record leaves its lane's list short, an `immediate`-tier input leads in service order; ② a park that carries one and is refused one names the refused one, a park that carries nothing names all, a full carry announces nothing; ③ the account arithmetic as ids — held less migrated, continuation first, a reopened row's frames dropped, a short list is the count alone, no ids recorded is the count alone, the approval row carries none; ④ the minter — complete lists only, follow-up lane keeps its own ids, the parent's copy carries the list and nothing aliases the caller's array or the other notice's; ⑤ every row with ids is `leg_end`).
768
+
769
+
770
+ ### Corrections
771
+ - The 7.58.0 notes carry the #2670 section (checkpoint-store contract kit judges the run origin) inside their `## 7.57.0` block; #2670 shipped in 7.58.0 (merged 10-25 21:15, after the v7.57.0 tag) — the released blocks are left byte-identical to their tags, so the misplacement stays where it is and is stated here instead.
772
+
773
+ - #902: the 7.58.0 note said the divergence was registered; it was registered 2026-10-26, after the release, as `fs-throat-dotdot-resolved-by-filesystem`.
774
+
775
+ no-notes: #2613(repo tool verify-debts.mjs closed-row sha existence; not in the package), #1068(a two-line src deletion only: the memory engine's two awaited rescue timers stay ref'd and are cleared when the race settles, the RB-466 form; its two functions are new in this window, so there is no behaviour relative to 7.58.0), #2352(repo tooling only: package.json test:affected + scripts/affected-tests.*; no package face)
776
+
777
+ ## 7.58.0 — 2026-10-26
778
+
779
+ ### The release re-window refuses the rows it cannot decide and keeps each row's first promised window — `scripts/release/rewindow.mjs` (#2835; release tooling only, `src/` untouched; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
780
+
781
+ - **Before.** At the R, `rewindow` moved every non-landed row windowed at the cut version: a P0 / P1 row, a row with no readable P level, a DESIGN-DONE row and a BLOCKED row went to the next version window with no car coordinate asked for, and `首次承诺窗` was read only from an explicit field and otherwise written as the version being cut — a row whose window history named 7.55.0 lost it. No re-window count was written.
782
+ - **Now.** Refused (LEDGER-LAW v2 §2.5; exit 3 in a dry run as in `--apply`; nothing moves and nothing is written; every refused row is named with why and how to write it): a row with no readable P level · a BLOCKED row missing any of `on` / 负责人 / 承诺解阻 / 下次复核 / 阻塞方 (a BLOCKED row is judged by its level and those five fields alone, P0 / P1 included: complete ⇒ it moves with the version) · and, for a row that is not BLOCKED: a P0 / P1 row with no car coordinate · a DESIGN-DONE row with no car coordinate. A coordinate is what git resolves from the status head: a car branch (or its `merge <car>` commit), or a commit that changes something beyond the bookkeeping files (ledger, retirement lines, anchor-claims stock group); a bookkeeping commit sha, a planned car with no branch and a session number are not. Every row the tool still moves (pending layer and next window alike) carries `首次承诺窗 <earliest window its history names>` and `改窗 <n + 1>` in its status head, the status word and the `原 …` tail kept: the first window is the earliest window the row names — a `首次承诺窗` field, the window cell's `原 x.y.z` / `原窗 x.y.z` / nested chain, an old re-window note (`a → b`, also `a → 待排`) — never defaulted to the cut, and a field is copied whenever the history agrees with it; the count is the largest explicit `改窗 n`, else the moves to a later window the two cells show (once per time it happened, a move told in both cells once, an advance not at all); going into the pending layer and back out copies both and only raises the count. Only the status head is read for the row's own car, sha and BLOCKED fields — a past status after `原 BLOCKED(` / `原 DESIGN-DONE(` / … is history. `--next` must be later than the cut.
783
+ - **Readings.** `rewindow 7.58.0 --dry-run` on main's ledger (4d71bbcfd) with the release head `origin/stage-7580` (d64bb24b1): the base tool moved 109 rows and refused none; this one moves 87 (34 into the pending layer, 53 to 7.59.0), refuses 22 (14 with no P level: #2357 #2361 #2378 #2392 #2404 #2405 #2411 #2413 #2426 #2427 #2428 #2429 #2698 #2699; P1 with no coordinate: #454 #1928; DESIGN-DONE with no coordinate: #1557 #1928; BLOCKED missing fields: #1444 #1595 #2596 #2609 #2631) and leaves 30 at 7.58.0 (26 landed, 4 with a car in the release); 109 = 87 + 22. 50 of the 87 carry a first promised window earlier than 7.58.0. Over the R 7.57.0 input (665 rows): of the 623 rows that entered the pending layer, 123 had a first promised window earlier than 7.57.0 that the R wrote as 7.57.0 (89 → 7.56.0, 20 → 7.53.0, 13 → 7.55.0, 1 → 7.52.0) — with the final reader 124 (one more is found from an `→ 待排` note: 1 → 7.48.0) — and 102 more carried a `首次承诺窗` field later than their own history (e.g. #901: 7.46.0 over `7.43.0 未兑现 → 7.46.0`): 226 in all; the ledger still carries the written values until the rows are lifted. A snapshot: the stage is not complete, so cars not yet merged read as outside the release.
784
+ - **Who is hurt.** Nobody at runtime. The R operator: `r-commit` / `rewindow` exit 3 until each of the 22 rows above has its level, coordinate or fields (or is closed, or `--keep`ed).
785
+ - **Pins.** `test/release-rewindow-refuse.test.ts` (X1–X12: the four refusals with a control each, one cell per BLOCKED field and the fullwidth separator, what a coordinate is — also against real git: a ledger-only commit, a mixed commit, a merge read against its first parent —, exit 3 through the command line in both modes with the file untouched, the first window from the history / an explicit field / the status notes, the count, the pending round trip, the stamp forms, `--next`); Twenty-one mutations of the tool (each refusal off, a bookkeeping commit read as work, a merge read without its first-parent diff, the first window defaulted to the cut or a field put above the history, the count restarted or an advance counted or repeated postponements collapsed, a past status read as the head, a fullwidth separator taken as a value, the stamp not written, the pending path or `--next` unguarded …) are each red in at least one cell, and the base tool is red in all 17. `test/release-chain-bookkeeping.test.ts` W1 / W2 / W4 re-pinned and the W7 acceptance freezes the 226 rows above (124 written as the cut, 102 a field later than the history) and checks each new window is earlier than the one written and named in the row's own cells.
786
+ - **Known limits.** A branch that exists but carries no work of its own (cut from the stage and never committed to) reads as a coordinate, as does any resolvable `car-…` word in the head, including one that only mentions another car; a commit counts as work if it touches any file beyond the three bookkeeping ones; the five BLOCKED fields are checked for presence, not for the quality of their values. The 226 ledger rows above are not repaired by this change.
787
+
788
+ ### The approval card's reason an extension's ask is not cleared by a matching allow entry is one station-neutral sentence — a `tool.check` ask no longer reads as a PreToolUse hook's (#2827; wording change on the card's disclosure clause, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core @test)
789
+
790
+ - **Before.** An ask stamped with the extension provenance (`decisionReason: "hook"`, ask class `hook`) is raised by two engine stations: a `classic.PreToolUse` handler answering `ask` (folded over the standing verdict by `foldHookAsk`, `src/core/tool-policy.ts`) and a `tool.check` handler answering `ask` (`readToolCheck` and `questionOf`, `src/core/tool-check-reading.ts`). The class's reason row, `SHADOW_REASON.hook`, said `a PreToolUse hook asks about this call — the deployment's own screening is answered by a person`, so the card for a call the `tool.check` station asked about named a PreToolUse hook in its closing clause while its message half already named the extension that asked (`asked by extension "<name>"`). A deployment policy's own ask that declares `decisionReason: "hook"` (a tighten-only input the class derivation reads) is the same class and read the same clause.
791
+ - **Now.** One row, one sentence for both stations: `an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person`. The card's clause and the exported `SHADOW_REASON.hook` are the same string. There is no row per station: the class is one class, and a sentence chosen by station would be two readings of it.
792
+ - **Not changed (stated).** The ask class set (`hook` stays the one class for both stations), the member phrase on the allow side (`a PreToolUse hook's allow` still names the member that matched, whichever station spoke the allow), `SHADOW_REASON` (still frozen, still exported from the root with the same keys).
793
+ - **Wording change (open to veto).** *What changed*: the closing clause of the card's disclosure for an ask of class `hook` has new words. *Who is hurt*: a host or test that matches the old clause by text. *Migration*: compare with the exported `SHADOW_REASON.hook`, never a copy of its text.
794
+ - **Consumers.** @cli @client-core: a host that renders the card's "why it cannot be cleared" half from `SHADOW_REASON` shows the new sentence with no change; one that snapshots the old clause by text re-pins to the exported row. @test black box: a `tool.check` ask beside a matching `allowedTools` entry ends its card `… does not clear the ask — an extension's screening asks about this call (a PreToolUse hook or a tool.check station) — the deployment's own screening is answered by a person`; a PreToolUse ask ends the same.
795
+ - **Pins.** `test/backlog2827-shadow-reason-hook.test.ts` (a real Runner and a real `Bash` call: a PreToolUse ask, a `tool.check` ask over an allow, and a `tool.check` ask while another registration's PreToolUse allow is the only member that matched — each card's why-clause is the exported row, names both stations and is never the old one-station claim; a deployment policy's own ask declaring the hook provenance; the clauses are byte-identical; the table stays frozen with no row per station); re-pinned to the exported row: `test/backlog1516-probe-mandate-disclosure.test.ts`.
796
+
797
+ ### BREAKING — a write-protection hit only the disk reaches is its own ask class, `write_protection_on_disk`, which the auto-mode classifier does not answer (#2795, ruled C-R923; behaviour narrowing + `AskClass` +1, open to veto; hard-breaking: yes)
798
+
799
+ - **Before.** A write whose path as written names no row of the write-protection table, but whose real target (a link onto `.claude/settings.json`) or link chain (a hop through `.ssh`) does, was the same ask as a write that spells the row: class `write_protection`, which the auto-mode classifier may answer — so in `auto` a model could steer a write through an innocent-looking link and have the classifier, which sees only the arguments, clear it.
800
+ - **Now.** One table hit has two readings, judged per written target: the path as written names the row ⇒ `write_protection` (unchanged: the classifier may answer it); only where the path resolves on disk does ⇒ `write_protection_on_disk`, whose row is `write_protection`'s but for the classifier column. The classifier station still reads one cell (the folded row); the reading is the class. A write tool's target reads the judge's `via` (the judge reads the spelling first and answers there on a hit, so `target` / `chain` means the spelling names no row); a shell command reads each written target — one occurrence at one seat, never one canonical identity — its text judged by the table's spelling view alone. Its text is the command's own: for a pattern, the pattern, not the names a listing produced; otherwise its spellings but the ones a reading of the filesystem added — `EstablishedRead.derivedSpellings` (new, optional) marks them: the home's view of a landed target (a home reached through a bind mount or a kept link respells the target through the home), and the name of a GNU sed `--follow-symlinks` backup when the operand's links supplied it. A command with a spelled target and a linked one carries both classes; the disclosed word is `write_protection_on_disk` (it sits just before `write_protection` in `ASK_CLASSES`).
801
+ - **Where the new class goes, by mode:** `auto` — to the approver (the classifier is not asked; no approver ⇒ the headless refusal); `bypassPermissions` — released, as `write_protection` is (`released.askClass: "write_protection_on_disk"`); `dontAsk` — refused; a declared sandbox may still admit it (the row's sandbox column is `write_protection`'s); no allow rule clears either.
802
+ - **Unchanged:** the ask sentence (the resolved form already carries the reach clause `matched where the path resolves on disk (its real target or a link on the way)`), the mandate word `write_protection` and its card reason (`SHADOW_REASON.write_protection_on_disk` is the same sentence), and every other class.
803
+ - **Hard-breaking, three sentences.** *What breaks*: `AskClass` gains `write_protection_on_disk` (`ASK_CLASSES`, `MODE_ARBITRATION`, `SHADOW_REASON` one row each; `ShellReadVerdict` one optional mark `writeProtectedOnDisk`; `AskClassFacts.mandateMarks` one optional `writeProtectedOnDisk`; `EstablishedRead` one optional `derivedSpellings`; the station's `writeTargetJudge` seat one optional input `spellingOnly`), and a write that reaches the table only on disk carries it instead of `write_protection` on `tool_end.gate.disposition`, the approval request and the park row — and the auto-mode classifier no longer answers it. *Who is hurt*: a consumer exhaustive over `AskClass` (a `Record<AskClass, …>` table fails to compile once); a host that recognises a write-protection question by `askClass === "write_protection"` misses this one (read the mandate word, which names both); an `auto` deployment whose classifier used to clear a write through a link onto a guarded path now puts it to its approver. *Compensation*: the row differs from `write_protection`'s in one column; the mandate word, the card reason and the sentence are unchanged; consumers are named below.
804
+ - **Not changed, stated.** A park row a 7.58.0 engine writes with the new word is screened out by an older engine's class screen (the word is outside its closed set) — the pair is dropped, not misread. Where the reference has no counterpart: a deployment's configuration root given as a link and a write spelled under the root's real directory is the disk's reading here (the declared root's spelling does not name it) — a stricter reading.
805
+ - **Consumers.** @server: `src/run-local.ts` `NO_TTY_ASK_CLASS_ROW` (`Record<AskClass, …>`) needs one row (the remedy `write_protection` has fits: terminal only, no budget release). @client-core: the generated class table and arbitration mirror regenerate; an older package reads the word as outside its table. @cli: please check for a table over `AskClass` (none was seen in the tree last read); a fixture that maps the mandate word to a class keeps working (the mandate word is unchanged). @test: black-box — in `auto`, a Write whose path is a link onto `.claude/settings.json` reaches the approver without the classifier being asked, while a Write spelling `.claude/settings.json` is still answered by the classifier; `echo a > .vscode/settings.json; echo b > link.json` carries both classes.
806
+ - **Pins.** `test/backlog2795-on-disk-hit-to-person.test.ts` (real lane, `auto`: W1 spelled ⇒ classifier; W2 link onto the row / W3 chain through `.ssh` ⇒ approver, no classifier; W4 a data-root sub-path naming `.ssh` stays the spelling's; W5 no approver ⇒ refused; S1 `echo x > link`; S2 `rm .bashrc` (entry seat) the spelling's; S3 `rm notes/x` with `notes` → `.ssh` the disk's; S4 two targets ⇒ both classes; H1 a home reached through a bind mount / H2 a followed sed backup ⇒ the disk's reading, H3 the same sed spelled directly ⇒ the spelling's; T1–T5 the row, the order, the words, bypass / dontAsk, the retired `write_protection_unresolved` stays retired). Re-pinned: the releasable-class lists (`backlog1111`, `backlog1214`, `backlog1423`), the class ratchet (`backlog1731` A6), the linked configuration root (`backlog1419` P7a). `test/live-write-protect-ask.test.ts` ① keeps the spelling form only (the resolved form no longer reaches the classifier).
807
+
808
+ ### `@sema-agent/core` depends on `@sema-agent/primitives` and reads it by name — a project that installs both holds one copy of the credential reference, and the root's tarball no longer carries `dist/primitives/` (#2749, ruled C-R910; install-shape change, open to veto; no behaviour change; hard-breaking: none; closed sets: none; exports: none — the six root values and six root types keep their names and kinds, now re-exported from the package) (@server @web-admin @settings-schema @cli @client-core @connectors @dgx)
809
+
810
+ - **Before.** The root compiled `src/primitives/` into its own `dist/` and re-exported that copy; it did not depend on the package. Installed side by side (both tarballs packed from one tree, installed into an empty project), `core.readCredentialRef !== primitives.readCredentialRef`, and the same for `CREDENTIAL_REF_KINDS`, `CREDENTIAL_REF_TRUST` and `CREDENTIAL_REF_PROBLEM_REASONS` — two module instances, as the 7.57.0 notes disclosed.
811
+ - **Now.** The root's `dependencies` name `@sema-agent/primitives` at the root's own version, exactly. `src/index.ts`, `src/core/peer-seat.ts` and `src/core/mcp-server-spec.ts` import the package by name; the root build excludes `src/primitives/` and compiles against the package's built declarations, so `npm run build` builds the package first (`scripts/build-root-deps.mjs`). The root's tarball goes from 1555 to 1551 entries (the four `dist/primitives/*` files). Installed side by side, all six values are the package's own (`===`), and npm keeps one copy. The package's declarations now carry their documentation (its build runs the second, comment-keeping declaration pass the root runs).
812
+ - **One law, both directions.** A package of the release names another only at the release version: a package's core peer (as before) and the root's dependency on a package (new). `gate:packages` checks the root's side — exact version, published, has source, does not take core (a cycle) — and the bump moves that cell (`scripts/bump-version.mjs`). The publish order is the manifests' dependency order (`scripts/release/lib.mjs` `publishSet`, whose code is unchanged; with the new dependency it reads `mods-kernel → primitives → core → core-stores-sql`, where it read core first); nothing else states it. Before the publish, the stranger installs (`gate:blackbox`, and `gate:packages:pack` for a package that takes core) install the root's tarball together with the tarballs of the packages it depends on, packed from the same tree — a new version is on no registry yet; the root's tarball must carry no file compiled from such a package's source; `gate:blackbox` checks the installed values are the package's own and that a consumer's compiler reads them as the package's own declarations. `gate:repro` refuses to judge a built `dist/` whose by-name import would not land in this tree's `packages/primitives` (no link, a link into another checkout, the package not built), naming the fix (`npm ci --ignore-scripts`, then `npm run build`). CI's fallback publish leg, which publishes the root alone, now refuses (`scripts/root-deps-published.mjs`) while a package the root depends on is not on the registry at the release version, or the registry cannot be asked — it no longer could land a root nobody can install; the refusal retires with that leg (#2803). `gate:spawn-sites` reads such a package as the repository's own source — every file it compiles must be under the `src/` it scans — instead of asking for a review row pinned to a version that moves every release; `criteria-lint` counts its source as shipped.
813
+ - **An intermediate step with its retirement condition, not a documented exception.** After #2802 (the three gates that read only `src/` — comment census, internal wording, module size — extended to `packages/*/src`) lands, the primitives source moves to `packages/primitives/src`, the build's exclusion and its `paths` entry retire, and the satellite packages have one layout.
814
+ - **Not changed: `@sema-agent/mods-kernel`.** The root still compiles the kernel into its own `dist/` beside the package (two module instances if both are installed; the kernel's README states two copies interoperate on plain objects and compare `KERNEL_CONTRACT_VERSION`). Reading it by name first needs a ruling on the kernel's public face, because the engine reads four of its non-entry modules — #2801, `KL-2749-a` (pending ruling, not accepted).
815
+ - **Install-shape change (open to veto).** *What changed*: installing `@sema-agent/core@X.Y.Z` now installs `@sema-agent/primitives@X.Y.Z` with it; every consumer's lockfile gains `node_modules/@sema-agent/primitives`. *Who is hurt*: nobody at runtime; a project that pins `@sema-agent/primitives` itself at a version other than its core's gets two copies (npm keeps core's own beside it), which `npm ls @sema-agent/primitives` shows. *Migration*: none for a project that does not import the package; one that does names the same version as its core.
816
+ - **Consumers.** @server @web-admin @settings-schema: a validator that reads `readCredentialRef` from `@sema-agent/primitives` names the package at your core's version — then it is the engine's own function, not a copy; your lockfile gains one entry when you take this release. @cli @client-core @connectors @dgx: one lockfile entry, no code change.
817
+ - **Pins.** `test/backlog2749-primitives-single-instance.test.ts` (over a throwaway release tree: the install set installs offline at an unpublished version and the root's re-exports are the package's values, declarations included; a root carrying a compiled copy is red in the tarball reading and in the identity probe; a root declaration re-exporting an unresolvable package is red in the declaration probe; the root's dependency law, red for a range, another version, an unpublished package, a peer entry; the bump writes the cell; the publish order; `gate:repro`'s precondition for each state; the CI fallback's refusal for a registry without the package, with it, and unable to answer, and its place before the leg's publish; the real tree's manifest, build config and build script). Re-pinned as well: `test/backlog1468-n1-core-stores-sql.test.ts` (`tsconfig.json`'s in-repo mappings are core and the package the root depends on). Re-pinned: `test/backlog2293-credential-ref.test.ts` (the pin that compared two source paths in one module graph — always the same module — is replaced by the source reading: the rest of `src/` reaches the folder only by the package name), `test/verify-packages.test.ts` (the root build program compiles no source of a package the root depends on and reads only that package's built declarations from `packages/`), `test/backlog1751-package-release-base.test.ts` (the bump's cells include the root's dependency; the lockfile links it at a version no registry holds).
818
+
819
+ ### The hosted-connector assertion header has one name, and the engine owns it — `MCP_ASSERTION_HEADER` is exported from the root and a peer declaration that names it is refused (#1750; additive export, behavior narrowing, open to veto; exports: +1 `MCP_ASSERTION_HEADER`)
820
+
821
+ - **Before.** The name of the header a hosted connector reads the principal assertion from had no definition in the engine: it was a proposed value on the connector's side and a free string on the server's request face, while the engine — the party that sends request headers — let any peer declaration set a static header under it (or name it as the principal header) and sent it as declared.
822
+ - **Now.** `MCP_ASSERTION_HEADER` (`"connector-assertion"`) is defined once, in `src/core/protocol-http-auth.ts`, and exported from the package root. The one ownership judge, `headerOwnershipCollision`, gives the engine that name as its first owner: a declaration that names it as the principal header's name collides, and the dial (MCP and A2A alike, one judge) refuses the peer with `config.protocol_header_collision` before any request leaves; its siblings still mount. The judge's answer gains `engineOwned` (true for this collision, false for the ordinary two-spelling one; `first` is then the engine's spelling, `second` the declaration's). Names that only contain it (`x-connector-assertion`, `connector-assertion-id`) are the declaration's own and travel. This release sends nothing under the name and adds no member to any declaration: the constant is the name only; the assertion's value is not minted, held or sent here, and its path is the credential-resolution seat (#2294 / #2295). (In this same release #2294 removes `transport.headers` altogether: a declaration carrying any static header is refused by name before this judge runs, so the judge's static-header arm is reached by no declaration and answers `undefined` for it; its live arm is `principalHeader`.)
823
+ - **Behavior narrowing (open to veto).** *What changed*: a peer declaration naming the engine's assertion header as `principalHeader` is refused at its dial; it was sent as declared (a static `headers` entry is refused earlier and by name, #2294). *Who is hurt*: a deployment that put a pre-minted assertion into a static `connector-assertion` header of an MCP or A2A peer (that peer is now skipped with a coded warning), or that named the principal header `connector-assertion` (a hosted connector reads that header as an assertion, not as a bare principal). *Migration*: remove the entry; a connector that requires the assertion has no static-header path from this release on — the value reaches it under this name from the credential seat once that lands. Measured on a real MCP dial, previous stage head vs this one: a static `Connector-Assertion` header reached the listener and is refused with the listener hearing nothing; `principalHeader: "CONNECTOR-ASSERTION"` likewise.
824
+ - **Consumers.** @connectors: your CN-034 gate can read `MCP_ASSERTION_HEADER` from the package root — the value is your launcher's current `connector-assertion`, so nothing is renamed on your side. @server: S-1566 can default `assertionHeader` to this constant; `_CoreHasNoAssertionSeat` stays green — the constant is not a seat (no `assertionHeader` key on the http transport) — and an intake that judges a declaration with `headerOwnershipCollision` now also refuses the engine's name, reading `engineOwned` for the wording. @test: a black-box cell for each refused form (static any-case, with a principal header, as the principal header; MCP and A2A).
825
+ - **Pins.** `test/backlog1750-assertion-header-name.test.ts` (the name defined once as a string literal in the whole src tree, exported and a valid header name; the judge for each form with its controls; the MCP and A2A dials refusing before any request, a sibling still mounting); `test/export-surface.snapshot.json` regenerated (+1).
826
+
827
+ ### The release is one tracked chain, `scripts/release/`, and each of its steps refuses what it cannot stand on (#2794; release tooling only; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
828
+
829
+ - **Before.** The release steps after the last car ran from per-window script copies kept outside the tree, beside an in-tree publish script that read its token from a shell profile. On the 7.57.0 day five checks were left to a person and all five slipped: the publish took its RC-green sha and the gated `dist/` only when they were set (neither was), the live gate ran after the publish, the post kept a `<N>` slot and a "byte-for-byte" sentence its publish log contradicted through four green runs of the post lint, the "shipped" post number was claimed 68 minutes before the publish, the R bookkeeping wrote a `BLOCKED(on 派车槽)` status no blocker stood behind (taking 662 live rows out of the capacity count), and the satellites' printed pack shasums were taken before their gitHead was written, so none matched the registry.
830
+ - **Now.** `node scripts/release/chain.mjs <ver> <step>|--all [--dry-run]` runs r-commit → live-stamp → tag-push → publish → ship-number → ship-post-lint → post-ship with one state file (`.gate-logs/release-<ver>.json`); versions, trees and the package set (`publishClaimsOfTree`) are parameters. `publish` requires `RC_GREEN_SHA` (an ancestor of the tag with the same source trees) and `PUBLISH_GATE_DIST` (compared file by file; the log says `dist compared with … identical`), reads the token from the environment only, packs each satellite after its gitHead is written and prints only the registry's readings. `tag-push` refuses without a green live stamp for the content (`live-stamp` keeps the live gate's own verdict record per run: exit, files, passed, skipped, OMITTED, time; newest run exit 0, no skip, at most `--live-max-age-hours` old, default 6) and when main moved after the release commit; it pushes through a credential helper that reads the token at run time. `ship-number` claims the number only after the registry's three-way sameness for every published package. `rewindow` (one tool for the three re-window scripts) keeps an unmerged P2 / P3 row OPEN in `待排(C-R231 ②;<类别>;原窗 <ver>)` with its first promised window, leaves landed rows (the ledger gate's `LANDED_STATUS`, the word post-ship reads too) and car rows whose car is in the release head (`carReader`: an ancestor of the head, not of the previous tag, not on the release's own first-parent line), moves every other row windowed at the cut version to the next window, sets the window cap to its true count, never writes BLOCKED, refuses to decide a CHANGELOG-named live row (`--ledgered` records a disclosure), and writes nothing when the ledger gate is red on its result. A real run of a step already recorded ok is not run again (no second tag push, publish or post-number claim); `tag-push` is done only when origin holds the tag and finishes a local tag it does not; every child process gets only the credential its own step needs; `live-stamp` refuses a tree with uncommitted changes. `ship-post-lint` gains four post-text legs (from 7.58.0): a `<…>` slot left, a byte-for-byte sentence without the publish log's comparison line (`--publish-log`), a car named as part of the release that is not in the RC, an `在飞(car-…)` the ledger's IN-PROGRESS rows do not confirm. `post-ship` writes `[tag v<ver> <sha>]` into the core landing rows and refuses a cited feature whose FEATS index row lacks `shipped v<ver>` and a row windowed at the shipped version that has not landed. `run-live-gate.mjs` writes its verdict record when `LIVE_GATE_SUMMARY_FILE` is set. `scripts/publish-release.sh` is retired (its cells re-pinned on the new publish step).
831
+ - **Who is hurt.** Nobody at runtime: `src/` is untouched and the package's file list is unchanged (`scripts/` is not in `files`). The publisher runs the chain; a publish without the two variables, a tag without a green live stamp, and a post number before the registry shows the release are now refused.
832
+ - **Pins.** `test/release-chain-steps.test.ts` (publish P1–P10, tag-push T1–T12, live-stamp L1–L4, ship-number S1–S6, r-commit R1–R4, chain C1–C5, `sameContent` and `carReader` over real git, against throwaway repositories, a fake npm and registry and a recorder in front of every push, fetch and ls-remote); `test/release-chain-bookkeeping.test.ts` (rewindow W1–W10, W7 being the 7.57.0 R input against the C-R906 rows, `test/fixtures/release-chain/cr906-rewindow.json.gz`; the post-text legs A1–A4 / B1–B3 with the real 7.57.0 publish log / D1–D2 / E1–E2; post-ship F1–F5); `test/backlog2154-publish-checkout.test.ts` ③ ④ re-pinned on the one publish step; `test/post-ship-script.test.ts` fixture carries the three new anchors.
833
+
834
+ ### A request to an MCP server or an A2A peer carries what the deployment's peer seat answers for that send — a declaration carries no value (#2294, slice S1 of the MCP credential seat, design/1494; hard-breaking, open to veto; security; closed sets: `MCP_FAILURE_KINDS` +1 (`credential_unavailable`), `CHECKPOINT_CONFIG_REFUSAL_CODES` +3 (`config.credential_in_declaration`, `config.credential_ref_invalid`, `config.peer_seat_missing`); exports: +5 root types (`PeerSeat`, `PeerQuestion`, `PeerAnswer`, `PeerSeatTarget`, `PeerAskCause`), `RunnerDeps.peerSeat` +1, `McpProbeOptions.peerSeat` +1, `materializeMcpTools` / `materializeA2aTools` +1 trailing parameter, `McpServerSpec.transport` −`headers` −`env` +`credentials`, `A2aServerSpec` −`headers` +`credentials`, `headerOwnershipCollision` takes the protocol, `DECLARATION_PATH_RULES` −3 rows, `DeclarationPathRule.holds` narrowed to `"a string"`) (@server @cli @client-core @connectors @settings-schema @web-admin)
835
+
836
+ - **Before.** An MCP http server's credential headers, a stdio server's child environment and an A2A peer's headers were VALUES in the declaration: read once when the transport was built and sent with every request, they rode wherever the declaration rode (a parked leg's stored request, a pooled connection's key, a child leg's inherited tools, a lock's kept copy), could not be renewed for a short-lived assertion, and could set the MCP SDK's own headers. A 401 was only a status: nothing asked for a fresh credential. An A2A card's endpoint was bound to the declared origins once, after the card was read, and only when the declaration had headers.
837
+ - **Now.** One seat, `RunnerDeps.peerSeat(question, signal)`, answers what a send carries beyond the protocol's own members, the SDK's own headers and the engine's principal header (`src/core/peer-seat.ts`). It is asked under the CONNECTION's identity — the server's name, its whole transport (url; or command and arguments), its opaque `credentials` reference, its fingerprint, the principal; never the session: before every http MCP request (the first as `cause: "connect"`), when a stdio child is started (its `env`; an answer's `expiresAt` retires the child before the next call through the server's one re-dial — concurrent calls re-dial once, the calls in flight on the old child settle before it is closed, and a pooled connection is replaced once for every holder), and before every A2A send (the question names that send's `destination`). The answer is `{ kind: "carry", headers? | env?, expiresAt? }` — `headers` for http and A2A, `env` for stdio, the other lane's member refused — or `{ kind: "unauthorized", authorizeUrl? }`. A declaration names at most one reference, `transport.credentials` (A2A: `credentials`), read by the one reader `readCredentialRef` (#2293) at every entrance; the engine resolves nothing. A 401 asks the seat once more (`cause: "rejected"`) and the next send carries that answer; a repeat-safe tool call (`effect: "read"` / `"idempotent"`) answered 401 is sent once more on the same connection after the revocation probe and `reach` are asked again, when the re-ask answered other pieces; a write-class call is not sent again; a dial whose handshake or first listing was answered 401 is dialed once more on the same terms. A seat that throws, does not answer within 30 s, answers off-lane or off-shape, answers a header the protocol writes itself (`mcp-session-id`, `mcp-protocol-version`, `content-type`, `accept`, `last-event-id`), or answers `unauthorized` sends nothing: the new failure word `credential_unavailable` (delivered `no`; no liveness observation); a re-send that was not delivered (the seat could not furnish it, the endpoint refused the connection) ends with the first attempt's failure, so a call one of whose attempts was sent never reads `no`. Every value a connection's sends carried is what its remote's words are read without (the failure texts, status records and operator warnings); a seat's credential headers and credential-judged stdio variables are held from spawned children like any credential the engine receives. An A2A send carrying pieces goes only to a declared origin, judged at every send (`config.protocol_endpoint_unbound`); a card read under pieces that names an outside endpoint still refuses the peer at once. The connection pool's key holds no value by construction. A 401 after the re-ask keeps today's reading (`http_status`, `delivered: "unknown"`); the structured `unauthorized` failure and its readers are the next slice (#2295).
838
+ - **Hard-breaking (open to veto).** (1) *What changed:* `McpServerSpec.transport.headers` (http) and `.env` (stdio) are removed; a declaration that still carries either — whatever it holds — is refused by name at every entrance (the preparation door, a resume's pre-claim screen, `materializeMcpTools`, the no-run probe, `materializeA2aTools`: `config.credential_in_declaration`, the value never repeated), and a declaration naming `credentials` with no seat wired is refused (`config.peer_seat_missing`; an unknown reference kind `config.credential_ref_invalid`). *Who is hurt:* every host that builds an MCP declaration with values — server (roster `resolveMcpServers`, request surface `task-mcp.ts`, S-1907's sealed `checkpoint_ctx` copy), a shell or client that builds one in-process, a library user; settings-schema's `RequestMcpTransport` mirror (its two-way drift gate reds); readers of `DECLARATION_PATH_RULES` (the `transport.env` / `transport.headers` rows are gone). *How to migrate:* move the values into `peerSeat`, answering by server name AND url (or command): `peerSeat: async (q) => (q.peer.protocol === "mcp" && q.peer.server === "github" && q.peer.transport === "http" && q.peer.url === GITHUB_URL ? { kind: "carry", headers: { Authorization: … } } : { kind: "carry" })` — never one token for every peer; resolve roster references inside the seat; a request surface's literal values go into the deployment's own store, and the submitted declaration names `{ kind: "handle", id }` instead. (2) *What changed:* `A2aServerSpec.headers` is removed (refused the same way), and the card endpoint is bound at every send that carries the seat's pieces rather than once after discovery. *Who is hurt:* a host declaring A2A peers with headers; a peer whose card names another origin and whose seat answers pieces for it (refused). *How to migrate:* as (1), with `q.peer.protocol === "a2a"` and `q.peer.destination`.
839
+ - **Behavior narrowing (open to veto).** A principal header named as a header the MCP transport writes itself (any case) refuses the server at its dial (`config.protocol_header_collision`) — it would have replaced the SDK's own. The engine's `MCP_ASSERTION_HEADER` is now the seat's to answer (the assertion's path), and still never the principal header's name. `headerOwnershipCollision(t, protocol)` takes the protocol (the protocol-owned names are per protocol; A2A has none) and judges a send's answered headers with the principal header; the judge's answer is unchanged in shape.
840
+ - **Consumers.** @server: `peerSeat` is yours to implement (roster `headerRefs` / `envRefs` resolved at send time, bound to the roster entry's url; request-surface literals stored and rewritten to `handle` before anything persists — design/1494 §9 is S-1907's retirement test); the assertion header is answered by the seat under `MCP_ASSERTION_HEADER`; `credential_unavailable` is a new `errorCode` word on the status record, the manifest row and `tool_end`. @settings-schema: `RequestMcpTransport` loses `headers`, gains `credentials` (`CredentialRef`). @cli / @client-core: a host that builds declarations in-process needs a seat (single-machine form: a local token store); renderers keyed on `errorCode` meet `credential_unavailable`. @connectors: the assertion arrives under `connector-assertion` from the deployment's seat; a write-class tool answered 401 is not re-sent by the engine. @web-admin: a validator reads `readCredentialRef`; vault entries bind their destination for the seat to check.
841
+ - **Pins.** `test/backlog2294-peer-seat.test.ts` (D: the retired members refused by name at the door and the library entrance, an `undefined` member absent, the reference read by its reader, a reference with no seat refused at the door and at the dial; H: an ask before every request, an answer that changes between calls changing the header between them, the question's identity without a session, no seat ⇒ no piece; F: four ways a seat fails to furnish a call ⇒ `credential_unavailable` / `no` and no call at the server; R: a read call re-sent once with the re-ask's answer, a write call not re-sent and the next call carrying the new answer, an unchanged re-ask sending nothing again, an unfurnished re-send keeping the first failure's verdict, a 401'd handshake re-dialed; E: an echoed token absent from a failure text, a status record and a warning; S: one ask per stdio child carrying its variable, an expired child retired before the next call with four concurrent calls re-dialing once; A: the card read carrying the answer with the send's destination, an outside card endpoint refused under pieces and mounted without; E3 a re-dial's new value scrubbed from a first-connection tool's failure; S3 an `expiresAt` without `env`); the migrated MCP / A2A pins.
842
+ - **Known limits.** After a dial, only tool calls are sent again on a renewed 401 — a refresh listing and the resource tools fail once (KL-2294-a); concurrent 401s on one connection share one re-ask (KL-2294-b); an expired stdio child is retired at the next tool call, not by the resource tools, and a failed re-dial leaves the server down (KL-2294-c).
843
+
844
+ ### An MCP `tools/call` carries `_meta["sema/toolUseId"]` — the id of the call it executes — and `_meta["sema/requestMeta"]` — the record of strings the call's `tool.call` chain handed on; one mint, one judge where a handler hands the record on, and the host supplies it as a deployment-seat `tool.call` handler (#2461; behavior change on the wire, open to veto: the request meta is wider than the reference, see Divergence; hard-breaking: one — `KERNEL_CONTRACT_VERSION` 3 → 4; closed sets: none; exports: none (a new internal module `src/core/mcp-call-meta.ts` and an internal `materializeLegMcpTools`, neither index-exported); members: +1 optional `ModDispatchOptions.checkHandOn`; signatures: none — the public `materializeMcpTools` takes no request-meta source, so a library materialization's calls carry the id and never a record) (@server @cli @client-core @test)
845
+
846
+ - **Before.** The one `tools/call` the engine sends handed the server `{ name, arguments }` and the SDK's own `progressToken`, nothing else; a server could not tie what it did to the call that asked for it, nor tell the engine's one resend after a dropped session from a new call. A `tool.call` handler that passed `next({ ...e, requestMeta })` had the member received and silently dropped at the chain bottom.
847
+ - **Now.** Every `tools/call` carries `_meta["sema/toolUseId"]` = the executing call's id — the `toolCallId` of its `tool_start` / `tool_end` (an extension's own `$.tool.call` executes under its `ext-` id, a resumed call under the id it was asked under) — whenever that id is a non-empty string; both attempts of a resent call carry the same. It correlates; it is not a global identity: the engine keeps it unique among one response's calls, but a model may reuse an id on a later turn and legs share a pooled connection, so a server that needs the session or the agent is stamped by the host. A `tool.call` handler may hand on `requestMeta`, a plain record of strings (at most 262144 UTF-8 bytes of keys and values): it rides as `_meta["sema/requestMeta"]` on that call when the tool is an MCP tool, as a frozen copy without a prototype (an empty record rides as nothing). It is judged where the handler hands it on, off the payload's own data member (an inherited one is not handed on; no getter, `toJSON` or Proxy trap runs): anything else — a member that is not a string, a list, a class instance, an accessor, a symbol key, over the bound — is the handler's violation, like a changed pinned key: its `next` does not descend, and the call is refused before its body naming the extension (the station's violation sentence: `a tool.call extension gave an answer the station cannot take (extension "<name>" next() handed on a requestMeta the call cannot carry: …) before this call to "<tool>" ran; the call was NOT executed (fail-closed)`), unless that handler's `.catch` answers. The record reaches the MCP tool on the body's own async chain, per leg: a child leg's calls, a second call in flight, a direct `execute` outside any body and a timer left behind read none of it.
848
+ - **The host's record and an extension's.** One source: the host is a `tool.call` handler at the deployment seat. Who wins a member is the chain's order — the value that rides is what the last handler before the body handed on; a deployment handler in the `append` tier is the innermost, and a task handler can neither `next.to` past it nor answer in its place except by refusing. Stated: the host's stamper is its own registration that makes no calls — a registration's own `$.tool.call` runs without that registration's handlers (the re-entry law), so a stamper that also calls tools does not stamp its own calls.
849
+ - **Contract 3 → 4 (hard-breaking, @server @cli @client-core).** What changed: `KERNEL_CONTRACT_VERSION` is 4 — a station may judge what a handler hands on (`ModDispatchOptions.checkHandOn`: its sentence is the handler's violation, a throwing check is one too; the dispatch's own `e` passed on unchanged is not judged), and `tool.call` takes `requestMeta`. Who is hurt: a host that loads `@sema-agent/mods-kernel` beside the engine and compares the contract for equality reads a mismatch until it takes the 7.58.0 kernel; a `tool.call` handler that already handed on a `requestMeta` member that is not a record of strings (none known) is now refused instead of ignored. How to migrate: take `@sema-agent/mods-kernel@7.58.0` with core 7.58.0; a handler that never sets `requestMeta` changes nothing.
850
+ - **Divergence (open to veto).** The keys are sema's own (`sema/toolUseId`, `sema/requestMeta`; the reference spells its id `claudecode/toolUseId`) — a server that reads only the reference's key reads nothing. The reference's request meta is a closed first-party relay: a hook may set one allow-listed key, it is read only behind a feature value that is off by default, and it reaches only the engine's own remote-session servers; sema has no such first party, so its record is open (any string member) under its own key and reaches every MCP server the engine calls — the hosts that write it are the deployment's and the task's in-process code. Not covered: in-process code that changes the shared prototypes (`Object.prototype.toJSON`) changes how the SDK serializes every message, this one's too.
851
+ - **Consumers.** @server: a stamper for a session, agent or driver identity is a deployment registration at `append` that makes no calls; equality checks of the kernel contract move to 4 with this release. @cli @client-core: the kernel copy's contract equality moves to 4. @test: the wire is observable on a real MCP server (`request.params._meta`). A server that de-duplicates resends keys on the id within one call's life, not across a session.
852
+ - **Pins.** `test/backlog2461-mcp-call-meta.test.ts`: a real `@modelcontextprotocol/sdk` server in process records `_meta` — the model's call (id = the frames'), two calls in one turn, a handler's record byte-equal with an own `__proto__` key, the chain's order both ways, five malformed shapes refused before the body, `{}`, a non-MCP tool, a `.catch` recovering with a good record, an inherited `Object.prototype.requestMeta` getter never run, an extension's `$.tool.call` (its `ext-` id; a stamper that makes no calls stamps it, one that makes the call does not), a direct `execute("")`; the judge, the mint and the seat (two holds under one id, a hold with none beside one with a record, outside, after, another seat) and the kernel's `checkHandOn` as units.
853
+
854
+ ### A server that declares `sessionMetaKey` is sent the sending leg's own session id on every `tools/call` and `resources/read`, under that key in `_meta`, over stdio and Streamable HTTP alike; absent by default, and a key that would land on a reserved or engine-owned place is refused by name (#2296; additive; behavior change on the wire for a declaring server only, open to veto — the reference sends no session id; hard-breaking: none; closed sets: none; exports: none (the new member is on the exported `McpServerSpec` type; `judgeSessionMetaKey` and `McpLegMetaReader` are internal to `src/core/mcp-call-meta.ts`); members: +1 optional `McpServerSpec.sessionMetaKey`; signatures: none public — the internal mint takes the declared key and the leg's session id as two more optional arguments, the internal seat constructor takes the session id) (@server @cli @client-core @connectors @test)
855
+
856
+ - **Before.** The engine never told a server which session a request came from: `mcp-session-id` is the server's own per-connection id, the principal header names the user, and a connector that keeps state per (principal, session) — a browser's login state, a profile per session — had no key to keep it under. Pooled connections are shared by legs, so a connection-level header could not carry it either.
857
+ - **Now.** `McpServerSpec.sessionMetaKey?: string`. With a key declared, every `tools/call` and every `resources/read` the engine sends that server carries `params._meta[key]` = the sending leg's `sessionId` (the id its events carry), over stdio and Streamable HTTP, per call — so two legs on one pooled connection each send their own. The `_meta` has still ONE writer: the mint `mcpCallMeta` (`src/core/mcp-call-meta.ts`) takes the declared key and the leg's session id beside the call id and the request meta; the resource handle's read params and the tool call's request both come from it. Absent ⇒ nothing is sent. A dial with no leg (a direct `materializeMcpTools`, the no-run probe) has no session id, so a declared key rides nothing there. A delegated child is another session: its own calls carry its own id, not its parent's; the engine does not guess a root, and the principal (`principalHeader`) is shared by every session of one user, so it is not a tree key either.
858
+ - **The key is judged once**, by `judgeSessionMetaKey`, where the declaration is judged — the preparation door (the whole prepare is refused) and the materialization entrance (that server is never dialed: `invalid_config`, a warning naming the key; siblings mount). Refused under `config.invalid_argument`, naming the server and the key, never dropped or defaulted: a non-string, an empty or over-long (> 128 characters) one; one outside the MCP `_meta` key-name format (an optional prefix of dot-separated labels and a slash — a label starts with a letter, ends with a letter or digit, holds letters, digits and hyphens — then a name of letters, digits, hyphen, underscore and dot that begins and ends alphanumeric; this also keeps out `__proto__`, which the SDK's own request parse drops before a server handler sees it); a key in a prefix MCP reserves (the prefix is the text before the first `/`; its SECOND label — compared with case folded — is `modelcontextprotocol` or `mcp`: `io.modelcontextprotocol/`, `dev.mcp/`, `com.mcp.tools/` are refused, `com.example.mcp/` is not; MCP 2025-11-25 "General fields"); `progressToken` (the SDK writes it over any `_meta` it carries); and anything under the engine's own `sema/` namespace (`sema/toolUseId`, `sema/requestMeta` and whatever the engine mints later).- **Divergence (open to veto).** The reference's per-call `_meta` carries its tool-use id and no session id; here a session id leaves the process under a key the deployment chooses, only for the servers that declare one. Default is the reference's.
859
+ - **Consumers.** @connectors @client-core: a connector that keeps state per (principal, session) declares `sessionMetaKey` on its server entry and reads `request.params._meta[key]` in its tool and resource handlers (a browser-class server: key the storage state on the pair; `principalHeader` carries the principal). @server: the entry's request / roster schema and its two-way drift gate need the new optional member if the deployment is to declare it; nothing changes for entries that do not. @cli @test: a session id is sent only to a server that asked; the wire is observable on a real MCP server (`request.params._meta`). A session id that looks like a credential goes out as written (it is the engine's own correlation id, and the key name is never rewritten).
860
+ - **Pins.** `test/backlog2296-session-meta-key.test.ts`: a real `@modelcontextprotocol/sdk` server in process (and a stdio child) records `_meta` — absent key sends nothing on a call or a read; declared key on both; two legs two ids; a delegated child's own id; a credential-shaped id out byte-equal under a credential-named key while a declared header value is still taken out of a failure text; the judge's twenty-six refusals and thirteen accepted keys; two legs on one pooled connection, interleaved; the door and the library entrance; the mint, the seat, one writer of `_meta`, and no `prompts/get` sender in core.
861
+
862
+ ### What started a task, when its host says so — `TaskSpec.runOrigin: "scheduled"` is declared once where the task starts, carried with the task across its legs, and reported by the leg's wiring manifest and the checkpoint listing (#1556 S1, design/1556 r2; new seat; hard-breaking: two closed-set words (below); behavior change for a resume config that carries the word, open to veto; closed sets: `REQUIREMENT_WORDS` +1 `run_origin`, `CHECKPOINT_CONFIG_REFUSAL_CODES` +1 `config.run_origin_invalid`; exports: +3 root names `RUN_ORIGINS` (frozen `["scheduled"]`), `RunOrigin` (type), `isRunOrigin` (function); new optional members `TaskSpec.runOrigin`, `WiringManifest.leg.runOrigin`, `CheckpointState.runOrigin`, `CheckpointSummary.runOrigin`) (@server @cli @client-core @dgx @test)
863
+
864
+ - **What changed.** A run the deployment's scheduler started (a cron job, a heartbeat, a delayed wake-up, a stored routine) looked
865
+ exactly like a run a person sent, on every face the engine reports — the event stream, a parked approval, the inbox listing. The
866
+ host now says so on the task it starts: `runOrigin: "scheduled"`. The config doors read it once (`runOriginOfLeg`), the leg's
867
+ `wiring_manifest` reports it (`leg: { kind, runOrigin }`), a park records it on the row (`state.runOrigin`, every gate kind, one
868
+ serializer), a leg a decision resumes reads it back from the row (a wake opens its leg with the input it hands over — the
869
+ #2664 entry above), and `summarizeCheckpoint` echoes it on the listing (only as a member of the
870
+ set). Absent = the host said nothing — never "a person sent it"; there is no positive word for that. Attribution only: no
871
+ permission, approval, mode or scope decision reads it, and it never enters the model's context. A delegated child does not
872
+ inherit it (a child is its parent's model's work; its tree is reached through `parentTaskId`).
873
+ - **Resume (behavior change, open to veto).** A leg a decision resumes continues the row's word. A resume config carries none —
874
+ any word on it is refused before the claim (`checkpoint.config_refused`, `detail.field: "taskConfig"`,
875
+ `detail.code: "config.run_origin_invalid"`; the row stays pending; the #2664 entry above retired the restatement this slice
876
+ first allowed). A row whose own word this engine does not know is refused before the claim too, after the row's reader
877
+ requirements (`detail.field: "inheritedGate"`).
878
+ - **Bad values (loud).** A present value outside the set — `null`, `""`, `"Scheduled"`, `"scheduled "`, a number, a boolean, an
879
+ object, an array — is refused at prepare (`config.run_origin_invalid`, naming the value) and on a resume config before the claim.
880
+ - **Hard-breaking (two closed-set words).** *What changed*: `REQUIREMENT_WORDS` gains `run_origin` — a row that carries
881
+ `state.runOrigin` requires a reader that knows the word; `CHECKPOINT_CONFIG_REFUSAL_CODES` gains `config.run_origin_invalid` — a
882
+ resume's pre-claim refusal can carry it as `detail.code`. *Who is hurt*: a consumer that pins either set (a store conformance
883
+ table, a retry-policy table over `detail.code`, a test enumerating the words); in a mixed fleet an older worker refuses a row
884
+ carrying `run_origin` as `version_newer` — only rows of tasks a host declared scheduled carry it. *Migration*: add the two words
885
+ to the pinned tables; upgrade the workers before the scheduler starts stamping `runOrigin`; a deployment that never stamps it
886
+ writes byte-identical rows.
887
+ - **Trust.** Set `runOrigin` only at the deployment's own scheduler fire path, never from a request body — the engine cannot
888
+ verify it, and a passed-through field lets any caller mark its run as scheduled.
889
+ - **Consumers.** @server: stamp `runOrigin: "scheduled"` where the scheduler / heartbeat fires `runTask`, not from the request
890
+ body; when a stored spec is replayed as a resume config, strip the field (a resume config carries none — the #2664 entry above);
891
+ add the two words to the store kit's and the
892
+ retry policy's tables; a SQL store that rebuilds `state` member by member must keep `runOrigin` (its row carries the word).
893
+ @cli: the TOC daemon's fire path stamps the word the same way. @client-core: the inbox may read `CheckpointSummary.runOrigin`
894
+ and the stream `wiring_manifest.leg.runOrigin` to mark scheduled work; unknown fields stay ignored. @dgx: the audit face reads
895
+ the same two fields through server. @test: a black-box cell per face (manifest, listing, resumed leg, refusals).
896
+ - **Pins.** `test/backlog1556-run-origin.test.ts` (real Runner): the manifest reports the word / the bare leg without it; eight bad
897
+ values refused at prepare; a park records the word under its requirement word and the listing echoes it; a resume that omits
898
+ it inherits it; a re-suspend keeps it; a bad resume word, a row-unknown word, a config word the row does not carry and (since
899
+ #2664) a restatement of the row's are refused before the claim with the row pending; a task that declares nothing parks with no member, word or key;
900
+ unit cells for the door, the listing echo, the static half and the child seat. Re-pinned: `backlog1320` H (the maximal row
901
+ carries the member), `backlog1950` (a recipe for the new code), `public-knob-liveness` (the seat's proof), the four fixtures that
902
+ spell a `SerializedCheckpointState` / the wiring-manifest phase input.
903
+
904
+ ### The write-protection ask and the sensitive-path refusal say how a path met a guarded row in one clause — a hit through the real target and a hit through a link on the way read one sentence; the spelling form is unchanged (#2793; wording change on the ask the auto-mode classifier reads, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @test)
905
+
906
+ - **Before.** The write-protection table's judge records which reading of a write target met a row (`via`: the spelling, the real target, a hop of the leaf's link chain), and the ask it minted said that in three sentences: `tool "W" writes to a write-protected path (table entry "N") — explicit approval required`, `… — its real target resolves onto table entry "N" — …` and `… — its symlink chain passes through table entry "N" — …`. That ask is the auto-mode classifier's `askMessage`. A live sample that put all three on one fixed call disagreed (spelling allow, target and chain block): the spelling sentence there described a write the call did not show, and the two resolved sentences were two wordings of one fact — the row was met by following the path on disk. The sensitive-path deny set worded the same three readings its own way, and each of the two guards read a hit's view kind into `via` through its own copy of the mapping.
907
+ - **Now.** One table reads a hit's view kind as its `via`, and one clause says how a reading other than the spelling met the row: `matched where the path resolves on disk (its real target or a link on the way)` (`src/core/path-guard-rows.ts`, read by both guards). The ask for a target or chain hit is `tool "W" writes to a write-protected path (table entry "N") — matched where the path resolves on disk (its real target or a link on the way) — explicit approval required`; the sensitive-path refusal is `write to "P" is blocked: the guarded sensitive path "N" — matched where the path resolves on disk (its real target or a link on the way)`. The spelling forms are unchanged byte for byte (`… (table entry "N") — explicit approval required`; `write to "P" is blocked: its path names the guarded sensitive path "N"`). The clause says which reading met the row and nothing about the spelling: inside the data root, where the identity exemption lets only the real target vote, a spelling that names the row is met by the target reading and reads the resolved sentence. `WriteProtectionVerdict.via` keeps its three values; its declared type is the alias `GuardHitVia`, structurally the same union.
908
+ - **Who may answer (settled in this release by #2795).** A hit the spelling itself names stays `write_protection` and the classifier may answer it; a hit only the disk reaches (its spelling alone names no row) is its own ask class, `write_protection_on_disk`, which the classifier does not answer — see the #2795 section. No path text enters either ask sentence.
909
+ - **Wording change (open to veto).** *What changed*: the classifier, the approval card and the model's refusal read one sentence where a target hit and a chain hit read two, and the deny set's resolved refusals have new words. *Who is hurt*: a consumer that matches the old resolved sentences by text. *Migration*: match the quoted row name, or the clause above.
910
+ - **Consumers.** @cli: `src/components/bypassModeDisclosure.test.tsx` ③e greps the core dist for `is blocked: its real target resolves onto the guarded sensitive path`; the dist now says `is blocked: the guarded sensitive path "<pattern>" — matched where the path resolves on disk (its real target or a link on the way)` for that refusal (a hit is still a deny) — one anchor to re-pin; the B-002 live gate's short anchor `guarded sensitive path` is unchanged. @server: the spelling refusal your `task-settings` cell anchors (`names the guarded sensitive path ".env"`) is unchanged. @test black box: one guarded row written through a one-hop alias onto it and through a link chain passing through it puts the same ask text on the card (and in the classifier's question); a direct write keeps the spelling sentence.
911
+ - **Pins.** `test/backlog2793-ask-sentence.test.ts` (the view-kind table and the clause; three readings mint exactly two ask sentences, the spelling one historical, row before clause; the real judge and the real deny set on a real filesystem for the direct spelling, a one-hop alias and a chain hop; the data root's identity exemption; neither guard keeps a private mapping or wording); `test/live-write-protect-ask.test.ts` (offline half: the sentence family; live half: each distinct sentence, asked beside a call consistent with it, yields a parseable ruling — the two rulings are printed, not compared; the old "three sentences agree on one fixed call" cell is retired, KL-842-live closed); rewritten to the new words: `test/backlog851-symlink-chain-hops.test.ts`, `test/backlog1737-probe-states-no-approver.test.ts`.
912
+
913
+ ### A test run no longer leaves its fixture directories in the temp root — one net in the suite's setup file removes every `mkdtemp` result under it, and `gate:tmp-hygiene` measures that it does (#2194; test infrastructure — no behaviour change; hard-breaking: none; closed sets: none; exports: none; members: none)
914
+
915
+ - **Before.** About eight hundred test files make their fixture directory with `mkdtemp(join(tmpdir(), "<prefix>-"))` and most never remove it. One host collected 108,602 top-level entries in its temp root in 17 hours (about 45,000 under this repository's prefixes); listing the directory, the file-event daemon and the page cache all got slower for every other process on the machine. One test file alone, run once, left 828 (`b1685*`), 700 (`b1672*`) or 505 (`b1643*`) entries behind.
916
+ - **Now.** `test/setup-reap.ts` wraps the three `mkdtemp` entry points (`mkdtempSync`, `mkdtemp` with a callback, `fs.promises.mkdtemp`) once per worker and publishes the wrappers to the ESM named exports, so every spelling a test or the code under test uses is covered. A directory made strictly inside the physical temp root is registered by its physical path, with the temp root, the working directory and the `encoding` option read when `mkdtemp` is called (a result written as hex or as bytes is decoded to its pathname); the registry is emptied at the end of each test file (after the file's own hooks, so a test's own cleanup still finds its directory) and on the worker's exit / SIGINT / SIGTERM passes. Only registered paths are removed; each removal first checks that the path still resolves to itself (a path with a link now in it — an ancestor swapped for a link to somewhere else, even somewhere else inside the temp root — is refused and named), the temp root itself is never registered, a process whose working directory lies inside a directory about to be removed steps back to where the worker started, and a failed removal is a stderr warning, not a red. A directory outside the temp root is neither registered nor mentioned. `SEMA_KEEP_SCRATCH=1` — the switch `scripts/scratch-dir.mjs` already had, now read by one function (`keepScratchRequested`) for both lifecycles — keeps the directories and names each on stderr; any other non-empty value other than `0` is said aloud once and reads as "remove".
917
+ - **Gate.** `gate:tmp-hygiene` (`scripts/verify-tmp-hygiene.mjs`; static tier of `gate:all`) runs a fixed batch of six test files — five that left 34 to 505 entries each before the net, and the net's own pin — under a private temp root of its own (never the shared one, which other processes write to) and is red unless the root is empty afterwards, naming the five most frequent prefixes; a batch that did not pass is red whatever the count, and so is a batch file that executed no test (read from the runner's JSON report — a filter that matches nothing is not an error to the runner). `--full` runs the whole suite; file arguments run those files.
918
+ - **Out of reach, on purpose.** A directory made by a child process (a spawned engine, a probe), by a call that is not `mkdtemp`, or by a worker killed outright: the net lives in the worker's own `fs`. The gate counts them if they happen inside its batch (KL-2194-a). The file-end pass is skipped when a file's hooks are (every test skipped, collection failed) or when an `afterAll` registered after it throws, and a function returned by a file-level `beforeAll` runs after it; the worker's exit pass then removes what is left.
919
+ - **Consumers.** None — the net, the gate and the cases are repository-only (not in the package: the `npm pack --dry-run` file list is unchanged).
920
+ - **Pins.** `test/backlog2194-tmp-hygiene.test.ts` (in-process: registered directories removed and an unregistered sibling left, a swapped ancestor refused, the working directory left first; child process, each with a temp root of its own: nine `mkdtemp` spellings gone after the file with their contents and still there at the file's own last hook, an outside directory left alone and unmentioned, the keep switch and its bad value, a worker signalled mid-file — and not outliving the signal —, a file's directories gone before the next file starts in the same process; the gate's verdict and report-reading functions; in-process: a link retargeted inside the temp root, results written as hex and as bytes, a temp root changed while a call is in flight, a differently-cased spelling of the root), `test/gate-all-roster.test.ts` (the gate's seat); fourteen mutants of the net, each red in at least one cell.
921
+
922
+ ### An input says what brought it, and a leg's word is the word of the input that opened it — a wake opens its leg with the newest input it hands over (`PendingSteerInput.runOrigin`), each `human_input` frame carries its input's word, a one-input message carries it too, and a resume config carries none (#2664, #1556 slice S2, design/2664 r2, ruled C-R873 and its note 1, C-R867 note 1; behavior change for a woken leg and for a resume config, open to veto; hard-breaking: two closed-set words (below); closed sets: `PENDING_STEER_FROZEN_FIELDS` +1 `runOrigin`, `STEER_REPLAY_FACETS` +1 `runOrigin`; exports: none; new optional members `human_input.runOrigin`, `UserMessage.runOrigin`, `PendingSteerInput.runOrigin`, `PendingSteerEntry.runOrigin`) (@cli @client-core @web-client @server @test)
923
+
924
+ - **What changed.** The run-origin word (`"scheduled"`) was a task's: a scheduled task a person woke still reported
925
+ `scheduled` on the woken leg, its next parked row and the inbox; a task a person started and the scheduler woke reported
926
+ nothing; and no `human_input` frame or transcript message said `scheduled` at all, so a UI rendered the scheduler's objective as
927
+ someone typing. The word is now an input's, stated by its host on the input's carrier — the objective's `TaskSpec.runOrigin`, a
928
+ parked or waking message's `runOrigin` — and a leg's word is the word of the input that opened it: the objective for a fresh
929
+ leg; for a wake, the NEWEST input the wake hands over — its message, else the parked entry it delivers last — so a
930
+ message-bearing wake and its atomic equivalent (`setPendingSteer`, then a message-less wake) answer the same. An input that
931
+ says nothing makes the woken leg say nothing — there is no fall-back to the row. A decision on a parked leg (approval,
932
+ resource limit, review) opens nothing and continues the word the parked leg recorded. The manifest's `leg.runOrigin`, the row
933
+ a leg parks (`state.runOrigin`) and its listing (`CheckpointSummary.runOrigin`) read that one value, so the inbox names the leg
934
+ that raised an approval. Each input's own word rides its `human_input` frame (objective, wake message, parked steer — applied
935
+ or withheld); a message that carries one input carries it too (`UserMessage.runOrigin`, the objective's), while a resumed
936
+ leg's continuation — several inputs in one message — carries none, exactly like `actor`.
937
+ - **Resume config (behavior change against #1556 S1, unreleased; open to veto).** A resume config carries no run origin —
938
+ `ResumeTaskConfig` omits `runOrigin` beside `objective` and `userAttachments`, and a config that carries one anyway — the
939
+ row's own word included — is refused before the claim (`checkpoint.config_refused`,
940
+ `detail.code: "config.run_origin_invalid"`, the row pending; the sentence says to omit it and that a wake states its word on
941
+ its message). A resume hands the engine no objective, so the field had nothing of its own to describe, and a restatement of
942
+ the row could silently disagree with the word a wake opened the leg with. A bad `message.runOrigin` (or `setPendingSteer`
943
+ `runOrigin`) is refused loudly before the claim, `steering.invalid_content` (the steering entry's own refusal family); a
944
+ hand-built resume that skips the entrance meets the config doors' `config.run_origin_invalid` on the same value.
945
+ - **Hard-breaking (two closed-set words).** *What changed*: `PENDING_STEER_FROZEN_FIELDS` gains `runOrigin` (a parked entry may
946
+ carry it) and `STEER_REPLAY_FACETS` gains `runOrigin` (re-parking an `inputId` under another word is
947
+ `steering.duplicate_input_id`, `detail.differs: ["runOrigin"]`, not a replay). *Who is hurt*: a consumer that pins either set
948
+ (a store's round-trip table, a test enumerating the facets); in a mixed fleet an older worker refuses a wake or a
949
+ `setPendingSteer` that carries `runOrigin` as an unknown steering field (`steering.invalid_content`, before the claim — the frozen
950
+ set's designed refusal), and an older worker that claims a row on which a newer host parked a worded steer, and re-parks that
951
+ steer before delivering it, has its own `setPendingSteer` refuse the entry — the instruction is lost. *Migration*: add the word
952
+ to the pinned tables; upgrade every worker and store adapter before a scheduler stamps a wake message or a parked steer; a
953
+ deployment that never stamps it writes byte-identical entries.
954
+ - **New members (additive).** *What changed*: `human_input` frames gain `runOrigin`, `UserMessage` gains `runOrigin` (attribution
955
+ metadata — `stripEngineMetadata` strips it; built-in brains never send it). *Who is hurt*: a renderer that shows every objective
956
+ or wake message as typed user input keeps doing so until it reads the member; a custom Brain that serializes messages whole
957
+ without `stripEngineMetadata` would see one more key. *Migration*: render a frame / message carrying `"scheduled"` as the
958
+ scheduler's; unknown members stay ignored.
959
+ - **Import.** The session-import door keeps a `UserMessage.runOrigin` that is a member of the set and drops anything else, with no
960
+ operator flag — the word grants nothing and the importer is a host that could state it on a task it starts (the posture the
961
+ door already gives `engineMinted`, not `actor`'s, whose strip guards an ingress-verified identity).
962
+ - **Trust.** Stamp `message.runOrigin` (and a parked steer's) only on the deployment's own scheduler path, never from a request
963
+ body.
964
+ - **Consumers.** @cli / @client-core / @web-client: read `human_input.runOrigin` to render a scheduled objective, wake message or
965
+ parked steer as the scheduler's, and `UserMessage.runOrigin` on a one-input message (the objective) when replaying a
966
+ transcript. @server: stamp `message.runOrigin: "scheduled"` where the daemon wakes a parked task (or on the steer it parks
967
+ before a message-less wake), not from the request body; strip `runOrigin` from a stored spec replayed as a resume config; after a
968
+ woken leg parks, the row carries the woken leg's word (`CheckpointSummary.runOrigin`); a SQL store that rebuilds parked entries
969
+ member by member must keep `runOrigin` (`PENDING_STEER_FROZEN_FIELDS` names it), and so must one that rebuilds a resolved
970
+ row's stored wake outcome (its `message`). @test: the two KL-1556-a directions as black-box cells, in both the message form
971
+ and the park-then-wake form.
972
+ - **Not yet.** An input that opens a model turn inside a leg — a live `"later"` steer — or rides a decision resume does not
973
+ change the leg's word (KL-2664-a); the live `TaskStream.steer` and next-turn carriers take no word; a resumed leg's
974
+ continuation carries no per-input word in the transcript; a compaction that drops the objective's message drops its word from
975
+ the transcript with it.
976
+ - **Pins.** `test/backlog2664-message-origin.test.ts` (real Runner): the objective's frame and message; both KL-1556-a directions on
977
+ the leg and the frame, in the message form and the park-then-wake form; the woken leg's re-parked row and listing in both
978
+ directions; six bad message words, a wake config that declares a word and one that restates the row's refused before the
979
+ claim, row pending; a withheld parked steer's frame; the newest-input rule; the replay facet; an approval resume (leg word
980
+ continued, continuation carries none); the strip and the import door. Re-pinned in `test/backlog1556-run-origin.test.ts`: a
981
+ restating resume config is now refused before the claim.
982
+
983
+ ### A session's write faces live on the store contract under one write law: `SessionStore.logTransfer` moves a log between backends through a staging nobody reads before its commit, `SessionStore.delete` deletes a session at its owner's request, and a deployment's cleanup runs before every row the bundled store deletes (#1468 S4 / #2166; behavior narrowing, open to veto; hard-breaking: 2 — `SessionRepo.importEntries` refuses an import onto a row that is not the importer's, and the store kit's optional-face report names two more faces; closed sets: +2 words `logTransfer` / `delete` on `SessionStoreContractHooks.onOptionalMember`'s `member`; exports: +6 types `SessionLogTransfer`, `SessionLogExportOptions`, `SessionLogReplace`, `SessionLogCommit`, `SessionLogCommitView`, `SessionStoreHooks`; members: optional `SessionStore.logTransfer` / `SessionStore.delete`, `TtlSessionStoreOptions.hooks`, `FileStorageBackendOptions.sessions`) (@server @dgx)
984
+
985
+ - **Before.** A cross-backend move of a session had no face on `SessionStore`: a deployment wrote the session rows itself, or reached under the store to `SessionRepo.importEntries`, which replaced the log of an existing row whoever imported it — another principal's import onto an owned row, or an anonymous import onto one, replaced the owner's history and kept the owner. A deletion at an owner's request had no store face either, and a deployment's own records keyed by a session id (a title, a pin) had no hook on the rows the bundled store deletes. And `TtlSessionStore` served a cached view while the row named the same occupant, so a log replaced under that occupant — an import through the repo, or through another store instance — was not seen until the view was dropped: the next acquire handed out the old history.
986
+ - **Now.** One write law, read by every face that writes a session's log (`importRowCells`, the bundled repos' one reading): an existing row keeps its occupant and its owner and takes a new log only when it is already the committer's (owners compared null-safe; `undefined` names `null`); another owner's row is refused `conflict` and a placed row `placement_refused`, with nothing written, and the check and the write are one step, so a row another writer created after the committer looked is refused, never taken; an id with no row becomes a row recording the committer and a fresh occupant. `SessionStore.logTransfer` (optional) carries it to the store: `listEntryIds` / `exportStream` read the whole log (`null` = no row; `exportStream({ afterSeq, batchSize })`, a bad option refused `config.invalid_argument`), and `beginReplace(id, { preserveActorAssertions })` opens a staging whose `append` passes each batch through the import gate (`StreamingImportValidator`; a refused batch ends the staging) and whose `commit({ owner, decide })` judges the write law first — `decide` is never asked about a row the committer may not write — then hands `decide` the destination's ids as they stand now and the staged ids (with a `read` of either side), writes on `"replace"`, leaves the log on `"keep"` (refused for an id with no row), and answers the row's head, all under the store's hold of the id; a refusal, or a throw from `decide`, writes nothing (against writers the hold does not see — another instance, the repo — the commit's step is the repo's conditional import; see the conditional row writes below). Staged entries are detached copies, and `decide` reads copies of both sides, so nothing it writes to reaches a log. The first commit call ends the staging, whatever its outcome. `SessionStore.delete(id, { owner })` (optional) deletes only a row whose owner is `owner` (`null` deletes only an anonymous row; a placed row is `release`'s), answers whether it deleted, and refuses a guard that names no owner. `TtlSessionStoreOptions.hooks.beforeSessionDelete` (and `FileStorageBackendOptions.sessions`, which reaches it) runs, awaited, before every row the store deletes — the owner's delete, a placed release, an `evict: "delete"` release or idle sweep — and when it rejects the row stays and the deletion rejects with it, and an owner's `delete` or a placed release called again runs both again (an ordinary release that failed has dropped its view and, as before, deletes nothing on a second call); after the hook the deletion lands only on the row the store judged (the repo judges it in the removal's own step, below), so a row another writer created under the id meanwhile is not deleted. A hooks record is read by the receipt law: a getter that throws, a member the store does not run or a member that is not a function is refused `config.invalid_argument`. `TtlSessionStore` serves a cached view only while the row names its occupant and holds its leaf; a commit through the store drops the view inside its hold, and an acquire whose resolution of the id a hold (a commit, a delete, a release) overtakes resolves it again after the hold instead of publishing the view it read. The bundled store implements both faces over a repo with `readRow`, `importEntries` and a head read (both bundled repos; `delete` needs `readRow` and the head read); its staging lives in process memory and ends with the process (a store that stages durably owes a sweep of abandoned stagings; the face has no member for it until such a store lands).
987
+ - **Hard-breaking.** (1) *What changed*: `SessionRepo.importEntries` onto an existing row refuses `conflict` unless the row's owner is the importer (null-safe), and refuses a placed row `placement_refused`; the store kit `sessionRepoContract` pins it. *Who is hurt*: a caller that imported onto another principal's row, or anonymously onto an owned one, and relied on the log being replaced; a third-party `SessionRepo` that replaced the log of any row — it now fails the kit's import case. *How to migrate*: import as the row's owner (a deployment that moves a session on behalf of its recorded owner passes that owner), or delete the row first; a repo applies the same reading (`importRowCells` in the bundled repos) in the step that replaces the log. (2) *What changed*: `SessionStoreContractHooks.onOptionalMember` reports `member: "logTransfer"` and `member: "delete"` too. *Who is hurt*: a kit consumer that asserts the exact set of reported faces, or switches over `member` exhaustively. *How to migrate*: add the two words (a store without the faces reports them `absent`).
988
+ - **@server.** The session-sync commit maps onto `logTransfer.commit` with one change of argument: the commit's `owner` is the owner cell the import's gate judged when that cell names a row (`expectedOwner === undefined ? importingPrincipal : expectedOwner`) — the write law then is the store-side owner check the route's `expectedOwner` comparison makes today, and a commit whose gate saw no row but meets a row of the importer's own refuses in `decide` (it sees `current` non-null). The narrow legacy arm that commits an anonymous row under the default principal stops re-stamping the row's owner (today the SQL upsert writes `owner = 'default'` over `NULL`); under the law that commit passes the recorded `null`. `OwnerAwareSessionStore`'s import / replace / staging / delete faces map onto `logTransfer` / `delete`; `restamp` is `keep`. The local lane's `LocalSessionStore` keeps owners in its own sidecar while the core rows it creates carry `null`: its replace (delete, then import onto the absent id) is not affected; its fresh-only `importEntries` onto a row that exists, with a named owner, is now refused `conflict` instead of replacing that row's log. A row-deletion cleanup of the deployment's own tables (title, pin) is `beforeSessionDelete` on the File lane. The SQL stores keep the same law in one transaction per commit / delete; the conditional row writes below give the bundled store the same row-level step.
989
+ - **@dgx.** A File-lane deployment that imports sessions through `FileSessionRepo.importEntries` imports as the row's owner; one that keeps its own records per session id wires `FileStorageBackendOptions.sessions.beforeSessionDelete`.
990
+ - **Pins.** `test/backlog1468-s4-session-write-faces.test.ts` (W1–W5; red on the previous release for every pin: the foreign and placed imports replaced the log there, and a repo import's new log was not served); the kit's `[transfer]` and `[delete]` groups, run on the in-memory, File and `FileStorageBackend` lanes by `test/backlog1468-s1-session-store-kit.test.ts`; `sessionRepoContract`'s import case. Re-pinned to the law (they pinned the replaced log): `test/backlog1468-s2-session-row-head.test.ts` H4c and the three H8 cases. Ratchet: `comment-ratio-ratchet` `src/core/store-contracts` 0.1742 → 0.1600 banked (the kit's new groups are case code).
991
+ - **Known limits (KL-1468-s4-b / -c; KL-1468-s4-a, the per-instance atomicity, is retired by the conditional row writes below).** A log replaced through another instance by one with the same entry ids keeps that instance's view standing (its occupant and leaf match). `list` lends a standing view's last run to a row whose log was replaced. An idle sweep whose deletion hook rejects keeps the row without a retry. `SessionStoreHooks` carries no leaf-advance hook (the bundled store does not observe a session's writes).
992
+
993
+ ### A store's retention word has one reading — the deployment deletes this store's rows on schedule — and the party that runs the sweep gives it when it constructs the store; the deployment's startup check holds the word to the executor it runs, and the per-leg preflight judges the words alone (#1468 T4; hard-breaking: 2 — `assertRetentionCapability` requires `executor`, and the three bundled declarers' `retention` member widens from the literal `"none"`; open to veto: an executor stated absent refuses every "managed" store, locked or not; closed sets: none; exports: +1 `readRetentionDeclaration`; members: optional `TtlSessionStoreOptions.retention`, the `retention` constructor option of `InMemoryCheckpointStore` and `InMemoryToolResultStore`, required `executor` on `assertRetentionCapability`'s input) (@server)
994
+
995
+ - **Before.** The word had two readings: core's documents said a store declaring `"managed"` PROMISES the `ManagedRetentionCapability` methods, while the deployment that declares it read it as "this store's rows are deleted on schedule by the deployment's managed retention" — the methods live on one executor that spans several stores, not on each store. And the word was a class constant: the bundled stores carried `"none"` for every deployment, a deployment's SQL store classes carried `"managed"` for every deployment, so a store taken out of the assembly that runs the sweep kept its word while nothing deleted its rows. Whether a deployment that declares managed stores runs any executor was judged by the deployment alone, after core's check had passed.
996
+ - **Now.** One reading, written in `retention.ts` and on each declaration face: `"managed"` = this store's rows are deleted on schedule by the deployment; `"none"` (or absent) = nothing deletes them on schedule. The bundled declarers take the word as a constructor option — `new TtlSessionStore({ retention })`, `new InMemoryCheckpointStore({ retention })`, `new InMemoryToolResultStore({ retention })` — default `"none"` (unchanged), read by the one declaration reader, `readRetentionDeclaration` (now exported from the package root; `@sema-agent/core-stores-sql` reads its `retention` option through it too), so a word other than the two is refused at construction (`config.retention_capability`). The file backend runs no executor, so its stores stay `"none"`: its options carry no word, and a word an untyped caller hands it anyway is refused before it takes its root (it used to be dropped). The check is two calls over one reader. The per-leg prepare preflight, which holds no executor, runs the declaration half alone (the policy value, each store's word, and the locked policy over `"none"` stores — as before). The deployment's startup call `assertRetentionCapability({ policy, locked, stores, executor })` runs that half and holds the words to the executor it runs: `executor` is required — the deployment's `ManagedRetentionCapability` (a backend's `retention` member) or `null` when it runs none, `undefined` refused naming it, so a backend's absent member is never read as "judge the words alone"; with `null`, every store declaring `"managed"` is refused naming those stores, locked or not; an executor whose four members are not all functions, or whose member read throws, is refused naming the member — whatever was thrown, the refusal is coded (the thrown value is read by the one guarded describer); a `"none"` store beside an executor is refused only by a locked policy. The refusal of an unparseable word now describes any value (a `bigint` word threw a raw `TypeError` from the message builder before).
997
+ - **Hard-breaking.** (1) *What changed*: `assertRetentionCapability`'s input requires `executor: ManagedRetentionCapability | null`; a call without it fails to compile, and at run time one without it (or with `undefined`) is refused `config.retention_capability`. *Who is hurt*: every deployment that calls the startup check — the server's governance seam calls it with `{ policy, locked, stores }`. *How to migrate*: pass the executor the deployment runs, or `null` when it runs none: `executor: backend.retention ?? null`. (2) *What changed*: the `retention` member of `TtlSessionStore`, `InMemoryCheckpointStore` and `InMemoryToolResultStore` is typed `RetentionDeclaration`, no longer the literal `"none"`. *Who is hurt*: code that holds the member as the literal type (`const r: "none" = store.retention` fails to compile). *How to migrate*: type it `RetentionDeclaration` (its value is still `"none"` unless the constructor was given `"managed"`).
998
+ - **@server.** At the startup call, pass the executor: `assertRetentionCapability({ policy, locked, stores, executor: retentionExecutorWired ? retentionExecutor : null })` — required now (hard-breaking 1) — and core answers "a store says managed and nothing deletes its rows"; the deployment's own `retentionExecutorWired` judgment beside it retires. That judgment only warned when the policy was unlocked; core refuses, locked or not — a narrowing: an unlocked SQL deployment with the sweep lane off, whose SQL store classes still carry `MANAGED_RETENTION`, is refused at startup until its assembler gives those stores `"none"`. The `MANAGED_RETENTION` / `UNMANAGED_RETENTION` store-class constants retire when the SQL stores move into `@sema-agent/core-stores-sql` (its backend factory gives the word from `SqlStorageBackendOptions.retention`); until then they keep compiling — the change for them is the reading. PICK7570 must-check.
999
+ - **Pins.** `test/backlog1468-t4-retention-declaration.test.ts` (each declarer × absent / `"none"` / `"managed"` / a bad word at construction; the member's type; the root reader; `executor` omitted / `undefined` / a backend's absent member refused, at the type and at run time; each declarer given `"managed"` × a complete executor under a locked policy / `null` locked or not / an executor missing each of the four members; a member that is not a function, a member read that throws an Error, an Error whose `message` getter throws, a Proxy whose prototype trap throws, a symbol and a bigint; a non-object executor; the words half alone; the full chain through a Runner's prepare preflight, managed and one seat left at the default; the file backend has no option, refuses one handed to it before taking its root, and its stores read `"none"`). Re-pinned to the two calls: `test/retention-declaration.test.ts` (the words half) and `test/backlog1468-k3-engine-backend.test.ts` (the startup call with the backend's executor). Ratchet: `module-size-ratchet` `src/core/checkpoint-store.ts` 4 076 → 4 077 banked.
1000
+ - **Known limits (KL-1468-t4-a / -b).** The per-leg preflight holds no executor, so a deployment that skips the startup call and declares a store `"managed"` while running no executor is judged by its words alone there, as today (exit = an executor seat the preflight can read). An option bag whose `retention` read itself throws (a throwing getter, a Proxy) makes the constructor throw that value, uncoded — as every other member of those option bags does.
1001
+
1002
+ ### A ledger's year-less `MM-DD` window is read by one function, against the row's filing day — the debts gate no longer calls next year's window due (#2805; release tooling only, `src/` untouched; no behaviour change; hard-breaking: none; closed sets: none; exports: none)
1003
+
1004
+ - **Before.** `scripts/verify-debts.mjs` read a date window as that day of the CURRENT year, so a window `01-05` filed in October was "due" on 2026-10-25: four server rows (S-1064, S-1442, S-1495, S-1813) were named by `gate:debts:rc` and worked around by hand. After New Year the same reading failed the other way — a window `10-27` read as the next October and dropped out of the due list. `scripts/verify-backlog-ledger.mjs` kept a second, different year rule (the year that puts the day in [today − 274, today + 90]).
1005
+ - **Now.** `windowDateOf(window, filedOn, today)` in `scripts/ledger-dates.mjs` is the only year reading, and both gates call it. The filing day is the most recent day with that month-day that is not after today (a row is not filed in the future); the window falls in that year, or in the next when its `MM-DD` is earlier than the filing day's (a window ON the filing day is the same year's). The debts gate takes the filing day from the row's 开账 cell; the backlog-ledger gate takes it from the window's own note, the stamp a row already carries: `10-30(10-25 11:2x 立)`. A row with no readable filing day has no year to take: red, named (`立票日缺席,窗无法定年`), never read against the current year. A day that is not on the calendar (`13-45`, `02-30`, `02-29` in a common year) is named too. The ledger gate keeps its 90-day horizon (`MM-DD` more than 90 days ahead is a version, not a date). `VERIFY_DEBTS_TODAY=YYYY-MM-DD` pins the debts gate's day, as `BACKLOG_LEDGER_TODAY` does the ledger gate's; both read the pin through `isoDayOf` (exactly `YYYY-MM-DD`), and one that is set but not a day on the calendar (`soon`, `2026-02-30`, which `Date` alone would roll over to March) exits 2 — never the real today, never a rolled-over day.
1006
+ - **Who is hurt.** Nobody at runtime. A live row of the core ledger whose window is a bare `MM-DD` and whose window note carries no `MM-DD HH:Mx 立` stamp is red from now on, naming the missing stamp; the ledger holds no such row (996 live rows at this tree: 353 version windows, 643 pending), so the gate reads the same ledger identically before and after. A debts row is unchanged in form — 开账 was already a required column.
1007
+ - **Readings.** `gate:debts:rc` at 7.58.0 over the real ledgers, base gate vs this one, on 2026-10-25: DEBTS-core 0 → 0 due; DEBTS-server 6 → 2 (the four rows above leave; S-2275 and S-2359 stay, both truly due; seven CLOSED rows the format gate already rejects were set aside so the RC arm is reached); cli, client-core, test, deploy and web-admin unchanged. Pinned to 2027-01-06: DEBTS-server 3 → 329 due — 326 overdue rows the current-year reading carried as next October. Core ledger gate: 0 findings before and after.
1008
+ - **Consumers.** @server: the four rows you carried by hand are no longer named at the RC gate; the workaround (`--year-wrap-move`) can be retired once you read this release's gate.
1009
+ - **Pins.** `test/backlog2805-window-date-year.test.ts` (47 cases: the reader R1–R8 and the clock pin R9; the debts gate D1–D11 over a throwaway ledger and over the four server rows copied verbatim into `test/fixtures/backlog2805-debts-server-four-rows.md`; the ledger gate L1–L6; both gates answering the reader's answer on nine triples, and neither keeping a year reading of its own). Eleven mutations (no wrap / absent falls back to the current year / either gate bypasses the reader / window on the filing day wraps / a future filing day kept / ledger ignores the stamp / debts drops 开账 / horizon removed / due-day exclusive / the clock pin rolls over) are each red; 15 of the 47 are red on the base gates. The date-window fixtures of `test/backlog-ledger-gate.test.ts` carry the stamp.
1010
+ - **Known limits.** The filing day carries no year, so a row left open for more than a year reads against the latest such day — a window in the months ahead of it is not yet due, as before. `scripts/rulings-gate.mjs` reads a bare `MM-DD` on its own rule (today's year, shifted back when more than 183 days ahead) and still calls a next-year window such as `01-05` due on 2026-10-25; it keeps no filing day and is not changed here.
1011
+
1012
+ ### A session row is written only as it was read: `SessionRepo.importEntries` and `SessionRepo.delete` take an expectation the repo judges in the write's own step, the import answers the head it wrote, and `SessionRepo.readRow` reads a row whole — the bundled store's commit and every deletion it makes go through them (#2583, design/2583 slice S1; hard-breaking: 2 — `SessionRepo.importEntries` answers a `SessionHead` (it answered nothing), and a repo with `readRow` judges the expectation of the writes it is handed; behavior narrowing, open to veto; closed sets: none; exports: +2 functions `sessionRowMatches`, `sessionLogMarkOf`, +3 types `SessionRowExpectation`, `SessionRowRead`, `SessionLogMark`; members: optional `SessionRepo.readRow`, `SessionRepo.delete`'s optional `expect`, the `expect` option of `SessionRepo.importEntries`) (@server @dgx)
1013
+
1014
+ - **Before** (the write faces above, as first landed). The store's write faces were atomic only against its own writers. A commit read the row's metadata and its log in two reads, so `decide` could be shown the log of a row another owner created under the id in between; a write through another instance landing while `decide` weighed the destination was overwritten by the commit; and the head was read after the write, so a fault there rejected a commit whose log was already in place. Every deletion judged the row, ran the hook, judged it again and then deleted the id unconditionally, one await later.
1015
+ - **Now.** One rule for every write that must land only on the row it judged: it carries the row as the judging read found it — a `SessionRowExpectation`, the occupant (`row`: its owner and occupant cell; `null` = no row) and, when the log binds, the log's mark (`log`: its length and last entry id, `sessionLogMarkOf`) — and the repo judges it inside the write's own step with one function, `sessionRowMatches`; a miss writes nothing and is refused `SessionError("conflict")`, the answer the leaf CAS already gives a stale append. The occupant cell is compared as written (a row from before the cell existed matches only an expectation without one: every write that creates a row mints a token, so such a row cannot be created again). `SessionRepo.readRow(id)` (optional) reads metadata, head and whole log of one row generation; `SessionRepo.importEntries` judges `options.expect` with the write law and answers the head of the row it wrote. A commit now reads the row once, judges the owner on that read, shows `decide` that log, and imports expecting that row and that log, answering the head the import wrote (on `"keep"`, the head read). Each deletion the store makes passes the row it judged: an owner's delete and a placed transcript's deletion expect the occupant they read BEFORE the hook ran (an append to it does not make it another row), an `evict: "delete"` release or idle sweep of a cached view expects the view's occupant and the view's log as it stands after the hook (an append through the view itself is still its log; a write through anyone else is not), and a cold release expects the head it read before the placement (no row read ⇒ it deletes none). A missed expectation answers `false` (`SessionStore.delete`) or deletes nothing (`release`, sweep). Both bundled repos judge and write in one synchronous step (the in-memory repo reads its storage's mark synchronously; the File repo's reads and writes are synchronous file calls). The store passes expectations, and has `delete` and `logTransfer`, only over a repo with `readRow` (and a head read); over any other repo a deletion after the hook is of the id judged.
1016
+ - **Hard-breaking.** (1) *What changed*: `SessionRepo.importEntries` answers `Promise<SessionHead>` — the owner and occupant of the row the write committed and the leaf its new log leaves it on. *Who is hurt*: a third-party `SessionRepo` implementing `importEntries` (a TypeScript one stops compiling; a JavaScript one that answers nothing makes the bundled store's commit refuse with a `storage` error saying the log was written and no head answered). *How to migrate*: answer the head from the write's own step (the leaf is the one after the new log's last entry). (2) *What changed*: a repo with `readRow` judges `expect` on `delete` and `importEntries` (`sessionRowMatches` with the row as it stands in that step; a miss ⇒ `SessionError("conflict")`, nothing written). *Who is hurt*: a third-party repo that adds `readRow` and ignores the expectation — the store would then delete or replace a row it did not judge; the repo kit's conditional cases fail it. *How to migrate*: call `sessionRowMatches(expect, row, () => sessionLogMarkOf(log))` in the step that writes. No repo in this release's consumers implements `SessionRepo` (the server's and the File lane's deployments use the bundled repos). The write faces above ship in this same release, so for a consumer they arrive once, with these primitives under them.
1017
+ - **Behavior narrowing (open to veto).** A commit whose destination was written by anyone since the commit read it is refused `conflict` (before: the write landed over it); a deletion whose row was written, deleted or created again since it was judged deletes nothing (before: the id was deleted). A caller retries by reading the row again.
1018
+ - **@server.** The SQL session stores implement `SessionStore` directly, so they keep the same rule in their own transaction: the commit's read, owner judgement, `decide` and write, and a delete's judgement and removal, each over a row revision every append moves (a `FOR UPDATE` on the session row alone serializes only writers that also lock it; a revision column, or a `SERIALIZABLE` transaction over the entries, covers appends) — the store kit's new `[transfer]` case (a write through a replica while `decide` runs is refused `conflict` and stands) is the check. The local lane's direct `repo.delete` / `repo.importEntries` calls on the bundled File repo pass the expectation of the row they read (`readRow` / `headOf`), or move to `SessionStore.delete` / `logTransfer`; without it they stay unconditional, as before.
1019
+ - **@dgx.** A File-lane deployment that calls `FileSessionRepo.importEntries` directly reads its answer as the committed head (it answered nothing); to write only the row it read, it passes `expect`.
1020
+ - **Pins.** `test/backlog2583-session-row-conditional-writes.test.ts` C1–C8 (on the previous state 14 of 17 red: the appended or leaf-moved destination overwritten, `decide` shown another owner's log, the post-write head fault rejecting and a write landing right after the import answered as the commit's head, the owner's delete and a cold placed release removing a row created in the last step, an eviction removing a replaced log, the judge absent; the three controls green on both); the repo kit's four conditional cases (`sessionRepoContract`) and the store kit's `[transfer]` replica case. Re-pinned: `test/backlog1468-s4-session-write-faces.test.ts` W6 (the post-write head fault no longer rejects the commit); `test/hardening-session-durability.test.ts`'s silently-dropping import answers a head; `test/compaction-state-carrier-omit.test.ts`'s three imports read the answered head (they pinned the import resolving to nothing).
1021
+ - **Known limits.** KL-1468-s4-a retired. KL-2583-a: a log replaced whole by one of the same length ending on the same entry id between a read and a write is not told apart by the mark (the same gap as KL-1468-s4-b; a row log-revision cell closes both). KL-2583-b: a repo without `readRow` is handed no expectation (the hook's window stays open there). KL-2583-c: a leg writing through a view after a commit replaced its log — refused `log_closed` on the File lane, landing in the replaced object on the in-memory repo.
1022
+
1023
+ ### Inside a worktree the write roots are that worktree — the structured write tools, the shell's write targets and the accept-edits gate read one write location; managed worktrees live at `<repo>/.sema/worktrees/<name>` on the new branch `sema/<name>`, refused when any managed level is a symlink; the write-protection table reads the current tree as its base checkout (#2290, design/1456 S1, #568 folded in; hard-breaking + behavior narrowing; open to veto)
1024
+
1025
+ - **Before.** EnterWorktree switched the working directory but every write root stayed the task root: from inside a worktree a
1026
+ write to the base checkout, or to another task's managed worktree under `.sema-worktrees/`, passed the structured write tools
1027
+ and the shell's write-target judgment as an in-root write (#568: one task could Edit another task's checkout). Trees were minted
1028
+ DETACHED at `<repo>/.sema-worktrees/<name>-<random>` with no screen on a symlinked managed path, and a name the grammar did not
1029
+ accept was silently sanitized.
1030
+ - **Now.** The reference implementation's permission-root relocation ("This moves the session's working directory and write
1031
+ access there"; "After a further switch, previously-visited worktrees are no longer writable"): a leg's write location is ONE
1032
+ reader (`currentCheckoutOf`, the active worktree while one is tracked, else the task root), read live by every write-root
1033
+ reader — Edit / Write / NotebookEdit containment, the shell station's write roots, and the `acceptEdits` mode gate's
1034
+ accepted directories. A write outside the write roots is judged by the existing semantics (the structured tools refuse under
1035
+ `writeFace: "roots"`; a shell write target there asks; under `writeFace: "open"` the tools do not judge containment, and the
1036
+ accept-edits gate now asks for a base-checkout write instead of passing it). Read roots do not move. The one mint
1037
+ (`addWorktree`, also the subagent isolation lane's) creates `<repo>/.sema/worktrees/<slug>` (a name's `/` flattened to `+`) with
1038
+ `git worktree add --no-track -b sema/<slug>`; an existing branch or directory of that name is refused, never reset or reused; a
1039
+ symlink at `.sema`, `.sema/worktrees` or the tree's own directory refuses the mint; names follow the reference grammar (each
1040
+ `/` segment `[A-Za-z0-9._-]+`, ≤ 64 characters, no `.` / `..` / `.git` segment) and a bad name is refused. Removal (ExitWorktree,
1041
+ the mint's own `destroy`) deletes the tree's own branch only while its tip is still the base commit (one compare-and-delete of
1042
+ that ref, never through a symbolic ref; an unusable base witness keeps it); a branch carrying commits is kept and named in the
1043
+ reply. The always-on write-protection table judges every view of a target inside the CURRENT managed tree (the EnterWorktree
1044
+ switch, or a task root that is itself a managed tree — an isolated child) as the same relative path in its base checkout: an
1045
+ ordinary file of the tree meets no `.sema` question, while the tree's own `.sema/settings.json` / `.git`, every sibling tree and
1046
+ the base checkout's ancestry are judged as ever.
1047
+ - **What changed (hard-breaking, three sentences).** Inside a worktree the write roots of the structured write tools, the shell
1048
+ write station and the accept-edits gate are that worktree plus the existing additional roots, so a write to the base checkout
1049
+ or to another managed worktree is judged as a write outside the roots; the managed parent moves from `<repo>/.sema-worktrees/`
1050
+ to `<repo>/.sema/worktrees/` (`WORKTREE_PARENT` is now `".sema/worktrees"`), and every minted tree checks out the new branch
1051
+ `sema/<name>` instead of a detached HEAD.
1052
+ - **Who is hurt.** A model or skill that edits the main checkout while a worktree is active (now refused or asked); a deployment
1053
+ or script that reads `WORKTREE_PARENT === ".sema-worktrees"`, lists that directory, or expects `addWorktree` to leave no branch
1054
+ behind (a tree with commits now keeps its `sema/<name>` branch after removal); an EnterWorktree caller that relied on a random
1055
+ suffix to reuse a name; trees still under `.sema-worktrees/` (registered git worktrees, no longer managed: a resumed session
1056
+ inside one keeps writing it, a new mint never lands there). Deployments with `writeFace: "open"` see no change to the structured
1057
+ tools' containment.
1058
+ - **How to migrate.** Exit the worktree (or add the directory to `additionalDirectories`) to write the base checkout; read
1059
+ `WORKTREE_PARENT` instead of a literal; move old trees with `git worktree move <old> <repo>/.sema/worktrees/<name>` or remove them
1060
+ with `git worktree remove`; delete `sema/<name>` branches a reaper no longer wants with `git branch -D`.
1061
+ - **Consumers.** @server — the SVC-3 isolation wrapper (`src/plugins/worktree-isolation.ts`) mints through `addWorktree`: its
1062
+ trees move to `.sema/worktrees/` and gain a branch; a reaper or disk cap that scans by directory name reads `WORKTREE_PARENT`.
1063
+ @cli — any display or cleanup of `.sema-worktrees` / detached worktrees; the EnterWorktree / ExitWorktree replies now name the
1064
+ branch. @client-core — the worktree card (`type: "worktree"`) is unchanged in shape; the reply text names the branch and the
1065
+ write-access move. Open to veto: the branch law `sema/<name>` (the reference CLI uses `worktree-<name>`), refusal of an existing
1066
+ name instead of the reference's resume-as-is, and the current-tree-only narrowing of the `.sema` exemption (the reference
1067
+ exempts every `.claude/worktrees` tree and relies on the write root for siblings).
1068
+ - **Exports.** No names added or removed. `WORKTREE_PARENT` value changes; `AddWorktreeOptions` gains `name?`; `addWorktree`
1069
+ resolves with `name` / `branch` / `baseSha?` beside `env` / `worktreeDir`; `ActiveWorktreeSession` gains `name?` / `branch?`
1070
+ (validated by `normalizeWorkspaceState`); `WriteProtectionCompileOptions` gains `checkoutOf?`; `FsWriteGatePolicyOptions.acceptDirs`
1071
+ also takes a getter.
1072
+ - **Pins.** `test/backlog2290-write-root-path-law.test.ts` (real Runner lanes over real git: base-checkout and sibling writes
1073
+ refused from inside a tree, writable again after Exit; a shell write there asks as a write outside the roots; the open-face
1074
+ accept-edits gate asks; an aliased task root; the managed location and branch; branch kept when it carries commits, deleted when
1075
+ clean; an existing branch refused; a record naming another branch, a branch turned into a symbolic ref and a null base witness
1076
+ each delete nothing they do not own; a symlink at each of the three levels; the name grammar; the accept-edits gate comparing the
1077
+ live roots as keys after a tree root is swapped for a link; the current-tree reading — ordinary file unasked (also through an
1078
+ aliased root and for a leg whose task root is a managed tree), sibling / in-tree settings / `.ssh` ancestry still asked, a `..`
1079
+ remainder / name-prefix sibling / case alias judged as they stand; the record's two allocation facts).
1080
+
1081
+ ### A mod package on disk has one reader, `loadModPackage`; an admission record carries the registration's provenance and says what it only watches; three real packages drive a real run (#2809; additive export and additive wire member, behavior narrowing on `observe` (C-R925), open to veto; hard-breaking: none; closed sets: none; exports: +1 function `loadModPackage`, +2 types `ModPackageHost`, `ModPackageRegistration`; members: +1 optional `ModAdmissionRecord.provenance` on both arms, so `wiring_manifest.mods[].provenance?` and `mods.registration_refused` `detail.provenance?`; `KERNEL_CONTRACT_VERSION` stays 4 — this release's move, whose sentence now names the record's two members) (@server @cli @client-core @test)
1082
+
1083
+ - **Before.** A mod reached the engine only as an object a host built in code: nothing read a mod package from disk, and every mods pin drove in-process kernel objects. An admission record named a registration by name, seat and tier only, so a `wiring_manifest.mods[]` row could not say whether the host minted it or a deployment declared it.
1084
+ - **Now.** `loadModPackage(dir, { tier?, provenance?, options? })` (`src/core/mods/package.ts`) reads `.claude-plugin/plugin.json` (`name`, and `version` / `description` / `author`), `hooks/hooks.json` (`modules` — exactly one `.mjs` path relative to it; `contract`, compared for equality with `KERNEL_CONTRACT_VERSION`; `uses`; `description`) and imports the module, returning the registration with a `digest`: the sha256 of the newline-joined sha256 of the three files' bytes, in that order. Every file it reads is, as the package stands when it is read, a regular file whose real path lies inside the package, opened once and judged and read through that one handle (a pipe is refused without waiting on it); a directory of the package changed while it is read — a link put in place of one — is outside what the reader judges: the directory is the host's, as the code in it is. A member either JSON file does not take is refused, never ignored; a refusal is `config.mods_invalid` naming the package directory and the file, never a manifest's text — what the module throws while it is imported is described as the kernel describes a throwing `register()`. The seat, tier, provenance and option values are the host's argument — a package that states a tier is refused. What the kernel judges of a registration (its name, `uses`, the `register` export, every `on`) is the kernel's screen at admission, not judged a second time. **The module is imported from the bytes read and hashed** (a `data:` URL of them, ruled C-R926 and its note 1), never from its path again: the module that runs is the module `digest` names, the same bytes are one module instance in a process wherever they sit, changed bytes load anew, and bytes put back are the first instance again. So a hooks module is one self-contained file: a relative or package import has nothing to resolve from and is refused when it loads (`… could not be imported (…); a hooks module is imported from its own bytes, so it is one self-contained file: a relative or package import has nothing to resolve from`); node builtins import as usual. What the module's code loads beyond its own bytes — an absolute URL, a file it reads — is its own act in the host's process and is not in `digest`. Wherever the runtime's sentence quotes the module's URL (its bytes, encoded), whole or cut, the refusal names the module by its path instead. The admission record carries the registration's `provenance` on both arms as the host gave it — absent when none was given, no default minted — and the refusal notice's `detail` carries it beside the record's other members.
1085
+ - **Fixtures.** `test/fixtures/mods/` holds three packages written for this repository (`sec-default`: a deployment guard on `plugin.register`, `tool.check` and `tool.call` — the last refuses a held tool's call before its body runs, the one refusal whose `tool_end` names the extension in `answeredBy`; `diff`: a `classic.PreToolUse` rewrite with a read call of its own, a `classic.PostToolUse` line on the result, and a `tool.call` answer in place; `telemetry`: watch-only). They share names with the reference CLI's built-in mods and none of their code — the reference's source is not licensed for copying. They are not in the package's `files`.
1086
+ - **`observe` says what a registration only watches (ruled C-R925).** A mounted record's `observe` lists the patterns of its `events` on which every handler the registration hung is a watcher (`{ observe: true }`); a pattern that also carries a judging handler is in `events` alone. So "this registration only watches" has one reading: `observe` present and holding every pattern of `events`. Before, a pattern with any watcher was listed, and a registration that watched and judged on one pattern had an `observe` equal to its `events` — indistinguishable from one that only watches (`src/core/mods/kernel/dispatch.ts`, the record's mint).
1087
+ - **Behavior change (open to veto).** A host that gives no provenance sees records and notices byte-identical to before; one that gives one sees one more member on its `mods[]` rows and refusal notices. *Behavior narrowing*: a registration that hangs a watcher and a judge on one pattern no longer lists that pattern in `observe` (its record had it listed; a registration with no such pattern sees the same record). *Who is hurt*: a reader that took `observe` as "has a watcher here" — none in this repository; a reader that took `observe` equal to `events` as "watch-only" now reads it right. Nothing else at run time changes.
1088
+ - **Consumers.** @server: S-2388's deployment loading calls `loadModPackage` once per declared package, logs `digest` as given, and keeps `assertDeploymentModsAdmitted` as the boot self-check; the `mods[]` projection picks members row by row, so `provenance` is a new optional member there — read it where present, never decide a code on its presence. @cli: the MO-1 view takes the optional `provenance` the same way; the three-cell wire sentences (refusal, answered in place, own call) are in the #2809 criteria. @client-core: the record type gains `provenance?`; "watch-only" is the mounted arm with `observe` holding every pattern of `events` (your U-10 — no new member); the refusal's extension name on `tool.check` (#2810) and the rewrite disclosure (#2811) are the two faces with no member yet. @test: the L1 cells and the server-lane chain are in the #2809 criteria; the server lane is blocked on the server's loading entry.
1089
+ - **Divergence (open to veto).** Against the reference (2.1.309): `uses` is declared in `hooks.json` where the reference scans the module's source for it; `hooks.json` carries `contract`, which the reference has no member for; a hooks module is `.mjs` only (the reference takes eight extensions and transpiles); the module is imported from its own bytes, so a relative or package import is refused (C-R926), where the reference allows relative paths and its own module name and refuses a dynamic `import()`; `options` are the host's values as given (the reference fills a manifest's `userConfig` defaults); `plugin.json` takes four members and `hooks.json` four — `$schema` and settings `hooks` included are refused.
1090
+ - **Pins.** `test/mods-real-e2e.test.ts` — D1–D12 (the reader: each file's members, the contract, the module path and an import-time throw described, containment by real path, no manifest text in a refusal, the kernel's own judgments, the digest and the module instance it names, a relative or package import refused without the module's bytes in the sentence whole or cut and a node builtin loaded, the running module's own URL holding exactly the hashed bytes, a pipe refused without waiting, one instance per bytes across paths and back again after a change), R0–R7 (one real Runner over the three packages from disk: the manifest rows in run order with provenance, the rewrite and the extension's own read call, the refusal at `tool.check` by name in the sentence and with no `answeredBy`, the card, the watcher's rows, a run without the watcher equal to one with it, the answer in place, the refusal at `tool.call` with `answeredBy`), K0–K5 (the run order across tiers and seats and each package's result line in that order, an unlisted task-seat package refused with its notice and its code never run, a task-seat allow under and over the deployment's refusal, one broken package among good ones, a failing watcher, a package that cannot mount), S1–S2 (the server's boot self-check over the three; the same three minted in code, as the server's chain is today, giving the same records, run and watcher rows as the packages); `test/backlog2809-admission-record-members.test.ts` — P1–P4 (`provenance` on both arms and on the notice as given, absent when none, not judged against a list), O1–O4 (`observe`: a pattern with a watcher and a judge in `events` alone, a watch-only registration's `observe` equal to its `events`, a judging one without the member, a handler hung with a matcher counted by its own options); `test/export-surface.snapshot.json` regenerated (+3); `scripts/consumer-smoke-probe.mjs` checks `loadModPackage`.
1091
+ - **Known limits.** KL-2809-a: no server entry loads a package from disk yet, so the server lane here is the boot self-check and the code-minted comparison (S1, S2); the server-loaded run is verifiable once the server takes this release. KL-2809-b: `digest` names the module that runs, not code that module loads by an absolute URL or reads itself; the package's files are judged as the package stands when read (a directory swapped for a link meanwhile is followed).
1092
+
1093
+ ### The redaction mark has one source, and the package root exports it; the agent name someone chose reads back from the root (#2821, #2822; additive exports, narrowing of two diagnostics, open to veto; hard-breaking: none; closed sets: none; exports: +2 `REDACTION_MARK`, `chosenAgentName`)
1094
+
1095
+ - **Before.** The bracket mark a redaction writes was spelled where it was written: `[redacted]` as a string literal in four modules (the pass runner, the egress tiers, the request-echo scrub, the terminal account's detail snapshot), its `-credentials` variant in three (the pass runner, the egress tiers, the route adjudicator's URL-userinfo strip), `-url` and `-path` in the egress tiers; and it was recognized by three hand-written patterns (the egress tiers' exact set; the pass runner's preexisting-mark count and the sub-agent display cut, each a looser `[redacted-<letters>]` shape). A host that had to tell "the engine withheld this" from a literal in the text kept a copy of its own (the server's reader, S-2408). Separately, "did someone choose this agent's name or is it the derived one" (`chosenAgentName`) was an internal reader: 7.57.0 made `name` required and gave an unnamed agent `agent-<12 hex>`, and a serving layer's roster could not read the fact back from the handle and the name.
1096
+ - **Now.** `src/core/redaction-marks.ts` holds the table (`REDACTION_MARKS`: `whole`, `credentials`, `url`, `path`), the bare mark (`REDACTION_MARK`) and the one reading of "where are the marks in this text" (`redactionMarkerSpans`, and `eachRedactionMarkerSpan`, its lazy form — one pattern derived from the table; the display cut reads the lazy form, so a line of a million marks costs it the few before its bound). Every pass that writes a mark, the request-echo scrub, the terminal account, the route adjudicator, the preexisting-mark count and the display cut read it; no `[redacted` spelling is left in `src/` outside that file. The package root exports `REDACTION_MARK` (`"[redacted]"`) and `chosenAgentName(handle, name)` (`undefined` when the name is the one `engineAgentName(handle)` derives, else the name; `engineAgentName` was already a root export). What a redaction pass writes is byte-identical to 7.57.0.
1097
+ - **Narrowing (open to veto).** *What changed*: a marker-SHAPED word that is not one of the four marks (`[redacted-foo]`) is no longer counted in `RedactionReport.preexistingMarkers`, and a display cut (`cutAt`, `redactThenCut`) that lands inside such a word is no longer moved back before it. *Who is hurt*: a reader that counted or guarded that shape; the engine writes no mark outside the four, so nothing it wrote is affected. *Why*: the egress tiers already read the exact set (a word a remote wrote is not a mark); the two looser patterns were a second reading of one question.
1098
+ - **Consumers.** @server: S-2408 / S-2411 can delete the hand copy of the mark and read `REDACTION_MARK`, and read "chosen vs derived" from a row's handle and name through `chosenAgentName` (no stored column). @cli @client-core: nothing to do.
1099
+ - **Pins.** `test/backlog2821-redaction-mark.test.ts`: the four spellings; the root values; every site driven through its real entry point with the table replaced by different spellings (a site that still holds a literal writes the old one); a scan of `src/` for a second spelling; `chosenAgentName` for the derived name, a chosen one, another agent's derived name and a handle that is not a durable agent handle; the exact-set reading of a mark.
1100
+
1101
+ ### `tool_end.rewrite` — when the gate lets a call go with arguments other than the ones it took, the end frame says what it let the call go with and who replaced them (#2811, ruled C-R922 and its note 1; additive member; closed sets: +1 `RewriteAuthor` kinds `extension` / `policy` / `approver`; exports: +2 types `RewriteAuthor`, `ToolInputRewrite`; hard-breaking: none)
1102
+
1103
+ - **Before.** Three judges can replace the arguments a call's body is handed — an extension's `classic.PreToolUse` answer (`updatedInput`), the leg's restriction chain (`allow` / `ask` with `updatedInput`), the approver of an ask answering with an edit — and no frame member said so: `tool_start.args` is the model's own, and the bytes the gate let go reached only the loop (`ToolGateResult.updatedInput`, whose doc told a host to compare values — a host on the wire never had the value to compare).
1104
+ - **Now.** `tool_end.rewrite = { by, input }`: `input` is the gate's frozen plain-data projection of the arguments it let the call go with (`finalInput`), `by` one `RewriteAuthor` per replacement that changed them, in the order they were made (`{ kind: "extension", name }` — this leg's registration, by name; `{ kind: "policy" }` — the bytes came back in the restriction chain's answer, whoever inside it wrote them; `{ kind: "approver" }` — whose answer is `gate.settlement.who`). Inside one `classic.PreToolUse` dispatch every handler whose answer's `updatedInput` differs from what its `next()` returned is named, innermost first; one that hands a lower rewrite on unchanged is not. Present exactly when the gate's allow exit let the call go, the frame carries no `notExecuted`, and the bytes let go differ from the bytes the gate took at its entry (both as the tool reads them — the loop's argument preparation is no rewrite); absent on a call refused before it was let go, on a parked or answered-in-place call and on a rewrite set back; a refusal recorded after the call was let go (the shell read admission) leaves it beside the `denied` record. It says what the gate let the call go with, never that the body ran (a tool's refusal of those arguments is `isError` beside it; the loop's re-validation refusal of a rewritten call carries no `notExecuted` today — #2817). On the frame only: the persisted `toolResult` row does not repeat it. One account per gate pass (`RewriteAccount`, `src/core/rewrite-rejudge.ts`) written where each rewrite is adopted, read once at the allow exit; bytes that moved with no author named is an engine defect and throws.
1105
+ - **CC 2.1.309.** CC adopts a hook's and a permission decision's `updatedInput` into the call's input and discloses no structured record of it (its only side channel is the hook's own raw output on `system/hook_response`, without a `tool_use_id`); this member is an additive divergence — every frame CC emits is unchanged.
1106
+ - **Not covered (#2814, 7.59.0).** A resumed leg's frames carry no `rewrite`: its `tool_start.args` are the decided bytes, a re-screen's rewrite of an approved call is not recorded, and a rewrite made before a durable park is already folded into the parked row's bytes.
1107
+ - **Consumers.** @cli: the MODS155 rewrite-notice cell reads `tool_end.rewrite` (present ⇒ the call was let go with other arguments; `by` names them). @server: S-2392 projects `tool_end.rewrite` whole beside `requestedBy` / `answeredBy`. @client-core: CC-1042 ③b reads `rewrite.by` / `rewrite.input`; ③a (`notExecuted ∧ ¬isError ∧ answeredBy`) and ③b are exclusive. @sdk: the two types. @test: L1 cell M6b reads the member.
1108
+ - **Pins.** `test/backlog2811-rewrite-disclosure.test.ts` (real Runner: one extension; two in one dispatch, both named; a hand-on that names nobody; a re-spelling the tool reads as the same bytes that names nobody; an intermediate form the tool cannot read, replaced further out, that refuses nothing; an extension's own call beside `requestedBy`; an extension then the chain; the approver's edit; an extension rewriting the approver's edit, the form approved — three entries in order; controls: nobody, the same bytes handed back, a rewrite set back, a refused rewritten call, a rewritten call answered in place; gate-level: a host's edit the one judge refuses — a getter, a Map, a Date, a class instance — is never read by the account, a plain edit is named as the approver's).
1109
+
1110
+ ### The judge of an MCP entry's `sessionMetaKey` is a root export — a schema package or a host that validates the field reads the engine's judgment instead of copying it (#2830; additive export; hard-breaking: none; behavior change: none; exports: +3 `judgeSessionMetaKey`, `MCP_SESSION_META_KEY_MAX_CHARS`, type `SessionMetaKeyReading`)
1111
+
1112
+ - **Before.** The key a server declares in `McpServerSpec.sessionMetaKey` is judged by `judgeSessionMetaKey` (`src/core/mcp-call-meta.ts`), but the function, its bound and its reading type were reachable only inside the package; a package that checks the field at its own door had to write the key-name format, the refusal list and the length bound a second time.
1113
+ - **Now.** The package root exports `judgeSessionMetaKey(value: unknown): SessionMetaKeyReading`, the bound `MCP_SESSION_META_KEY_MAX_CHARS` (128) and the type `SessionMetaKeyReading` (`{ key: string | undefined } | { problem: string }`). They are the module's own members, re-exported on one line of `src/index.ts`: the function the preparation door and the materialization entrance ask is the function the root hands out (`===`), and the root declares no copy. A key that can ride answers `{ key }` (`undefined` answers `{ key: undefined }`); every refusal answers `{ problem }` naming the key — a non-string, the empty string, more than 128 characters, a name outside the MCP `_meta` key-name format, the SDK's `progressToken`, anything under the engine's `sema/` namespace, a prefix MCP reserves.
1114
+ - **Not changed, stated.** No behavior moves: the judge's body, its sentences, the door and the entrance that ask it, and the wire are byte-identical to the previous release. The three names are new on the export surface only (`test/export-surface.snapshot.json` +3: a function, a variable, a type).
1115
+ - **Consumers.** @settings-schema: the MCP entry schema's `sessionMetaKey` check can call `judgeSessionMetaKey` and report its `problem` rather than carry its own format; a deployment's own limit on top of the engine's is its own rule. @computer-use @desktop: a key such as `computer-use/sessionId` answers `{ key }`; `sema/…` and `progressToken` answer a problem.
1116
+ - **Pins.** `test/backlog2830-session-meta-key-export.test.ts` (the root answers a key that rides, the engine namespace, the SDK key, a reserved prefix, the bound ± 1, a non-string and the empty string; the root function is the module's function; one declaration of the judge and of the bound in `src/`; the root's one export line names all three; the reading type is one type; the frozen snapshot registers the three kinds and tiers). Smoke: `judgeSessionMetaKey` (function) and `MCP_SESSION_META_KEY_MAX_CHARS` (number) are in `SMOKE_CHECKED_EXPORTS`, so a stranger install proves them reachable from the package root.
1117
+
1118
+ ### A relative path is anchored, never folded — a `..` is the filesystem's: the execution seam's path law (`FileSystem`, `absolutePath`) is "anchor only, no `..` folding, no symlink resolution", `NodeExecutionEnv` reads every path that way, a not-yet-created target's key carries no `.` / `..` segment, and `resolveKey` reads one base (#902, design/902; behavior correction on the base-less reading, open to veto; hard-breaking for remote execution environments: their `..` folding is now out of contract (open to veto); closed sets: none; exports: none) (@server)
1119
+
1120
+ - **Before.** One spelling named two files. With `bridge` a symlink into `elsewhere/sub`, the fs throat keyed `bridge/../next` as `<dir>/elsewhere/next` (the file the kernel opens) when the caller had a base, but as `<dir>/next` when it had none: the spelling went to `env.absolutePath`, and `NodeExecutionEnv` anchored it with `path.resolve`, which folds `..` lexically. Every member of that environment read a relative path the same folding way (`readTextFile("bridge/../next")` read the other file), while the seam's contract said only "without resolving symlinks". A target that did not exist yet was keyed by rejoining its missing tail as written, so `missing/../x`, `gap/./new` and `gap//new` minted keys with `.`, `..` or a separator run in them — a second key for a file a later spelling keys differently. `resolveKey` read a call's target against `cwd ?? root`, and where that base was unusable read it again against the environment's own `cwd`.
1121
+ - **Now.** The seam states the law (`src/engine/harness/types.ts`): a path a method is handed is absolute as written or relative ANCHORED at `cwd`; no method folds a `..` (the filesystem resolves it, components first); `absolutePath` anchors only, and an environment that owns no working directory refuses a relative path — the engine never places one at `cwd` on its behalf. `NodeExecutionEnv` reads every path through one anchor (the chain walk's `anchorAtLinkDir`, unfolded, one separator): its members (a relative `cwd` is the process's, so `absolutePath` never answers with a relative path), `joinPath` (a later segment is a segment, never a root), the parent a write creates (`dirname`, so `bridge/../newdir/f` creates `elsewhere/newdir`) and the paths a listing reports (under the path it was handed — the JS search fallback now matches its echo against the start as written, and its lexical collapse helper is gone). Below a target's deepest existing ancestor the missing tail is applied the way the kernel will apply it once the write creates it, as far as nothing on the way can be a link: under the first missing name `.` and separator runs fold and a `..` cancels the missing name before it; a `..` that cancels the last missing name, or climbs to the canonical prefix's parent, lands in a directory that exists, and the rest of the spelling is probed again from there (a link on it is followed, a regular file on it is no directory) instead of being folded on. With nothing on the chain at all the same rule runs below the path's own anchor. `resolveKey` refuses a call whose base it cannot use (`cannot resolve path "…": the base this call resolves against (…) is not a fully-qualified path of this tree's family; refused.`) instead of reading it a second time. The throat is unchanged: with a base it anchors (`anchorSpelling`), with none it hands the spelling to the environment.
1122
+ - **Who is hurt.** A caller that relied on the fold: a relative path handed straight to `NodeExecutionEnv` whose `..` follows a directory that does not exist now fails the way the kernel fails (`ENOENT`) instead of landing beside it, and one whose `..` follows a symlinked directory now lands where the link leads. Through the engine, a spelling whose `..` cancels a name that does not exist yet (`gap/../x`) is keyed where it lands once that name is created (`<root>/x`, judged there by every fence), so a write that used to fail with `ENOENT` now writes there. The engine's own tools hand the environment canonical keys and are not affected; a base-less relative spelling reaches the corrected reading only at the deployment-text seats (a rootless write gate's target and domains, a relative data root, a protected-target judgment with no base) and in `resolveKey` on a base it cannot use (now refused).
1123
+ - **Consumers.** @server — hard-breaking, open to veto, three sentences: (1) the seven remote adapters (adb / device / e2b / host / k8s / local-docker / ssh) read a path with `posix.normalize`, which folds `..` on absolute paths too, so on every remote lane `<base>/bridge/../next` is asked as `<base>/next` — their shared `resolve(p)` should keep `p` as written when absolute and join it under `cwd` when relative, never folding a `..` (the remote filesystem resolves it), and a listing should name its entries under the path it was handed; (2) `DeferredSandboxPathEnv.absolutePath` keeps refusing a relative path, and its absolute arm stops folding `..` the same way; (3) both land in ONE server version — adapters that stop folding while the gate environment still folds would have the write gate judge `<base>/next` while the tool opens `<base>/elsewhere/next`. Until then the remote lanes keep their fold (consistent between gate and tool, unlike the shell, which resolves `..` on the remote kernel). A host's own `ExecutionEnv` reads the new contract text.
1124
+ - **Reference.** The reference CLI's path expansion folds lexically (`normalize` / `resolve`) and opens the folded path; this tree resolves `..` by the filesystem on every face (the fs throat with a base already did, as do the symlink chain walk and the shell read establisher), so the fs tools and the shell agree on what one spelling names. Registered as a divergence (`fs-throat-dotdot-resolved-by-filesystem`).
1125
+ - **Pins.** `test/backlog902-relative-anchor.test.ts` on a real filesystem (`bridge -> elsewhere/sub`, `elsewhere/next` against a decoy `next`): the base-less key, the based key with a base that is not the environment's `cwd`, and the kernel's `realpath` and inode name one file; an environment member, `absolutePath`, the leaf chain, a listing, a write's parent and `joinPath` read the spelling the same way; the missing tail's `..` / `.` / separator run and a `..` climbing past it through the link (checked against the file the kernel then creates); a `..` back into an existing directory followed by a link out of the root (refused by containment where it leads) and by a regular file (refused); the nothing-exists fallback and its root; `joinPath`'s later segments; a relative environment `cwd`; a remote write gate's shape (a `StubExecutionEnv` with cwd `/` refusing relative paths) still refuses a base-less relative spelling; `resolveKey` on an unusable base; the example environment's `absolutePath`. 17 of the 20 cases are red on the previous tree; the based-key control, the gate-shape case and the later-segment `joinPath` case are green on both. Re-pinned: `backlog840` (#840) G6 (the canonicalizer's roster names `effective-path-target.ts`, the reader `resolveKey` goes through) and G15 (the stated limit — a separator run kept in the missing tail — is retired: one key on every family); `fs-search-honesty` #318 (the win-shaped stub lists entries under the start as written, and a stub that folds falls back to the projection).
1126
+
1127
+ ### A run may declare its session plan file — `TaskSpec.planFile` — and the plan then lives there: every gate that judges a write reads the one admission (the file tools' root fence for write and read, the permission-mode write gates, the write-protection table), `ExitPlanMode` takes no `plan` and presents what the file holds, the planning frames name the file, and a compaction refers back to it; undeclared, nothing changes (#1503 + #2745, design/1503, C-R887; behavior widening on a new seat, hard-breaking: three sentences below, open to veto; closed sets: +1 refusal code `config.plan_file_invalid`, +1 tool contract `core.exit_plan_mode_file@1`; exports: none; members: +1 `TaskSpec.planFile`, +1 optional `filePath` on the `exit-plan-mode` card) (@cli @server @client-core)
1128
+
1129
+ - **Before.** The shell keeps the plan in a file under its configuration root and tells the model it is the one file it may edit, but never told the engine. A Write to that file in plan mode asked (`mode` + `write_protection`), and after Yes the root fence refused it: `path "…/.sema/plans/<slug>.md" resolves outside the allowed roots …; access denied` (test [9700] U2). Three gates, three lists of what is writable, none of them holding the plan file.
1130
+ - **Now.** `planFile` is the absolute path of this session's plan file in the leg's execution environment (the reference's `<plans directory>/<slug>.md`). Declared, it is admitted through the advertised-writable seat as its third advertiser (beside the scratchpad and the memory root) — a FILE: its key is the canonical parent joined with the declared name, frozen at admission. The root fence admits it for write and read, every permission mode's write gate admits it through the request's advertised roots (no question in `plan`, `default` or `acceptEdits`), and the write-protection table does not demote it — the reference's order, where "Plan files for current session are allowed for writing" is answered before the dangerous-path check and before the plan-mode question (CC 2.1.309 `checkEditableInternalPath`).
1131
+ - **The file, and what stays as it was.** The fence and the write gates admit the declared path and anything beneath it until #2746 (the advertised seat has one reach, "the path and below"; a file-only reach is that ticket — KL-1503-a); the write-protection table exempts exactly the file — by identity: the write's real target must be the admitted key, and a spelling that names the plan file only waits for that answer — so a path below it, and the plan's own spelling once a link replaced the file (the `.sema` row asks again, and the landing is judged too), still meet the table. A sibling in the same directory and every deny row (the opt-in sensitive-path set, a person's rules) stay as they were. Not inherited: a delegated child, a fork or a workflow step plans in its final answer.
1132
+ - **Refused, coded.** A declared value the gates cannot hold refuses the run (`terminal: { kind: "failed", code: "config.plan_file_invalid" }`, the value and the reason stated): not a string, empty, not absolute, not in lexical normal form, or not tellable to the model verbatim (a control character, a run of whitespace, an envelope marker, over 4096 characters); the leaf is a symbolic link, a directory or another non-file kind; its directory does not resolve, or is not a directory (the host creates the plan file's directory before the run — the engine never materializes it); the leg's hands are read-only or absent; the key would hold a fence root. Refused rather than skipped: the plan-exit tool's arm (#2745) is fixed at mount, so a declared file is never narrowed away later.
1133
+ - **The plan-exit tool reads the file (#2745).** One fact picks the arm, as in the reference (CC 2.1.309 keys both on one host fact: a diskless session passes the plan as `plan`; any other reads the plan file). Declared, `ExitPlanMode` is mounted in its FILE arm — contract `core.exit_plan_mode_file@1`, no parameters, the reference's disk-arm description naming the file — and when called it reads the plan through the seat's one reader at the admitted key: the plan text rides the tool result (fenced) and the `exit-plan-mode` card as `plan`, with `filePath` (the declared path, the reference's `ExitPlanModeOutput.filePath`); a file not written yet (absent or blank) is refused with the reference's sentence — `No plan file found at <path>. Please write your plan to this file before calling ExitPlanMode.` — before any review is requested, and a file no longer the admitted object (an ancestor or the leaf replaced by a link, a directory, another kind) or over 1 MiB is refused with the reason, never read through; where the environment can hold what it opens (`openBound`) the bytes are the judged object's, else the file is judged again after the read (KL-1503-b). An existing file is keyed by its own canonical spelling (a case-insensitive volume keeps the stored case). Undeclared, the parameter arm is byte-identical (`plan` required, contract `core.exit_plan_mode@1`).
1134
+ - **The frames name the file (#2745).** A plan-mode leg that carries the plan-exit tool and declared a plan file gets the reference's disk-arm planning frame — the edit ban "with the exception of the plan file mentioned below" and its `## Plan File Info:` section naming the file ("NOTE that this is the only file you are allowed to edit") — and the sparse restatement "Read-only except plan file (<path>)"; the file's existence is left to the model (the reference words the section two ways off a disk read; this frame names both actions). The exit frame is the one every planning wording shares. Every other leg's frames are unchanged.
1135
+ - **A compaction refers back to the plan (#2745).** After a landed compaction a leg whose run admitted a plan file that holds a plan gets the reference's `plan_file_reference` in one engine-minted reminder — "A plan file exists from plan mode at: <path>", the plan fenced, "If this plan is relevant to the current work and not already complete, continue working on it." — in any mode; an absent or blank file says nothing.
1136
+ - **One reading retired.** The permission-mode write gate no longer exempts `envFacts.scratchpadDir` by its own spelling: what it never asks about is the run's advertised seat, read off each request — the admission the fence holds. A scratchpad the seat skipped (and the fence already refused) is no longer exempt at the gate.
1137
+ - **Open to veto — hard-breaking, three sentences.** (1) `TaskSpec.planFile` is new: a deployment that declares it gets the plan-file arm — `ExitPlanMode` with no `plan` argument, reading the file — and a declared value that is not the absolute path of a regular-or-absent file in an existing directory refuses the run with `config.plan_file_invalid` instead of starting. (2) The declared file is written with no question in every permission mode (plan included) and is exempt from the write-protection table — the `.sema` row no longer asks about it. (3) The permission-mode write gate stops reading `envFacts.scratchpadDir` on its own: a scratchpad the advertised seat skipped is no longer exempt at that gate.
1138
+ - **Consumers.** @cli (primary): declare `planFile: getPlanFilePath()` on the session's runs and create `getPlansDirectory()` before the run (today it is created when the plan prompt is first built); the plan-file prompt then matches the engine's gates and its frames (the shell's own plan-mode prompt, CC's `plan_mode` attachment text, can retire in favour of the engine's marked frame); `ExitPlanMode` now arrives with no `plan` argument — render the plan card from the card's `plan` / `filePath` (or the file) rather than from the call's arguments. @server: pass a deployment-supplied `planFile` through the task body (absolute path in the run's execution environment) or leave it absent; map `config.plan_file_invalid` like the other `config.*` refusals. @client-core: no change unless it builds task specs.
1139
+ - **Pins.** `test/backlog1503-plan-file-seat.test.ts` (real Runner, NodeExecutionEnv over temp directories: the U2 lane declared ⇒ written with no card, undeclared ⇒ refused as before; `default` / `acceptEdits`; Read + Edit; sibling refused; inside the task root's `.sema` the plan file is not demoted while its sibling asks with `write_protection`; an alias spelling of the declared file; a link planted after admission; nine bad forms coded; the seat's key; the child seat; the scratchpad in plan mode; #2745: the file arm's empty schema, description and card (`plan`, `filePath`), nothing written refused with the reference's sentence, a link planted before the call never read through, the parameter arm unchanged; the planning frame names the file, the fold reads it back as its row; the post-compaction reference and its silent cases).
1140
+
1141
+ ### `workspace_changed` is the leg's whole snapshot — every leg opens with one (`cwd`, `root`, `entered?`, `project?`, `remote`), then one per change; `TaskSpec.projectId` is judged against the checkout's marker by the leg's one project judge, which memory v2 now reads (#2291, design/1456 slice S3; hard-breaking, open to veto: the frame gains required members and a frame on every leg, `resolveProjectId` becomes `(fs, rootDir) => Promise`; behavior narrowing: a declared project unequal to the marker refuses the leg) (@server @client-core @cli @web-client)
1142
+
1143
+ - **What changed (hard-breaking, three sentences).** (1) `workspace_changed` is now a WHOLE snapshot of where the leg stands — `cwd`, `root` (the task root as the leg's root receiving point settled it) and `remote` always, `entered: { dir, byPath? }` while an EnterWorktree switch is active, `project: { id, source: "marker" | "declared" }` when the leg has a project identity — and EVERY prepared leg (fresh, resumed, continued, child; read-only legs and legs with no execution env included, where `cwd` is `root`) sends one after `wiring_manifest` (and after the leg-start `tool_disclosure` census when it defers tools), before its first model or tool interaction, then one each time the snapshot changes; `TaskSpec.projectId` (new) is judged with the checkout's `.sema/project` marker by one judge once per leg (marker present: the declaration must equal it, else `config.project_identity_mismatch`; no marker: the declaration is the identity; not a UUID: `config.project_id_invalid`), and `resolveProjectId` reads through the filesystem the root names: `resolveProjectId(fs, rootDir)` returns a Promise. (2) Who is hurt: a consumer that treated every `workspace_changed` as "the directory moved" (it now also sees the leg-start frame, equal to what it may already hold), a consumer or fixture that constructs the frame with `cwd` alone (two required members), a host that sends a `projectId` unequal to the checkout's marker (the leg is refused), and a caller of `resolveProjectId(dir)`. (3) How to migrate: replace your copy of the snapshot with each frame and render a move only when `cwd` differs from the one you hold (keep the last frame as the session row's place, project and remoteness — read the frame, do not re-derive them from the disk); send `TaskSpec.projectId` on every leg with the marker's id (or none); call `await resolveProjectId(env, dir)` with the execution env the directory lives in (`new NodeExecutionEnv({ cwd: dir })` for a host path). @server: the session row's project and place are the last frame's — read the frame and retire the self-computation (`src/project-identity.ts` `resolveProjectIdentity`'s own marker walk).
1144
+ - **The rule (what got fewer).** Where a leg stands is one projection (`workspaceSnapshotOf`, `src/core/workspace-snapshot.ts`) announced by one per-leg seat (`Prepared.workspaceFrame`: the identity wiring binds it after the manifest, the tool walk and the resumed approved call observe it; a snapshot equal to the last one sent is not sent — the digest is the snapshot's canonical JSON, so every member takes part). Which project a leg belongs to is one verdict (`resolveSessionProject`), read by the frame and by memory v2. Retired: the cwd-only dedupe seeded so that a leg's starting place was never announced (a resumed or continued leg's restored cwd now reaches the wire); the frame's four-sentence contract (moves only / real shell only / initial not announced / resets across a suspend — the last was already false); memory v2's own marker read and its own unreadable-marker catch; the inline remoteness reading beside `onWorkspaceResolved` (the restore phase computes the leg's one reading and returns it to both); the host-only marker read (`existsSync` / `readFileSync`).
1145
+ - **Project identity (behavior).** The verdict is decided on the task root, once per leg (never re-resolved within it). A marker that cannot be read (nested below the repo root, corrupt, a lookup the filesystem cannot answer) leaves the frame without `project` and is told to `onError` (phase `config`, the marker's own code) on every leg; only a leg that consumes project identity is refused with it — memory v2 with a `proj:` / `userproj:` scope (as before) and, new, a leg that declared `projectId`. A leg with an execution env reads its marker through that env (a remote env's marker is the one in the env); a leg without one reads the host at its root, as memory did. Memory v2 keys its mount by the verdict only when it came from the marker (a declared-only identity does not change the memory key or its write-target check). Changed for memory: the marker is read at the leg's task root, where before it was read at `rootPath` when one was configured — they differ for a delegated child in its own worktree (the worktree's committed copy of the marker is read) — and through the remote env for a remote leg (before: a host path that did not exist there, so the path key).
1146
+ - **Consumers.** @server: `src/trace/core-keyset-guard.ts` gains `root` / `remote` / `entered` / `project` on the `workspace_changed` arm; the session row's `projectId` and place are the LAST frame's (`project.id`, `root`, `cwd`, `entered`) — `src/project-identity.ts` `resolveProjectIdentity` is the reading this frame retires (read the frame, retire the self-computation); forward the session's project as `TaskSpec.projectId` on every leg (S-1348). Kinship stays in its existing words: fork lineage is `SessionMetadata.forkedFrom`, delegation lineage is `parentSessionId` — do not record a fork as `parentSessionId`. @client-core: `workspaceChangedArm` reads the new members (CC-495); the frame is a snapshot. @cli: do not render "directory changed" for a frame whose `cwd` equals the one already shown (the leg-start frame). @web-client: the session header can show the root, the active worktree and the project from the last frame.
1147
+ - **Not in this slice (stated).** `repository` (the repository's main worktree root) and `entered.name` / `entered.branch` arrive with the worktree path-law slice (S1), `session` with the session-checkout slice (S2) — each is a new member of the same snapshot.
1148
+ - **Exports and wire shape (the release's wire manifest).** No name added or removed; `resolveProjectId` changes signature (`(rootDir) => marker | null` → `(fs, rootDir) => Promise<marker | null>`). `TaskEvent` `workspace_changed` gains `root` and `remote` (required — a constructor of the frame breaks) and `entered?` / `project?`; `TaskSpec` gains `projectId?`. Closed sets: +1 new, `workspace_changed.project.source` (`marker` | `declared`). Refusal codes: +2 (`config.project_identity_mismatch`, `config.project_id_invalid`); an unreadable marker keeps `config.memory_project_marker` / `config.memory_project_marker_nested`.
1149
+ - **Memory side effects of a refused leg (narrowing).** The write-target check (`config.memory_project_identity`) now runs before the marker hint is recorded and before the key-switch carry-over drains the path-keyed announcement queue, so a leg it refuses leaves neither behind; the hint and the carry-over are written only from a verdict decided on the memory partition's own root.
1150
+ - **Order of the project read (no contract change).** The leg's project judge runs once the caller's mounts are judged, so a leg its mounts refuse (`config.tool_mount_denied`) is refused before any marker read and its rejection settles at the same depth as before this slice; a leg refused on both counts reports the mount refusal. The frame's place (after `wiring_manifest`, before the first model or tool interaction), the judge's two codes and `resolveProjectId(fs, rootDir)` are unchanged. Pinned in `test/backlog2291-session-facts-frame.test.ts` (no marker-walk read on a mount refusal, with its admitted control; the stream order) and `test/design393-s6-run-leg-lanes.test.ts` (rejection depth held at 52).
1151
+ - **Pins.** `test/backlog2291-session-facts-frame.test.ts` (real Runner: the leg-start frame on a shell / read-only / env-less leg, changed-only frames, the continuing leg's restored cwd, the resumed leg, the remoteness reading, EnterWorktree / ExitWorktree, no kinship key; the judge's four outcomes and its two refusals, an unreadable marker reported vs refused, the env-face read; memory v2 on an env-less leg still keyed by the host marker, declared-only identity not keying memory, an unreadable marker refusing a consuming session); re-pinned `test/workspace-changed.test.ts`, `test/design393-s2-run-lanes.test.ts`, `test/memory-scope-contract.test.ts`.
1152
+
1153
+ no-notes: #2575(the multi-package release-base pin now reads a fixture repository whose history it writes instead of the checkout's own tags and packages; a pin that was red on the v7.56.0 tag tree and on a depth-1 clone is green on both; test only; no script or export change), #1030(test fixture only: the 1751 pin's fixture body now reads the RC manifest through the one git seam; the seam itself shipped in 7.54.0), #2700(ticket named by the 2604-fix1 commit, not fixed here: Monitor skipping the kill guard is a 7.58.0 car), #926(sweep: session-log-transfer renders thrown values through thrownText; behaviour unchanged for an Error and a string)
1154
+
1
1155
  ## 7.57.0 — 2026-10-25
2
1156
 
3
1157
  ### A Model object the engine cannot read is refused by name at every seat that takes a model — `Runner.runTask` and `Runner.compactSession` read the one model-binding judgment (#2769; behavior narrowing, open to veto; hard-breaking: none; closed sets: none — the refusal is the existing `config.unknown_role` / `not_a_model_ref`; exports: none) (@server @cli)
@@ -46,6 +1200,13 @@
46
1200
  - **Exports.** +2 types `CompactSessionRequest` / `CompactSessionResult`; `Runner` gains `compactSession`. Closed sets: +2 refusal codes from the new verb only (`compact.invalid_request`, `compact.session_busy`).
47
1201
  - **Pins.** `test/backlog2451-compact-session.test.ts` (real Runner: landing + frames + next run reads the summary; held session refused; a leg arriving mid-pass waits; the doors; withdrawn request; deployment block; the facade's seats; an unavailable seat; summarizer failure; activation snapshot restated; a credential callback that never settles; the summary model's route fallback; `disabled` / `noop`).
48
1202
 
1203
+ ### The checkpoint-store contract kit judges the run origin — a row's `state.runOrigin` round-trips verbatim, rides the listing, stays absent when absent, and a word outside the closed set is kept on the row and read as absent in the listing (#2670; contract kit only, `src/` behavior: none; hard-breaking: none; closed sets: none; exports: none; members: none) (@server)
1204
+
1205
+ - **Before.** `CheckpointState.runOrigin` (7.57.0, `TaskSpec.runOrigin: "scheduled"`) is a persisted member carrying the requirement word `run_origin`, and the listing echoes it as `CheckpointSummary.runOrigin`. The store-contract kit never put a row with the member, so a backend that rebuilds `state` member by member — the shape of a SQL store written before the member existed — passed the whole kit while handing back a row whose requirement list still names `run_origin` and whose content does not. The resume screen refuses that row as `requirements_damaged`, for every worker, for good: a scheduled task's parked approval could be listed and never resumed. Measured on the tree this change started from: five stores, each with one defect on this member, each passed every kit case.
1206
+ - **Now.** `checkpointStoreContract` carries one more case, `run origin: …`, over three rows. (1) A row whose `state.runOrigin` is `"scheduled"` comes back with the member verbatim. (2) The listing echoes it. (3) A row without it comes back without the key (never `null`, `""` or a key holding `undefined`), and its listing summary has no key. (4) A row carrying a word outside the closed set comes back with the word kept verbatim (the resume screen refuses it loudly; the store never launders it) and its listing summary has no key. The case runs unchanged over `InMemoryCheckpointStore`, `FileCheckpointStore` and `PgCheckpointStore` (pg-mem); all three pass. No engine behavior changes: `src/` carries only the kit case.
1207
+ - **Who is hurt.** A third-party or server-side `CheckpointStore` that drops or fabricates `state.runOrigin`, echoes a word outside `RUN_ORIGINS` in its listing, or launders an outside word on write now fails the kit at `run origin: …`. @server: a SQL checkpoint store that rebuilds `state` by hand must carry `runOrigin` as its own member — absent when the row has none, never `null` — echo it in the listing only for `"scheduled"`, and keep an outside word on the row verbatim; run the kit over your store and read the failing assertion's message.
1208
+ - **Pins.** `test/backlog2670-run-origin-kit-case.test.ts`: a premise cell (a stamped row that comes back without the member is `damaged` at the resume screen's own judge), a control (the reference store passes every case) and five bad stores, each the reference store with one defect, each red at exactly the new case and at exactly the named assertion — A rebuilds `state` without the member (1), B a listing that never echoes (2), C a rebuilt `state` carrying `null` for an absent row (3), D a listing that echoes an outside word (4, listing half), E a store that drops an outside word on write (4, row half). All five pass the kit whole on the tree this change started from. Mutations: `mutations.md` in the car receipt.
1209
+
49
1210
  ### The rulings-landing gate reads every ledger the way it is written — one row splitter, a `path:line` + snippet is a claim judged on the file's content, a window's note is history it never reads, a disposition addresses ONE row, one comms root per run — `scripts/rulings-disposition.mjs` drafts the post's 裁定处置 lines, and the backlog gate counts only work as a car coordinate (#2113, #2260; release tooling only; behavior change: none; hard-breaking: none; closed sets: none; exports: none; members: none) (@test @cli @server @client-core)
50
1211
 
51
1212
  - **Before.** Six readings of `scripts/rulings-gate.mjs` disagreed with the books it judges. (1) `BLOCKED(on #N)` took the ticket's state from the FIFTH cell of its backlog row: 188 of 2098 ticket rows are wider than six cells (a bare `|` in a head cell), so for them the "state" was whichever cell stood fifth, and `SHIPPED-…` was never "landed". (2) An `已落` row passed when any ONE of its tokens resolved, so a row that cited a commit and a symbol the code no longer holds read as landed (on the comms ledger of 10-24: 12 `path:line` + snippet claims in 10 rows name text that is not in the file at all — `DATE_ANCHOR_CUSTOM_TYPE` moved to another file, `ENGINE_ATTESTATIONS` likewise, `judgeRead(read, boundary)` changed shape — and 128 more name a line the snippet is no longer on). (3) A ruling that owns several rows in one repo shares one key, so one line in the post disposed of all its due rows. (4) With `--ledger` named, `BLOCKED(on S-563)` was still looked up in whichever comms checkout sat beside the tree; a `#N` / `core@x` blocker in another repo's row could never resolve. (5) A window cell with a note — `7.57.0(10-24 R 对账改窗:7.56.0 未并 / 未派;原 7.56.0)` — was an unreadable window: the 33 rows re-windowed that way were neither format-clean nor due, so leg (a) never asked the post for a line about them. (6) The backlog gate's "car coordinate" was any `car-…` string anywhere in the status cell, so a car that finished, a plan that never ran and an OPEN row naming a planned car all kept a twice-re-windowed row out of the "moving without work" list (22 of the 53 such rows on the stage-7570 ledger).