@sema-agent/core 7.62.0 → 7.63.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 (193) hide show
  1. package/CHANGELOG.md +528 -0
  2. package/dist/agents/subagent-transcript-placement.d.ts +23 -0
  3. package/dist/agents/subagent-transcript-placement.js +14 -0
  4. package/dist/agents/subagent.js +82 -51
  5. package/dist/brain/route-adjudicator.js +9 -4
  6. package/dist/core/approval-object.js +1 -1
  7. package/dist/core/arg-summary.js +1 -1
  8. package/dist/core/ask-question.d.ts +2 -2
  9. package/dist/core/canonical-json.d.ts +23 -13
  10. package/dist/core/canonical-json.js +4 -4
  11. package/dist/core/checkpoint-queries.d.ts +47 -4
  12. package/dist/core/checkpoint-queries.js +36 -16
  13. package/dist/core/checkpoint-requirements.d.ts +3 -3
  14. package/dist/core/checkpoint-requirements.js +2 -1
  15. package/dist/core/checkpoint-row-verdict.d.ts +15 -4
  16. package/dist/core/checkpoint-row-verdict.js +22 -2
  17. package/dist/core/checkpoint-store.d.ts +23 -10
  18. package/dist/core/checkpoint-store.js +45 -4
  19. package/dist/core/compliance.d.ts +6 -2
  20. package/dist/core/compliance.js +3 -3
  21. package/dist/core/engine-attestation.d.ts +1 -1
  22. package/dist/core/engine-notice.d.ts +19 -4
  23. package/dist/core/git-worktree-env.d.ts +62 -3
  24. package/dist/core/git-worktree-env.js +91 -30
  25. package/dist/core/governance-codes.d.ts +7 -3
  26. package/dist/core/governance-codes.js +13 -3
  27. package/dist/core/memory-engine/consolidation-driver.d.ts +32 -17
  28. package/dist/core/memory-engine/consolidation-driver.js +99 -98
  29. package/dist/core/memory-engine/consolidation.d.ts +73 -10
  30. package/dist/core/memory-engine/consolidation.js +167 -11
  31. package/dist/core/memory-engine/data-plane.d.ts +8 -4
  32. package/dist/core/memory-engine/data-plane.js +11 -6
  33. package/dist/core/memory-engine/delegation-settlement.d.ts +37 -35
  34. package/dist/core/memory-engine/delegation-settlement.js +53 -59
  35. package/dist/core/memory-engine/dual-root.d.ts +12 -6
  36. package/dist/core/memory-engine/dual-root.js +9 -5
  37. package/dist/core/memory-engine/engine.d.ts +98 -35
  38. package/dist/core/memory-engine/engine.js +477 -380
  39. package/dist/core/memory-engine/entry-scan.d.ts +8 -0
  40. package/dist/core/memory-engine/entry-scan.js +3 -0
  41. package/dist/core/memory-engine/file-backend.d.ts +29 -3
  42. package/dist/core/memory-engine/file-backend.js +66 -35
  43. package/dist/core/memory-engine/index.d.ts +7 -7
  44. package/dist/core/memory-engine/index.js +6 -6
  45. package/dist/core/memory-engine/landing-admission.d.ts +5 -3
  46. package/dist/core/memory-engine/landing-admission.js +3 -3
  47. package/dist/core/memory-engine/layout.d.ts +121 -45
  48. package/dist/core/memory-engine/layout.js +252 -102
  49. package/dist/core/memory-engine/memory-backend-contract.d.ts +19 -1
  50. package/dist/core/memory-engine/memory-backend-contract.js +320 -0
  51. package/dist/core/memory-engine/memory-deployment.d.ts +31 -8
  52. package/dist/core/memory-engine/memory-deployment.js +26 -12
  53. package/dist/core/memory-engine/scope-contract.d.ts +52 -11
  54. package/dist/core/memory-engine/scope-contract.js +68 -19
  55. package/dist/core/memory-engine/session-write-home.d.ts +3 -1
  56. package/dist/core/memory-engine/session-write-home.js +1 -1
  57. package/dist/core/memory-engine/sync-client.d.ts +3 -1
  58. package/dist/core/memory-engine/sync-client.js +7 -0
  59. package/dist/core/memory-engine/sync-report.d.ts +3 -2
  60. package/dist/core/memory-engine/sync-report.js +6 -2
  61. package/dist/core/memory-engine/tools.d.ts +2 -2
  62. package/dist/core/memory-engine/tools.js +10 -10
  63. package/dist/core/memory-engine/types.d.ts +118 -19
  64. package/dist/core/memory-engine/types.js +1 -0
  65. package/dist/core/memory.js +15 -6
  66. package/dist/core/mods/stations.d.ts +20 -1
  67. package/dist/core/mods/stations.js +21 -2
  68. package/dist/core/park-selfcheck.js +2 -2
  69. package/dist/core/pause-registry.d.ts +2 -0
  70. package/dist/core/pause-registry.js +3 -0
  71. package/dist/core/permission-rule-consent.d.ts +10 -3
  72. package/dist/core/permission-rule-consent.js +37 -24
  73. package/dist/core/permission-rule-store.d.ts +35 -1
  74. package/dist/core/permission-rule-store.js +27 -8
  75. package/dist/core/read-only-shell.js +3 -2
  76. package/dist/core/redaction-marks.d.ts +8 -0
  77. package/dist/core/redaction-marks.js +6 -0
  78. package/dist/core/remote-env.d.ts +12 -1
  79. package/dist/core/remote-env.js +3 -0
  80. package/dist/core/runner/child-tree.d.ts +29 -3
  81. package/dist/core/runner/child-tree.js +39 -16
  82. package/dist/core/runner/contracts.d.ts +18 -9
  83. package/dist/core/runner/gate-exit.js +2 -2
  84. package/dist/core/runner/inherited-ask-grants.js +1 -1
  85. package/dist/core/runner/memory-consolidation-driver.d.ts +6 -3
  86. package/dist/core/runner/memory-consolidation-driver.js +4 -4
  87. package/dist/core/runner/memory-consolidation-write-judge.d.ts +2 -1
  88. package/dist/core/runner/memory-consolidation-write-judge.js +3 -2
  89. package/dist/core/runner/person-path-rows.d.ts +8 -3
  90. package/dist/core/runner/person-path-rows.js +5 -1
  91. package/dist/core/runner/placement-fence.d.ts +12 -0
  92. package/dist/core/runner/placement-fence.js +20 -6
  93. package/dist/core/runner/prepare-ask-lane.js +2 -2
  94. package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -1
  95. package/dist/core/runner/prepare-caps-and-workflow.js +5 -2
  96. package/dist/core/runner/prepare-execution-env.js +17 -6
  97. package/dist/core/runner/prepare-hands-readface.d.ts +2 -1
  98. package/dist/core/runner/prepare-hands-readface.js +4 -3
  99. package/dist/core/runner/prepare-inherited-gate.d.ts +10 -8
  100. package/dist/core/runner/prepare-inherited-gate.js +8 -4
  101. package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -4
  102. package/dist/core/runner/prepare-memory-engine-session.js +4 -4
  103. package/dist/core/runner/prepare-memory.d.ts +3 -2
  104. package/dist/core/runner/prepare-memory.js +28 -20
  105. package/dist/core/runner/prepare-park-ask.js +4 -3
  106. package/dist/core/runner/prepare-task.js +15 -12
  107. package/dist/core/runner/prepare-workspace-restore.js +3 -6
  108. package/dist/core/runner/run-leg.js +1 -1
  109. package/dist/core/runner/run-settle-and-teardown.js +3 -2
  110. package/dist/core/runner/terminal-account.js +1 -1
  111. package/dist/core/runner-deps.d.ts +6 -2
  112. package/dist/core/secret-env.d.ts +1 -1
  113. package/dist/core/secret-env.js +4 -4
  114. package/dist/core/session-checkout.d.ts +108 -0
  115. package/dist/core/session-checkout.js +485 -0
  116. package/dist/core/session-store.d.ts +12 -4
  117. package/dist/core/session-store.js +23 -3
  118. package/dist/core/session.d.ts +16 -2
  119. package/dist/core/session.js +3 -0
  120. package/dist/core/store-contracts/checkpoint-store-contract.d.ts +0 -12
  121. package/dist/core/store-contracts/checkpoint-store-contract.js +6 -7
  122. package/dist/core/store-contracts/session-store-contract.js +39 -0
  123. package/dist/core/task-event.d.ts +21 -0
  124. package/dist/core/task-notification.d.ts +9 -1
  125. package/dist/core/task-notification.js +6 -0
  126. package/dist/core/task-registry-agent.d.ts +14 -2
  127. package/dist/core/task-registry-agent.js +45 -19
  128. package/dist/core/task-registry-shared.d.ts +26 -11
  129. package/dist/core/task-registry.d.ts +15 -9
  130. package/dist/core/task-registry.js +9 -10
  131. package/dist/core/task-spec-members.js +1 -1
  132. package/dist/core/task-spec.d.ts +20 -0
  133. package/dist/core/tool-policy.d.ts +14 -12
  134. package/dist/core/tool-policy.js +11 -10
  135. package/dist/core/tool-spec.d.ts +38 -19
  136. package/dist/core/types.d.ts +1 -1
  137. package/dist/core/untrusted-egress.d.ts +15 -4
  138. package/dist/core/untrusted-egress.js +23 -22
  139. package/dist/core/workspace-snapshot.d.ts +3 -1
  140. package/dist/core/workspace-snapshot.js +1 -0
  141. package/dist/engine/harness/types.d.ts +66 -1
  142. package/dist/engine/harness/types.js +108 -0
  143. package/dist/engine/session/import-validate.js +6 -1
  144. package/dist/engine/session/session.d.ts +24 -1
  145. package/dist/engine/session/session.js +45 -1
  146. package/dist/index.d.ts +7 -4
  147. package/dist/index.js +7 -4
  148. package/dist/internal/harness-types.d.ts +1 -1
  149. package/dist/orchestration/run-workflow-tool.d.ts +4 -1
  150. package/dist/orchestration/run-workflow-tool.js +1 -0
  151. package/dist/orchestration/workflow.d.ts +3 -0
  152. package/dist/orchestration/workflow.js +3 -1
  153. package/dist/stores/file/session-store.js +2 -1
  154. package/dist/tools/fs/bash-program-position.js +3 -3
  155. package/dist/tools/fs/program-read-model.d.ts +34 -10
  156. package/dist/tools/fs/program-read-model.js +37 -7
  157. package/dist/tools/fs/program-read-model.rows.js +13 -2
  158. package/dist/tools/fs/read-deny.d.ts +13 -1
  159. package/dist/tools/fs/read-deny.js +10 -2
  160. package/dist/tools/fs/removal-targets.js +3 -3
  161. package/dist/tools/fs/safety.d.ts +2 -0
  162. package/dist/tools/fs/safety.js +1 -1
  163. package/dist/tools/fs/shell-read-argv.d.ts +8 -1
  164. package/dist/tools/fs/shell-read-argv.js +34 -29
  165. package/dist/tools/fs/shell-read-bindings.d.ts +2 -0
  166. package/dist/tools/fs/shell-read-bindings.js +5 -1
  167. package/dist/tools/fs/shell-read-brace.d.ts +18 -0
  168. package/dist/tools/fs/shell-read-brace.js +79 -0
  169. package/dist/tools/fs/shell-read-check.js +10 -8
  170. package/dist/tools/fs/shell-read-establish.js +23 -16
  171. package/dist/tools/fs/shell-read-judge.d.ts +11 -0
  172. package/dist/tools/fs/shell-read-judge.js +3 -3
  173. package/dist/tools/fs/shell-read-plan.d.ts +10 -0
  174. package/dist/tools/fs/shell-read-plan.js +189 -93
  175. package/dist/tools/fs/shell-read-start.d.ts +19 -9
  176. package/dist/tools/fs/shell-read-start.js +20 -12
  177. package/dist/tools/fs/shell-read-word.d.ts +10 -0
  178. package/dist/tools/fs/shell-read-word.js +9 -5
  179. package/dist/tools/fs/shell-read-workdir.d.ts +26 -7
  180. package/dist/tools/fs/shell-read-workdir.js +73 -12
  181. package/dist/tools/fs/shell-read-write-targets.js +13 -8
  182. package/dist/tools/worktree.d.ts +3 -2
  183. package/dist/tools/worktree.js +7 -35
  184. package/package.json +3 -2
  185. package/test/export-surface.snapshot.json +73 -11
  186. package/wire-changes/core-stores-sql@7.63.0.json +30 -0
  187. package/wire-changes/core@7.63.0.json +3523 -0
  188. package/wire-changes/mods-kernel@7.63.0.json +30 -0
  189. package/wire-changes/primitives@7.63.0.json +445 -0
  190. package/dist/core/credential-vocabulary.d.ts +0 -176
  191. package/dist/core/credential-vocabulary.js +0 -190
  192. package/dist/core/redaction-passes.d.ts +0 -82
  193. package/dist/core/redaction-passes.js +0 -377
package/CHANGELOG.md CHANGED
@@ -1,3 +1,531 @@
1
+ ## 7.63.0 — 2026-11-01
2
+
3
+ ### A parked row's members are read one way by every reader — the row judge and the listing faces share one member-shape table, so over the five members it names (the gate, the pending action, the state, `createdAt`, `deadline`) a row a listing calls damaged is refused at the resume with the row's sentence, and no face lets through a row another cannot read (#3383; behavior change; behavior narrowing — four, below, open to veto; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: none; wire: no key added) (@server @client-core @cli @test)
4
+
5
+ - **Before.** Three readings answered one question ("do this row's members read?"), and they disagreed. In 7.62.0 the judge (`judgeCheckpointRow`) read a row's `gate` and `state` only by reaching into them (a row without one threw inside the judge and was caught as `damaged`) and never touched `pendingAction`; `listByScope` projected whatever the members held; `listBySession`'s `unreadable` arm asked four members of its own — the pending action's kind a string, a tool approval's `toolCallId` a string, `createdAt` a finite number, `state` an object (an array counted). Measured on 7.62.0 (`146310a6a`, an unstamped row over an in-memory store) over thirteen forms of a stored row: the judge and `listByScope` said `ok` to all thirteen — a gate with no kind as a card whose `gateKind` is `undefined`; `listBySession` answered `unreadable` for seven (a pending action that is a `Date`, a gate with no or an unregistered kind, a tool approval with no or a non-string `toolCallId`, a `createdAt` that is `NaN`, a BigInt or a string) and the row for the other six (a pending action of a kind no release registered such as `{ kind: "tool_call" }`, a `state` that is an array, a `deadline` that is `NaN`, a BigInt or `null`); `listOverdue` left out the same seven. The change's own base (`8eb95d362`, 7.62.0 plus the changes before it in this release) differed from 7.62.0 in the judge's and the summary's reading of `pendingAction` and `state` (#3364, below): 44 of the 53 new cells were red there. A stamped row (format v10, every row parked since 7.49.0) whose `createdAt` or `deadline` was changed in storage was already refused by its digest, under "the reader-requirement list does not match the row"; a row below that format was not: a v1 plan review with a `createdAt` of `NaN` or a `deadline` of `"soon"` resumed and was consumed.
6
+ - **Now.** One table, `ROW_MEMBER_SHAPES` (`src/core/checkpoint-queries.ts`), in this order: the gate a record of a registered gate kind; the pending action a record of a registered pending kind (the pause registry's `pending` column), a tool approval carrying a string `toolCallId`; the state a record (not an array, not a function); `createdAt` a finite number; `deadline` absent or a finite number. The judge reads it where #3364's table of the three required records (below) stands — after the version ceiling and the reader words, before the retired seats — and a row it fails is `damaged` / `checkpoint.invalid_outcome` / `requirements_damaged` under the fixed sentence, the diagnostic naming the member in the table's own words (`detail` carries no `thrownName`); `summarizeCheckpoint` asks the same table before it projects; `listBySession`'s `unreadable` arm takes its `problem` from it; the overdue face's placement reads its gate entry. For every such row whose members are plain data (as a store hands a row back — a value that reads differently on each read, an accessor, is not covered) the judge, `listByScope` and `listOverdue` answer one verdict (deepEqual), and the resume's diagnostic carries the session face's `problem` verbatim. An optional member that is absent (`deadline` deleted or `undefined`) is no damage; a pending kind other than an approval needs no `toolCallId`.
7
+ - **Narrowing — four (open to veto).** (1) A row the digest does not cover — parked before 7.49.0, or written by a deployment without the stamp — whose gate kind, pending kind, approval `toolCallId`, `createdAt` or `deadline` does not read is refused before the claim (the row stays `pending` and byte-identical) and listed `damaged`; it resumed before. (2) `listBySession` answers `unreadable` where it answered the row for a `deadline` that is not a finite number, a pending kind no release registered, and a `state` that is an array (a gate kind no release registered was `unreadable` there already); the pending action's `problem` words read "is not an object of a registered pending kind" (were "…with a kind"). (3) A row with such a member that also carries a retired seat is told as damaged, not as the retired seat — as #3364 (below) already tells a row missing a record. (4) A wake (`{ gate: "wake" }`) over a row whose gate or pending kind no release registered is refused `checkpoint.invalid_outcome` / `requirements_damaged` by the row's verdict, where the wake's own screen refused it `wake.gate_pending` (the row stays pending both ways; the wake screen's copy for such a kind is no longer reached).
8
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* a parked row whose members do not read as the table says is no longer resumable on this release, and every face reads it `damaged` / `unreadable`. *Who is affected:* a deployment holding rows parked before 7.49.0 or writing its own rows with such a value (a `deadline: null` for "none", a `NaN` a JSON round trip left, a pending kind of its own) — and a mixed fleet, whose 7.62.0 workers still resume a row this release refuses (as with #3302, the row is left pending and byte-identical here, so it can still finish there). *Compensation:* write `deadline` absent for "no deadline"; finish such a row on a worker of the release that parked it, or expire it (`CheckpointStore.expire`) and run the task again. A row whose `deadline` does not read was already one the reap verbs take as past its deadline (`checkpointDeadlinePassed`), so a deployment that reaps expired it at its next sweep before and does now.
9
+ - **Rules.** One table where 7.62.0 had two readings and a gap: the session face's own four-member test is the table, the judge's reaching into `gate` / `state` (and its silence about `pendingAction`) is the table's entries, the placement's gate line reads the table's entry; the projection keeps echoing `deadline` only when the value it reads is finite (its own read, not the table's). One runtime predicate is added, `isPendingKind` (`src/core/pause-registry.ts`, the registry's `pending` column; not on the package root).
10
+ - **Consumers.** @server: a store's listing built on `summarizeCheckpoint` carries the judge's verdict for these rows (the same frozen value as the unreadable-row verdict); no site of this engine writes `deadline: null` on a row, and the queue projection that writes `deadline: null` (`local-checkpoint-store.ts:423`) is a wire row, not a stored one (read, not run). @client-core @cli: nothing new to render — such a row is a `damaged` row, rendered by `rowVerdict`. @test (black box): a v1 plan review row with `createdAt: NaN` ⇒ its approval is refused `checkpoint.invalid_outcome` / `requirements_damaged`, the row pending; `listByScope`, `listOverdue` and `judgeCheckpointRow` give that row one verdict.
11
+ - **Known limit.** A member the summary projection reads beyond the table is not judged by it: a `resourceLedger` that is `null` lists `damaged` (the projection throws on it and answers the unreadable form) while the judge answers `ok` and `listBySession` answers the row — 7.62.0 failed the whole page on it, #3364 (below) lists it, and this change neither opens nor closes the disagreement that remains.
12
+ - **Claude Code 2.1.316.** No anchor: Claude Code keeps no durable park row store or listing (the same reading as the #3364 / #3268 section).
13
+ - **Pins.** `test/backlog3383-row-member-shape.test.ts` — A1 the judge over thirteen forms (cx-3364 Y2 / Y3 / Y4, an unregistered gate kind, an approval with no / a numeric `toolCallId`, a `state` that is an array, `createdAt` NaN / BigInt / string, `deadline` NaN / BigInt / `null`) · A2 `summarizeCheckpoint` and `listByScope` carry exactly the judge's verdict, the page serializes · A3 `listOverdue` ≡ `listByScope` (a gate that reads no kind left out) · A4 the File store · P1 the refusal names the member in the session face's own words · O1 newer before damaged · O2 the records' arm before a retired seat · K1–K4 a clean row, absent optional members and non-approval kinds, the unreadable summary's members, a row damaged elsewhere keeps its sentence · R0 / R2 controls (a parked approval, a legacy plan review resume) · R1 a stamped row's refusal names the member · R3 a legacy plan review with a damaged `createdAt` / `deadline` is refused, the row pending. Re-pinned: `backlog3265-row-verdict` P5 (the diagnostic's words), `backlog3268-listing-total` C3 / G1 / F1 (the pending action's words; the gate's words where the projection's `TypeError` was) and G2 (a non-finite `deadline` is now `damaged`, not echoed). Mutations (receipt).
14
+
15
+ ### An assignment-shaped argument is the word the program receives, its value read through the binding table as the operand beside it is — `T=secrets/key.txt; dd if=src.txt of="$T"` and `X="of=secrets/key.txt"; dd if=src.txt $X` are judged as `of=secrets/key.txt` on both faces (#3350; behavior change; behavior narrowing — security, open to veto; one widening, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
16
+
17
+ - **Before.** A `NAME=value` word handed to a program, a launcher or a declaration builtin as an ARGUMENT (`dd of="$T"`, `env F="$X" cat …`, `export V="$P/x"`) had its value read off the lexer's pieces alone, never the binding table: `of="$T"` was the unresolvable `$T`. With `Edit(secrets/**)`, `T=secrets/key.txt; dd if=src.txt of="$T"` ran on the bypass seat and wrote the protected file (the write face judged an unestablishable word, which that seat releases); the default seat put the ordinary question. The operand form beside it — `truncate -s 0 "$T"`, `cp src.txt "$T"`, `tee "$T"`, `> "$T"` — was read through the table and refused. A keyed shape an expansion handed over (`X="of=secrets/key.txt"; dd if=src.txt $X`, and `X="if=…"; dd $X …` on the read face) was read as one whole-word name (`./of=secrets/key.txt`) on both faces, never as dd's `of=`, and ran on both seats with no question.
18
+ - **Now.** One reading. An assignment-shaped argument is read off the word the program receives (`receivedWordOf`, `src/tools/fs/shell-read-word.ts` — the one the program row's argv already carried), so a value that is itself `NAME=value` is that argument; its value is read by the same `wordValues` that reads `"$T"` (`pushAssignment`, `src/tools/fs/shell-read-argv.ts`) — a value the names hold as a pattern included (`T='secrets/*'; dd of=$T`) — on both faces, so dd's `of=` role writes `secrets/key.txt`. The shell's OWN assignments — a prefix (`T=… cmd`) and a statement (`T=…;`) — keep their reading: bash expands them left to right as a chain (`X=/b; X=/a Y="$X" cmd` gives `Y=/a`), which the segment's starting table does not answer.
19
+ - **Narrowing.** Security, open to veto. A command that writes — or reads — a path a deny row covers through a value the same command line binds, spelled as an assignment-shaped argument, is refused `read_boundary` before it runs, on the bypass seat and on the default seat with no question: `T=secrets/key.txt; dd if=src.txt of="$T"`, `T=secrets; dd if=src.txt of="$T/key.txt"`, `export T=…; dd … of="$T"`, behind `nice`, `T='secrets/*'; dd if=src.txt of=$T`, `X="of=secrets/key.txt"; dd if=src.txt $X`; the read face's `P=x; T="$P/key.txt"; dd if="$T" of=out.txt` under `Read(x/**)` (it ran on bypass) and `X="if=secrets/key.txt"; dd $X of=out.txt` under `Read(secrets/**)`. Also narrowed: a value handed over assignment-shaped to a program with no keyed role is read as its literal spelling already was — `X='name=secrets/key.txt'; cat "$X"` under `Read(secrets/**)` is refused, as `cat name=secrets/key.txt` was before this change (a keyed payload read only where the program's grammar declares a key is not this change). Not covered: a keyed value the names hold as a PATTERN handed over whole — `X='of=secrets/*'; dd if=src.txt $X` stays unestablishable, as before (KL-3350-a).
20
+ - **Widening.** Open to veto. A keyed argument spelling the declared home as `$HOME` is read as the operand beside it already was: `dd if="$HOME/notes/ok.txt"` (and an unlisted program's `a="$HOME/…"`) answers as `cat "$HOME/notes/ok.txt"` — on the open face no question where the unestablished value put the ordinary one, on the roots face the outside-roots question with its root grant where it was the unestablished one; a row under the home still refuses (`dd if="$HOME/.sema/settings.json"`). The tilde spelling `dd if=~/x` keeps its reading (KL-993b ②). Likewise ``x='`id`'; let "a=$x"``: the argument `let` receives holds a backtick in no subscript, which no evaluator runs (measured on bash 3.2.57 and 5.3.15: `let` reports an operand error), so the station judges it (inside the roots: vouched) where the unresolvable argument kept its card; the subscript spelling that does run (``x='b[0`id`]'; let "a=$x"``) keeps its card, and the classify face's whole-string gate refuses both.
21
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row. *Affected:* a command that names such a path through a variable in an assignment-shaped argument — it no longer runs. *Compensation:* none needed; a path outside the rows is unchanged (`T=out.txt; dd … of="$T"` runs).
22
+ - **Wire / exports.** None.
23
+ - **Consumers.** @server @cli (the embedded chain): the refusal renders as every deny refusal. @test (black box): under `bypassPermissions` with `Edit(secrets/**)`, `T=secrets/key.txt; dd if=src.txt of="$T"` is refused and `secrets/key.txt` is unchanged.
24
+ - **Rules.** Retired: the lexer-only reading of an argument's value, and the argument's shape read off the word as written while its argv carried the word received (two readings of one word). Added: none.
25
+ - **Claude Code 2.1.316.** CC's write boundary checks paths only under `blockWritesOutsideWorkingDirectories` (#3320) and asks; a deny row refusing a computed write operand is this engine's — the same divergence as D-3290-a, not registered again.
26
+ - **Pins.** `test/backlog3350-write-face-one-reading.test.ts` #3350 — fourteen forms (eight keyed, six already-placed operand forms) refused on both seats, three controls (`T=out.txt`, `X="of=out.txt"`, the denied file only read), three read-face cells (the third: `X='name=secrets/key.txt'; cat "$X"` answers as the written `cat name=secrets/key.txt`); `test/backlog1100-tilde-assignment-deny.test.ts` KL-993b ② re-pinned (the `$HOME` spelling answers as the operand `cat "$HOME/…"`, the tilde spelling stays unestablishable); `test/backlog921-single-quoted-expansion.test.ts` re-pinned (``x='`id`'; let "a=$x"`` vouched; the subscript spelling carded).
27
+
28
+ ### A brace list or sequence is the words it makes — `ln -sf {src.txt,secrets/key.txt}`, `truncate -s 0 secrets/k{1..2}.txt` and `for f in {a,secrets/key.txt}; do cat "$f"; done` are judged word by word on both faces (#3351; behavior change; behavior narrowing — security, open to veto; two widenings, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
29
+
30
+ - **Before.** The lexer carves an unquoted `{…,…}` or `{x..y}` into one piece, and neither face expanded it: every word holding one was unestablishable. With `Edit(secrets/**)`, `ln -sf {src.txt,secrets/key.txt}`, `rm -f {a,secrets/key.txt}`, `cp {src.txt,secrets/key.txt}`, `tee {a,secrets/key.txt}`, `truncate -s 0 {a,secrets/key.txt}` and `truncate -s 0 secrets/k{1..2}.txt` ran on the bypass seat and wrote into `secrets/`, as did a `for` loop over such a list; with `Read(secrets/**)`, `cat {src.txt,secrets/key.txt}` ran there with a disclosure (KL-r2-e).
31
+ - **Now.** Brace expansion is the first expansion bash performs on a simple command's words and on a `for` list's; those words are now the words it makes (`braceWordsOf`, `src/tools/fs/shell-read-brace.ts`, read by the plan and by the binding table's `for` reading) — left to right, a nested list depth-first (`{x{1,2},y}` is `x1 x2 y`), a word made empty dropped, a sequence its terms up or down (`{3..1}`, `{-1..1}`, `{a..c}`) — before the one reading every word already has, so each alternative is read as any argument is (a quote, a `$T`, a `~` in it still the shell's). Where bash 3.2 (macOS's `/bin/bash`) and bash 4.0 on make different words of one text — 4.0 on pads a sequence whose end is written with a leading zero (`{01..03}` is `01 02 03`, 3.2 makes `1 2 3`) and reads a step (`{1..9..4}` is `1 5 9`, 3.2 keeps the word as written), measured on 3.2.57 and 5.3.15 — the command is read once per release's words (`braceWordListsOf`), as a command whose names hold several values already is, and refused where either reading meets a row; a `for` list binds its variable to every release's words. Not expanded, as bash does not: a `[[ … ]]` or `case` word, a redirection's target, an assignment's value. Not expanded here (each stays the word it is, KL-3327-a): a letter range through a non-letter (`{Z..a}`), a word whose braces would make more than the reading bound (64), an array assignment's list and a `select` list; and a `for` variable bound to more than 64 words — every release's words counted together (`for f in k{001..040}` binds 80) — is unknown, as one bound to 80 written words already was.
32
+ - **Narrowing.** Security, open to veto. A brace list or sequence naming a path a deny row covers is refused `read_boundary` before it runs, on both seats, on the face whose row it meets — the six write forms above, nested (`secrets/{a,{b,key.txt}}`), inside a keyed argument (`dd of={a,secrets/key.txt}`), a letter sequence (`rm -f secrets/{a..c}`), a sequence the releases expand differently (`truncate -s 0 secrets/k{01..02}`, `truncate -s 0 secrets/k{1..3..2}`, and under `Edit(k1)` the 3.2 reading of `truncate -s 0 k{01..02}`), a `for` list (`for f in {src.txt,secrets/key.txt}; do truncate -s 0 "$f"; done`), and the read forms `cat {src.txt,secrets/key.txt}` / `cat secrets/k{1..2}.txt` (KL-r2-e's brace form retires); a made word under a sensitive-path deny row (`**/.env`) is refused where the one word was a question the user could approve (`cat .{env,bak}`, `cat ~/{.env,x}`).
33
+ - **Widening — two (open to veto).** (1) Made words that all land inside the roots and meet no row are read as those words: on the full shell's roots face the station vouches where the unestablished word was the mandated containment question — `cat {a,b}`, `cat {1..3}`, `cat {foo,bar} src/a.ts`; the read-only classifier decides the rest as before (it already admitted `cat {a,b}`; `sed -n 1p {a,b}` keeps its unquoted-pattern sentence and its question). (2) Made words outside the roots are the out-of-root read they spell: the approval face of `cat {/etc/passwd,}` names `/etc/passwd`'s directory as `cat /etc/passwd` does (before: an unresolvable operand with no directory to grant) — the `rb421-bash-boundary-hardening` BB-1 classify cell, re-pinned to it. `test/backlog994-s1-dual-run.test.ts` records the fourteen corpus inputs under `brace_words`.
34
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row. *Affected:* a brace list naming such a path. *Compensation:* none needed; lists naming no protected path run (`rm -f {a,b}`, `cp {src.txt,out.txt}`), and a quoted list is one word (`cat '{a,b}'`).
35
+ - **Wire / exports.** None.
36
+ - **Consumers.** @server @cli: as every deny refusal. @test: `ln -sf {src.txt,secrets/key.txt}` under `bypassPermissions` + `Edit(secrets/**)` refused, `secrets/` unchanged.
37
+ - **Rules.** Retired: the brace list or sequence as one unresolvable word, in a simple command and in a `for` list. Added: none (the words go through the existing per-word reading; a release-dependent text goes through the existing several-readings merge; the `for` list reads the same `braceWordListsOf` the plan reads).
38
+ - **Claude Code 2.1.316.** As for #3350: a deny-row refusal of a write is this engine's (D-3290-a).
39
+ - **Pins.** `test/backlog3350-write-face-one-reading.test.ts` #3351 — eleven write forms (one a list inside a made word, `{a,{b,secrets/key.txt}}`) and three read forms refused on both seats, six controls (no protected name, outside copy, a quoted list, an assignment's value, a sequence and a `for` list outside the denied directory), three release-dependent sequences refused, the per-release cell (`Edit(k1)` / `Edit(k01)` / `Edit(k3)`), and the reading bound pinned as the limit it is; `test/backlog3330-writer-program-rows.test.ts` L re-pinned (the brace cell refused); `test/backlog945-plan.test.ts` re-pinned (`cat .{env,bak}` reads `.env` / `.bak`; F3/F4 keeps its unresolvable form with `$V` and pins the made words); `test/backlog994-s1-dual-run.attribution.mjs` + `brace_words`; `test/backlog714-home-expansion-precise.test.ts` re-pinned (the unresolved-operand structure cell reads `$V`; `cat {foo,bar}` is vouched on both seats); `test/rb421-bash-boundary-hardening.test.ts` BB-1 classify cell re-pinned (`cat {/etc/passwd,}` answers as `cat /etc/passwd`); the two equivalence corpora + `3351-brace-words` (car A) / `3351-brace-words/read|write/tighter` (car C), and `3350-received-word` / `3350-received-word/read/same standing` for #3350.
40
+
41
+ ### A GNU build's `g` name runs the row's GNU grammar — `gln`, `gcp`, `gtruncate`, `gtimeout` are the rows they spell, read by one name resolution (#3352; behavior change; behavior narrowing — security, open to veto; one widening, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
42
+
43
+ - **Before.** `programRow` knew one spelling besides a row's key, an interpreter's trailing version. A GNU coreutils build installed beside the system's own (Homebrew's `coreutils`: `gln`, `gcp`, `ginstall`, `gtimeout`, …) named no row, so its words had no writer: with `Edit(secrets/**)`, `gln -sf ../src.txt secrets/link`, `gtruncate -s 0 secrets/key.txt`, `ginstall`, `gdd`, `gcp`, `gmv`, `grm`, `gtee` into `secrets/` ran on the bypass seat, and `gtimeout 5 truncate -s 0 secrets/key.txt` hid the launcher's program. The gate's own binary lane already ran `g<name>` as the GNU implementation.
44
+ - **Now.** A row declares the other spellings of its name (`ProgramRow.spellings`: `versioned`, and `gnu-prefixed` — every coreutils row, measured against the package's installed names), and `programRow` reads them in one place: `g<key>` is the row's GNU view (`implementationsOf`; a row every implementation reads one way is itself). The readers that asked "which program" by the written name read the row: a launcher is a launcher by its row (`launcherRowOf`, retiring the name-set check), and the tables keyed by program — the removal guard's `rm` / `rmdir`, the placement tables of `acceptEdits` (`cp` / `mv` option words, `mv` reshaping the tree, `rm -r` writing beneath), the shape tier's device writers — read the row's key (`programKeyOf`). `versioned?: true` becomes `spellings: ["versioned"]`.
45
+ - **Narrowing.** Security, open to veto. A write through a `g` name into a path a deny row covers is refused `read_boundary` on both seats, as the name it spells is; a `g` launcher's program is read (`gtimeout 5 truncate …`, `genv -C …`); `grm -rf` meets the removal guard as `rm -rf` does.
46
+ - **Widening.** Open to veto (@server @cli). A `g` name is answered as the name it spells where that name is answered without a question: `acceptEdits` places `gcp src.txt out.txt` inside the roots as it places `cp src.txt out.txt` (before: no row, the question), and the shape tier reads `gtee /dev/tty` as `tee /dev/tty`.
47
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user on a host with GNU coreutils under `g` names who protects a path with a deny row. *Affected:* a command through a `g` name — it is read as the program it is, refused or placed as that program. *Compensation:* none needed. Not covered: the `g` names of other GNU packages (`gsed`, `ggrep`, `gfind`, `gxargs`, `gtar`) — their rows declare no `gnu-prefixed` spelling, those packages not being on the host the set was measured on (KL-3327-a).
48
+ - **Wire / exports.** None (`ProgramRow` is not exported from the package root).
49
+ - **Consumers.** @server @cli: as every deny refusal; zero read points of the row schema.
50
+ - **Rules.** Retired: `versioned` as its own column and its own resolution arm; the launcher name set as a second answer to "is this a launcher"; the written-name keys of five program tables. Added: none (`spellings` is the one resolution `versioned` was).
51
+ - **Claude Code 2.1.316.** As for #3350 (D-3290-a); CC reads a program by its name and has no row model.
52
+ - **Pins.** `test/backlog3350-write-face-one-reading.test.ts` #3352 — ten forms refused on both seats, two controls, the composite `T=secrets/key.txt; gln -sf {src.txt,"$T"}`, the model cell, the `acceptEdits` cell (`gcp -f` = `cp -f`); `test/program-read-model.structure.test.ts` schema keys.
53
+
54
+ ### A copy with no destination lands where its program starts — `env -C <abs>/secrets ln -s /etc/hosts` is judged in `secrets/`; `install -D` states its effect; dd is a device writer (#3353; behavior change; behavior narrowing — security, open to veto; two widenings, open to veto; hard-breaking: none; closed sets: none; exports: none — the one new member, `ShellReadSegment.programStart`, is not on the package root; wire +1 additive) (@server @cli @client-core @test)
55
+
56
+ - **Before.** A lone `ln` operand links into the working directory, which the write face borrowed from the first relative word of the segment; with a launcher that moves the base (`env -C`, `sudo -D`) and no relative word, there was none to borrow, the link's name was unplaced, and `env -C <abs>/secrets ln -s /etc/hosts` ran on the bypass seat under `Edit(secrets/**)`, making `secrets/hosts`. `install -D` was an option without a stated effect, so every word read as written: `install -D secrets/key.txt out/k.txt` (the protected file only read) was refused. The shape tier read `dd … of=/dev/null` as the ordinary question (KL-1685-f).
57
+ - **Now.** (b) The plan carries where each segment's program starts, `ShellReadSegment.programStart` — the candidate `.` placed as the program's relative words are (where the command line stands, or where a launcher put it, its deny floor both places); the write face reads it, and the borrow from a relative word retires. (`install -D`) GNU's `-D` (the destination's leading directories — the destination's own path, judged as the destination is) and BSD's `-D DIR` (the root its metalog strips; measured `install -D /tmp src dst` writes `dst`) are declared. (c) dd joins the shape tier's device writers: its `of=` writes through (#3330), and every other key both implementations take writes nothing beyond it (the binary gate's dd cells, eleven keys, GNU and BSD); dd declares no byte bound, so a generator read stays the mandated question.
58
+ - **Narrowing.** Security, open to veto. A lone-operand link (or copy) under a launcher that moves the base into a deny-covered directory is refused `read_boundary` before it runs, on both seats: `env -C <abs>/secrets ln -s /etc/hosts`, `genv -C …`.
59
+ - **Widening — two (open to veto, @server @cli).** `install -D <protected source> <outside destination>` runs (the over-refusal retires; `install -D src.txt secrets/new/k.txt` is still refused). `dd if=src.txt of=/dev/null` is no question on the default seat, as `cp src.txt /dev/null` is (`dd if=src.txt of=out.txt` keeps it; `dd if=/dev/zero of=/dev/null count=1` keeps the mandated one).
60
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row; a user whose `install -D` from a protected source was refused. *Affected:* a lone-operand link into a protected directory through a launcher. *Compensation:* none needed.
61
+ - **Wire.** +1 additive: `ShellReadSegment.programStart?: ReadCandidate` (optional; set on every segment the planner makes; a hand-built segment without it names no place its program starts in — its lone-operand children stay unplaced, the fail-closed reading). @server @cli @client-core: zero read points of the member on your `origin/main`; a fixture that builds a `ShellReadSegment` by hand compiles unchanged. Exports: none.
62
+ - **Consumers.** @server @cli: as every deny refusal. @test: `env -C <abs>/secrets ln -s /etc/hosts` under `bypassPermissions` + `Edit(secrets/**)` refused, `secrets/` unchanged; `dd if=src.txt of=/dev/null` on the default seat asks nothing.
63
+ - **Not in this change.** Backup names of `-b` / `-S` (KL-1102-k → #3389); a lone glob `ln -s secrets/*.txt`, still refused by its pattern (KL-3390-a → #3390).
64
+ - **Rules.** Retired: the borrow-a-relative-word placement arm and its "no launcher moved the base" fallback (one fact, `programStart`). Added: none (two option declarations and a set member are data).
65
+ - **Claude Code 2.1.316.** As for #3350 (D-3290-a).
66
+ - **Pins.** `test/backlog3350-write-face-one-reading.test.ts` #3353 — (b) two refused, two controls; `install -D` one widened, two refused; (c) three; `test/backlog1685-device-table-exempt.test.ts` ⑤ re-pinned (KL-1685-f closed); `test/backlog3330-writer-program-rows.test.ts` K re-pinned (`install -s` keeps the over-refusal, `install -D` runs); `test/program-read-model.binary-gate.writes.ts` dd key cells.
67
+
68
+ ### An operand that carries a command substitution meets the deny rows where its literal part resolves — `cat secrets/$(printf key.txt)` is judged as `secrets/…` at the place the command stands, not by its bare spelling (#3374; behavior change; behavior narrowing — security, six forms below, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
69
+
70
+ - **Before.** A word whose value the shell rewrites before the program sees it — a command substitution inside it — was matched against the deny rows by its bare folded spelling alone (`secrets/ subst`): no base, no floor, no ancestor views. Run in `proj` with `Read(proj/secrets/**)` read against the home, `cat secrets/$(printf key.txt)` printed the protected file under `bypassPermissions` and was the ordinary question on the default seat (real bash, measured on the base); so were `cat ../secrets/$(printf key.txt)` from `proj/sub`, the same after `cd ..` or after `cd "$(pwd)/.."`, and a quoted mix `cat "secrets/$(printf key).txt"`; under `Edit(proj/secrets/**)`, `echo x > secrets/$(printf key.txt)` wrote it.
71
+ - **Now.** The rewritten word is placed through the one operand resolver every operand goes through: at each base the walk knows, at the floor where it lost track, and at the ancestor views of a directory the text does not know. Its spelling at a base is the literal part joined to that base, the rewritten piece standing for one segment, so a row that covers everything below the literal part meets it. The word stays unestablishable — what the program opens is not in the text — and a word no row meets is asked or contained as before. No rule was added: the special early answer for a rewritten word is gone.
72
+ - **Narrowing.** Security, open to veto. A word whose literal part a deny row covers — a read, or a redirection's target on the write face — is refused `read_boundary` before it runs, on the bypass seat and on the default seat without a question (S1–S6 in the pins). Before: it ran on the bypass seat and was the ordinary question on the default seat. Not narrowed: a whole-word substitution (`cat $(printf ok.txt)`), a literal part no row covers (`cat ../$(printf ok.txt)`, `cd .. && cat ok$(printf .txt)`); the station does not refuse a word for carrying a substitution.
73
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row and expects a shell command that computes a file name inside it to respect it. *Affected:* a command that computes a name below a directory a deny row covers whole (`Read(proj/secrets/**)`) — refused whatever the name computes to. *Compensation:* write the name literally.
74
+ - **Consumers.** @cli, @server (embedded chain): the refusal renders as every deny refusal; the place it names is the literal part with the substitution's placeholder (`/…/home/proj/secrets/ subst`). @test (black box): under `bypassPermissions` with `Read(proj/secrets/**)` against the home and the command in `proj`, `cat secrets/$(printf key.txt)` is refused `read_boundary` and prints nothing; `cat $(printf ok.txt)` runs.
75
+ - **Known limit.** KL-3374-a: the literal part is what the rows meet — a substitution that computes the directory part (`cat $(printf secrets)/key.txt`) names any directory, and a row that names one file below the literal part (`Read(proj/secrets/key.txt)`) does not meet the rewritten piece; both run on the bypass seat as on the base (S7 in the pins; judged again once a command substitution that is a plan fact can be settled, #3357).
76
+ - **Pins.** `test/backlog3374-3375-3379-read-boundary-runs-where.test.ts` — real Runner lane, real bash, both seats, `secrets/` the witness · S1–S6 leaked (or wrote) on the base, refused · S7 the limit, leaked on both trees · SC1–SC4 controls alike on both trees.
77
+
78
+ ### After the walk loses track, a literal move goes where it says from the deny floor — a top-level `cd ..`, a literal `eval` text's moves, and an `eval` text that loses track itself hand their places to the floor (#3375; behavior change; behavior narrowing — security, seven forms below, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
79
+
80
+ - **Before.** Once the walk lost track (`cd -P ..` from `proj/sub/deep`: a move through links it cannot see), a later literal `cd ..` was walked from the places the walk held BEFORE the loss, not from its floor; a literal `eval` text started there had no floor, so its own moves added nothing; and an `eval` text that lost track itself (`eval 'cd -P ..'` from a settled start) handed back the places its closed scopes went but not its floor. A word the walk could not place afterwards was judged only at the floor it had: `cd -P .. && eval 'cd ..' && cat secrets/key.txt` and `cd -P .. && cd .. && cat secrets/key.txt` from `proj/sub/deep`, and `eval 'cd -P ..' && cat secrets/key.txt` from `proj/sub`, printed the protected file on the bypass seat and were the ordinary question on the default seat (real bash, measured on the base).
81
+ - **Now.** One reading for every literal move of a walk that lost track, at the top level or in a literal `eval` text: it is walked from the floor (and from where the walk stood before the loss), and where it goes joins the floor. A literal `eval` text run where the walk lost track starts at that floor; an `eval` text that ends lost hands its floor back as places it went. The floor reading lives in one place, the walk's own (`floorOf`). The floor is a set of places the walk carries as it carries candidates, under the same bound (256): each literal move after the loss may have run or not, so the places double with each one; past the bound a move goes from where the walk stood when it lost track alone, and the walk no longer knows where it stands — a later word meets the deny rows at every directory at or above its floor, as a word made from a directory the text does not know does (B1 / BC1 in the pins: eighteen such moves are judged in bounded time). A loop the walk does not count that moves it loses track the same way: each beat moves from where the last one went, so past its first beat the walk no longer knows where it stands (U1 / UC1; before, the walk held its floor as if it did). Not changed: a settled `eval` text (`eval 'cd ..'`, `eval 'cd sub'`) is walked as before; the floor's places stay deny-only — a word is never placed there, and containment is unchanged.
82
+ - **Narrowing.** Security, open to veto. A word the walk cannot place after such a move is refused `read_boundary` before it runs, on the bypass seat and on the default seat without a question, when a deny row names it at one of the move's places, or at a directory above the floor once the floor has passed its bound or a loop the walk does not count has moved it (E1–E5, B1, U1 in the pins). Before: it ran on the bypass seat and was the ordinary question on the default seat.
83
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row and expects a shell command that moves through links, then moves again, to respect it. *Affected:* a command that loses track and then moves literally — its later unplaced words are judged at every place the moves may reach, the place it started included (the floor never shrinks). *Compensation:* move with `cd` without `-P` where links are not in play, or name the path absolutely.
84
+ - **Consumers.** @cli, @server (embedded chain): the refusal renders as every deny refusal. @test (black box): under `bypassPermissions` with `Read(proj/secrets/**)` against the home and the command in `proj/sub/deep`, `cd -P .. && eval 'cd ..' && cat secrets/key.txt` is refused `read_boundary` and prints nothing; `cd -P .. && eval 'cd deep' && cat .keep` runs.
85
+ - **Known limit.** KL-3375-a: past the bound, a deny row on a directory below the floor that only some of the more than 256 combinations of moves reach is not met (the floor's ancestors are); nor is one below the floor that an uncounted loop's beats move down to.
86
+ - **Pins.** `test/backlog3374-3375-3379-read-boundary-runs-where.test.ts` · E1–E5 leaked on the base, refused · B1 eighteen moves that may each fail, then two `cd ..`: leaked on the base, refused · U1 an uncounted loop that moves up: leaked on the base, refused · EC1–EC4, BC1, UC1 controls alike on both trees · the planner cell: B1's last word stands at a floor of hundreds of places, not 2^18.
87
+
88
+ ### A function body and a code body (`trap`, `alias`, `mapfile -C`) are judged where they run — a body where its calls stand, an action at every place after it is set, the text's end included (`trap … EXIT` runs at the command's end state) (#3379; behavior change; behavior narrowing — security, twenty-one forms below and one over-reading, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
89
+
90
+ - **Before.** A function body's words were placed where the body is written, and a code body was planned where the segment that sets it stands. A body called after a move, or a trap action that fires at the end of a text that moved, read the protected file where it ran: `f() { cat secrets/key.txt; }; cd .. && f` and `trap 'cat secrets/key.txt' EXIT; cd ..` from `proj/sub` printed it on the bypass seat and were the ordinary question on the default seat, as were the same after `cd "$(pwd)/.."` or `cd -P ..`, a body's own move run at its call (`up() { cd ..; }; cd .. && up && cat secrets/key.txt` from `proj/sub/deep`), and an `eval` string in a body or an action (real bash, measured on the base).
91
+ - **Now.** The reading the binding thread already gives a deferred text: a function body runs at its call, after any segment, and may run again; a code body runs at any later point. A code body set at a segment is planned where it is set and at every place the walk may stand after it — each segment run after it, and where the text ends; a trap on `EXIT` is therefore judged where the text ends. A function body runs where a segment that may run a body stands — the same segments the binding thread reads as running one: a call, a text the plan does not read, a text the segment hands a shell before its command that may (a substitution in a word, an assignment or a redirection target, an unquoted here-document's, at any depth, a parameter's default text), and the places a code body set there fires. Its segments are walked once more from there, beside where they are written, each loop in it on every beat it counts (its `done` and the redirection there with it). A loop in a loop runs every beat of its own on every beat around it — in a body and in the text alike: before, a later beat of the outer loop walked the inner one once — up to the bound a counted loop has (120 beats in all; past it, the loops are a loop the walk does not count, #3375); a body called from a body is called where that body's walk stands, so the walks repeat until the places they stand stop growing (a body that calls itself and moves is walked once more from where the walk does not know, its floor every place it stood). Where a body's moves go from there joins the deny floor of a walk that lost track. The #3290 clause that gave a body's unplaced words the end's unsettled mark is gone: the body's walk starts holding the mark the text's walk holds where it ends (one rule fewer).
92
+ - **Narrowing.** Security, open to veto. A body or an action that names a deny row at a place it may run is refused `read_boundary` before the text runs, on the bypass seat and on the default seat without a question (D1–D11, D13, X2–X6, L1–L4 in the pins). Before: it ran on the bypass seat and was the ordinary question on the default seat.
93
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row and expects a shell function or trap to respect it. *Affected:* a text that defines a function or sets a trap and calls or moves after it. A call is read as the binding thread reads it — a segment that may call one of the text's functions, not which one — so in a text with several functions every body is judged where any call stands; an action set by `mapfile -C` is judged where it is set too, as it runs during that command; a trap action is judged at the places of a subshell after it too, where bash resets traps and so never fires it; an alias body is judged where it may run though a non-interactive bash expands no alias (over-readings; `alias c='cat secrets/key.txt'; cd .. && c` ran on the base and is refused now, O2 in the pins). A body nothing calls is judged where it is written only, as before (DC5). *Compensation:* name the path absolutely, or define the function after the move.
94
+ - **Consumers.** @cli, @server (embedded chain): the refusal renders as every deny refusal. @test (black box): under `bypassPermissions` with `Read(proj/secrets/**)` against the home and the command in `proj/sub`, `f() { cat secrets/key.txt; }; cd .. && f` and `trap 'cat secrets/key.txt' EXIT; cd ..` are refused `read_boundary` and print nothing; `f() { cat ok.txt; }; cd .. && f` and `f() { cat secrets/key.txt; }; f; cd /tmp` run.
95
+ - **Pins.** `test/backlog3374-3375-3379-read-boundary-runs-where.test.ts` · D1–D11 leaked on the base, refused (D7: a body's substitution operand, with #3374; D10: a body called in a subshell that moved, a place the text's end does not hold; D11: a body called from a body) · D12 a body a trap action calls: refused on both trees (the action's call already loses the walk on the base) · D13 an inherited `ERR` trap (`set -E`) that fires in a subshell that moved: leaked on the base, refused · X2–X6 a body a substitution calls (an argument's, an assignment's, an unquoted here-document's, a nested one, a parameter's default) and L1 / L2 a body whose loop moves twice or reads its `done` redirection, L3 / L4 a loop in a loop (in the text, in a body): leaked on the base, refused · X1 a body a substitution calls after a computed move: refused on both trees · DC1–DC7, LC1 controls alike on both trees · the planner cells: 10 × 12 beats counted, 11 × 11 past the bound and unsettled · O2 the over-reading: ran on the base, refused · re-run unchanged: `test/backlog1082-shell-read-shadow.test.ts` C20 (#1082's pin: a nested body that is never called moves nothing), `test/backlog3290-launcher-computed-dir.test.ts` A2 / K14 (a body called before a computed move, refused).
96
+
97
+ ### Removing a memory file forgets it — a file the session was served on its write face that is gone or blank at harvest is that entry's delete, checked against the version it was served; the deletion fuse is max(3, ⌊ratio × N⌋); a refused harvest and the changes the store did not take are told to the person (#2424 = design/1068 §3.7 A; behavior change; hard-breaking: one, three sentences below, open to veto; widening: one, open to veto; closed sets: `HarvestReport["incident"]["kind"]` −1 (`index_cleared`), `EngineNoticeCode` +2 (`memory.harvest_refused`, `memory.harvest_conflict`); exports: +1 root value `DELETION_FUSE_FLOOR`; members: −1 `MemorySessionHandle.indexBaselineLines`; wire manifest: breaking items 2 — the closed-set member and the type key removed above, both told in the one hard-breaking item) (@server @cli @client-core @test @dgx)
98
+
99
+ - **Before.** The `# Memory` instruction tells the model to "delete memories that turn out to be wrong", and Claude Code's tells it, asked to forget, to "find and remove the relevant entry". The harvest read a file gone from the write face as an accident and put it back from the committed copy (`HarvestReport.restored`); only a frontmatter tombstone (`deleted: true`) deleted. So the forget the model did was undone at the boundary and the entry rode the next session's index. Removing the only entry of a scope tripped `mass_deletion` (1 / 1 > 0.5), and a removal beside an emptied `MEMORY.md` tripped `index_cleared`. A blank file at a served path, or a rewrite without the id line, reached the File store's update / delete lane, which finds an entry only by the id line on the plane, and came back `unknown id` — which the next session's announcement called a "concurrent-change conflict".
100
+ - **Now.** The deletion right is the write right. A file this session was served on its write face that is absent or blank at harvest — its id not seen again at another path (a rename stays an update) — is a `delete` patch with `baseRev` = the version it was served: the same per-id CAS delete a tombstone makes. Another writer's commit since ⇒ a CAS conflict: nothing deleted, the winner's copy back on the plane. A removal of an entry the store no longer holds (another writer deleted it) is no change. One the store now holds in another scope (another writer moved it since materialize — the rev does not cover the scope) is no delete and nothing is put back at the old seat (a warning says so): a removal deletes only in the session's write scope (the move between that read and the commit is KL-2424-c). Where the store cannot say at harvest where it holds the entry, nothing is deleted and nothing put back (a copy written at the old seat could be another scope's entry; a warning says so). A read-only layer's missing file is no delete, as before (the session holds no write right there): it is listed in `missing` and the entry stays committed. The fuse: more removals in one harvest than `max(DELETION_FUSE_FLOOR = 3, ⌊MASS_DELETION_FUSE_RATIO × N⌋)` over the N served write-face files ⇒ `mass_deletion`, nothing deleted and nothing put back (the supersession fuse's form, one shared function); `index_cleared` retires — the index is derived, an emptied `MEMORY.md` is rebuilt; `dir_missing` and `sidecar_corrupt` stand, and `dir_missing` reads the home without following it: a link standing where the write home was is the home gone (the store refuses a linked home outright), said with the store's own refusal (`memory.target_outside_store` in `incident.detail`) when the link resolves outside the store, where the harvest used to judge the plane through the link — so the polluted index restore and the derived-index gate no longer reach a linked home: the harvest refuses before them. A path that resolves outside the write root now (a directory on its way swapped for a link) is not a removal. A blank file holds no entry on any reader (`carriesEntry`): the harvest does not admit a blank new file, the File store's read skips one, and a blank seat is free for an add's slug. The File store's update / delete lane finds an entry whose plane file lost its id (blanked, rewritten without the id line, removed) at its committed account seat — the address the twins and the erasure lane already use — so a shadow-only row no longer answers `unknown id` and an id-less rewrite of a served file is that entry's update (behavior fix). The remote data plane (`harvestFilesToPatches`) reads removals, blank files and the fuse the same way — without the placement read (it holds no store; a host applying its delete patches meets the cross-scope move for the whole session, KL-2424-c).
101
+ - **Affected (containment, unchanged in kind).** A removal meets the gates a tombstone meets: a session that commits nothing (`memoryProvenance: "off"`, polluted) and the instruction hard gate (`"carry"`, an exposed session or one whose delegation outcome is pending) withhold an instruction-form entry's removal — an entry whose committed form cannot be read counts as one, at assembly and at the pre-commit late mark alike (the late mark reuses the form the placement read returned) — and put its committed copy back (`restored`, with a `polluted` rejection or a pending warning — where a tombstone of it would be held and commit on a clean settlement, KL-2424-b); the pre-commit late mark withdraws a removal the same way. An archived-body stub's removal is `stub_modified` and is not harvested (KL-2424-a).
102
+ - **Notices.** `memory.harvest_refused` (audience `user`; `detail: { kind, committed, reportId?, sessionId? }`), once per refused harvest — the person was told "remembered" or "forgotten" and learns it did not hold. `memory.harvest_conflict` (audience `user`; `detail: { count, conflicts: [{ op, id, concurrent }] (first 20), reportId?, sessionId? }`), once per harvest the store did not take whole. Both mint at the runner's harvest seat beside `memory.harvest_quarantined`. Each conflict is said by what the store reported: `concurrent-change conflict` only for a CAS miss (the row carries both the base and the current rev), `write refused` for any other; only the CAS reading says a conflicted deletion left the entry in place; the store's reason text is not quoted on either face (it can name another scope). No notice for a deletion that landed: it is the session's own act, and `patches.delete` counts it.
103
+ - **Widening — one (open to veto).** A small scope can be emptied in one harvest: 2 of 2, 3 of 3, 3 of 4 or 3 of 5 removals now commit where the ratio alone refused them (`⌊0.5 × N⌋ < 3` for N ≤ 5); from N = 6 up the ceiling is the ratio's (`⌊0.5 × N⌋`), the same line as before.
104
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* a served write-face file that is gone or blank at harvest is deleted (it was put back, and listed in `HarvestReport.restored`); `HarvestReport["incident"]["kind"]` loses `"index_cleared"`; `MemorySessionHandle.indexBaselineLines` is gone; `DELETION_FUSE_FLOOR` is new; a blank new file is no longer admitted as an empty entry. *Who is affected:* host tooling that removes or truncates projection files during a session and relied on the harvest to put them back (they are now deleted — inferred: a name grep of the local `origin/main` of @server, @cli, @client-core, @sdk and the web client found no reader of `restored`, `index_cleared` or `indexBaselineLines` — not a build of each, and @dgx's tree is not checked out here); a consumer that switches exhaustively on the incident kind (stops compiling) or reads `indexBaselineLines`; a dashboard or test that reads `restored` for a write-face removal; the 3-of-3 accident pins re-pinned to 4-of-4 here (`test/memory-engine.test.ts`, the fuse and the over-fuse restore cells; `test/memory-engine-pollution.test.ts`, the accident-exit containment cell) and the symlinked-home cell re-pinned to `dir_missing`. *Compensation:* a removal is the session's word — a host that must reset a plane does it outside a session's window (between a harvest and the next materialize) or materializes again; switch on the three remaining kinds; drop `indexBaselineLines`; read `missing` with `patches.delete` for what a session removed.
105
+ - **Rules.** Retired: the restore arm for the write face, the `index_cleared` fuse, "a blank file adds as an empty entry", and the File store's plane-only lookup for update / delete. Added: one predicate `carriesEntry` read by every plane reader, one fuse form (`fuseAllowance`) the deletion and supersession fuses share, and one placement read a removal's delete stands on (held in the write scope ⇒ delete; absent, elsewhere or unreadable ⇒ no delete).
106
+ - **Claude Code 2.1.316.** "If they ask you to forget something, find and remove the relevant entry" (`cli316.js` L143962 / L144000; the shared-store variant at L143967 says to rewrite the document without that content). CC's file system is its store, so a removal is the delete at once; the harvest, its CAS and its fuse are this engine's (D-2424-a).
107
+ - **Consumers.** @server: the two notices ride `onNotice` with zero wiring; your sync trigger counts `add` + `update` (`src/boot/runner-deps.ts:1036` on your `origin/main`, and the `memory_harvest_patches_total` metric at `:1015` the same), so a harvest whose only change is a delete does not trigger a sync — a remote that should learn it waits for the next add or update unless the trigger also reads `patches.delete` (your call); a sandbox reset that truncates projection files mid-session now deletes. @cli / @client-core: two catalog rows (audience `user`). @dgx: a sync tool that clears a plane mid-session now deletes. @test (black box): a session that removes a memory file ⇒ the next session's index lacks it; four of four removed ⇒ `memory.harvest_refused` and all four stay; another session's commit between ⇒ `memory.harvest_conflict` with `concurrent: true` and the entry stays.
108
+ - **Pins.** `test/backlog2424-forget-is-delete.test.ts` — A1 rm deletes (ledger, shadow, next session) · A2 a read-only layer's removal is no delete (control) · A3 CAS conflict: nothing deleted, the winner's copy back, said as concurrency · A4 rename stays an update (control) · A5 1 of 1 is a delete · A6 removal beside an emptied index commits · A7 the fuse's four boundaries and its ceiling table · A8 `dir_missing` (control) · A9 blank served file deleted, blank new file nothing · A10 id-less rewrites update · A11 "off" puts back (control) · A12 the hard gate withholds an instruction entry's removal, a plain one deletes · A13 a removal of an already-deleted entry is no change (control) · A14 a topic directory swapped for a link is no removal · A15 an entry another writer moved to another scope is not deleted there and not put back · A16 the same with the placement read failing: nothing deleted, nothing put back · C1 copy-out: full projection deleted, stub `stub_modified` · C2 the data plane's delete patches and fuse · C3 copy-out with the store's reads failing: an exposed session's removals are not deleted · C4 the late mark with a read outage inside it withholds the instruction-form removal, the plain one commits · R1–R4 the Runner: forgets across sessions, `memory.harvest_refused` for the fuse and a vanished root, `memory.harvest_conflict` and the next announcement, the probe's two forms · W1–W3 the sentences and these notes. Re-pinned: `test/memory-engine.test.ts`, `test/memory-data-plane.test.ts`, `test/memory-engine-pollution.test.ts`, `test/design336-read-side.test.ts`, `test/design178-v2b-erasure-evidence.test.ts` (B-6: a shadow-only row's delete applies), `test/hardening-memory-engine.test.ts`, `test/governance-codes.test.ts`, `test/memory-session-handle-keyset.test.ts`, `test/backlog1279-child-undrained-to-parent.test.ts` (the notice code count 115 → 117); the put-back cells now drive the containment arm that still writes it (a session that commits nothing): `test/a005-memory-engine-nofollow.test.ts` (the dangling-link and ordinary-removal cells), `test/backlog1076-memory-mode-bits.test.ts` (e5), `test/backlog1094-memory-target-realpath.test.ts` (⑮ both modes and its negative controls; ⑲b / ⑲c read the linked home's `dir_missing` with the code).
109
+
110
+ ### A working directory the text does not settle is a directory it does not know — the deny rows meet a read made from it at every directory at or above where the text stood (#3290; behavior change; behavior narrowing — security, two groups below, open to veto; one widening, open to veto; hard-breaking: none; closed sets: none; exports: none — two new optional members, `ReadCandidate.unsettledStart` and `EstablishedRead.ancestorViews`) (@cli @server @test)
111
+
112
+ - **Before.** A launcher's working-directory value the shell computes — `env -C "$(pwd)/.."`, `env -C "$D"` with `D=$(…)`, `` env -C `pwd`/.. ``, `env -C ../../pro?`, `env -C "${PWD%/*}"`, an arithmetic expansion — or a `cd` / `pushd` target it computes — `cd "$(pwd)/.."`, `cd "$D"`, `cd ../../pro?`, the same in a literal `eval` text or a function body — left what followed unplaced, with its deny floor where the command line stood. A relative word made from that directory met the deny rows only there. Run from `proj/sub` with `Read(proj/secrets/**)` read against the home, `env -C "$(pwd)/.." bash -c 'cat secrets/key.txt'` and `cd "$(pwd)/.." && cat secrets/key.txt` printed the protected file under `bypassPermissions` and were the ordinary question on the default seat (real bash, measured on the base); under `Edit(proj/secrets/**)` the same forms wrote it.
113
+ - **Now.** One reading for both moves: a value the text does not settle is a directory it does not know, one at or above where the text stood. A word made from it carries `unsettledStart`, and the deny judge meets its spelling at every directory at or above its floor (`ancestorViews`). That is the reading an object path relative to a repository top the text does not settle already had (#1726); its views move to the same member. The floor itself stays where the text stood: the removal guard judges a removal there as before, and containment is unchanged. A launcher's computed value is computed where the command line stands, so its floor is where the launcher stood and where the command line stands. Not changed: a literal, a `~` the text does not rebind, a relative literal, a name bound to a literal; a literal move the walk cannot follow (`cd -P ..`) keeps its own floor; a value with two readings (`unshare -w=V`), an empty value, a bare `nsenter -w` and a root change read as before.
114
+ - **Narrowing.** Security, open to veto. A word made from a directory the text does not know — a read, a write, a pattern, a directory a recursive read names (`grep -r KEY secrets`) — is refused `read_boundary` before it runs, on the bypass seat and on the default seat without a question, when a deny row names it at a directory at or above where the text stood (the K13 / K14 / H1–H4 forms in the pins). Before: it ran on the bypass seat and was the ordinary question on the default seat. Migration: none needed for a command that reads no protected path; to read one on purpose, write the directory literally. Not narrowed: a recursive read of the computed directory itself (`cd "$(git rev-parse --show-toplevel)" && grep -rn TODO .`, `env -C "$(pwd)/.." grep -r x .`) runs on the bypass seat and is the ordinary question on the default seat, as before — the ancestor views meet the rows a word names, not the relation by which a recursive read's root may hold a row (that relation reads the root where the text stood, as it does for `cd -P .. && grep -r x .`); a listing runs as before.
115
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with a deny row and expects a shell command that computes its directory to respect it. *Affected:* a command that computes its working directory and then names, relative to it, a path a deny row covers somewhere above; a command whose text both computes a directory and later moves by a literal absolute one is judged at every ancestor of both (the mark does not lift); a word the walk cannot place after a subshell or a function body that moved to a computed directory is judged the same way (`(cd "$(pwd)"); cd -P .. && cat secrets/key.txt`: asked on the base, refused now) — as the deny floor already keeps the places a closed scope went, and a function body runs again at every later call; a computed move AFTER a word never reaches back to it, except into a function body, whose words run at its calls and so read the whole text (`f() { cd -P .. && cat secrets/key.txt; }; f; cd "$(pwd)/.."` is refused though its one call comes first). *Compensation:* write the directory literally.
116
+ - **Widening.** Open to veto (@server @cli). A launcher value that names a `HOME` the text binds to a literal by a statement (`HOME=<dir>; env -C ~ …`, `env -C "$HOME"`) stands at the binding, as `cd ~` after the same binding already does; the base left it unsaid (the launched words judged only where the command line stood, and asked). Readings, base → now (bypass / default): `HOME=<project>; env -C ~ bash -c 'cat secrets/key.txt'` LEAK / ask → refused / refused; `HOME=<project>/sub; env -C ~ bash -c 'cat secrets/key.txt'` (no protected file there) ran / ask → ran / ask. A placed word may now be judged by the containment roots instead of being asked unplaced — six probe forms (`env -C ~` / `cd ~` / `env -C "$HOME"` after the binding, reads in and out of the roots) asked on the default seat on both trees, so no answer was seen to move; that is the widening's whole reach as measured. A prefix binding (`HOME=<dir> env -C ~ …`) is unchanged: bash expands the `~` before the prefix applies, and the walk reads it at the declared home on both trees.
117
+ - **Consumers.** @cli, @server (embedded chain): the refusal renders as every deny refusal; the place it names is an ancestor view (`/…/home/proj/secrets/key.txt`). @test (black box): under `bypassPermissions` with `Read(proj/secrets/**)` against the home and the command in `proj/sub`, `env -C "$(pwd)/.." bash -c 'cat secrets/key.txt'`, `cd "$(pwd)/.." && cat secrets/key.txt` and `cd "$(pwd)/.." && grep -r KEY secrets` are refused `read_boundary` and print nothing; `env -C .. bash -c 'cat ok.txt'`, `cd -P .. && cat ok.txt` and `cd "$(pwd)/.." && grep -r OPEN .` run.
118
+ - **Known limit.** KL-3290-a: a recursive read of a directory the text does not know (`cd "$(pwd)/.." && grep -r KEY .`) is judged where the text stood — when that directory holds the protected file, it is read, as `cd -P .. && grep -r KEY .` is on the base (judged again once a command substitution that is a plan fact can be settled, #3357). KL-3290-b: a directory the text does not know BELOW where it stood, climbed back out of (`env -C "$(pwd)/deep" bash -c 'cat ../../secrets/key.txt'`), is not met — no floor at or above names it; `cd -` with an `OLDPWD` the text does not know, a bare `cd` / `cd ~` after the text rebinds `HOME`, a target found through a `CDPATH` or `cdable_vars` the text does not settle, a bare `nsenter -w` and a root change keep the floor where the text stood.
119
+ - **Pins.** `test/backlog3290-launcher-computed-dir.test.ts` — real Runner lane, real bash, both seats, `secrets/` the witness · K13: fifteen launcher forms (substitution, a name bound to one, unquoted, backquoted, a pattern, arithmetic, behind `nice`, `sh`, a `cd` in the launched text, the program's own word, from a subdirectory, after a settled launcher, attached, a pattern-removing parameter expansion, `~` after the text binds `HOME` to the project) and K14: twelve `cd` forms (substitution, a bound name, a subshell, a child shell, backquoted, `pushd`, a pattern, a literal `eval`, a function body, a settled launcher after it, a literal `eval` after the walk already lost track, a function body written before the move and called after it): leaked on the base, refused · the write group: five forms wrote on the base, refused · sixteen controls (`~`, relative literals, a name bound to a literal, `cd ..`, `cd -P ..`, a settled launcher elsewhere, a computed move only after the read, `env -C ~` / `cd ~` after `HOME` is bound to a literal elsewhere and to the project) and the write controls read alike on both trees · the two conservative readings pinned (A1 a subshell's computed move before the read, A2 a function body called before the move: asked on the base, refused) · two open-file forms run · recursive reads and patterns: four forms naming the protected directory leaked on the base, refused (H1–H4); six recursive reads and a listing alike on both trees (T1–T7: the computed directory's own tree runs, a recursive read of the home is refused by the built-in credential rows on both); the known limit pinned (H5 / H6 leak on both trees, H7 the base's own form of it) · the removal guard: five forms alike on both trees · the plan: which words carry the mark and which do not (twenty forms) · below the floor pinned (X1 / X2 leak on both trees) · an object path whose repository top the text does not settle (`cd -P .. && git show HEAD:secrets/key.txt` from `sub/deep`, a real repository): refused on both trees, its open-file twin runs (O1 / O2) · re-pinned: `test/backlog3235-rebase-plan-nested.test.ts` K13 / K14 (unplaced, now refused); `test/backlog994-s0-deny-outranks-unresolved.test.ts` (`cd sub && cd $'\x2e' && cat .ssh/id_rsa` with the row under the declared cwd: a mandated ask on the base, now refused — the lexer does not decode ANSI-C quoting, so that target is a directory the text does not know; when it does, #3358, the cell is a mandated ask again); the two equivalence corpora, class `3290-unsettled-start` (five commands each; retires for the quoting form with #3358).
120
+
121
+ ### A background fork child's session is its agent's transcript, placed like every background child's: the fork's creating write lays down the same delegation tuple, so the store's placement read names its parent, root and agent (#3346, ruled C-R1087, open to veto; behavior change; behavior narrowing — three, below, open to veto; hard-breaking: three, three sentences each below, open to veto; closed sets: none; exports: none; members: +1 optional parameter `SessionStore.fork(sourceId, owner, opts?: { placement })`, +1 optional parameter `ToolExecuteContext.hostSessionFork(opts?)`, `admitSessionPlacement`'s `request.placement` widened to the tuple without `owner`; wire: no key added — `placementOf` of a background fork child now answers the tuple the plain background child's answers) (@server @cli @client-core @sdk @test)
122
+
123
+ - **Before.** A background child spawned plainly had its transcript session created into the subagent placement partition — `{ kind: "subagent", scope, parentSessionId, rootSessionId, handle }`, owner in the row's owner cell — and a background child spawned with `subagent_type: "fork"` did not: its session was a fork of the caller's (`sessions.fork(sessionId, owner)`), whose row carried `forkedFrom` and no tuple. The spawn code said only "forks stay unplaced", with a reason given for synchronous children alone. A store's placement read (`placementOf`, the read @server's approval queue and `GET /v1/sessions/:id` project `agent{ id, parentSessionId, rootSessionId }` from) had nothing to say about a fork child, so its parked card had no way back to the agent that owns it.
124
+ - **Now.** One rule for both background lanes. The fork lane mints the a* handle before it forks (`TaskRegistry.mintTaskId`) and registers its row under that id; the fork's creating write takes the tuple through `SessionStore.fork(sourceId, owner, { placement })` — the tuple without an owner, since the fork's owner argument records the tree's owner — and `ctx.hostSessionFork({ placement })` hands it to the host store with the source and the owner still bound there. `TtlSessionStore.fork` passes it to the repo's fork, carries the persisted tuple on its cache entry, and on a store that declares the partition judges the created row with the one placement admission's mirror direction (`placement_refused` when the repo dropped the tuple, the copy removed first — expecting the generation the fork created, so a row another writer put under the id meanwhile stays; a copy that cannot be removed is named in the refusal, code unchanged). `FileSessionRepo.fork` writes the tuple on the meta line through the readers' form judge, as its `create` does. The gate and the tuple are the plain lane's, one function each (the gate: the durable row store armed and the store that CREATES the transcript declaring `placements.subagent` — `declaresSubagentPlacement`; for a fork that is the host store, so `hostSessionFork` hands the placement on only when the host store declares, and the fallback fork only when the child runner's does; `subagentTranscriptPlacement`: parent = the spawning session, root = its root or itself, the row's scope, the handle — the two lanes no longer build the shape twice); a synchronous fork has no row and stays an ordinary branch. `forkedFrom` stays: it answers "whose history was copied" and is written on every fork, a `/branch` copy included; the tuple's `parentSessionId` answers "which session spawned this agent" — the two coincide only on a background fork row.
125
+ - **Narrowing (three, open to veto).** On a deployment that arms the durable row lane and declares the partition, a background fork child's session (1) is no longer listed by `SessionStore.list` (a host's `/resume`, @server's `/v1/sessions`), (2) refuses a claim-form `acquire` with `placement_refused` — the read form (`requireExisting`) re-opens it, so its own park and resume are unchanged — and (3) is deleted with its agent row at the joint reap (and by the partition-orphan leg), where under `evict: "forget"` it used to stay forever. A synchronous fork, a `/branch` copy and a deployment without the row lane are unchanged.
126
+ - **Hard-breaking ① — the fork child leaves the session list (three sentences, open to veto).** *Before:* a background fork child's session was listed by `SessionStore.list` beside the user's own sessions, for the tree's owner. *Now:* it is in the placement partition and only `listPlaced` / the agent's a* handle reach it, as a plain background child's transcript always was (Claude Code keeps every sub-agent transcript off its resume list, `cli316.js:158125`). *Migration:* a consumer that found fork children through the session list reads the agent's row (`TaskRegistry` / the background-agent store, its `sessionId`) or `listPlaced("subagent", { scope })`; rows forked before this version carry no tuple and stay listed (no backfill).
127
+ - **Hard-breaking ② — a claim of the fork child's id is refused (three sentences, open to veto).** *Before:* `acquire(forkedId)` without `requireExisting` attached a new conversation to the fork child's transcript. *Now:* it is refused `SessionError("placement_refused")`, obligation 6 of the partition; `acquire(forkedId, { requireExisting: true })` re-opens it. *Migration:* a host that continues a fork child addresses the agent (`SendMessage` / the continuation verb with its a* handle — a fork row is not revivable, so a continuation spawns a new agent with the needed context, as before) or reads the transcript with `requireExisting`.
128
+ - **Hard-breaking ③ — the fork child's transcript goes with its row (three sentences, open to veto).** *Before:* the joint reap released the row's anchored session, and a fork child's unplaced session under `evict: "forget"` was only dropped from the cache — the branch stayed on disk with no core collection path. *Now:* placement obligation 4 makes that release a real deletion, and the partition-orphan leg deletes a placed fork whose row is gone, exactly as for a plain background child. *Migration:* a deployment that kept fork children as durable branches copies what it needs before the row's retention window ends (`maxAgeMs`), or forks the session itself (`SessionStore.fork` with no placement, a `/branch`), which stays an ordinary row.
129
+ - **Consumers.** @server: your stores answer `placementOf(forkedId)` with the three keys once their `fork` persists `options.placement` as their `create` does (`SessionRepo.fork`'s options already carry it), and your wrapping stores (`ForkRoutingSessionStore.fork`, `CachingSessionStore`) forward the third argument; until then a fork row lands without the tuple — the unplaced shape of every earlier version, a legal degrade that the new session-store contract face reports — and S-3000's projection stays absent for it. A store you build over core's `TtlSessionStore` gets the mirror refusal; a store of your own judges with the exported `admitSessionPlacement`. Your fork-routing store learns a placed fork id from the host's metadata on acquire, as it does for a plain child. @sdk: `PendingCheckpoint.agent?` mirrors the server's projection, unchanged in shape. @cli, @client-core: a background fork child no longer shows in the session list; its agent's row and park card are where it shows. @test (black box): spawn a background fork on a server with the durable row lane, park it, read `GET /v1/approvals` — the row carries `agent{ id: <a*>, parentSessionId, rootSessionId }`; `GET /v1/sessions` does not list the fork child.
130
+ - **Claude Code 2.1.316.** A sub-agent transcript lives under its parent session, addressed by the agent id (`<session>/subagents/agent-<agentId>.jsonl`, `cli316.js:265828`), and `/resume` filters it out (`isSidechain=true`, `cli316.js:158125`); that a fork sub-agent records through the same sidechain path is inferred (its write site was not traced in the bundle). The parent and the agent are part of the transcript's address there; here they are the tuple's two members.
131
+ - **Pins.** `test/backlog3346-fork-child-delegation.test.ts` — F1 the forked row's tuple (parent = the spawning session, root, handle = the launch card's task_id = the row id, scope) and `forkedFrom` · F2 the plain child's tuple unchanged, the fork's with exactly its members · F3 off the host list, claim refused, the read form re-opens it, `listPlaced` lists it · F4 a fork row without a tuple reads as before · F5 File (backend / declared / undeclared Ttl) keep the tuple, in-memory keeps none (declared ⇒ refused, undeclared ⇒ unplaced) · F6 first-write immutable · F7 `forkedFrom` and the parent are two cells · F8 the CC 316 address · F9 a declaring store over a repo that drops the tuple refuses `placement_refused` and leaves no copy · F10 a synchronous fork stays ordinary · F11 the v7.62.0 engine reads the row this engine writes as placed (measured readout in `test/fixtures/backlog3346-v7620-readout.json`) · F12 split stores, two real Runners over one file backing: a declaring host store over an undeclared child store ⇒ placed; an undeclared host store over a declaring child store ⇒ an ordinary fork with no tuple · F13 the refusal's cleanup leaves a row written under the id during the deletion hook, and a copy it cannot remove is named in the refusal. The session-store contract gains two cases: a fork carrying a placement on a declaring store (before and after a restart), and one on a store that does not declare (it still forks). Re-pinned: the #3149 pin `test/backlog3149-delegation-owner.test.ts` HB-3 found the fork child through `list()`; it now reads it through `listPlaced` (owner cell = the tree's, unchanged) and pins that the list no longer shows it. `test/backlog2265-principal-name-one-judge.test.ts` b7 and two `test/prepare-inherited-gate.test.ts` cases recorded the fork call's argument list; they now record the third argument (`undefined` for a synchronous fork; the Runner closure forwards a placement verbatim). Mutations: `.gate-logs/criteria-3346-mutations.md`.
132
+
133
+ ### A directory-pinned memory deployment counts its personal store once a write left a record on the mount — opening the store, reading it or a refused request no longer adds a second store (#3345 = #3337 S1, ruled C-R1086; behavior change — `MemoryDeployment.stores()`, the census an erasure without a grant reaches, and the `planes` rows of `sessionMemoryStatus`; contract sentence +1 `memory.deployment.store_set`; hard-breaking: none; closed sets: none; exports: none) (@server @test @client-core @cli @sdk)
134
+
135
+ - **Before.** On a directory-pinned deployment `stores()` listed the personal plane's store once its mount existed under the engine root, or once this deployment object had opened it, and kept it. Opening that store writes its control plane (`.engine/root-anchor.json`, `.engine/scopes.json`), so a read made the mount exist: resolving or listing a personal layer, a session's memory status, a harvest over a read-only mount, an erasure refused before it ran. From then on every deployment object over that engine root listed two stores, an `{ ids }` / `{ sessionId }` erasure without a grant executed in a store that held nothing, and `sessionMemoryStatus` carried a `personal` row of zeros. Adopting an old-layout tree also wrote an empty `index-revs.json` where there was none, so the read itself left a record. The 7.61.0 #3172 section's `stores()` line ("once its mount exists") is the reading this replaces.
136
+ - **Now.** One predicate, `storeHoldsRecord` (`layout.ts`): the personal store is in the set when its control plane or memory directory holds a file or directory that is not one of the artifacts opening and reading write. The list (`STORE_OPEN_ARTIFACTS`) is place plus exact name, nothing matched at another depth: control plane top level, files `root-anchor.json` · `scopes.json` · `scopes.json.journal` · `.tmp-*`; control plane top level, directories as whole trees `root-anchor.json.lock` · `scopes.json.lock` · `txn.lock` and their `.stale-*` tombs; memory directory top level, files `.casefold-probe-*`. A directory that cannot be read counts (a fault is not an absence), and so does a link that leads nowhere — at the control plane or the memory directory, or above them (a volume not mounted); a file put by hand in the memory directory counts; a non-directory at a lock's name counts. Each item is judged as its listing names it, and a lock's tree is not read. The census holds no store lock, so the tree can move while it reads (an adoption carrying a loose directory into a new home, a record moved into a directory already read): a walk that finds a record answers at once, "no record" needs two walks in a row that find none and see no listed directory gone, and a tree that has not given that after four walks counts as holding a record — a move never hides one; locks and temporaries coming and going are artifacts by name, never a move or a record, and a directory that appears after the listing found it absent is walked, not counted. The set is read from the disk at each call — the arm "a store this object opened stays in the set" is retired, so every deployment object over one engine root answers the same. With a host capture carrier (`memoryCaptureRecordStore`) a session's opt-out can be recorded with nothing on the mount, so the status asks the personal engine even when its store is not in the set and shows its row when that engine answers a capture source — a record, or `fault` (a plane that cannot be opened answers `{ optOutSource: "fault" }`); with the file carrier the record is a file on the mount and puts the store in the set. Adoption voids `index-revs.json` only when one exists. The root anchor law (`controlPlaneHoldsStore`, "must this root stay guarded") is unchanged; it answers another question.
137
+ - **Narrowing / widening.** A behavior fix, no refusal added: a deployment whose personal mount holds only what an open or a read left — written by this version or an earlier one; nothing on the disk is migrated or deleted — lists one store, an erasure without a grant executes in the project store only, and the status has no `personal` row of zeros. A mount with any record on it lists two stores as before. One change the other way, open to veto: a `personal` directory that is itself a link leading nowhere was read as absent (the mount check looked below it); now it is in the set, so the status shows a `personal` row with `optOutSource: "fault"` and an erasure without a grant fails with the store's open instead of erasing the project store alone. A control plane that is such a link was in the set before and stays.
138
+ - **Who needs it / who is affected / compensation.** *Needs it:* a host or user reading a deployment that never wrote a personal memory — one store, one status row. *Affected:* a reader that counted the personal store because a read had opened it. *Compensation:* none needed; the store joins the set at its first write.
139
+ - **Consumers.** @server: zero src; the four 🚧 cells in `test/memory-layer-seat-http.test.ts` that a read left two stores in flip, and their assertions read the file names of the contract row `memory.deployment.store_set` (`docs/CONTRACT-SENTENCES.md`), not a copy — the mount directory still exists after a read (`existsSync(mount)` stays `true`); it is just not a store. @test: the `sdk33a-20261031 d-c` answer flips to one store; the mount directory may stay. @client-core, @cli, @sdk: a status read on a deployment that only read its personal layer has one `planes` row fewer.
140
+ - **Known limit.** A file a future read path writes under the mount must join the list in the same change, or that read puts the store in the set; the closure pin catches a write it can see (every `node:fs` creation call under the mount, and the end state of the read walk). With a host carrier every status read opens the personal store (its open artifacts, one carrier read). A record hidden by a move from two walks in a row (two moves, each into a directory the walk had already read) reads as absent for that call.
141
+ - **Pins.** `test/backlog3345-store-set-written.test.ts` — a fresh pinned deployment ⇒ one store; open, resolve, list, status, a read-only harvest and a refused erasure ⇒ one store, on the same object and a fresh one, and the residue stays; an empty memory directory made by hand ⇒ one; a write ⇒ two stores (a write-plane mount that wrote nothing still writes its session account and index; an executed erasure that erased nothing records its request; a capture opt-out through the file carrier); `transfers.jsonl` alone, a capture opt-out record (also one whose session id starts `.tmp-` or contains `.lock.stale-`), a hand file in the memory directory ⇒ two; a mid-flight registration's files, `txn.lock` and its tombs ⇒ one; a file at `txn.lock`'s name ⇒ a record; a case-fold probe at the top level ⇒ one, one level down ⇒ a record; an unreadable control plane ⇒ in the set, a `fault` status row, `stores()` throws; a control plane, a memory directory or the `personal` directory standing as a link that leads nowhere ⇒ in the set (a `fault` row), a control plane linked to an empty directory ⇒ one store; two objects over one root agree; old-layout adoption writes no `index-revs.json` and voids a standing one to `{}`; the host carrier — a mark through it ⇒ a `personal` row with `captureOptedOut: true` and `committedCount: 0`, a carrier fault with no mount ⇒ a `fault` row, an unopenable plane ⇒ a `fault` row and not in the set, no record ⇒ no row. `test/backlog3345-store-set-artifact-closure.test.ts` — every file the read walk and the transient walk (stolen stale locks, a fold-equal registry, an old layout) create under the mount is on the list, the end state is exactly `.engine/root-anchor.json` + `.engine/scopes.json`, every list member is produced by some path, and the contract row and the JSDoc spell the same list. `test/backlog3345-store-set-census-walk.test.ts` — the tree moving while the census reads (staged before `readdirSync` / `lstatSync` of a path): a loose directory carried into a new home, at the top and one level down ⇒ still a record; the sole record moved out of a directory not yet read into one already read ⇒ found by the second walk; a lock and a temporary appearing and going at every walk ⇒ no record; a tree moving at every read ⇒ a record; a control plane an open creates after the listing found it absent ⇒ walked again, no record. Re-pinned to the written reading: five cells of `test/backlog3172-3175-memory-deployment-judge.test.ts` write the personal layer through their own engine before they read it as a store.
142
+
143
+ ### The secret-shape detection definition lives in `@sema-agent/primitives` — one table (`CREDENTIAL_VOCABULARY`, public for the first time), one matcher (`scanSecrets` / `isSecretShaped`), one renderer (`renderSecrets`), no layer's policy inside: every caller passes its whole policy and its own marks (#3338 = #3223 S1a, ruled C-R1084 and its 加注 1; behavior change: none — the outputs of `redactSecrets`, `redactHostLeaks`, `untrustedEgressForHuman`, `boundedRedactedSummary`, `egressValue`, `detectSecret`, `looksLikeCredentialValue`, `isSecretEnvKey`, `scrubSecretEnv` and the route adjudicator's userinfo strip are byte-identical over 5,214 texts; hard-breaking: none; closed sets: +1 `SECRET_READING_KINDS` in `@sema-agent/primitives` (`raw`, `format-free`); exports: none added or removed on `@sema-agent/core`; `@sema-agent/primitives` +11 values, +19 types) (@server @cli @client-core @test)
144
+
145
+ - **Before.** The credential vocabulary (`src/core/credential-vocabulary.ts`) and the egress engine that runs it (`src/core/redaction-passes.ts`) were engine-internal modules. The table carried one policy of its own, `policy.urlUserinfo: "keep-username"`, read by the egress tier; the egress tier, the memory refuse-write face, the env scrub and the route adjudicator each composed their own reading of the table (the route adjudicator rebuilt the userinfo regex from the table module's two exported regex sources, and the egress tier built its URL regex from one of them). A layer outside the engine that wanted the same detection had to copy patterns.
146
+ - **Now.** `@sema-agent/primitives` holds the table and its readers, and core imports them by the package name — one copy in a project that installs both. Values: `CREDENTIAL_VOCABULARY`, `CREDENTIAL_MIN_CHARS`, `URL_OF_ANY_SCHEME` (the URL grammar, for a layer that withholds whole URLs), `SECRET_READING_KINDS`, `scanSecrets`, `isSecretShaped`, `renderSecrets`, `isSensitiveRecordKey`, `isSensitiveHeaderName`, `envNameView`, `splitCamelCase`. Types: `CredentialVocabulary`, `ValueFamilyRow`, `CredentialWordRow`, `CredentialWordPosition`, `EnvNameView`, `RecordKeyView`, `RedactionConfidence`, `RedactionSource`, `SecretGrade`, `SecretReading`, `SecretScanPolicy`, `SecretNotation`, `SecretScan`, `SecretSpan`, `RenderOptions`, `RedactionPass`, `RedactionFinding`, `RedactionReport`, `SummarizableFinding`. `SecretScanPolicy` (`grade`, `readings`, `urlUserinfo`, `onUnresolvedReading`) has every member required and no default; `SecretNotation` (`value`, `byKind?`, `byFamily?`, `overStrip`) is the caller's marks; a policy or notation that is not whole throws a `TypeError` (a mark is written as spelled: one holding `$` before a digit, which the engine's templates read as a group of the match, is refused); both are read on every call, and what they read as picks a compilation kept across calls (a getter member is never read once and trusted). `scanSecrets` answers `{ outcome: "spans", spans }` in the text's own coordinates or `{ outcome: "whole", reason }`. The table's `policy` member is gone: core's egress tier passes `urlUserinfo: "keep-username"` itself. The table, its arrays and its rows are frozen (its regexes are not: `replace` writes a global regex's `lastIndex`, and `RegExp.prototype.compile` rewrites even a frozen one), and the package's functions never run the exported regexes: they run copies made as the package loads, and every env-name view carries its own, so a regex a caller recompiles changes only that caller's reading (core's two load-time copies, the URL grammar and the userinfo row, are KL-3338-a). No regex source is exported: the two source constants are private, the route adjudicator reads the `url-userinfo` row, and the env-name view answers the engine-namespace rule as a regex (`anySegmentUnder(namespace)`) instead of a source string. Core's `RedactionFinding` / `RedactionReport` / `RedactionConfidence` / `RedactionSource` / `SummarizableFinding` are the package's types re-exported under the same names; `summarizeRedactions` and the report's `preexistingMarkers` count stay in core, which knows its marks. Core's marks live in `redaction-marks.ts`: `REDACTION_NOTATION` (the notation the egress tiers render with) and `WITHHELD_VALUE_MARK` (the route adjudicator's `«redacted»`, a separate constant — it is not a member of `REDACTION_MARKS`, so the recognizer of engine marks is unchanged).
147
+ - **Narrowing / widening.** None for any engine face (the byte gate above). Widening of the primitives surface by thirty names; the `whole` userinfo rendering, never selected before, is reachable through the package.
148
+ - **Consumers.** @server @cli @client-core: a layer that looks for a secret reads `scanSecrets` / `renderSecrets` with its own policy and marks instead of a copy of the patterns (for the shell, its own spellings in `cloudResources.ts` and `settingsScratchSession.ts` move to the matcher at S4; nothing changes for any consumer in this version). @client-core: the package uses no Node built-in. @test: the egress, refuse-write and env faces are unchanged; the package contract is new.
149
+ - **Pins.** `test/backlog3338-secret-primitives.test.ts` — P1 (the root's names and the engine-internal ones it does not export; no Node built-in and no import outside the folder; no string export and no string member in the env-name view; no policy in the table; the table frozen, its regexes not; a regex read off the table, the URL grammar or an env-name view and recompiled by a caller changes nothing the package or core detects; core's faces import the package), P2 (ten bad policies and nine bad notations throw `TypeError` at the matcher and the renderer; a `byFamily` that splits a pass is refused; the readings set), P3 (matcher ⇔ renderer on every value fixture; spans withheld; strict grade ⇔ `detectSecret`; core's tiers = `renderSecrets` under core's policy and notation; mark precedence; both userinfo renderings; a mutable policy, and a frozen policy or notation with getter members, re-read on every call; a mark written as spelled, `$` not before a digit literal), P4 (format-free reading, original coordinates, readings joined, the 64-slot budget), P5 (`URL_OF_ANY_SCHEME`, `anySegmentUnder` reads its namespace literally, the host tier). The moved tests read the moved modules.
150
+
151
+ ### A one-shot submission closes on the completion of a background agent that parked on an approval and was resumed by a host's decide drive — the parked cycle's debt stays on the lane it was owed to, and the redemption completes there (#3334; behavior change — an in-process parked-resume completion lands on the spawning run's lane, not the mount's own sink; hard-breaking: one, three sentences below, open to veto; closed sets: `EngineNoticeCode` +1 (`delegation.resume_lane_missing`); exports: none (two optional members on `TaskRegistry`); widening: one, narrowing: one, both open to veto; C-R1085) (@server @cli @test)
152
+
153
+ - **Before.** A one-shot (`-p`) parent waits, where it would end, for the terminal frames its lane is owed (`DeliveryObligations`, #3025). A background agent that parked on an approval sent no frame and left the spawn's debt on that lane; the host's decide drive (`execute` with `reviveClaim.parkedResume` and no `onTaskNotification` on its ctx) completed into the mount's own sink (`background.notify` — the server's relay, which re-enters the parent as an `external` frame through `TaskStream.notify`, a frame that settles no debt). Nothing settled the park's debt, and the parent waited out the 600 s print-mode ceiling after the child had finished (cli [12620] R2: 604–605 s, on 7.140.0, 7.141.0 and 7.143.0). Giving the drive the parent's lane alone would not have closed it: the drive booked a second debt for the same handle while the park's stayed, and one frame settles one (server S-3001 B2).
154
+ - **Now.** One handle, one debt. The park records on the parked handle (`TaskRegistry`, beside the stop arbitration) the sink its cycle's frame is owed to; the parked-resume handoff keeps it. A parked-resume drive is that cycle continuing: it books nothing new, and with no lane on its own call it completes into the recorded lane — the parent's laneSink, the one discharge mouth — so its frame settles the park's debt and the parent closes on it. A drive whose own call carries a lane moves the debt there when it consumes the approval (released on the park's lane, owed on the call's). Until that consume the attempt's terminal frame belongs to the park's lane (an attempt that ends failed before it — the approval consumed but the registry flip lost — settles the park's debt, not the call's). An attempt that ends before the consume without ending the cycle — rolled back, a rollback that cannot tell (`retry`), or lost to another transition — sends no terminal frame (the park, or that transition, still speaks for the cycle), and neither does one that re-parks it; from the consume on, the cycle is the attempt's own and its failure is reported. This is per attempt, so a retry of the same handle never changes what an earlier attempt sends. A drive in a process that holds no park of the handle (it parked in another process, or before this one restarted) on a call with no lane completes into the mount's own sink exactly as before, and says so once, at the consume: `delegation.resume_lane_missing` (operator; `detail: { taskId, rootSessionId? }`; delivered to the process default seat — the delegation tool holds none of its own). The resume is never refused for it. No production constant moved; the ceiling stays 600 s.
155
+ - **Narrowing / widening.** One widening, open to veto: a delegation tool mounted with no `background.notify` (the shape revive tools had before the server's relay) used to refuse a parked-resume drive `revive.no_background`; in a process that holds the park it is now admitted, because its completion has a lane to come back to (the one background admission, `admitsBackgroundLaunch`, judged over the resolved sink). One narrowing, open to veto: a parked-resume drive that rolls back, cannot tell, or loses to another transition before the consume, or that reopens the approval, no longer sends a terminal frame — it used to send `failed` (and the matching terminal event) for an agent that stayed parked or whose cycle another transition owns; the host's decide call still carries the refusal, and the agent's real completion is its one frame.
156
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* in a process that holds the park, a parked-resume drive's completion frame goes to the lane the parked cycle was owed to (a live run's queue, or — when that run has ended — the session's live lane or its parked store, the road every never-parked background agent's late completion takes), and no longer to the mount's `background.notify`. *Who is affected:* @server — its relay (`createBackgroundCompletionRelay` → the session notify door) now carries a revive completion only across processes (another replica, a restart), and its pins that assert the relay is called for an in-process park → decide → completion move (candidates by name, not run: `test/background-revival-notify-door.test.ts`, `test/parked-world.ts` callers, `test/child-park-scope-s1419.test.ts`, `test/parked-split-store.test.ts`, `test/own-tool-lists-host-lanes.test.ts` — inferred); the frame now arrives as `task_type: "background_agent"` (cap-preferred, settling the debt) where it arrived as `external`. *Compensation:* none needed in the decide leg — no signature moved (`reviveClaim`, `parkedResume`, `ParkedClaimTicket`, `ToolExecuteContext` are unchanged; `src/parked-decide.ts` / `resume-legs.ts` call exactly as today); re-pin the in-process cases to the parent lane, keep the relay pins for the cross-process shape, and read `delegation.resume_lane_missing` (by code) where the cross-process shape is pinned.
157
+ - **Rules.** The debt has one reading again: a frame owed to a lane reaches that lane, and a park does not change which lane. The redemption's extra booking is gone (the drive books nothing); the debt's move is one function (`moveTerminalDelivery`) at the one consume point, and an attempt's terminal frame follows its debt through one attempt-scoped lane (the three agent-lane terminal sites read it; a status read of the shared handle, which a later attempt can change, is not used). No `-p` case, no new public member on the stream face (a `TaskStream` member handing out the internal lane — server ① — was not taken: `notify` mints only `external` frames so an outside caller cannot speak as an internal lane).
158
+ - **Claude Code 2.1.316.** Print mode waits for background tasks per task record and its own `notified` flag (`t_` / `Gl`, `cli316.js` L288814; the ceiling `CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS` at L266924): one task, one completion owed, whatever happened to it on the way. CC has no durable park, so the park/redeem shape is this engine's; the per-handle reading is the reference's.
159
+ - **Consumers.** @server: zero wiring for the in-process case — your S-3001 ① (a stream member for the lane) and ② (no second booking) are taken inside the engine, ③ (announce, do not refuse) is the notice; re-pin as above; your cross-process wire black box (no park here ∧ relay seat ⇒ still the relay) is the case this release keeps. @cli: re-run `fix159ppark-probe-readings.mjs` (L-2289) on a server that carries this — the parent `-p` should exit within seconds of the child's completion, not at 600 s. @test (black box): `-p` + a background agent that parks + a decide ⇒ the parent closes within 1 s of the child's completion; the decide landing on another replica than the run keeps the 600 s wait (the cross-process bound, announced).
160
+ - **Pins.** `test/backlog3334-parked-resume-discharge.test.ts` — P1 real Runner: one-shot parent, background child parks, host decide drive with no lane ⇒ the parent closes < 1 s after the child's completion, the relay untouched (base: still waiting) · P2 a registry that holds no park of the handle + a relay ⇒ the relay takes the completion, the notice once, the resume proceeds · P4 an external notify carrying the child's id reaches the waiting parent and settles nothing; the real completion closes it · P5 the foreground form ends promptly · P6 the interactive form: the parent does not wait; the resumed completion reaches the session's next run, not the relay · P7 a drive with its own lane moves the debt · P8 park + lane-less drive owe exactly one frame and it settles · P10a the ceiling constant · P10b a drive tool with no relay is admitted in-process · P11 a drive rolled back before the consume sends no terminal frame and leaves the park's lane and debt in place; the next drive settles it (base: a `failed` frame for an agent still parked) · P12 the registry record · P13 a drive with its own lane that ends before the consume (checkpoint resolved, flip lost) sends its terminal frame to the park's lane, settling it; its own lane gets nothing · P14 a rollback that cannot tell sends no frame and the debt stays · P15 a failure after the consume is reported to the lane and settles it. `test/backlog1279-child-undrained-to-parent.test.ts` — the catalog 114 → 115 (one added here; the stage's #3325 removed one).
161
+
162
+ ### A background agent stopped or expired while parked on an approval tells its parent so — one `killed` / `failed` frame to the lane its park recorded, so a one-shot submission waiting on it closes (#3355; behavior change — a frame that was never sent is now sent; hard-breaking: none; closed sets: none; exports: none; members: `TaskRegistry.attachAgentTerminalNotifier`'s callback now receives one argument, a zero-argument callback is still accepted) (@server @cli @test)
163
+
164
+ - **Before.** A background agent's terminal frame came from its cycle's attempt (the unwind), or — for a running cycle the registry reaped — from the notifier the spawn lane hangs on the handle. A cycle that PARKED had no attempt left (it returned at the park), and the two terminals the registry lands on a park itself sent nothing: a `TaskStop` that won the approval's arbitration flipped the row `killed`, the parked reconciliation flipped a row whose approval expired, went missing or was decided outside the claim path `failed`. The spawn's debt stayed on the parent's lane and a one-shot (`-p`) parent waited out the 600 s print-mode ceiling; an interactive parent's next run was never told; the fleet observer never saw the row end.
165
+ - **Now.** The registry announces every terminal it lands without the cycle's attempt the same way — a reap of a running cycle, a won stop of a parked one, a parked one's expiry — through the handle's terminal notifier, once, under the one terminal once-latch every background kind's terminal takes (the attempt's own unwind claims the same latch, so a stop that wins inside a drive's window and that drive's reject leg still send one frame between them). A parked cycle's ending goes to the lane its park recorded the debt on (`parkedCompletionSink`, #3334) — not the lane of whichever attempt last held it, which an attempt that ended without its cycle (a rolled-back drive) no longer has — and settles it. The frame says what the registry knows at the transition: `status` (`killed` with its attribution, or `failed` with the reconciled reason as `error` and in the summary), `completionId`, `sessionId`, `seq` exactly as the cycle's own unwind would carry it (one function for the three senders — a retained, revived or resumed cycle carries its number, an unretained first cycle none, on every sender alike), `resumable: false` (under-claimed: the durable write is still in flight); the run's result and usage are the unwind's and stay absent. That `seq` is new on the reap frame too, for the cycles whose unwind frames carry one: without it two ended cycles of one revived handle spelled one frame key and the second settled nothing on the parent's book, and with the registry's live number instead an unretained cycle's reap frame and its late unwind's frame (after the terminal row is collected, no latch is left) would no longer fold. Both registry landings that await a store first — the won stop (its arbitration awaits the checkpoint store) and the reconciliation — land on the park as the registry holds it after the await (`heldPark`: the same id, still parked on the same approval), so a stop whose arbitration was still in flight when a decide's drive took the park over (the in-process handoff replaces the handle) lands on the handle the drive reports through, under its one latch, instead of on the replaced one. A park this process recorded no lane for (it parked in another process, or before a restart) owes nothing here and announces nothing.
166
+ - **Rules.** −1: the exception "a parked cycle's registry-landed ending is announced by no one" is gone. −1: the agent lane's two hand-kept copies of the once-latch (session reap, stale reap) retire into the latch the shell kinds use (`notifyTerminalOnce`), now the one latch for every background kind; the four sites call one function (`announceLandedAgentTerminal`). The two post-await re-checks (the stop's status check on the handle it held before the await, the reconciliation's status-and-token check on its loop handle) become one reading (`heldPark`), and the two unwind legs' copies of the cycle-number expression become one function the notifier reads too (`cycleSeqOfFrames`). Not changed: a parked-resume drive's own rollback still reports its ending itself (its attempt kept the park's lane, #3334).
167
+ - **Claude Code 2.1.316.** Stopping an agent that is not running — one that ended its turn waiting on background work of its own (`aE`, `cli316.js` L273015) — enqueues its `killed` notification at the stop itself (`VA` → `e2t({…status:"killed",killedBy})`, L273022), once by the task's `notified` flag (`t_`, L288814). CC has no durable approval park, so the park is this engine's; the shape — the stop that ends a cycle nobody else will report reports it — is the reference's.
168
+ - **Consumers.** @server: an in-process parked agent stopped through `TaskStop` or swept by `reconcileParkedAgents` now reaches the spawning run's lane (a live run's queue, or the session's lane / parked store when that run has ended — the road a running agent's late stop takes) and the background-child observer as a terminal; a pin asserting silence there re-pins — including the deny of an unrevivable card (expire + `reconcileParkedAgents`), which now delivers the reconciliation's `failed` frame (its `error` is the row's, "approval checkpoint expired while parked (reconciled)"). An expiry is announced when the reconciliation runs, so a one-shot parent's wait after a lapse is the deployment's sweep interval, not 1 s. A reaped retained, revived or resumed agent's `killed` frame now carries the `seq` its unwind's frame carries (a fold keyed `taskId:status[:seq]` reads it with the cycle's other frames; a pin asserting its absence re-pins); an unretained first cycle's stays seq-less. A park decided or swept in another process is unchanged (nothing is owed there). @cli: a `-p` run whose background agent parks and is then stopped exits within a second of the stop; one whose approval lapses exits within a second of the deployment's next parked reconciliation — not at 600 s either way. @test (black box): `-p` + a background agent that parks + `TaskStop` on it ⇒ the parent exits within 1 s on a `killed` frame; the same with the approval expired and the deployment's parked reconciliation run ⇒ a `failed` frame.
169
+ - **Pins.** `test/backlog3355-parked-child-terminal.test.ts` — S1 real Runner: one-shot parent, background child parks, `TaskStop` ⇒ the parent closes < 1 s later on `killed` (base: still waiting) · S2 the same with the approval expired + the reconciliation ⇒ `failed` · S3 exactly one `killed` frame with attribution and completion id, the lane settled, a second stop adds nothing · S4 expiry ⇒ one `failed` frame naming the reason · S5 the decided-elsewhere arm ⇒ one `failed` frame · S6 a drive that rolled back left the park standing ⇒ a later stop still reaches the park's lane · S7 a stop winning inside a drive's pre-consume window ⇒ still one frame (latch control) · S8 a completion is unchanged and a later stop adds nothing · S9 a mismatched decide rolls back with no frame, the debt owed · S10 a running child's stop is still its unwind's frame · S11 a reconciliation in a registry holding no park touches no lane; the spawner's own then announces once · S12 a park with no lane announces nothing, one with a lane once · S13 both reaps through the same announcement · S14 a cycle a decide resumed parks again, then is stopped ⇒ one `killed` frame, the lane settled · S15 a stop whose arbitration is in flight when a decide's drive takes the park over ⇒ one `killed` frame with its completion id, the live row `killed` · S17 the same for a reconciliation whose checkpoint read is in flight ⇒ one `failed` frame · S16 two parked cycles of one revived handle expire on one lane ⇒ two `failed` frames keyed apart (the revived cycle's `seq` 2), both debts settled · S18 an unretained cycle reaped, its row collected, its late unwind reporting ⇒ the two frames share one key.
170
+
171
+ ### `truncate`, `dd of=`, `install` and `ln` write the paths the shell station's model says they write — an `Edit(…)` deny row now holds them on every seat (#3330; behavior change; behavior narrowing — security, thirteen forms below and the open read face's out-of-root writes, open to veto; two widenings — `dd … of=<standard device>` and a standard device `dd if=` / `install` / `truncate -r` reads, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
172
+
173
+ - **Before.** The station's program model had no row for `truncate`, `dd`, `install` or `ln`, so their words were judged on the read face alone. With only `Edit(secrets/**)` denied, `truncate -s 0 secrets/key.txt`, `dd if=/dev/null of=secrets/key.txt`, `install src.txt secrets/key.txt` and `ln -sf src.txt secrets/key.txt` ran under `bypassPermissions`, and on the default seat were put to the ordinary question — one yes and the file was written (real bash, measured on the base).
174
+ - **Now.** Four rows in the same table, read by the same walk and judged by the same `writeTargetsOf` as every other writer; no new station.
175
+ - `truncate`: every operand is written; `-s` / `--size` take a value; `-r` / `--reference` names a file that is read.
176
+ - `dd`: `of=` names the written path (through a link: where it leads is written); `if=` names a read; without `of=` dd writes its standard output, which is no path. The table gains one column, `operands.keyed`, for `KEY=VALUE` operands; a key it does not name is an ordinary operand.
177
+ - `install`: the last operand (or `-t <dir>`) is the destination; with `-d` every operand is a directory it creates; the rest are read.
178
+ - `ln`: the last operand (or `-t <dir>`) is the destination; a source is named, not opened. A lone operand is no destination: GNU and BSD make the link in the working directory under its last segment (`ln -s dir/f` makes `./f`), which the write face judges as a copy's child is judged — one more column, `operands.loneOperand`.
179
+ - Each implementation is read as it is: GNU and BSD options per row (BSD has none of the long names, no `truncate -o`, no `install -t`, no `ln -b` / `-t`); an option a reading does not know makes that reading say every word is written.
180
+ - A row's words are read as every row's are: `dd`, `ln` and the rest were read the speculative way of a program with no row (#1102b: a word was a containment candidate only where it existed); now a word is the path it spells, and a written word meets the read face's deny rows only. For `dd` this is the reading the tables #1102 replaced gave: four entries of car A's equivalence corpus and three of car C's read as their recorded baseline again, and their seven allowed entries are removed.
181
+ - The write face's closing clause names the programs it judges from the table itself: "… the operands of flock, mkdir, touch, rm, rmdir, tee, cp, mv, truncate, install, ln, dd's of= and an in-place sed — against the write deny list …" (the hand-kept list it replaces left out `flock`).
182
+ - **Narrowing / widening.** Narrowing — security, open to veto: with an `Edit(…)` deny row on a path, a shell command that writes it through one of the four is refused `read_boundary` before it runs — on the bypass seat, and on the default seat without a question: `truncate -s 0 f`, `truncate -r ref f`, `dd if=… of=f`, `dd of=f if=…`, `install src f`, `install -d dir`, `install -d dir other`, `install src dir`, `install -t dir src`, `ln -sf src f`, `ln src dir`, `ln -t dir src`, `cd dir && ln -s ../src` (a lone operand: the link lands in `dir`). Narrowing — security, open to veto: on an `open` read face a write outside the roots through one of the four is the write face's mandated question, as `cp`'s and `mv`'s are (`dd of=/etc/passwd`, `ln -s a.txt /dev/null`; it was the ordinary question, which a pre-approval of `Bash` released); on the `roots` face it already asked the mandated question. Not narrowed: the protected path as `truncate -r`'s reference, dd's `if=`, install's source or ln's source — a lone one too, `ln -s secrets/key.txt` makes `./key.txt` (a `Read(…)` row still stops those as reads, as before). Widening, open to veto: `dd … of=/dev/null` (any standard device) is a write through the device, which the station takes without a containment question as it takes `cp a.txt /dev/null` (KL-1685-f's station half; the `roots` face asked the mandated question, the shape tier's ordinary question stays on both faces). Widening, open to veto: a standard device the four READ — `dd if=/dev/stdin of=f`, `install /dev/null f`, `truncate -r /dev/null f` — is no containment question, as `cat /dev/null`'s is not (#1685); the base read these words the speculative way and put the mandated `outside_roots` question, which a pre-approval of `Bash` does not release. A generator (`dd if=/dev/zero of=f count=1`: the table knows no byte bound for dd) still is that question. No other widening: with no deny row in play the four run, and the default seat asks for them, as before (none is in the read-only set or in `acceptEdits`'s file-command set).
183
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who protects a path with an `Edit(…)` row and expects a shell writer to respect it. *Affected:* a command that writes a write-denied path through one of the four; and three over-readings — a dd word `of=x` is also judged whole, beside its value `x`; a lone `ln` glob or other word the station cannot settle (`ln -s secrets/*.txt`) may be several operands, so it is judged as the destination too — refused under `Edit(secrets/**)` even when the glob has one match and would make `./key.txt`; an option the row does not declare, or whose effect it does not state (`install -D`, `ln -F`), makes every word written — `install -D a b` judges `a` as a write target too. *Compensation:* write through a tool the row allows, or narrow the row.
184
+ - **Consumers.** @cli, @server (embedded chain): the refusal renders as every write-face refusal, with the derived closing clause. @test (black box): under `bypassPermissions` with an `Edit(secrets/**)` row, `truncate -s 0 secrets/key.txt` is refused `read_boundary` and `secrets/key.txt`'s bytes are unchanged; the #3327 cells for `truncate` / `dd of=` / `install` / `ln -sf` move from the read-face sentence to the write-face read-row sentence.
185
+ - **Known limit.** KL-3327-a, rewritten: alias executables (`gtruncate`, `ginstall`, `gln`, …), programs with no row (`shred`, `split`, `patch`, `rsync`) and writes inside interpreters stay read-face only; a link `ln -s` / `ln` makes to a write-denied path earlier in the same command line is not followed (the station reads the line before it runs: `ln -s secrets/key.txt x && truncate -s 0 x` writes the key) — in a later call the write is judged where the link leads and is refused; a lone `ln` operand whose working directory the station does not place — a launcher that MOVES it and no relative word on the line (`env -C /abs/dir ln -s /abs/f`) — and a brace list (`ln -sf {src.txt,secrets/key.txt}`, as `rm -f {…}` today, KL-r2-e) run on bypass, as on the base; a lone glob's link name is judged by the glob's own text, so a row on the directory holds it and a row naming one file (`Edit(secrets/src.txt)` against `cd secrets && ln -s ../s?c.txt`) does not. KL-1685-f, rewritten: the shape tier still does not read `dd` as a device writer. KL-1102-k, extended to install / ln: the backup name `-b` / `--backup` / `-S` / `--suffix` writes beside the destination (BSD `install -b`: `<dest>.old`) is no write target — a deny row that names the backup and not the destination does not stop it, as for cp / mv.
186
+ - **Pins.** `test/backlog3330-writer-program-rows.test.ts` — real Runner lane, real bash, both seats, `secrets/` the witness: the twelve forms refused, nothing written · four read-only forms run (the default seat asks) and write outside · the same four refused by a `Read(…)` row · the limits pinned (a link written through in the next call refused, in the same line not; `install -D` from a write-denied source refused) · a write outside the roots through each of the four answers as `cp`'s does on both read faces and three arms · a lone `ln` operand: `ln -s secrets/key.txt` runs and makes `./key.txt`, eleven forms whose link lands in `secrets/` (`cd secrets && ln -sf ../src.txt`, a hard link, a subshell, an absolute source, `env -C secrets`, a variable set on the line, a trailing slash, `--`, `nice` in front, a one-match glob, a glob-valued variable) and a variable the shell splits into two operands refused on both seats, a one-match glob whose link lands outside refused (the over-reading), the brace limit pinned · a standard device the four read runs with `Bash` pre-approved and an approver that answers no (three forms), `dd if=/dev/zero` is the mandated question · four no-deny controls run and write · the closing clause names the table's writers · the write readings per implementation (`dd` `of=` / `if=`, `truncate -r` / `-s`, `install` / `ln` destination and `-t`, a lone `ln` operand, `install -d`). Re-pinned to the rows: `test/backlog1685-device-table-exempt.test.ts` (`ln` acts on the entry; `dd of=` a device is exempt at the station, the shape tier still asks), `test/backlog860-assignment-word-payloads.test.ts` (`dd of=/etc/passwd` is the write it is), `test/backlog1132-deny-tables.test.ts` (the writer list), the two equivalence pins' allowed entries. `test/program-read-model.binary-gate.writes.ts` — write cells for the four against real binaries, both slots (the BSD slot is listed absent on the Linux gate host, `test/skip-baseline.json` +4). `test/backlog3327-unmodelled-writer-sentence.test.ts` — the four cells moved from R to W. Mutations (receipt): the truncate row dropped, `of=` read as a read, install's destination read as a read, ln's sources read as written, the keyed column ignored by the walk, `install -d` read as writing nothing beyond its operands, ln's destination read as a read, ln's lone-operand column ignored, a lone word that expands judged neither as the destination nor as a source (and as the destination only), every launcher read as moving the working directory — each red. The binary gate's `ln` cells add a lone operand: plain, `-s`, and with a trailing slash.
187
+
188
+ ### Repo release tool: `scripts/remote-gate.sh` hands a container no database DSN unless a run names one, and gains `fetch` / `clean`, the lane label, the keepalive ssh spelling, a checked lane directory, a watchdog that leaves nothing running, and `ship --git <depth>` (#2427; behavior change: none in the package — the script is not published; hard-breaking: none; closed sets: none; exports: none) (@server @cli @sdk)
189
+
190
+ - **Before.** Every `run` container got three test-database DSNs from built-in defaults (a shared database each, a password among them written in the script), although no test or gate in this repo reads those names; `$GATE_REMOTE_DIR` was spliced unchecked into remote commands that `rm -rf` it; there was no way to copy a file back or to stop a lane's containers; ssh had no keepalive (a half-open connection hung the chain); `npm ci`'s failure was masked by a pipe to `tail`; a ship leg cut by its deadline could leave its container running on the host; the container's throwaway index skipped a tracked file that matches `.gitignore`; the container never had real history, so gates that read commits, a merge base or a tag could not pass there.
191
+ - **Now.** `run [--dsn "<names>"] <cmd>` — closed set `TIDB_TEST_URL` / `PG_TEST_URL` / `INNODB_TEST_URL`; a named DSN must come from the caller as a non-empty `GATE_<name>` (empty ⇒ `REMOTE_GATE_DSN_EMPTY`, absent ⇒ `REMOTE_GATE_DSN_ABSENT`, both exit 2 before any ssh; an unknown, repeated or multi-line one is refused too); not named, or `--dsn ""`, ⇒ the container gets none; values travel over ssh's stdin and reach the container as `-e <name>`, never in an argv or a log; the remote side prints `REMOTE_GATE_DSN handed=<names|-> skipped=<n>` after checking every named value arrived (`REMOTE_GATE_DSN_LOST` otherwise, no container). `fetch <lane-relative path> <local file>` (path closed set; the host reads the file only if it resolves inside the lane, so a symlink a container left pointing out of it ⇒ `REMOTE_GATE_FETCH_OUTSIDE`, nothing read; `.part` then rename, deadlined). `clean` stops every container carrying `sema-gate-lane=$GATE_REMOTE_DIR`, then deletes the lane and its home; cannot list or stop ⇒ non-zero, nothing deleted. `ship` stops the lane's containers before emptying it, its legs are deadlined (`GATE_SHIP_TIMEOUT_SEC`, a positive integer), a leg that fails (deadline or lost ssh) stops the lane's containers before the script exits with that leg's rc (`REMOTE_GATE_STOP_FAILED` if the stop cannot run), the container's index is exactly the shipped files (a tracked file matching `.gitignore` included), and an `npm ci` failure says `REMOTE_GATE_SHIP_NPM_CI_FAILED` and fails the ship. `ship --git <depth>` sends a shallow clone's `.git` (HEAD = the checkout's HEAD) instead of the throwaway one-commit index. One ssh spelling with `ServerAliveInterval=20` / `ServerAliveCountMax=3`. `$GATE_REMOTE_DIR` must be `/<seg>/<seg>/<name>` (segments `[A-Za-z0-9._@+-]`, no `.` / `..`, none starting with `-`; `<name>` starts with a letter or digit and does not end in `-home`): a lane owns `<name>` and `<name>-home` and nothing else, so two lanes never share or nest a directory and no lane is a shared dot-directory (`REMOTE_GATE_RDIR_INVALID`). The deadline guard no longer leaves its `sleep` running after every call.
192
+ - **Narrowing / widening.** A hand-run `run` that relied on the built-in database defaults now gets no DSN: name the database with `--dsn` and give `GATE_<name>`. An empty `GATE_REMOTE_DIR` or `GATE_SHIP_TIMEOUT_SEC` is refused instead of defaulted; so is a lane of more or fewer than three segments, or one whose name ends in `-home` or starts with `.` / `@` / `+` (every lane this repo's chain uses is `/root/ci/<name>`). Differs from the server repo's copy in two places: there a bare `run` hands every name of the closed set, here it hands none (nothing here reads them); and the lane-directory check is this copy's own (the server copy has none).
193
+ - **Consumers.** @server — same verbs, names and red codes as the server copy (fetch / clean / label / keepalive / DSN stream); the watchdog fix, the lane-directory check, fetch's in-lane resolution, the stop after a failed ship leg and the `add -A -f` index apply to the server copy's same lines. @cli — `ship --git <depth>` is the history the container's git-class gates need. @sdk — a copy of this script for the publish lane should start from this one. The stage chain's four calls name no DSN and need no change.
194
+ - **Pins.** `test/release-gate-pins.test.ts` (23 cells): fetch path closed set / success / cut transfer / real-executed links inside and out of the lane · clean by label, real-executed against a docker stub (list or stop failure keeps the lane) · label on run and ship containers · the single SSH spelling · lane directory and deadline knob refused before any ssh · watchdog leaves no sleep / timeout kills the pipeline / rc 255 passes at once · ship with and without `--git` (shallow, HEAD equal, no throwaway commit), real-executed (the index is the shipped files, a failing `npm ci` fails the ship), and a failed leg (deadline / lost ssh) stops the lane's containers · DSN unnamed ⇒ none, named ⇒ name-only argv with the value on stdin, absent / empty / unknown / repeated / newline reds, the remote side's machine line and a lost stdin, real-executed · no DSN literal in the script and no password in the pg-live run line.
195
+
196
+ ### `readMemoryLedgerForm` states its fifth outcome — a ledger it cannot read rejects with `ControlPlaneCorruptError`, never a word (#3329; behavior change: none — the contract is stated and pinned; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
197
+
198
+ - **Before.** Nothing in 7.62.0: `readMemoryLedgerForm` is new in this release (#3310, below), which states four words and, in one sentence, a rejection for a read fault. This section states the rest of the contract — the rejection's class, and that the outcomes are exactly these five.
199
+ - **Now.** The contract names the whole answer: the four words, or one rejection — `ControlPlaneCorruptError` (package root), the error the store's own open raises for the same fault, its message naming the errno and the ledger (`EISDIR` for a directory at the path, `EACCES`, `ELOOP`, an I/O error). It is not a word on purpose: `"malformed"` says the content was judged and refused, and a read fault judged nothing — a census that counted `EACCES` as malformed would report a fault of the filesystem as a finding about the store, and a transient fault would read the same as a corrupt file (the control plane's rule: a read failure is surfaced, never folded into another answer). A missing file, a missing directory and a link whose target is missing (`ENOENT`) stay `"absent"`.
200
+ - **Narrowing / widening.** None; no line of the reader changed. The JSDoc and the integration note say what it always did.
201
+ - **Choice recorded.** The card offered two forms: (a) answer `"malformed"` plus a notice carrying the errno, or (b) a coded rejection `config.memory_ledger_unreadable`. Neither was taken as written. (a) needs a notice code (the catalog just lost one) and folds a transient fault into a content verdict; (b) adds a second discriminant beside the class the store already raises for the same read fault. The server has no caller of the function yet (its S-2896 census mouth waits on this release), so no consumer shape was in the way; the typed rejection is the smaller change and the one a census can branch on without reading text. A coded string can be added on the rejection later without breaking `instanceof`.
202
+ - **Consumers.** @server (S-2896 census): treat a rejection as "could not be asked" — record it by store, do not count it as v1 / v2 / malformed. @dgx: same.
203
+ - **Pins.** `test/backlog3329-ledger-form-unreadable.test.ts` — a directory at the path (`EISDIR`), a link that names itself (`ELOOP`), a mode-000 file (`EACCES`, skipped as root): each rejects with `ControlPlaneCorruptError` naming the errno and the ledger, and answers no word · the store's own open raises the same class for the same fault · a missing file, a missing directory and a dangling link answer `"absent"` · over nine ledgers and faults the outcomes are the four words or that one class, and a bad `controlDir` is a `TypeError`.
204
+
205
+ ### The replication judge reads a key's reserved prefix as the parser does — `UserLocal:a`, `userlocal:a` and the other folded spellings of `userlocal:` never travel (#3328; behavior change — a scope key that spells `userlocal:` in a folded form is refused by a sync, including on a deployment that never opted in to v2; hard-breaking: none; closed sets: none; exports: none; narrowing: one, open to veto) (@server @dgx)
206
+
207
+ - **Before.** 7.62.0 has no `userlocal:` family and no judge of what may travel (both arrive in this release, #2970 below): `syncMemoryScope` ran for any scope a host named, and `parseScopeKey` read a key's reserved prefix by its exact text only, so `UserLocal:a`, `userlocal:a` and the other folded spellings were opaque scopes that synced like any other (#3303, below, refuses them under v2).
208
+ - **Now.** One reading of "is this key in the `userlocal:` family", `reservedPrefixOf` in `scope-contract.ts` (the judge #2970 adds first trimmed the key and compared the literal `userlocal:`, which answered "may travel" for `UserLocal:a` while the parser refuses that spelling; that comparison is gone and the 2970 pin's `UserLocal:a` cell moved from "replicable" to the family): the parser asks it for the prefix it refuses, `isReplicableScope` asks it for `userlocal`. A key whose reserved prefix is `userlocal` — exact or folded, well-formed or not — is not replicable; `syncMemoryScope` refuses it before any read or request, and `memoryTravelGapOf` lists it `local_only`. The other four prefixes' folded spellings are reserved to the parser and still replicable (the family is the one thing that does not travel), and a string the fold does not reach (`x-userlocal:a`, `userlocal` with no colon, `userlocalx:`) is an opaque scope as before.
209
+ - **Narrowing / widening.** One narrowing, open to veto. The judge reads no contract, so it also applies to a deployment that never opted in to v2: there a key spelled `UserLocal:alice` (or with a full-width colon or compatibility letters) is an opaque scope the parser leaves alone, and used to sync; it is now refused by the sync. The safe direction for a layer whose spelling says it stays on the machine; the cost is a rename for a deployment that used such a spelling for an ordinary scope.
210
+ - **Who needs it / who is affected / compensation.** *Needs it:* a user who keeps a layer local by naming it `userlocal:…` and spells it in any case or width. *Affected:* a non-v2 deployment that synced a scope whose name is a folded spelling of `userlocal:`; a v2 deployment is not (the parser refused those keys already). *Compensation:* name the scope with a spelling that is not a folded form of the prefix, or opt in to v2 and use `formatUserLocalScope` for a layer meant to stay local.
211
+ - **Consumers.** @server: the sync executor and the session memory-sync route leave a scope this judge refuses out of the layers they run (a scope list that contained such a spelling now reports it `local_only` in the travel gap); veto the narrowing if a deployment of yours spells a synced scope this way. @dgx: same, for any node-local scope naming.
212
+ - **Pins.** `test/backlog3328-replicable-scope-one-reading.test.ts` — over 14 spellings of `userlocal:`, 10 folded and exact spellings of the other four prefixes and 11 strings the fold does not reach: not replicable exactly when the parser reads `userlocal` (45 cells) · every `userlocal:` spelling is not replicable, the other four stay replicable, the look-alikes stay opaque · `syncMemoryScope` refuses three folded spellings before any read or request, the travel gap lists them `local_only` · a non-string key still throws. `test/backlog2970-userlocal-scope.test.ts` — the `UserLocal:a` cell moves from "replicable" to the family.
213
+
214
+ ### A shell write through a link that a `Read(…)` row denies gets its sentence from the face the station judged the operand on — pinned as it is, no third wording exists (#3327; behavior change: none; hard-breaking: none; closed sets: none; exports: none; known limit: KL-3327-a) (@test)
215
+
216
+ - **Before.** The 7.62.0 pass saw `truncate -s 0 link` (the link's chain passing a directory a `Read(…)` row denies) refused `read_boundary` with a sentence that was neither the #3259 read-row write sentence nor the write list's, and read it as a third wording.
217
+ - **Now.** No code changes here. There is one mint (`readDenySentence`; its two callers are the shell station and the write tools' path resolution) and two faces. The programs the station models as writers are judged on the write face and read the #3259 sentence; an operand the station judges as a read reads the read face's sentence — the one `cat link` reads: `reading "…" is refused: the requested path's spelling ("…") matches the sensitive-path read deny list (pattern "Read(…)")`. When the ticket was read, `truncate`, `dd of=`, `install` and `ln` had no row in the program model, so their operands were judged as reads and read that sentence — true of what the station did. Since #3330 (the section above) they are modelled writers and read the #3259 sentence like `cp`.
218
+ - **What the check found beside it.** An `Edit(…)` deny row alone did not stop `truncate -s 0 secrets/key.txt` or `dd of=secrets/key.txt` in a shell: the write face is not asked of an operand the model does not know to be written. #3330 gives these four programs rows; what the write face still does not judge is recorded as KL-3327-a.
219
+ - **Narrowing / widening.** None in this section (#3330 carries the narrowing).
220
+ - **Who needs it / who is affected / compensation.** *Needs it:* a reader of the 7.62.0 black-box cell who expected one wording for every write through a read-denied link. *Affected:* none. *Compensation:* none needed.
221
+ - **Consumers.** @test (black box): the `truncate` cell of the 7.62.0 pass read the read-face sentence on 7.62.0; on this release it reads the write-face read-row sentence (#3330 flipped it on purpose).
222
+ - **Pins.** `test/backlog3327-unmodelled-writer-sentence.test.ts` — real Bash over real links with `Read(mid/**)` + `Edit(mid/**)` rows: `>>`, `tee`, `cp`, `truncate`, `dd of=`, `install`, `ln -sf` carry exactly the minted write-face read-row sentence; `cat` carries exactly the minted read-face sentence · the two faces are the two branches of `readDenySentence` for one finding and differ.
223
+
224
+ ### A device id spelled into the device-move refusal is folded to one line, and a fence with no device reads "fenced to no device" (#3326; behavior change — the words of that refusal for an id that carries control characters, and for a fence that names no device; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core @test)
225
+
226
+ - **Before.** In 7.62.0 the three device receipts threw a sentence that spelled each device id into the line as the backend gave it (`this agent's placement fence names device "device-1" but its execution environment reports device "device-2" — …`; #3256, below, rewrites it in this release). An id carrying a line feed, an ESC sequence or a NUL put those characters on the `error:` line a delegating model reads (a forged `error:` line was one `\n` away).
227
+ - **Now.** Each id goes through `inlineUntrusted` (every line separator and control character, the C1 block included, folded to a space; an envelope tag defused) and is then held to the 48-character budget, head and tail, as #3256 spells it — folded first, because defusal grows a text and a cut made before it would push the id's distinguishing suffix out (two ids that differ only after an envelope tag would read the same). A very long id is folded from its two 192-character windows only, so it costs the same as a short one, and the sentence's tail (the way on, the factory clause) still survives. Unicode direction controls are not folded by the shared mint (KL-3326-a). A fence with no device reads `fenced to no device`, as the report's side already read `no device`.
228
+ - **Narrowing / widening.** None. The refusal fires on exactly the condition it fired on; an id of printable characters reads byte for byte as #3256 (below) spells it. The absent-fence arm is not reachable through the settle point or the restore check (both refuse only a fence that names a device); it is the exported function's own answer.
229
+ - **Who needs it / who is affected / compensation.** *Needs it:* the delegating model and any host that renders the child's `error:` line. *Affected:* a host or test that matched a raw control character or the word `undefined` in this sentence. *Compensation:* match the code and the way on, which did not change.
230
+ - **Consumers.** @cli, @client-core: the line renders as before for any ordinary id. @test (black box): a device id with a line break in a refused child's report is one line.
231
+ - **Pins.** `test/backlog3326-device-id-controls.test.ts` — eight hostile ids (line feed, CR, ESC sequence, NUL, C1 CSI, both Unicode separators, a forged envelope tag) in the fence, the report and both, for both codes: no control character, the code and the way on kept · a forged `error:` line stays inside the quotes · a 128-character id with breaks in its head and tail keeps both ends folded within the budget, and so does a 1 000-character one · ids that differ only after an envelope tag, after growing fence markers or after 10 000 characters of padding still read differently · the absent fence · the settle point over an environment that reports a hostile id.
232
+
233
+ ### A session whose log dropped records is told once, as `session.lineage_rerooted` — the server-minted `session.records_skipped` leaves the notice catalog (#3325; behavior change: none in this package — a catalog row and its doc entry leave; hard-breaking: one, three sentences below, open to veto; closed sets: `EngineNoticeCode` −1 (`session.records_skipped`); exports: none) (@server @sdk @client-core @cli)
234
+
235
+ - **Before.** The catalog held five server-minted rows. One of them, `session.records_skipped` (audience `user`, minter `server`), told the session user that the store had skipped records it could not read when it opened the session — the same fact the engine tells, since 7.62.0 (#1077 / #3237), as `session.lineage_rerooted` (`detail.recordsDropped` / `recordsTotal`, once per prepared leg, whether or not the branch broke). Two codes for one fact.
236
+ - **Now.** The row is gone from `ENGINE_NOTICE_CODES`, `NOTICE_AUDIENCE` and `NOTICE_MINTER`, and from the consumer-facing doc of `EngineNotice.code`; four server-minted rows remain. The server retires its own mint in its 7.144.0 (its post [12615] §3), so no producer is left; a local store that implements `getReplayLoss` makes the engine's frame carry the same count the server's frame did.
237
+ - **Narrowing / widening.** None at runtime: this engine never minted the code. `noticeAudienceOf("session.records_skipped")` now answers its default for a word the table does not hold (`"operator"`) — which matters only while a server older than 7.144.0 still sends the frame to a client built on this catalog.
238
+ - **Hard-breaking: one, three sentences (open to veto).** *What changed:* `session.records_skipped` leaves `ENGINE_NOTICE_CODES`, `NOTICE_AUDIENCE`, `NOTICE_MINTER` and the consumer-facing doc of `EngineNotice.code`, so the catalog holds one code per fact (C-R226 (a)) — `session.lineage_rerooted` — and the server's mint retires in the same wave. *Who is affected:* a consumer that spells `"session.records_skipped"` as an `EngineNoticeCode` (the union loses a member, so a `Record<EngineNoticeCode, …>` or an exhaustive switch over it stops compiling), and one that looks the code up in `NOTICE_AUDIENCE` / `NOTICE_MINTER` and finds no row; @sdk's docs and one wire-fixture test spell the code, and @client-core's `engineNoticeInCatalog` answers `false` for it from this version (a name grep of the local `origin/main` of @cli, @client-core, @sdk and @server at the time of writing found no other reader — inferred, not a build of each). *Compensation:* read `session.lineage_rerooted` (audience `user`, `detail: { break, recordsDropped, recordsTotal, leaf, entriesOnPath, sessionId, runId }`), drop the row, and require a server at or above 7.144.0.
239
+ - **Consumers.** @server: the mint retires in your 7.144.0; your reconciliation gate's `SERVER_MINT_RETIRED_CATALOG_PENDING` entry for the code goes red on this version by design (your post [12615] says its self-destruct pin fires when the row leaves) and moves to RETIRED; nothing else. @sdk: the `events.ts` note and `server-7104-wire` fixtures that spell the code become history. @client-core, @cli: no read of the code is known; `engineNoticeInCatalog` flips for it by construction.
240
+ - **Pins.** `test/backlog3325-records-skipped-retired.test.ts` — the code is in none of the three tables and no `src/` file spells it (the doc row included) · `session.lineage_rerooted` is the engine's own `user` row · the server-minted set is exactly the four that remain · `test/backlog1240-server-minted-notices.test.ts` and `test/governance-codes.test.ts` lose the row.
241
+
242
+ ### An approval binds the call's TOOL with its arguments: the park row's `boundInputHash`, the live ask's and the routed question's hash and an answer's license all digest the one record `{ tool, input }`, so a decision for one tool never matches a call of another over the same arguments under the same call id; a tool-approval row parked before this release is refused as `requirements_damaged` (#3302; behavior change — every binding hash value moves; hard-breaking: one, three sentences below, open to veto; closed sets: `RequirementWord` +1 `tool_binding`; exports: none) (@server @computer-use @client-core @test)
243
+
244
+ - **Before.** The binding hash covered the arguments alone: two parks under one `toolCallId` with the same arguments for two different tools carried one hash, so a decision echoing the first card's `(boundCallId, boundInputHash)` resumed the second card — the tool the person approved was not the tool that ran. A host reconciling a live ask against a parked row by `(toolCallId, hash)` matched the two calls likewise. @server closed it on its own side (ASKIDENT: its `askId` includes the tool name) but its resume leg compares the call id and hands the hash to the engine.
245
+ - **Now.** One digest of a call, `exactBoundInputHashOf(tool, input)` (`src/core/canonical-json.ts`: SHA-256 over the canonical form of `{ tool, input }`, the record held at depth −1 so the arguments count their nesting as when digested alone): minted at the durable park (`pendingAction.boundInputHash`), at the ask chokepoint (`AskRequest.boundInputHash`; a caller-supplied value is still dropped), on a routed question (`AskQuestionRequest.boundInputHash`) and on every engine answer record (`inputDigest`); the one license judge, `licenseCovers(licensed, tool, runs)`, compares against that call, so an answer for one tool licenses no call of another. The name is the call's own spelling (`toolName` as the row, the ask and the record carry it): no alias or case is resolved — `write_file` and `Write` bind different hashes, so a re-spelled call is another question. The resume still compares the echoed hash by string equality; nothing on the wire changes shape.
246
+ - **Now — rows across the upgrade.** A row says its hash has the new form with a new requirement word, `tool_binding` (carried by `pendingAction.boundInputHash`, so every tool-approval row this release writes declares it). A row without it — a 7.49.0–7.62.0 row (format v10 without the word) or any row below the requirements format that carries a hash — is refused by the row's judge as `checkpoint.invalid_outcome` / `requirements_damaged`, before the claim, the row left pending and byte-identical and listed with `rowVerdict` `damaged`; the diagnostic after the fixed sentence says "the pending approval's bound hash predates tool binding". A row from before the binding (no hash) is not touched by this. A 7.62.0 worker meeting a row this release writes judges it `lacking` (`version_newer`, `requires: ["tool_binding"]`).
247
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* the binding hash's encoding — every `boundInputHash` / `inputDigest` value differs from 7.62.0's, and a tool-approval row parked by an earlier release no longer resumes on this one. *Who is affected:* a deployment that upgrades with approval cards still pending — each such card's approval or denial is refused `requirements_damaged` and the card is listed `damaged` — and a mixed fleet, whose 7.62.0 workers refuse the rows a 7.63.0 worker parks (`version_newer`); a host that compares a live ask's hash with one it stored before the upgrade stops matching. *Compensation:* ask again — expire the old card (`CheckpointStore.expire`) and run the task again, or drain pending cards on the parking release before upgrading; the hash stays opaque, echoed verbatim, never recomputed by a host.
248
+ - **Rules.** One digest of a call where the license sites and the park each read the arguments' digest; the row's judge gains one arm (the binding's reading, at any row format), the requirement tables one word (their extension point).
249
+ - **Claude Code 2.1.309 / 2.1.316.** The team permission bridge binds an answer to `approved_request: { tool_use_id, tool_name, input_digest }` and refuses one whose `tool_use_id` or `tool_name` differs from the waiting call ("the leader answered X, not this Y call") or whose `input_digest` differs (`cli309.js` L261521 schema, L284168 matcher; `cli316.js` L268255, L285539): the tool's name, compared as spelled, is part of the binding there too. This engine folds it into the one opaque hash the server already echoes.
250
+ - **Consumers.** @server: the S-2246 side comparison can retire — the engine's hash covers the tool; the echo is unchanged (`resume-legs.ts` / `approval-reconciler.ts` compare opaque values); pending cards across the upgrade are the hard-breaking sentence above. The store-contract kit's fixture rows (`createCheckpointFixture`'s pending call, the canonical `listByScope` escalation row) no longer carry an input hash (`"h0"`): a row of no stated format is one from before the binding, and a hash on it would now be refused — a kit runner that read `"h0"` off the fixture reads none, and its expected summaries do not move. @computer-use: N1 "another tool ⇒ another question" is held by the engine's hash. @client-core: the hash stays opaque; a pending card listed `damaged` / `requirements_damaged` after the upgrade is this. @test (black box): one `toolCallId`, the same arguments, two tools parked ⇒ the first card's echo is refused on the second (`checkpoint.invalid_outcome`, `detail.field` `boundInputHash`), nothing runs, the row pending; a 7.62.0 approval row resumed on 7.63.0 ⇒ `requirements_damaged`, the row pending.
251
+ - **Pins.** `test/backlog3302-bound-hash-tool.test.ts` — B1 another tool under the same id and arguments refused, nothing run · B2 / B3 controls (its own echo runs; other arguments refused) · B4 the v7.62.0 row (`test/fixtures/backlog3302-v7620-row.json`) and a v9 row carrying a hash refused with the diagnostic, a pre-binding row not · B5 spellings · B6 one encoding (member order; the live ask's hash is the park row's) · B7 the row requires the word · B8 the resume's own reading of the approved bytes covers the row's tool (an unedited call is not re-judged). Mutations (receipt).
252
+
253
+ ### A call's approval binding digests the arguments' JSON form — so a call whose arguments carry a record member holding `undefined` parks a row on a JSON store that keeps its approval targets, and the live ask and the parked row bind one hash (#3331; behavior change — the binding digest of such a call; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
254
+
255
+ - **Before.** The bindable domain takes a record member holding `undefined` as legal data (`bindableValueOf`), and the capture a durable store's round trip takes drops it (`capturedJsonOf`), but the call's binding digest (`exactBoundInputHashOf`) was taken over the arguments as given, where the canonical form encodes the member as a token of its own, so `{ file_path: "/f", limit: undefined }` and `{ file_path: "/f" }` bound two digests. Such arguments come from deployment code, never from a model: a PreToolUse hook's or a policy's rewrite spelled `{ ...args, limit: cap ?? undefined }`, or a tool's own `prepareArguments` spelling an absent option as `undefined`. On a store that keeps JSON (the File store, and any store that declares `fidelity: "json"` or declares none) the park files the arguments in their stored form and binds the row's hash to it, then records where the call's target resolved only when that hash covers the live request's arguments — which, with the member still on them, it did not. Measured with a real Runner on the File store: the row carried no `targets` and no `approval_targets` requirement, and a symlink re-pointed between the approval and the resume was read at its new target instead of being refused `resume.target_moved`. The live ask's `AskRequest.boundInputHash` for that call also differed from the parked row's `boundInputHash`, so a host reconciling the two by `(toolCallId, hash)` did not match them. The in-memory store keeps the member on both sides and did not diverge. The redeem itself went through on both stores — the call was never unredeemable; what failed was the target check and the hash match.
256
+ - **Now.** `exactBoundInputHashOf` digests `{ tool, input }` with the arguments in their JSON form — the same reading as `capturedJsonOf` — at every mint (the park row's `boundInputHash`, the live ask's and the routed question's reconciliation hash, an answer's `inputDigest`) and in `licenseCovers`. A call and its JSON round trip bind one digest, so such a row records its targets and the resume's target check runs; the live ask, the File row and the in-memory row bind the same hash for the same call. The judge's copy still keeps the member — a tool reads its arguments as given — and a JSON store still files them without it. The canonical form (`canonicalize`) is unchanged: `{a: undefined}` and `{}` stay two forms for every other digest of a value — a workflow call's journal key, the rewrite judge (`sameBytes` / `readRejudge`: a rewrite that only adds or drops such a member is still a rewrite), a file rule store's checksum, a wiring fingerprint.
257
+ - **Narrowing / widening.** Widening, one: an approval's license (`licenseCovers`) now covers arguments that differ from the approved ones only by record members holding `undefined` — the arguments a JSON store, a JSON wire and an approver's card show as one. So an approver's edit that only adds such a member is the approved call (its targets are judged at the resume, a moved one vetoed `resume.target_moved`), no longer an edit of other bytes; a member holding `null` is still other bytes. The same holds for a later layer's rewrite (a hook's or a policy's `updatedInput`) that only adds or drops such a member after an answer: the answer still covers it, so the unstated question is not asked again, and the tool runs the arguments as given, the member on them — a tool that tells a member's presence from its absence (`Object.hasOwn(args, k)` rather than `args[k] !== undefined`) reads a call that the approver's card and the parked row show without it. Every call whose arguments hold no such member binds the digest #3302 gives it (the tool-bound encoding, above), byte for byte — this change adds no move of its own for such a call; against 7.62.0 every binding hash moves with #3302.
258
+ - **Rows across the upgrade.** Relative to the #3302 encoding (above), no persisted digest moves under this change; relative to 7.62.0 every binding hash moves with #3302, and every tool-approval row parked by an earlier release is refused `requirements_damaged` there. A JSON store files the arguments without the member, and the row's `boundInputHash` was already minted over that stored form; the in-memory store keeps no row across a restart; a durable store that keeps the member (one that declares `fidelity: "structured-clone"`) holds no tool-approval row from an earlier release that the new digest could mismatch, because every such row lacks the `tool_binding` requirement word and is refused `requirements_damaged` at admission, before the resumed leg's license check (#3302); workflow journal keys, rule-store checksums, row digests (`requirementsDigest`) and declaration digests read `canonicalize`, which is unchanged.
259
+ - **Claude Code 2.1.316.** The team permission bridge's `input_digest` is a SHA-256 over the tool's name and the input's text with its keys sorted, taken of the input's JSON round trip (`cli316.js` L269242, `Z6t` / `q5`), so a member holding `undefined` is absent there too (read from the code's shape: the two helpers around the input are chunk-local names, one feeding the hash a string and the other parsing it back).
260
+ - **Consumers.** @server: nothing to change for this section — it moves no persisted digest beyond #3302's (above), the hash stays opaque and echoed; a deployment whose in-process hooks, policies or tools hand the engine such arguments now gets the targets check on the rows a JSON store holds, and its reconciler's `(toolCallId, hash)` match holds for those calls. @cli: nothing to change; an approval card for such a call carries the hash its parked row carries. @test (black box): a PreToolUse hook rewriting `Read` to `{ ...args, note: undefined }` on a File-store deployment, the file a symlink re-pointed after the park ⇒ the approved resume ends `resume.target_moved`, the new target unread; the link left in place ⇒ the approved file is read.
261
+ - **Pins.** `test/backlog3331-undefined-member-digest.test.ts` — U1 the binding (one digest at the top, nested, in a list of records; a call's digest is its JSON round trip's and its capture's) · U2 the canonical form keeps the member (two forms and two value digests at any depth; an `undefined` list element or value, `null`, the text `"undefined"` distinct; the judge refuses the element and keeps the member on its copy) · U3 / U4 real Runner and File store, a hook's rewrite and a tool's own reading: the row keeps its targets, the re-pointed link is refused `resume.target_moved` and never read, the control reads the approved file · U5 a call carrying `{ note: undefined }` parks on the File store and redeems with its targets and the row's hash on the live ask · U6 the File row, the in-memory row and the live ask bind one hash · U7 the rewrite judge keeps presence · U8 three workflow journal keys as literals (a spec carrying members holding `undefined` keys as before). `test/backlog1391-approval-object.test.ts` — K2 and the license-judge cell re-pinned to this reading (an edit adding a member holding `undefined` is the approved bytes, one holding `null` is not); the #2111 exact-digest cell is taken over the capture. Mutations (receipt).
262
+
263
+ ### A file memory store's ledger form is readable without opening the store — `readMemoryLedgerForm(controlDir)` answers `"v1"` / `"v2"` / `"absent"` / `"malformed"`, read-only, through the judge the store opens its ledger by (#3310; behavior change: none; hard-breaking: none; closed sets: none; exports: +1 root function `readMemoryLedgerForm`) (@server @dgx)
264
+
265
+ - **Before.** The pre-binding (v1) form of the committed-rev ledger `revs.json` was read in one place, `file-backend.ts`, which upgrades it in place the moment the store opens; nothing outside could ask which form a store held without parsing the file itself (a second reader of the persistent format) or opening the store (which migrates it).
266
+ - **Now.** `readMemoryLedgerForm(controlDir)` (package root; `controlDir` is `FileMemoryEngineBackend.controlPlaneRoot`) answers one of four words: `"absent"` (no ledger file), `"v2"`, `"v1"` (the bare id → rev map), `"malformed"` (the file is there and the store would refuse it). It reads the file once through `parseLedgerText`, the judge the store opens its ledger by; it takes no lock and creates, upgrades and writes nothing. A file that cannot be read for any reason but its absence is no form: the call rejects, as the store's own read does. A `controlDir` that is not a non-empty string rejects with a `TypeError`. When the `v1` form retires, the answer set is `"v2"`, `"absent"` and `"malformed"`.
267
+ - **Inside the engine.** The old-writer-alive notice (a v1-format journal recovered over a ledger that is already v2) asked the ledger's form with its own lenient JSON probe; it now asks the same function the new export is built on, so there is one reading of "this ledger is v2". The one difference: a ledger that carries `v: 2` but whose rows the store would refuse no longer raises that advisory notice (the recovery's own strict read of the ledger is unchanged).
268
+ - **Narrowing / widening.** None for any caller of the store. Widening of the surface by one function.
269
+ - **Consumers.** @server (the two census tickets that wait on this export): call it with the control plane of each file memory store before constructing the backend — construction migrates a `v1` ledger — and count the `"v1"` answers; do not parse `revs.json`. @dgx (the other half of the census): the same call over each node's stores.
270
+ - **Pins.** `test/backlog3310-memory-ledger-form.test.ts` — F (absent: an empty control directory and a directory that does not exist, and a store that never committed; v2: a store's own ledger, unknown envelope and row keys tolerated; v1: the bare map; malformed: thirteen shapes the store refuses), J (the reader says `"v1"`, opening the store upgrades it and the reader says `"v2"`; a malformed ledger is refused by both; the old-writer notice is raised where the reader says `"v2"`), R (names, sizes, mtimes and bytes of the control directory unchanged after two calls, for each of the four forms; a missing directory is not created), E (a ledger path that is a directory rejects; a bad `controlDir` rejects `TypeError`), X (the root export is the leaf's).
271
+
272
+ ### A reserved scope-key prefix is reserved however it is spelled — under the v2 contract a key that reads as `user:` / `userlocal:` / `org:` / `proj:` / `userproj:` in another case, with a full-width colon, or padded with whitespace is refused, not taken for an opaque scope; the owner reading refuses it too (#3303; behavior change — a v2 key of that spelling; hard-breaking: none; closed sets: none; exports: none) (@server @dgx @test)
273
+
274
+ - **Before.** Under `scopeContract: "v2"` the prefix test was an exact-text match: `USERLOCAL:alice`, `Userlocal:alice`, `userlocal:alice` (a full-width colon) and ` org:acme` (a leading space) matched none of the five, parsed as `{ kind: "legacy" }`, and the v2 spec accepted them. The layer then carried the key syntax's name without any of its judgments — a `userlocal:` layer spelled in capitals was not held to the key syntax, and the consolidation compliance veto read `USER:alice` or ` org:acme` as the deployment's layer and asked the deployment's posture instead of the principal's or the tenant's.
275
+ - **Now.** The v2 key parser reads a key that does not carry a prefix exactly once more, by its folded spelling — surrounding whitespace dropped, compatibility forms (a full-width colon, full-width letters) made plain, case folded — and a key that then starts with one of the five prefixes is refused `config.memory_scope_key`, the sentence naming the prefix and saying the key spells it differently. It is the reserved-prefix table read one step wider, not a case for any one prefix: the rule that a recognized prefix must be well-formed now covers the spellings of the prefix. `memoryScopeOwnerOf(key, "v2")` and every other reader of the parser refuse the same keys.
276
+ - **Narrowing / widening.** Narrowing: a v2 deployment that carried such a key as an opaque scope is now refused at the door that reads the spec (a spec's own surrounding whitespace is trimmed before the key is read, so a padded key reaches the parser only through the doors that take a key as given — the owner reading, a host calling the parser). Nothing widens. *Who is affected / compensation:* a deployment that minted its keys with `formatUserScope` and the other `format*` functions never produces such a spelling; one that minted them by hand and meant a lower-case prefix reads the refusal's sentence and spells it exactly. Without the opt-in nothing changes: such strings stay opaque, byte for byte, and `isReplicableScope` — which reads the key as the engine reads a key, trimmed and case-exact, under any contract — answers as before.
277
+ - **Known limit.** Only the fold above is read: a prefix with a space before its colon (`user :alice`), a zero-width character in front of it, or another colon-like character the compatibility fold leaves alone is still an opaque key.
278
+ - **Consumers.** @server, @dgx: a v2 session whose scope list carries such a spelling is refused at prepare with `config.memory_scope_key`; a host that hands a scope string to the v2 parser or to `memoryScopeOwnerOf(key, "v2")` gets the same refusal. @test (black box): `normalizeMemorySpec({ scopes: ["USERLOCAL:alice"], scopeContract: "v2" })` throws `config.memory_scope_key`; the same list without the opt-in is accepted.
279
+ - **Pins.** `test/backlog3303-reserved-prefix-spelling.test.ts` — S (five prefixes × eleven spellings: upper case, first letter upper, full-width colon, leading space / tab / ideographic space, trailing space, both, case and full-width colon, full-width letters and colon, padded and upper case: each refused with the code and a sentence naming the prefix and the spelling, by the parser and by the owner reading; a spelling that is not padded refused by a v2 spec as a read scope and as the write scope; a padded one trimmed by the spec to the exact key), E (each exact spelling keeps its kind; fourteen keys that fold to no prefix stay `legacy`; a value that is not a string is read as it was, coerced and opaque), N (without the opt-in the spec keeps every spelling and the owner is the deployment), O (the owner reading refuses `USER:alice` / ` userlocal:alice` / `ORG:acme` under v2 and keeps its answers for the exact keys).
280
+
281
+ ### A scope segment the key syntax cannot decode is refused with the key syntax's code — a non-canonical escape (`user:%41`), a segment over 64 characters or one that is not UTF-8 carried no `code`; `decodeScopeSegment` throws `config.memory_scope_key` on all four of its refusals (#3305; behavior change — an additive `code` on four errors; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
282
+
283
+ - **Before.** `parseScopeKey` refused a malformed key with `config.memory_scope_key`, but a key whose segment passed the shape test and failed the decoder (`userlocal:%41`, `user:%41`, a 65-character segment, `user:%FF%FE`, a lone byte-order mark `user:%EF%BB%BF` — the decoder strips it and the encoder then refuses "nothing") threw a bare `Error`: no `code`, so a consumer branching on the code let that one arm through as an unclassified failure.
284
+ - **Now.** The one refusal of the key syntax is one function in `scope-contract.ts`, used by the parser and by `decodeScopeSegment`; all four decoder refusals (over-long, malformed, invalid UTF-8, non-canonical) carry `config.memory_scope_key`. A segment whose decoded text the encoder refuses (empty, after a byte-order mark) is the non-canonical refusal, the encoder's own sentence in parentheses. The other sentences are unchanged. `decodeScopeSegment` is a package-root function, so a host that calls it directly sees the code too.
285
+ - **Narrowing / widening.** None: the same inputs throw the same sentences; an `Error` that had no `code` has one.
286
+ - **Consumers.** @server, @dgx: a branch on `config.memory_scope_key` now catches the segment arm as well; nothing to change. @test: `user:%41` under a v2 spec throws `config.memory_scope_key`.
287
+ - **Pins.** `test/backlog3305-segment-refusal-code.test.ts` — D (four bad segments — non-canonical, invalid UTF-8, over-long, a lone byte-order mark — × `user` / `userlocal` / `org` through the parser and through a v2 spec; either segment of a two-segment kind; `decodeScopeSegment` itself on all four refusals and on the empty and byte-order-mark segments; control: the refusals that already carried the code keep it and a good segment decodes).
288
+
289
+ ### A device move is refused in one sentence that names the code and the way on — `config.placement_not_honored` / `resume.env_failed` for a leg whose workspace is not on the device it is fenced to (#3256; behavior change — the words of that refusal, and the sub-agent report's `error_kind` for the code is now decided; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core @test)
290
+
291
+ - **Before.** A sub-agent whose environment came up on another device than the one its placement fence names was refused, and the delegating model read `error: this agent's placement fence names device "device-1" but its execution environment reports device "device-2" — refusing to run it on another target than the one it was handed (the factory must mint on the fenced device or throw)` beside `error_kind: logic (retryable: false)`. The code was on `terminal.code` and on the card, not in the sentence the model reads, and the sentence's advice was for the factory's author, not for the model that had to act. A leg that restored or resumed a checkpointed workspace met the same fact under two other sentences (`resume workspace identity mismatch: …`), one at the settle point and one at the identity check before `resumeVM`.
292
+ - **Now.** One mint builds the sentence for all three doors of the device receipt: `<code>: refused before it ran — fenced to device "D", but the environment reports device "E" | no device. Bring the workspace back to that device or open a new workspace for this work. (The factory must mint on the fenced device or throw.)`. The code is `config.placement_not_honored` for a fresh fenced leg and `resume.env_failed` for a leg that restores or resumes a checkpointed workspace (both codes unchanged). The order is the point: the report's `error:` line is bounded at 300 characters, so the code, the two devices and the way on come first and the factory's clause last, where a cut costs the least; a device id is any string a backend mints, so one longer than 48 characters is spelled with its middle elided (head and tail kept) and the way on still fits. In the sub-agent report's `error_kind` table `config.placement_not_honored` is now a decided row (`logic`, `retryable: false` — the verdict the fall-through already gave): delegating the same work again lands on the same binding, and the way on is in the sentence.
293
+ - **Narrowing / widening.** None. The refusal fires on exactly the condition it fired on (`placementHonored`), and the provider-axis mismatch sentence (`the checkpoint records provider …`) is unchanged.
294
+ - **Who needs it / who is affected / compensation.** *Needs it:* a delegating model that is told a helper was refused for a moved workspace, and the operator reading the report. *Affected:* a host or a test that matched the old words by substring (`refusing to run it on another target`, or `resume workspace identity mismatch` on the device axis). *Compensation:* match `terminal.code` / `errorCode`, which did not change.
295
+ - **Consumers.** @cli, @client-core: the `error:` line renders as before, with the new words. @test (black box): re-read the NOT-MET cell of the 7.62.0 pass, "a child refused for a moved workspace has no actionable code" — the report's `error:` line carries `config.placement_not_honored`, both devices and `Bring the workspace back to that device or open a new workspace for this work.`; a resumed leg's `terminal.message` carries `resume.env_failed` and the same words.
296
+ - **Pins.** `test/backlog3256-device-move-sentence.test.ts` — the delegating model's report of a refused child (code, both devices, the way on, `error_kind: logic (retryable: false)`) and the control under a factory that honors the fence · the Runner's terminal of a fresh leg, the restored leg's settle point, an env naming no device, the fenced device that is no refusal, and the restore's identity check before `resumeVM` · the way on inside the report's 300 characters at two 36-character ids and at two 128-character ids (both codes, and through a refused child) · the class the code decides. Mutations (receipt): the code dropped, the way on dropped, the restore's old sentence, the class row set to `network`, the two codes swapped, the factory's clause moved ahead of the way on, the settle point refusing every leg — each red.
297
+
298
+ ### A write refused by a `Read(…)` deny row says its reads are denied — it no longer calls that row a write deny row (#3259; behavior change — the words of that refusal; hard-breaking: none; closed sets: none; exports: none; members: +1 optional `WriteDenyMatcher.guardsReads`, +1 optional `ShellReadBoundary.writeDenyGuardsReads`) (@cli @client-core @test)
299
+
300
+ - **Before.** The write face of the deny table holds the `Read(…)` rules too (a path whose reads are denied is not written either). A write refused by such a row — `echo x > link` where the link's chain passes a directory a `Read(/mid/**)` rule denies — read `writing "…" is refused: the requested path's spelling ("…/mid/hop") matches the write deny list (pattern "Read(/mid/**)"). A write deny row holds regardless of the containment roots …`: a read rule named as a write deny row, and nothing in the sentence told it from an `Edit(…)` row.
301
+ - **Now.** The matcher says which of its rows guard reads (`WriteDenyMatcher.guardsReads`), read once for a hit; both mints of the write refusal (the shell station, the write tools' path resolution) carry it to the one sentence mint. A write refused by a read row reads `writing "…" is refused: the path passes through "…/mid/hop", which the read deny row "Read(/mid/**)" denies reading — a path whose reads are denied is not written either. A read deny row holds on writes too, regardless of the containment roots and of the permission mode.` (or, where the target itself is the denied location, `the target is a path the read deny row "…" denies reading`). A write refused by a row of the write face alone (`Edit(…)`) keeps the write list's sentence word for word, and a read keeps the read list's. Which row is named when several reach the path is unchanged (the table meets them in its own order); the refusal's code (`write_path_denied`) and `pattern` are unchanged.
302
+ - **Narrowing / widening.** None: every path refused before is refused now; only the sentence changed, and only for a hit on a read row.
303
+ - **Who needs it / who is affected / compensation.** *Needs it:* a model told why a write through a link was refused — "the path's reads are denied" sends it to the right rule. *Affected:* a host or a test that matched `write deny list` in the refusal of a write that a `Read(…)` row refused. *Compensation:* match the code and the pattern, which did not change.
304
+ - **Consumers.** @cli, @client-core: the refusal renders as before, with the new words. @test (black box): re-read the NOT-MET cell of the 7.62.0 pass, "a write refusal still names the `Read(/mid/**)` row as a write deny row" — the sentence names it a read deny row and the location the path passes through; an `Edit(/mid/**)`-only policy still reads the write list's sentence.
305
+ - **Pins.** `test/backlog3259-read-row-write-sentence.test.ts` — the matcher's family answer (a Read rule, an Edit rule, a name it holds no row for) · the sentence for a write refused by a read row (through a link, reached directly), by a write row alone, and a read · real Bash over real links: `echo x > link` through a read-denied directory, a direct write under an Edit row alone and under a Read row alone, a read through the same link · the write tools' path resolution for a link chain through a read-denied directory and for an Edit row alone. Mutations (receipt): the sentence ignoring the family, the matcher answering always true and always false, the two arms swapped, the station not carrying the family, the write tools' resolution not passing it, the shell seat answering always false — each red.
306
+
307
+ ### Errata to earlier sections (the 7.59.0, 7.60.0 and 7.62.0 sections are frozen; the corrections live here)
308
+
309
+ - The #2500 section (7.59.0) said in its Consumers line that the server's `task-a2a.ts` (`a2aInjectionHonored`) "reads both words as spelled strings (`lockedConfigKeys?.includes("a2a")`, `denies.has("a2a_peers")`)". That was untrue: before this release the module read neither word. The server's 7.137.0 header (`src/task-a2a.ts:31-32`) says A2A has no operator lock and no compliance slot today and that the module therefore reads no word that does not exist; its one gate was the single-user check, and neither `a2a_peers` nor `lockedConfigKeys` occurs in that file at 7.136.0 or 7.137.0. The true reading: this release lets the module read the two words as typed members of the closed sets instead of spelling them, which is how the server's 7.138.0 does (`src/task-a2a.ts:100` `config.lockedConfigKeys?.includes(A2A_LOCK_WORD)`; `:105-106` `A2A_LOCK_WORD: LockedKey = "a2a"` and `A2A_COMPLIANCE_WORD: ComplianceCapability = "a2a_peers"`). The rest of that Consumers line stands as the instruction for the pickup, not as a description of the server's earlier code.
310
+ - The #1917 section (7.59.0) said in its Hard-breaking "Who is hurt" sentence that "@server `memory-operator-faces.ts` / `memory-compliance.ts` read `erased[].binding` and `residuals.quarantineHits`", and its Consumers line told the server to "retire the `quarantineHits` / slug reads". Untrue of the server's source: no file under its `src/` reads `erased[].binding`, `residuals.quarantineHits`, `quarantineOpaque` or `indexUncleared` (server 7.136.0 through 7.138.0). The face hands the attestation on unchanged (`src/memory-operator-faces.ts:95` at 7.138.0 types it as `MemoryErasureAttestation`; the route's header says both 200 bodies go out as they are, neither projected nor restated, `src/http/routes/memory-compliance.ts:32-35`, where `erased[].binding` appears only in that comment). The v1 shape lived in the server's tests: two fixtures spelled `residuals: { quarantineHits: [], quarantineOpaque: 0, … }` (`test/memory-compliance-http.test.ts:63` and `test/memory-operator-faces.test.ts:63` at 7.137.0; both moved to `v: 2` with the carrier table at 7.138.0) and a pin of the SDK's v1 schema (`test/producer-contract.test.ts`). So the party hurt on the server side was its fixtures and that pin, not a source read; the source needed no change.
311
+ - The #2964 / #3030 section (7.60.0) lists three narrowings and omits a fourth (#3056). A capability block whose members are not the block's own — a class instance whose capabilities are getters on its prototype, an `Object.create(proto)` block — is read as wholly undeclared: the receipt copies a block off its own members and a prototype's getters are not members (at 7.60.0: `CAPABILITY_RECEIPT_MODE` with `others: "copy"`, `src/core/remote-env.ts:666`; `receiveCapabilities`, `:679-710`; the rule, `src/core/mods/kernel/receive.ts:39-44`), the same law as a model's options (#2846) and a store's options (#2847). The engine before the change read such a getter directly (`env.capabilities.<key>`, `src/core/remote-env.ts:664`, `:682`, `:721` at 7.59.0). Now each of the eight keys is announced once as `config.execution_env_capability_invalid` (`valueType: "undefined"`), `config.cross_boundary_posture_undeclared` is announced, and the leg has no shell (measured on a real Runner, the stage before the change against the stage with it: the shell ran with no notice, now it does not; the same block with its capabilities as the instance's own fields reads as before). It is loud, never silent. The section's migration line ("none for a TypeScript adapter whose block is a plain data member") holds; for a block of the prototype form, define the eight capabilities as the block's own members. Open to veto.
312
+ - The 7.60.0 section's Exports line for `carriesCredential` (#3046) calls it "the one test the sync client and its report already use". That is true of those two readers, and it can be read as the engine's one credential judge for a text; it is not. `src/core/runner/terminal-account.ts` keeps a private function of the same name (`:81-83` at 7.60.0) with another rule, `looksLikeCredentialValue(text) || egressText("same-principal", text) !== text` and no userinfo clause, which decides which strings and member keys of a terminal failure's detail show as the redaction mark (`:131`, `:192`). The two answer differently for a URL with a bare user name: `https://alice@host.example/x` is a credential to the exported test and not to the terminal account's (both say yes with a password, a bearer form or an `sk-` key; read by calling both on the tree at this release's cut). They were two judges in 7.60.0 and remain two; taking the exported one as the single judge is #3048 (open), and it narrows the terminal detail (a bare-user-name URL is then masked there too; open to veto when it lands).
313
+ - The #3282 section (7.62.0) said a `computer-access` declaration on a schema without `apps` "is refused by the same judge as any other card", and the release criteria document's G10.a (`docs/release-criteria/7.62.0.json`) said it "is refused `config.tool_face_invalid` … and the prepare fails". The judge is the same (`toolFaceProblem`, `src/core/runner/tool-face-overlay.ts:68` at 7.62.0); the outcome follows the lane. A caller tool's declaration throws at the caller door and the prepare fails (`config.tool_face_invalid`, `src/core/runner/prepare-safety-scan.ts:199-203`). An MCP server's overlay is judged against the materialized schema at each listing: the tool is not mounted, one `config.tool_face_invalid` notice is delivered and the run completes (`src/core/runner/tool-face-overlay.ts:236-252`; the contract, `src/core/mcp-server-spec.ts:110-116`). A word outside the closed set still fails the prepare on both lanes (the MCP entry's schema-free half, `src/core/tool-face-reader.ts:123-130`). Both outcomes are loud and the difference is deliberate: a bad face on a caller tool makes the run's own tool table untrustworthy, on an MCP server it makes one tool of that server untrustworthy. Recorded as KL-3282-b; read G10.a's sentence per lane.
314
+
315
+ ### A session can work in its own tree: `TaskSpec.workspace` declares it, the first leg mints and records it once, every leg is judged against that record; `probeWorktreeCapability` / `releaseSessionCheckout`; a declared code source per repository (#2292 / #3004; behavior change — a new declaration, a delegated child whose environment stands at its caller's write location, and a task root below a managed tree on the write-protection table; hard-breaking: none; closed sets: +1 set `WorktreeIncapableReason` (7 words), +6 thrown codes; exports: +3 values `probeWorktreeCapability` / `releaseSessionCheckout` / `WORKTREE_INCAPABLE_REASONS`, +5 types `WorkspaceDeclaration` / `WorkspaceSourceDeclaration` / `WorktreeCapability` / `WorktreeIncapableReason` / `ReleasedTree`; members: +1 optional `TaskSpec.workspace`, +1 optional `workspace_changed.session`; session entry types: +1 `session_checkout`)
316
+
317
+ - **Before.** A host that wanted a session isolated from the person's checkout had to run `git worktree add` itself, hold "which tree is this session's" itself, and point every leg's environment at it — and a parked leg resumed on a fresh environment lost the tree. Nothing in the engine said where a session's code came from.
318
+ - **Now — the declaration.** `TaskSpec.workspace = { isolation?: "worktree", baseRef?, name?, sources? }`, sent on every leg (a resume config carries it like every member). One shape judge refuses a malformed one (`config.session_workspace_invalid`). `sources: [{ root: "taskRoot" | { directory }, remote, sha, ref? }]` names, per repository, the commit the session's code starts from: `remote` is normalized https (a user name, password, or a query / fragment parameter whose name reads as a credential is refused, and the refusal echoes only the origin), `sha` is a full commit id, `{ directory }` names an `additionalDirectories` entry; `isolation` is optional (a session may declare its source without a tree).
319
+ - **Now — the first leg.** Every check runs before any git write: the tree's capability (`probeWorktreeCapability`), each in-place source's commit (`git rev-parse HEAD` at that root, else `workspace.source_mismatch`), and that no writable `additionalDirectories` entry reaches into the isolated base checkout (`config.session_workspace_invalid` — writes there would land in the base checkout). Then the one managed mint makes `<repository root>/.sema/worktrees/<name>` on `sema/<name>` (at the task root's source commit when one is declared, else at `baseRef`), writes a birth record `{ allocationId, sessionId, baseSha, declared }` into the tree's private git directory, and appends ONE `session_checkout` entry at once — before the leg's first turn, so a crash or park keeps the fact. The append is conditioned on the session leaf read before the leg judged "no allocation yet": of two first legs of one session at once, one records and the other is refused (`workspace.checkout_unavailable`, or `config.session_workspace_changed` when it reads the winner's record). A tree a refused allocation already minted is removed while still clean; no record is written. A tree this session minted before a crash kept it from recording is taken back only under the same declaration (else `workspace.isolation_unavailable`, or `workspace.source_mismatch` when its commit is not the declared one). The leg's task root is the task root's place in the tree (`<tree>/pkg` for a task root in `pkg/`); every reader of the task root (read / write roots, file history, LSP, the prompt, the frame) reads it there.
320
+ - **Now — every later leg.** The same declaration ⇒ the leg runs in the tree. A different or missing declaration, a declaration that appears on a session that already ran without one, or a released record ⇒ `config.session_workspace_changed`. An own record that cannot be read (a store read that throws, a malformed own entry, two allocations) ⇒ `workspace.checkout_unavailable`. The tree gone, or the tree at its path no longer the one this allocation minted (its birth record missing or naming another allocation — a tree another session minted there since) ⇒ `workspace.checkout_missing`. A writable `additionalDirectories` entry reaching into the isolated base checkout is refused on every leg (`config.session_workspace_invalid`), not only the first. None of them falls back to the base checkout. The record is read from the whole log, never the branch (a rewind to before the allocation keeps the tree), and only an entry whose `sessionId` is the session's own counts: a fork does not inherit the checkout, and a fork that declares the parent's tree name is refused (`workspace.isolation_unavailable`, `name_in_use` — a same-name tree is reused only when its birth record is this session's, the crash-before-record case).
321
+ - **Now — release and probe.** `releaseSessionCheckout(env, session, { onExit? })` (the host's archive / delete door) removes each tree only when it is clean (no uncommitted file, no file git ignores — #3312 —, no commit past its base, state readable) and its birth record names this allocation, with `git worktree remove` WITHOUT `--force` (a write landing after the check keeps the tree); the branch goes with it only while it sits at the base commit. Everything else is kept and reported (`kept`: `dirty` · `ignored` · `commits` · `unverifiable` · `requested` · `not_owned`). `onExit` is `"keep-if-dirty"` (default) | `"keep"`; a discarding removal is not offered. The release is recorded once; calling it again re-reports. `probeWorktreeCapability(env, cwd, { name? })` answers `{ worktreeCapable, gitRoot?, reason?, detail? }`, `reason` from `WORKTREE_INCAPABLE_REASONS` judged in order.
322
+ - **Now — the frame.** `workspace_changed.session` (additive): the record's cells, one per repository — `{ repository, root, baseSha, dir?, name?, branch?, baseRef?, source? }` (`dir` / `name` / `branch` / `baseRef` present together = the session's tree; `baseRef: "source"` = minted at the declared commit). A list from the first build (multi-root sessions add entries, never change the shape).
323
+ - **Narrowing / widening.** None for a session without a declaration. A delegated child whose environment stands where its caller writes — no environment factory (the child shares the caller's environment), or a factory that rooted it at the `parentCwd` hint — now starts there: inside the session's tree, or the tree the caller entered; a caller at its task root hands that root, so the child's root is unchanged there (closes #2289's known limit for those deployments). The write-protection table reads a task root BELOW a managed tree (`<tree>/pkg`) as standing in that tree, like a task root that is one (an ordinary file in the leg's own tree is not questioned by the `.sema` row; a sibling tree still is; a `.` / `..` level below the tree answers no tree).
324
+ - **Known limits.** A bounded-tail store that has cut the first leg's entry answers `workspace.checkout_unavailable` (fail-closed; the entry is not restated at compaction, as `workspace_state` is not). Additional directories are not mapped into trees yet (multi-root, #2378): one tree per session, the task root's repository; a writable additional directory reaching into the isolated checkout is refused meanwhile, on every leg. A factory that roots a delegated child outside the session's tree is refused (#3314, the next section). The source check runs on the first leg only, and checks the commit, not the remote: `remote` is the declared provenance (that the commit was pushed there is the orchestrator's judgment). A file git ignores keeps a tree at release (#3312, below).
325
+ - **Consumers.** @server S-1950: forward `workspace` unchanged on every leg; release on archive / delete with `onExit` `"keep-if-dirty"` | `"keep"` (S-1950's `onExit: "remove"` is not offered); the probe endpoint passes through `probeWorktreeCapability`; `core-keyset-guard` gains `session`; a SQL session store that whitelists entry types stores `session_checkout`; the tree path rides the frame (no factory `worktree{repoRoot,branch,key}` seat — C-R724 Q3). @client-core CC-495 / CC-496 / CC-543: `StartSessionOptions.workspace` same shape; the frame reader takes `session`; CC-1052 produces `sources`. @web-client: a session's isolation switch disabled with the probe's reason; the session header shows `session[].dir` / `branch`. @cli: render the session's tree and branch from the frame; the leg-start frame is a snapshot (dedupe). @test (black box): two legs of one session declaring isolation both `pwd` inside `<repo>/.sema/worktrees/<name>` and the base checkout is unwritten; a changed declaration is refused before any tool runs; release on a clean tree removes it, on a dirty one keeps it.
326
+ - **Pins.** `test/backlog2292-session-checkout.test.ts` (17) — first leg mints at the repository root, records before the first turn, works in the tree, frame carries it · a later leg in the tree, a subdirectory task root keeps its place · changed / dropped / late declaration refused, no tool runs · an own unreadable record refused (with and without a declaration) · tree gone refused · fork does not inherit; a same-name fork is refused, its own name allocates · an additional directory reaching into the isolated checkout (ancestor / itself / inside) refused, one outside admitted · a static-env child starts in the tree · release: clean removed with its branch then no further leg, idempotent · dirty / commits / keep / not_owned kept, `"remove"` refused · the clean removal lets git refuse a changed tree · the probe's seven reasons and the capable answer · a refused allocation names its reason · remote screen (https only, no userinfo / credential parameter, the refusal echoes no secret; short sha, empty sources, baseRef without isolation, unknown key refused; normalization) · in-place source at / not at its commit (no record) · isolated tree minted at the source commit · all or nothing: a second root's failing source refuses before any tree. `test/backlog2292-session-checkout-ownership.test.ts` (6) — another session's tree minted at the session's path after its own was removed: refused, never worked in, the other session still works · a tree minted before a crash kept the record: taken back only at the declared commit, and a refused first leg leaves the session open · a later leg adding a directory reaching into the base checkout refused · a factory-rooted delegated child starts in the tree, the base unwritten · two first legs at once: one allocation, the loser refused and its tree removed · release on an unreadable tree path: unverifiable, untouched. `test/backlog2292-session-tree-write-protect.test.ts` (4) — a write inside the session's tree lands without a question with the task root at the repository root and at `pkg/`, the base unwritten · the tree a location sits in (nearest managed ancestor; `.` / `..` below answers none; byte-exact) · a sibling tree stays refused.
327
+
328
+ ### A delegated child of a session that works in its own tree starts inside that tree, or not at all: a factory that ignores the `parentCwd` hint is refused (#3314; behavior change — narrowing, open to veto: such a child is refused where it used to start in the base checkout; hard-breaking: none; closed sets: none; exports: none) (@server @client-core @test)
329
+
330
+ - **Before.** A session declared `workspace: { isolation: "worktree" }` and worked in its tree. It delegated a child on a deployment whose `executionEnvFactory` roots every env at the base checkout (ignoring the `parentCwd` hint it is handed): the child's root became `rootPath` — the base checkout — and it read and wrote there, with no notice. A worktree the caller offered the child, ignored the same way, ended the same way (the child's placement read "elsewhere" — the word for another namespace — although it was the same host's checkout).
331
+ - **Now.** One judgment in the child's own prepare, at the point its root is settled: when its caller's root lies in a managed tree (a session's own tree — the caller's task root is its place in the tree — or a worktree the caller itself was started in) and the child's environment did not place it where it was asked, the child's root (canonical, the spelling reading the placement judgment already uses) must be at or below that tree; otherwise the child is refused before its first turn — `workspace.isolation_unavailable`, the sentence naming `factory_ignored_hint`, where the child would have stood, where its environment stands when that differs, and the session's tree — and its environment is destroyed (a factory that handed back the deployment's shared static environment has it detached, never destroyed). The caller's tree is read on the canonical spelling of its root, so a caller started in a tree through a symlink alias or a `.`-segment spelling is bound the same way. The caller's run goes on: the Agent call answers `status: failed` with that sentence, the card's `errorCode` is the code; a workflow script's `agent()` call rejects with it. The workflow's stream lane (`ctx.agentStream`, the steerable spawn) handed its children no placement seats at all, so none of the placement readings ran there (this refusal, the worktree request's, the anchors of the rules a child placed elsewhere inherits); it now hands the same `callerRoot` / `callerCheckout` as the plain lane — one reading of the seats (`callerPlacementSeats`, not a root export) for the delegation tool and both workflow lanes. A declared sandbox off the host's disk (`hostLocalPaths: false` with `isolation: true` — the one reading the worktree request's guard already exempts by, now one named predicate `isDeclaredSandboxOffHost`, not a root export) is another namespace and is not judged.
332
+ - **Narrowing (open to veto).** Only a delegated child of a caller in a managed tree, placed by its environment outside that tree, on the host's paths or on an environment that does not declare itself a sandbox. Unchanged: a child whose environment honors the hint (byte for byte, or another spelling of the same place), a child placed anywhere inside the tree (a subdirectory included), a child of a caller with no session tree (the same factory still starts it at the base checkout), a child on a static environment (it shares the caller's).
333
+ - **Known limit.** On a deployment with a `rootPath`, a factory that roots the child in a subdirectory of the tree other than the hint still has the child's root read as `rootPath` (the existing root law: an unhonored hint does not move the root), so it is refused; without a `rootPath` its root is its environment's, inside the tree, and it starts. An explicit `cwd` the model gives a delegation is a contract the caller asked for and is judged by the deployment's root fence, as before, not by this one. The exemption believes the sandbox's declaration.
334
+ - **Consumers.** @server S-1950: the execution-environment factory must root a delegated child at `ctx.parentCwd` (or inside the session's tree) — a factory that ignores the hint now gets the child refused instead of running it in the person's checkout; to be named in the arrival post. @client-core: the failed Agent card carries `errorCode: "workspace.isolation_unavailable"`; render the sentence. @test: black box — a session with `workspace: { isolation: "worktree" }`, a factory that roots every env at the base checkout, a delegated child running `touch child.txt`: the Agent call fails with that code and `factory_ignored_hint`, and the base checkout has no `child.txt`; with a factory honoring the hint the child works in the tree.
335
+ - **Pins.** `test/backlog3314-factory-hint-floor.test.ts` — refused: the base checkout (rootPath set; card code and sentence, no turn, base and tree unwritten, the caller's run completes, no notice) · another session's tree (both places named) · an offered worktree ignored (the tree minted for the child not left behind) · a factory handing back the shared static env (refused, not destroyed) · a caller started in a tree under a symlink alias / a dotted spelling of its root · a workflow agent on the `agent()` lane and on the `agentStream()` lane · controls: hint honored (exact / alias spelling), no session checkout, a subdirectory of the tree, a declared sandbox. `test/backlog2292-session-checkout-ownership.test.ts` hint-honored cells unchanged.
336
+
337
+ ### Releasing a session's checkout keeps a tree that holds files git ignores — `kept: "ignored"` — instead of deleting them with it (#3312; behavior change — narrowing of #2292's release verb, open to veto: such a tree is kept where git's clean status alone would remove it (7.62.0 has no release verb); hard-breaking: none; closed sets: `ReleasedTree["kept"]` +1 `ignored`; exports: none) (@server @cli @test)
338
+
339
+ - **Before.** Nothing in 7.62.0: a session's own tree and the verb that releases it, `releaseSessionCheckout`, are new in this release (#2292 / #3004, above), and this is part of what that verb ships.
340
+ - **Now.** The verb removes a tree only when git calls it clean and it holds no ignored file. Git's "clean" (`git status --porcelain` empty, no commit past its base) does not see the files it ignores, and `git worktree remove` — even without `--force` — deletes them with the tree: an `.env` the person kept in the session's tree, build output, a `node_modules/` would be gone on archive, with nothing reported; and in a repository configured `status.showUntrackedFiles=no` the status read lists no untracked file either, and `git worktree remove` without `--force` removes such a tree with its untracked files too. So one status read (`git status --porcelain --ignored --untracked-files=normal` — the last flag lists untracked files whatever the repository's `status.showUntrackedFiles` says) answers both questions: a tracked change or an untracked file keeps the tree `dirty`, as before; otherwise a file or directory git ignores keeps it `ignored`, nothing moved or deleted, with `detail` naming the first five paths (and how many more) and saying to delete or move them, then release again. The release is still recorded; calling it again after the files are gone removes the tree (and its branch, at its base). `onExit: "keep"` is unchanged.
341
+ - **Narrowing (open to veto).** A tree with ignored files is not removed at release — the release verb of #2292 (above), read on git's clean status alone, would have removed it. One that has none — a tracked `.gitignore` is a tracked file, not an ignored one — is removed. `ReleasedTree["kept"]` (the union in `src/core/session-checkout.ts`, six words with `ignored`) is told in `docs/CLOSED-SETS.md` and in `docs/INTEGRATION-CORE.md`'s list.
342
+ - **Consumers.** @server S-1950 (the archive / delete release door): `kept` gains the word `ignored` (a table over the words needs the row; to be named in the arrival post); show the person `detail` and offer releasing again. @cli: render `ignored` like `dirty` (the tree's path stays on disk). @test: black box — a session tree with an ignored `.env`: release answers `kept: "ignored"`, the tree and the file are still there; delete the file and release again ⇒ removed.
343
+ - **Pins.** `test/backlog3312-release-ignored.test.ts` — an ignored `.env` kept (tree, file and branch still there), deleted ⇒ released again removes · `node_modules/` kept, named as the directory · control: a tracked `.gitignore`, clean tree removed · an untracked file beside ignored ones answers `dirty`; seven ignored files ⇒ five named and "and 2 more" · a repository configured `status.showUntrackedFiles=no`: an ignored file ⇒ `ignored`, an untracked file ⇒ `dirty`, both still on disk. `test/backlog2292-session-checkout.test.ts` release cells unchanged.
344
+
345
+ ### A first leg whose checkout record could not be written removes the tree it minted only when a read-back that succeeded proves no record names it (#3419; behavior change — narrowing: a tree that used to be removed on a read-back that failed or could not be judged is kept, and the refusal says so; hard-breaking: none; closed sets: none; exports: none) (@server @cli)
346
+
347
+ - **Before.** The first leg of a session that declared `workspace: { isolation: "worktree" }` mints the session's tree and then writes the allocation record, conditioned on the leaf it read before. When that write threw, the leg read the record back and removed the tree it had just minted unless the read-back showed a record naming this allocation. A read-back that threw, or that answered `unreadable` (the log could not be read, an own entry was not a valid record), was taken as "no record". So when the append had landed and only its acknowledgement was lost, or when a concurrent leg had taken the tree back and recorded it while this leg's own read-back failed, the tree was removed while the record still named it: the winner's next leg was refused `workspace.checkout_missing` and the session's work was gone with the tree.
348
+ - **Now.** One judgment: the minted tree is removed (while still clean, with its branch, as before) only when the read-back SUCCEEDED and no record holds the tree — none at all, or a record that neither carries this allocation nor stands a cell on the tree's directory (what is proved is about the tree, not the allocation id). A record carrying this allocation (the append landed, or a winner took the tree back), a record of another allocation whose cell stands on the tree's directory, a read-back that threw, and a read-back the reader could not vouch for all keep the tree; the leg is refused `workspace.checkout_unavailable`, and the refusal adds one sentence when the read-back could not be judged — "The allocation record could not be read back; the tree is kept at <path> (<reason>)" — or when another allocation's record names the directory — "Another record names this tree; the tree is kept at <path>". A later leg reopens the kept tree through its record, or the host releases it (`releaseSessionCheckout`). A throw out of the reader is read as the reader's own `unreadable` answer (the word every other door of this module already refuses on) — there is no second reading of "could not be read" as "not there". `appendSessionCheckout` / `readSessionCheckout` and `releaseSessionCheckout` are unchanged; nothing retries.
349
+ - **Narrowing (open to veto).** Only the first leg of a session whose record write was refused and whose read-back failed, was not judgeable, or showed a record of another allocation standing a cell on the tree's directory: the tree stays on disk until the next leg reopens it or the host releases it, where it used to be removed. A refused leg whose read-back succeeded and shows no record, or another allocation's record with no cell on the tree, is unchanged (tree and branch removed, same code, same sentence).
350
+ - **Consumers.** @server @cli: the refusal's code is unchanged (`workspace.checkout_unavailable`); its text gains the sentence above when the read-back could not be judged — show it as it is. A host that retries a refused first leg reopens the kept tree if its record landed.
351
+ - **Pins.** `test/backlog3419-checkout-undo-inconclusive.test.ts` — append landed + acknowledgement lost + read-back throws ⇒ tree and branch kept, path named, the next leg reopens it · append never landed + read-back throws / answers an invalid own entry / the reader itself throws on the entry ⇒ tree kept and named · two legs at once, the winner took the loser's tree back and recorded it, the loser's read-back throws ⇒ the winner's tree is kept and its next leg reopens it · an allocation with no tree (a declared source in place) whose read-back throws ⇒ refused, the sentence claims no tree · controls: read-back succeeds with no record ⇒ removed with its branch; succeeds with a record naming another allocation and another tree (or no tree) ⇒ removed; succeeds naming this allocation (with or without a cell on the directory) ⇒ kept, no unreadable sentence · succeeds with a record of another allocation whose cell stands on this tree's directory ⇒ kept, "Another record names this tree". `test/backlog2292-session-checkout-ownership.test.ts` winner-took-it-back cell unchanged.
352
+ - **Known limit (#3423, 7.64.0).** A read-back that SUCCEEDED and showed no record is a snapshot: between it and the removal, another leg can adopt this still-clean birth-marked tree and record it, and the removal then takes the tree the winner just recorded (nothing fences adoption against `removeManagedWorktree`). The window is the gap between two awaits of one leg; the fix shape is decided in #3423 (keep every unrecorded tree and hand it to the orphan listing of #3420, or an exclusive adoption/removal protocol). `KL-3419-a`.
353
+
354
+ ### A principal's memory layer that never leaves the store it is written in — the `userlocal:<P>` key family: personal plane, never replicated; a sync refuses it before any I/O and the travel gap lists it `local_only` (#2970 = design/2897 r1 S3, ruled C-R947 加注 2; behavior change; hard-breaking: one, three sentences below, open to veto; closed sets: `ParsedScopeKey["kind"]` +1 `userlocal`, the travel gap's `why` +1 `local_only`; exports: +2 root functions `formatUserLocalScope`, `isReplicableScope`) (@server @cli @client-core @test)
355
+
356
+ - **Before.** Every memory layer a session reads could ride a sync: `syncMemoryScope` carried any scope it was handed, and a user who wanted a note kept on this machine had no key to put it under (the quarantine is the gate's containment of refused content, not a privacy layer — it has no key and the local model does not see it either). Under the v2 contract a `userlocal:…` key parsed as an opaque legacy key: project plane, replicable.
357
+ - **Now.** `formatUserLocalScope(P)` mints `userlocal:<encoded P>` (one segment, like `user:`); under v2 `parseScopeKey` reads `{ kind: "userlocal", principal }` and refuses a malformed one (`config.memory_scope_key`; the prefix is reserved). `isReplicableScope(key)` (root) is the one replication judge: `false` for the `userlocal:` family alone — by its spelling (surrounding whitespace trimmed, as the engine reads keys), well-formed or not, under any contract. `syncMemoryScope` refuses such a scope with `config.memory_scope_key` before anything else (the store is not opened, the transport's `peer` not read, nothing posted, the scope not registered); `memoryTravelGapOf` lists it `why: "local_only"` whatever the sync did. Its plane is personal: `isPersonalScope` answers `true`, and the dual-root split, the store resolution and the in-repo placement gate (`config.memory_scope_placement`) put it with `user:` / `userproj:` / `org:` on the home mount.
358
+ - **Why the plane predicate was renamed (internal).** The task card asked the old `isCentralAuthorityScope` to answer "not central" for `userlocal:`. Its only two readers — the placement gate and the dual-root split — ask a plane question ("must this layer stay out of a repo directory?"), not an authority one; answering "not central" there would have put a `userlocal:` layer on the project plane, where it can be projected into the repo and leave the machine with every commit (the §2.7 leak shape) — the opposite of the family's promise. The two questions coincided until this family existed; `userlocal:` is where they part (plane personal, layer replicated nowhere). The predicate is now named for what its readers ask, `isPersonalPlaneScope` (not a root export; the `@contract memory.identity_absence.opaque_key` row in `docs/CONTRACT-SENTENCES.md` moved with it), and "not central" is `isReplicableScope`'s `false`. The placement gate's sentence says "personal-plane scope(s)" instead of "central-authority scope(s)". One rule more (the replication judge, the feature), none added for the split.
359
+ - **Hard-breaking: one, three sentences (open to veto).** *Who needs it:* a user who wants a memory layer used on this machine and never copied to a central store (C-R947 加注 2). *Who is affected:* a consumer that enumerates `ParsedScopeKey["kind"]` exhaustively — @server `src/memory-scope.ts:23` `V2_SCOPE_PREFIX_BY_KIND: Record<Exclude<ParsedScopeKey["kind"], "legacy">, string>` stops compiling until it carries `userlocal: "userlocal:"`; a consumer that switches exhaustively on the travel gap's `why` (none in the three repositories today: `memoryTravelGapOf` has no reader in server, cli or client-core `src/`); and a deployment that happens to use `userlocal:` as an opaque key — its sync of that layer is refused, and under v2 the key moves to the personal plane (a malformed one is refused). *Compensation:* the compile error is the list of places to update; a bad key is refused loudly, never read as another kind; server, cli and client-core hold no `userlocal` string (origin/main) and core named it only in prose, so the opaque-key case is a deployment's own data (unknown). Neither `ParsedScopeKey["kind"]` nor the gap's `why` is registered in `docs/CLOSED-SETS.md` today — an existing bookkeeping gap this change does not widen.
360
+ - **Known limit.** The judge is a replication fact about the sync, not a move of the store: a deployment whose memory backend is a central database keeps a `userlocal:` layer there, where its sessions write it. The operator export (`MemoryEngine.exportMemoryScopes`) exports a scope it is asked for by name, and a deployment that materializes a leg's layers into a remote execution environment (`materializeEntriesToFiles`) does so for that leg — neither is a sync; a host that means "this machine only" leaves the layer out of both. An older client does not refuse the key: the center's sync route refusing it too is the server's half. Whether the cloud can READ a session's travelling layers is unchanged by this entry (that waits on server S-2482 / S-626). `docs/INTEGRATION-CORE.md` §7.2a states the family once. The 7.60.0 section's known limit ("`localOnly` … lands with the key family (#2970)") is closed by `local_only`.
361
+ - **Claude Code 2.1.309.** A personal-memory key can target an excluded subtree that the memory sync keeps out (`Key targets an excluded personal-memory subtree`, `cli309.js:159901`, string level): a namespace-level exclusion, the shape this family takes. The name `userlocal:` is not the reference's.
362
+ - **Consumers.** @server: `memory-scope.ts` `V2_SCOPE_PREFIX_BY_KIND` gains the `userlocal` row (the compiler asks), so `memoryScopeContractOf` stamps v2 on a session that carries one; the sync executor and the session memory-sync route leave a scope `isReplicableScope` answers `false` for out of the layers they run (running it reports `failed` with `config.memory_scope_key`; the gap says `local_only` either way); the center's `/v2/memory/sync/:scope` route can refuse the family for clients older than this version; `project-layer-key.ts` `projectLayerOwnerOf` answers the whole key for a `userlocal:` global layer, as it did when the key was opaque. @client-core (CC-1052): the gap's `why` gains `local_only` — the layer stays on this machine by its owner's choice, not a failure to retry. @cli: a "keep this on this machine" choice is a `userlocal:<P>` scope (`formatUserLocalScope`). @test: black box — a session over a `userlocal:` layer and a project layer, the sync round's gap names the first `local_only`, and the request bodies carry none of its bytes.
363
+ - **Pins.** `test/backlog2970-userlocal-scope.test.ts`: K (format ⇄ parse round-trip; under v2 four malformed spellings refused `config.memory_scope_key`, a non-canonical escape by the decoder like `user:%41`; no opt-in stays opaque), P (`isPersonalScope` / `isPersonalPlaneScope` true; dual-root split read and write face personal; store resolution personal under v2, project without; the placement gate refuses it with "personal-plane scope(s)"), R (every other key replicable, the family never — well-formed, malformed, padded; a non-string throws), I5 (three spellings refused `config.memory_scope_key` with zero touches on a counting store and transport, ahead of a foreign cursor and of a missing transport; a replicable scope over the same counters touches both), G (`local_only` with no layer, with a layer the host ran anyway, in a refused round; other scopes keep their reasons), X (root exports are the leaf's; the plane predicate stays internal). `test/memory-scope-contract.test.ts` re-pinned to the placement gate's new sentence; `test/export-surface.snapshot.json` re-baselined (+2 root functions). Mutations (`.gate-logs/criteria-2970-mutations.md`): the replication judge always `true` ⇒ R / I5 / G red; the plane predicate dropping `userlocal` (or `isPersonalScope` dropping it) ⇒ P red; the prefix not reserved ⇒ K red; the sync judge after the store / cursor reads, or the peer read before it ⇒ I5 red; the gap reading the layer before `local_only`, or a refused round without it ⇒ G red; the judge without the trim ⇒ R / I5 padded red.
364
+
365
+ ### A session's worktree survives a read-only leg that parks: the resume leg takes the session's tree and the stored record is not cleared (#2288; behavior change — a resume whose checkpoint tracked no cwd; hard-breaking: none; closed sets: none; exports: none)
366
+
367
+ - **Before.** Leg A (a real shell) entered a worktree and settled — the session's record said `activeWorktree`. Leg B, a read-only leg (`handsReadOnly`, plan research), mounts no tracked cwd, so it stamped neither `handsCwd` nor `activeWorktree` on its checkpoint when it parked on a plan question. The approved resume (leg C, a real shell again) read that checkpoint first, skipped the stored record on every resume, ran in the base checkout, and — its baseline being "unknown" — wrote a CLEAR snapshot over leg A's record, so the next plain turn started at the root too and the tree was lost to the session (`ExitWorktree` answered no-op, the tree leaked).
368
+ - **Now.** A resume leg whose checkpoint recorded no tracked cwd takes the continuation rung like a plain turn: it reads the branch-nearest `workspace_state` record, so it stands in the tree (cwd, write location, the ExitWorktree session) and `pwd` prints the tree. A checkpoint that did track a cwd — every checkpoint a real-shell leg writes — stays first and alone, as before. A resume leg's baseline is unknown only when it read no record (a checkpoint that tracked a cwd, or no record visible on the branch): the CLEAR snapshot that retires a stale entry is still written there, and not after a leg that read the record and left it as it was.
369
+ - **Who needs it / who is affected / compensation.** *Needs it:* a session that enters a worktree, then researches read-only and asks for a plan to be reviewed (the plan-mode flow), then resumes to do the work. *Affected:* a resume of a checkpoint with no tracked cwd that lands on a session whose branch holds a non-default record — a wake of a completed session, a deployment-minted park — now starts where that record says, as the next plain turn already did. *Compensation:* none; an `ExitWorktree` ends it.
370
+ - **Known limit.** A read-only leg that itself resumes a parked real-shell leg and parks again stamps no tree on its new checkpoint, and the stored record of a leg that parked is not written at its park: the leg after it reads an older record. The slice that makes the checkpoint always carry the session's current checkout (design/1456 S1) closes it.
371
+ - **Consumers.** @cli, @test (black box): EnterWorktree → a read-only plan turn that parks (`plan_review`) → approve → the resumed turn's `pwd` is the worktree and a further plain turn still finds the tree. Nothing on the wire changes.
372
+ - **Pins.** `test/backlog2288-readonly-park-keeps-worktree.test.ts` — the ladder (the premise: the parked checkpoint holds no cwd and no tree; the resume leg's `pwd` and the next turn's `pwd` / `ExitWorktree` are the tree) · the baseline (a CLEAR record read by the resume leg is not written over again; the leg stays at the root). Mutations (receipt): the old guard on the record read turns both red; the old baseline turns the second red.
373
+
374
+ ### A delegated child is asked to work where its parent writes — the location the parent entered, not the task root — and a tree minted from inside another tree is its sibling (#2289; behavior change — `ctx.parentCwd`; hard-breaking: none; closed sets: none; exports: none; members: +1 optional `ToolExecuteContext.callerRoot`, +1 optional `RunWorkflowToolDeps.callerRoot`, +1 optional `RunWorkflowOptions.callerRoot`, +1 optional `RunInternals.callerCheckout`)
375
+
376
+ - **Before.** `ctx.parentCwd` — what a delegation tool hands the child's execution-environment factory ("the parent's effective working root, worktree-aware") — was the task root settled at prepare. A parent that had entered a worktree delegated children that landed back in the base checkout; and an isolated child that isolated its own child minted the grandchild's tree inside its own tree (#2738).
377
+ - **Now.** `ctx.parentCwd` (the Agent tool's, the Workflow mount's) is read at the call from the leg's one write-location reader: the entered tree while one is tracked, the task root — in the spelling the deployment gave it — otherwise, and back at the root after `ExitWorktree`. The task root rides beside it as `ctx.callerRoot` (`RunInternals.callerRoot`): the checkout a child's placement is judged against is the caller's, whichever tree the caller has switched to inside it, so a factory that puts an isolated child back in the caller's checkout is still refused (`isolation.unavailable`). When the caller has switched to a tree that lies outside its root (a managed tree hangs at the repository root — #2738), that tree is the caller's own as well: `RunInternals.callerCheckout` (+1 optional member, filled beside `callerRoot` only when the two differ) makes a child placed inside it a `caller_tree` placement, refused the same way. A ctx or a workflow call that names only `parentCwd` (a caller outside the Runner) takes it as its root, as before.
378
+ - **Narrowing / widening.** None for a leg that never entered a worktree: the hint is the same path in the same spelling. A factory that roots the child at the hint now roots it in the tree while the parent is in one. A deployment with no environment factory starts the child where its caller writes too (the same reading, #2292 below) — see the known limit for the factory deployments it does not cover.
379
+ - **Known limit.** A child of a parent in a tree starts at `rootPath` on a deployment that has an environment factory AND a `rootPath` when the factory roots the child somewhere other than the hint. A factory-less deployment, and a factory that roots the child at the hint, no longer have this limit (#2292: a delegated child whose environment stands at `parentCwd` roots there), and a session that declares its own tree (`TaskSpec.workspace`) has the tree as its task root.
380
+ - **Consumers.** @server: the factory context's `parentCwd` is the entered tree while the parent is in one (the same string it receives for any isolated child); nothing else changes. @client-core, @cli: none.
381
+ - **Pins.** `test/backlog2289-child-starts-at-write-location.test.ts` — the child is asked in the tree and works there, then at the root after Exit · a grandchild's tree is a sibling in the repository's managed parent, not nested · the placement is judged against the task root while the caller stands in a tree (a hint-ignoring factory is refused) · a parent rooted below the repository root, in a tree outside its root, is refused the same way (the active checkout counts) · `test/prepare-inherited-gate.test.ts` and `test/prepare-caps-and-workflow.test.ts` (the getter is read at each call; `callerRoot` does not move). Mutations (receipt): each red in at least one pin.
382
+
383
+ ### The managed worktree parent hangs at the repository root, whoever asks, and the read roots follow a tree outside the task root (#2738; behavior change — where a tree is minted for a task rooted below the repository root or inside another tree; hard-breaking: none; closed sets: none; exports: none)
384
+
385
+ - **Before.** The one worktree mint, `addWorktree`, hung `.sema/worktrees` under the root it was asked at (the caller's task root). A task rooted in a subdirectory of the repository scattered trees under that subdirectory, and a mint asked from inside a managed tree (an isolated child that isolates its own child) nested the new tree inside the old one.
386
+ - **Now.** The mint reads the repository root of the checkout it is asked at through the one repository-top reader (a root at or below a managed tree — its root, a subdirectory of it, a symlink alias of either — is first peeled to the root before the managed marker's outermost occurrence) and hangs the managed parent there — `<repository root>/.sema/worktrees/<name>`, the path law — for every caller: EnterWorktree, the delegation helper, the session opening to come. The `git worktree add` itself still runs where it was asked, so a tree minted from inside another tree starts at THAT tree's commits (its default `HEAD`), not the main checkout's. Where the reader names no root (not a repository, a linked work tree of the person's own, a submodule, a lookup the environment did not answer) the tree stays where it was asked, as before; where the repository root is the root it was asked at, nothing moves and the caller's spelling is kept. Because that tree can now lie outside the task root, the read roots follow the write location when it leaves the task root (a Read in an entered tree works under the roots face; a path outside every root is still asked), and `EnterWorktree(path)` takes back a tree whose path is a managed tree of this repository even when it lies outside the task root (a tree the session kept at `ExitWorktree` can be entered again); a registered worktree anywhere else outside the task root is still refused.
387
+ - **Old trees.** A tree an earlier build minted under a task root stays where it is and keeps working: its record carries its directory, `ExitWorktree` removes it from there, and nothing migrates.
388
+ - **Who needs it / who is affected / compensation.** *Needs it:* a delegating tree of isolated children, and a deployment whose task root is a package directory of a monorepo. *Affected:* the path of a tree minted from such a root (a structured `worktreeDir` or a sentence names a different directory; the shape is the same). *Compensation:* none needed; the path is read from the result, never composed.
389
+ - **Consumers.** @cli, @client-core: render the path the result carries. @server: none. @test (black box): EnterWorktree from a package directory names `<repository root>/.sema/worktrees/<name>`.
390
+ - **Pins.** `test/backlog2738-managed-parent-anchor.test.ts` — the unchanged top-level mint · a mint from a subdirectory · a mint from inside a tree is a sibling and the tree reads back as the repository root · a tree minted from inside another starts at that tree's commits · a mint from a subdirectory of a tree, or through a symlink alias of it, is still a sibling · a symlink alias of the root keeps its spelling · outside a repository nothing is named and git refuses loudly; `test/backlog2738-read-roots-follow-the-tree.test.ts` — a Read of a file in the entered tree works and a file outside every root is still asked · a kept tree is entered again by its path from a subdirectory task. Mutations (receipt): the mint stays where asked, the re-spelling, the missing peel — each red; the read-roots pin was red before the one-line change.
391
+
392
+ ### The consolidation state lives behind one store face on the backend — `MemoryBackend.governance` (gate rows, plans, intent credentials, the driver's run account, mint archives); the engine's consolidation reads answer through it and are async; one reading says whether that state rides the backend (#3299 = #900 ② C2a, design/900 r2; behavior change: none on the File backend — same file names, same bytes, same locks; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: −5 root names, +7 root names; members: +1 optional `MemoryBackend.governance`, +1 `FileMemoryEngineBackend.governance`, +2 `MemoryEngine.governance` / `MemoryEngine.readConsolidationDriverRun`) (@server @dgx @test)
393
+
394
+ - **The face.** `MemoryGovernanceStore` holds the five consolidation families an engine keeps: the per-scope gate rows and the plans (`transact(planIds, fn)` — `fn` runs over the whole row document and the named plans with nobody else's transaction between its reads and its writes; its staged plan writes, then its row write, land after it returns; a throw inside `fn` writes nothing; a failure while the writes land is not rolled back — the 7.62.0 behavior — and the engine never asks one transaction for a plan write and a row write together), plan custody (`quarantinePlan`), intent credentials (`recordIntents` / `readIntents`, idempotent on `requestId`), the driver's run account (`claimRun` / `readRun` / `writeRun`; a write by a superseded attempt is refused `memory.consolidation_driver_superseded` and writes nothing), and mint archives (`archiveMint` / `readMint` / `eraseMint`). A record never written reads empty; a malformed one is refused, never read as empty. The engine uses `backend.governance` when the backend carries one, otherwise `fileGovernanceStore(controlDir)` over its own control plane. `fileGovernanceStore` keeps every file name, byte and lock of 7.62.0 (`consolidation-gate.json`, `consolidation-plans/`, `consolidation-intents.json`, `distiller-runs.json`, `distiller-plans/`); `FileMemoryEngineBackend` carries it over its control plane. `memoryGovernanceStoreContract(hooks)` is the conformance kit a store passes (runner-agnostic, node:assert).
395
+ - **The reading — and what it means in this version.** `memoryGovernanceDurability(backend)` answers `"backend"` or `"replica-local"`, and it answers one question: may consolidation be armed across replicas over this backend (the multi-node refusal is told in #3300, below). **In this version its value is exactly the old predicate — `"backend"` ⇔ the backend has a non-empty string `controlPlaneRoot`.** A backend that carries `governance` but publishes no control plane still answers `"replica-local"`, because the instruction holds (each beside its captured bytes) and the default capture opt-out carrier stay in the replica's control plane; the challenge, lineage, settlement and session-account ledgers and the announcement queue ride the store's document seat once the backend carries a store (#3308 / #3307, below), and the answer turns `"backend"` for such a backend only when those two ride the store too. `createMemoryDeployment` does not ask it: it asks its own question — does the backend publish a control plane (where the scope registry and the capture records a session's memory status reads live) — and the two answers coincide on every backend today. A host that judged consolidation capability from the `controlPlaneRoot` string should ask this reading, the one that will keep answering that question.
396
+ - **Hard-breaking — one (open to veto; design/900's HB-2).** *What changed:* `MemoryEngine.readConsolidationGate`, `readConsolidationGateState`, `listConsolidationPlans` and `readConsolidationPlanFoldEvidence` return Promises; `markSessionCaptureOptOut` (type unchanged) answers its Promise arm whenever consolidation is on; five root names are removed — `readConsolidationDriverRun(controlDir, scope)` (use `engine.readConsolidationDriverRun(scope)`), `archiveDistillerPlan`, `readIntentCredentials`, `CONSOLIDATION_DRIVER_RUNS_FILE`, `CONSOLIDATION_DRIVER_PLANS_DIR`; `ConsolidationDriverEngine` gains the required `governance` member. *Who needs it:* a multi-replica deployment whose consolidation state must follow the backend — a store that keeps it in a database answers asynchronously, so the reads cannot stay synchronous. *Who is affected:* a caller of the four sync reads (now must `await`), an importer of the five names (compile error), and a host that judges capability from the `controlPlaneRoot` string (server's status endpoint, D1 and deployment object read `backendOwnsControlPlane`; dgx not checked). *Compensation:* the File backend's disk bytes are unchanged and it always carries the face, so a File deployment reads its existing state as before; the `replica-local` answer behaves exactly as today.
397
+ - **Inside the engine (no public face).** Plan application keeps its owner fence and its landing question on both store forms: a store whose `readPlan` answers synchronously is fenced inside the backend's landing lock as before; a store whose `readPlan` answers a Promise lands each patch alone with the owner re-checked before each one, and a backend that names its landings is still handed the landing question with each patch, so a collision-suffixed file is judged before it is written (`applyEachAlone`'s pre-patch hook may now be async and it can carry `admit`). A superseded driver run's refused write is tagged as a drive abort by the driver, so the run stops without settling.
398
+ - **Consumers.** @server: `boot/memory-consolidation.ts:100` imports `readConsolidationDriverRun` and `:1032` calls it by path — switch to `engine.readConsolidationDriverRun(scope)`, which is async (the `lastRun` member at `:934` is synchronous today); `backendOwnsControlPlane` (`memory-scope-stores.ts`) answers the question `createMemoryDeployment` asks (does the backend publish a control plane), which today coincides with `memoryGovernanceDurability` — keep it for that question and ask the reading for "may consolidation be armed across replicas"; a pg / mysql consolidation store implementing `MemoryGovernanceStore` and passing the kit is server's half (no DEBTS-server row names it yet — please open one). @dgx: #2611's archive erase reaches `MemoryGovernanceStore.eraseMint`. @test (black box): a File deployment upgraded from 7.62.0 keeps its consolidation state (same files, same bytes).
399
+ - **Pins.** `test/backlog900-governance-store.test.ts` — the kit over the File store and over an in-memory store (absent ≠ corrupt, fail-closed reads, transaction commit / abort, the owner fence with three racing holders, the seat CAS with four racing claims, the run claim's superseded writer, intent idempotence, custody, mint write / read / erase), the kit failing a store that interleaves its transaction (negative control), the engine's snapshot → commit → reconcile → list running on an in-memory store with no consolidation file written beside it, the File store's names and bytes, the reading's answers, the deployment face asking its own question (re-pinned under #3308), the retired root names; `test/backlog1653-consolidation-reads-write-judge.test.ts` — over a store whose plan read answers a Promise, a deny on the collision-suffixed `<name>-2.md` refuses the second product and nothing lands there (control: no deny lands it). Mutations: File plan writes unstaged · engine ignoring `backend.governance` · erase leaving bytes · a file name changed · a byte format changed — each turns its fixture red (the deployment-face mutation of the car's table is superseded: #3308 gives that face its own question).
400
+
401
+ ### An engine that declares multi-node consolidation over a backend whose consolidation state is replica-local refuses at construction — `config.memory_consolidation_replica_local` (#3300 = #900 ② C2c, ruled C-R1078 option (a); behavior change — one construction form; hard-breaking: one, three sentences below, open to veto; closed sets: none; codes: +1 `config.memory_consolidation_replica_local`; exports: none) (@server @dgx @test)
402
+
403
+ - **What it refuses.** An engine whose `consolidation` declares `multiNode: true` over a backend for which `memoryGovernanceDurability` answers `"replica-local"` refuses at construction with `config.memory_consolidation_replica_local` — the door that already refuses `multiNode` without a lease, asked after the option values are judged (a missing or malformed lease keeps its own code). Every consolidation verb reads the screened options, so the refusal closes all of them, not just the driver. The reason: a consolidation's eligibility reads the challenge, settlement and lineage ledgers and the capture opt-out records, and on such a backend they stay in the control plane of the replica that wrote them (a store that carries the governance documents takes the ledgers off the replica's disk — #3308, below — but the default capture opt-out carrier and the instruction holds stay per replica, which is why the answer stays `"replica-local"`) — a second replica would consolidate an entry the first one challenged. Single-node consolidation over the same backend constructs and behaves as before; the File backend answers `"backend"` and is admitted.
404
+ - **The reading it asks.** `memoryGovernanceDurability` (#3299, above): its value in this version is the old predicate (`"backend"` ⇔ a non-empty string `controlPlaneRoot`), and it turns for a backend without a control plane only when the instruction holds and the default capture opt-out carrier ride the store too; this refusal lifts with no host change when it does. This section moves no ledger by itself — the document seat for the four ledgers is #3308 and the announcement queue's is #3307 (below).
405
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* `consolidation.multiNode` over a replica-local backend no longer constructs. *Who needs it:* a tenant whose challenged or withdrawn memory must stay out of every replica's consolidation. *Who is affected:* a host that declares `multiNode` with a lease over a backend without a control plane — none known (server declares no `multiNode`, `boot/memory-consolidation.ts:959`). *Compensation:* the refusal names the reason and both ways out (one node, or a backend whose state rides it), and it lifts with no host change once the reading turns.
406
+ - **Consumers.** @server: multi-node consolidation over the pg / mysql twins waits on #3307 / #3308 and on a `MemoryGovernanceStore` implementation that passes the kit (please open the DEBTS-server row); until then arm consolidation on one node or not at all. @dgx: no change. @test (black box): `multiNode` + a lease over a non-File backend refuses `config.memory_consolidation_replica_local` at construction; the same options over a File backend construct.
407
+ - **Pins.** `test/backlog900-governance-two-replica.test.ts` — two replicas over one File store arm `multiNode` and an entry challenged through replica A stays out of replica B's consolidation; two replicas over one database-shaped backend (shared entries, each replica its own control plane), with and without a carried consolidation store, refuse `multiNode` with the code and the reason; single-node consolidation there constructs, and replica B's snapshot offers the entry replica A challenged (the fact the refusal fences — it turns together with the reading); a missing or malformed lease keeps its own code on both backends. Mutations: the refusal never fires · the reading turning on `backend.governance` alone · the refusal ignoring `multiNode` · the engine handing a constant instead of the reading · the File backend reading replica-local · eligibility dropping the exclusion filter · the refusal answering before the option faults — each turns its fixture red.
408
+
409
+ ### A consolidation run asks the compliance posture of the scope's OWNER first — `ComplianceCapability` gains `memory_consolidation`, the hipaa and zdr floors carry it, and the consolidation verb refuses a denied run before it reads, claims or calls a model (#3301 = #900 ③ C4, design/900 r2 §4.5, ruled C-R921 Q-900-3 (b) and C-R1080; behavior change; hard-breaking: one, three sentences below, open to veto; behavior narrowing: two, open to veto; closed sets: `ComplianceCapability` / `COMPLIANCE_CAPABILITIES` +1 word `memory_consolidation`; exports: no root name added or removed; members: +1 optional `RunMemoryConsolidationOptions.compliance`) (@server @dgx @test)
410
+
411
+ - **Before.** Nothing could veto a consolidation run on compliance grounds. A posture's deny set had no word for it, so a hipaa or zdr deployment that armed automatic consolidation (`RunnerDeps.autoRunOnRecommendation`, on by default where both seats are wired) ran it at every recommending settle and kept the run's mint archive — the model's input and output, verbatim. The only posture the engine read was the one of the run's own principal, frozen at prepare; an operator's run (a host's manual face) carries a scope and no principal.
412
+ - **Now.** `memory_consolidation` is a member of `COMPLIANCE_CAPABILITIES`. `runMemoryConsolidationDriver` takes an optional `compliance: { postureOf?, scopeContract, denies? }` and asks it once per invocation, first — before the write judge, before any read, seat, lock or model call. The posture asked is the one of the scope's owner, read in one place (`memoryScopeOwnerOf(scope, scopeContract)`, `src/core/memory-engine/scope-contract.ts`): under the v2 contract a principal's own layer (`user:` / `userlocal:` / `userproj:`) asks `postureOf` with that principal; a tenant's layer (`org:` / `proj:`) and an opaque key — every key without the v2 contract, where `user:42` is an opaque spelling — ask it with no principal, the deployment's posture. Outside the v2 contract a key spelled as a principal's layer is also asked about that principal, refuse-only (the same stored layer under `user:<P>` cannot leave P's question by a task that leaves the contract out). `denies` add the caller's own. A denial refuses `config.compliance_denied`, a seat that throws or answers an unparseable posture `config.compliance_required` (fail-closed), both as a `ConsolidationRefusedError` with nothing read or written; a bad option value refuses `config.memory_consolidation_driver`. The Runner's automatic run passes the deployment's seat (`RunnerDeps.compliancePostureResolver`), the leg's scope contract and the leg's own `complianceAdditionalDenies`; a resumed leg settles through the same tail. `deliverWriteRefusal` delivers a compliance denial as the `memory.consolidation_refused` notice it already delivered for a write-judge refusal (`detail.refusalCode` `config.compliance_denied`); a posture fault is not delivered and reaches `onError`. `BUILTIN_COMPLIANCE_DENIES.hipaa` and `.zdr` name the word.
413
+ - **Hard-breaking — one, three sentences (open to veto).** *What changed:* `ComplianceCapability` has a sixth word. *Who is affected:* a consumer that builds a `Record` or switches exhaustively over `ComplianceCapability` stops compiling until it handles `memory_consolidation` — @server `src/boot/governance-seams.ts:171` `DENY_CONFLICTS … satisfies Readonly<Record<ComplianceCapability, FaceConflict | null>>` needs the row (`null`: not a face every task of the deployment carries); cli, client-core and sdk `src/` name neither the type nor a capability word (a grep of their origin/main, not a build). *Compensation:* the compiler names the place; the new word is accepted by every array that already reads the set (a posture's `additionalDenies`, a task's `complianceAdditionalDenies`, a governed script's list), and a host that does not pass `compliance` to the verb sees no change on its operator face.
414
+ - **Behavior narrowing (open to veto).** (1) A deployment whose posture is hipaa or zdr and whose automatic consolidation is armed now has every recommending settle's run refused: in place of a run, one `memory.consolidation_refused` notice (`detail.refusalCode` `config.compliance_denied`), and the recommendation stays unconsumed, so the next recommending settle in that scope says it again — the same geometry as a write-judge refusal. (2) A posture seat that throws or answers an unparseable posture now also refuses the automatic run (`config.compliance_required`, to `onError`) where the run used to go ahead — outside the v2 contract that includes a seat that throws when asked about the principal a `user:<x>` spelling names; prepare's own fault arm was already deny-everything, and it denies the new word with no further row.
415
+ - **Known limit (KL-3301-a).** A tenant's layer is vetoed by the deployment's posture, not the tenant's: the seat is keyed by principals, and an organization's layer has none. Today server's seat answers one deployment posture for every principal, so the two readings agree; a per-subject posture would leave organization layers on the deployment's.
416
+ - **Claude Code 2.1.309.** The policy-limits table has no consolidation row; its nearest is `allow_memory_sync` (`deniedUnder: ["hipaa","zdr"]`, `cli309.js` @11882599), and auto-dream is a settings / server-flag pair (`autoDreamEnabled`, @25914305). Naming consolidation in the two floors is this engine's reading (divergence to register).
417
+ - **Consumers.** @server: `governance-seams.ts` `DENY_CONFLICTS` gains `memory_consolidation: null` (the compiler asks); the operator face (`boot/memory-consolidation.ts:1015`) passes `compliance: { postureOf: <the deployment's resolver>, scopeContract: memoryScopeContractOf(scope) }` to `runMemoryConsolidationDriver` so a manual run is vetoed by the same reading — its `deliverWriteRefusal(err, …)` call then also delivers a compliance denial as the refusal notice, and the route's code mapping meets the two compliance codes; a deployment that pins hipaa / zdr and arms automatic consolidation may want an assembly-time line (your call). @dgx: a host that calls `runMemoryConsolidationDriver` directly is vetoed only when it passes `compliance`. @test (black box): a hipaa posture + armed automatic consolidation ⇒ the settle emits `memory.consolidation_refused` with `refusalCode` `config.compliance_denied` and no run row; a `userlocal:B` layer written by principal A with a seat denying only B ⇒ refused, denying only A ⇒ runs; a throwing seat ⇒ `onError` `config.compliance_required`, no notice.
418
+ - **Pins.** `test/backlog900-consolidation-veto.test.ts` (24): K (the owner reading per kind — `user` / `userlocal` / `userproj` principal, `org` / `proj` tenant, an unprefixed key and every key without v2 the deployment; a malformed reserved key throws `config.memory_scope_key`), V (a principal's layer asks that principal and is refused before the write judge, no model call, no run row; a tenant's layer and an opaque key ask with no principal and reach the judge; the same `user:P` layer with the contract left out still asks P and is refused, a malformed spelling asks only the deployment; the deployment's posture refuses a tenant's layer; no option ⇒ no veto), F (throw / unparseable / rejected ⇒ `config.compliance_required`), D (the caller's denies), S (the set and both floors), O (six bad option values ⇒ `config.memory_consolidation_driver`), B (the bridge: denial ⇒ the notice, fault ⇒ `onError`), R (a real `Runner`: an opaque scope asks the deployment, the leg principal's posture is not the one read; a v2 `userlocal:B` layer written by principal A asks B; the leg's own denies refuse; the control settles one run). Re-pinned: `test/backlog761-auto-consolidation.test.ts` (the bridge's direct calls pass `compliance`), `test/backlog1473-task-tighten-seat-family.test.ts` and `test/prepare-caps-and-workflow.test.ts` (the closed set's word list), `test/flaky-guard.test.ts` (the new file's bounded effect poll declared). Mutations (`.gate-logs/mutations-3301.md`, per fixture): the verb never asks the owner's principal ⇒ V ×3 / B / R red; settle without the leg's contract ⇒ R (`userlocal:`) red; a fault read as allow ⇒ F / B red; the bridge dropping the option ⇒ B / R ×3 red; a tenant asked as a principal ⇒ V ×3 red; the veto after the write judge ⇒ 11 red; the floors without the word ⇒ 8 red; a denial not a notice ⇒ B / R ×3 red; the caller's denies ignored ⇒ D / R red; `userlocal:` read as the deployment's ⇒ K / V / R red; the option screen without its key check ⇒ O red; the owner read without the opt-in ⇒ K red; no spelling read outside the contract ⇒ V (contract left out) red; settle dropping the leg's denies ⇒ R red.
419
+
420
+ ### Four governance ledgers live behind the store's document seat — `MemoryGovernanceStore.readDoc(name)` / `updateDoc(name, coerce, fn)` (lineage, challenges, delegation settlements, session accounts); the engine reads and writes them only there, and the engine faces that read them are async; the instruction-hold ledger stays beside its captured bytes in the control plane (#3308 = #900 ② C2c-β, ruled C-R1078 K2 and its 加注 1 option A / 加注 2 option a; behavior change: none on the File backend — same file names, same bytes, same locks, same journals; hard-breaking: one, three sentences below, open to veto; closed sets: +1 `MemoryGovernanceDocName` (four names); codes: +2 `memory.governance_doc_unknown`, `memory.control_plane_rebuild_unsupported`; exports: none; members: +2 required `MemoryGovernanceStore.readDoc` / `updateDoc`, +1 `governance` on the seat `ToolExecuteContext.delegationSettlement()` answers) (@server @dgx @test)
421
+
422
+ - **The seat.** `readDoc(name)` answers the document as last committed — `undefined` when it was never written, a refusal (never `undefined`) when what is stored cannot be read. `updateDoc(name, coerce, fn)` hands the stored document to `coerce`, the coerced value to `fn`, and commits `fn`'s `next` with no other update of the same name between the read and the commit; no `next` writes nothing, a throw in `coerce` or `fn` writes nothing and reaches the caller unchanged, and the call answers `fn`'s `result`. `fn` is synchronous; what a document means — its shape check and its fold — stays in core, the store only keeps it. A name outside the four is refused `memory.governance_doc_unknown`, never given storage of its own. `fileGovernanceStore` answers both over the 7.62.0 files with the 7.62.0 lock-and-journal protocol (`lineage.json`, `challenges.json`, `delegation-settlement.json`, `session-accounts.json`; same JSON form). The engine keeps the four documents in `backend.governance` when the backend carries one, otherwise in `fileGovernanceStore(controlDir)` over its own control plane — the 7.62.0 place.
423
+ - **What stays in the engine's control plane on every store.** The instruction-hold ledger (`holds.json`): a hold row and its captured bytes are one record, and the bytes (the custody copy, the quarantine) are files there, so the row stays beside them rather than becoming a second home for one record; on several replicas each replica's holds are its own, the same reading the multi-node consolidation refusal (#3300) already gives — `memoryGovernanceDurability` still answers `"backend"` only for a backend that publishes its control plane, so that refusal's meaning does not change. Moving the bytes into the store is #3311. Also unchanged: the projection-debt, origin-clearance, layer-observation and erasure-sweep records, the session pollution markers, the scope registry and the announcement queue (#3307).
424
+ - **The kit.** `memoryGovernanceStoreContract(hooks)` gains the document cases: a never-written document reads `undefined` and its first update is handed `undefined`; each name is its own storage (no alias, no lost write); answers are copies; a throw writes nothing; a malformed document is refused by both members and never reaches `coerce` as missing; eight racing updates of one name all land; a name outside the four is refused. `hooks.corrupt` is handed the four names as well.
425
+ - **What the reading answers, and the deployment's own question.** `memoryGovernanceDurability(backend)` answers one question — may consolidation be armed across replicas over this backend. Its value is unchanged: a backend that carries `governance` but publishes no control plane still answers `"replica-local"`, because the instruction holds and the default capture opt-out carrier are still kept in the replica's control plane (the announcement queue rides the store since #3307, below). `createMemoryDeployment` now asks its own question — does the backend publish a control plane (`controlPlaneRoot`), where the scope registry and the capture records a session's memory status reads are kept — instead of the reading; the two answers coincide on every backend, so no deployment is admitted or refused differently.
426
+ - **The rebuild stays a File operation.** `rebuildCorruptControlPlaneLedger` quarantines a corrupt ledger's bytes beside its file, so it runs only when the engine's governance store is a File store; over another store it refuses `memory.control_plane_rebuild_unsupported` before it announces anything, and the host recovers the document through the store that keeps it.
427
+ - **A pollution mark's sweep is held until it lands.** The retroactive challenge sweep a pollution mark starts is awaited by the mark and also held by the engine: `readChallengeExclusions` waits for every sweep already started, so a tool lane that marks without waiting still reads that mark's challenges on its next memory read.
428
+ - **Hard-breaking — HB-3 (open to veto).** *What changed:* `MemoryGovernanceStore` gains two required members, `readDoc` and `updateDoc`; thirteen `MemoryEngine` methods return Promises — `readChallengeExclusions`, `markSessionPolluted`, `challengeEntries`, `challengeSession`, `resolveChallenge`, `adjudicatePendingLineage`, `listPendingLineage`, `readChallengeLedger`, `endSessionLeg`, `resolveSettlement`, `resolveSessionAccount`, `readDelegationSettlements`, `readDanglingSessionAccounts` — and a refusal they threw synchronously is now a rejection (a `challengeEntries` without `requestId` rejects `config.memory_challenge_request`); `rebuildCorruptControlPlaneLedger` answers a Promise as well (it refuses over a non-File governance store; its announcement is a document update through the same seat — #3307's HB-2, below); `resolveHold` and `readInstructionHolds` stay synchronous; the seat `ToolExecuteContext.delegationSettlement()` answers `{ governance, controlDir, sessionId }` (was `{ controlDir, sessionId }`; the two old members are unchanged, and a seat without `governance` refuses the background launch it guards). *Who needs it:* a multi-replica deployment whose challenged entries must stay withheld on every replica, and whose lineage, settlements and session accounts must follow the backend — a store that keeps them in a database answers asynchronously, so the ledgers' reads cannot stay synchronous. *Who is affected:* a store written against the #3299 face (above; it must add the two members and pass the kit — server's pg / mysql store, not yet begun), a caller of the thirteen methods or of the rebuild (must `await` them — server's origin/main has no call site), a tool or host that builds `ctx.delegationSettlement()` (one member more), a host calling the rebuild over a backend whose `governance` is not a File store. *Compensation:* the File backend's disk bytes are unchanged and it carries the File store, so a File deployment reads its existing ledgers as before; a backend without `governance` keeps them where 7.62.0 kept them; the hold faces keep their 7.62.0 types.
429
+ - **Inside the engine (no public face).** Every ledger read and write of the four is awaited, including a delegation's settle on the subagent lane; the plane's challenge-exclusion read and a memory session's release are async; a session-account ledger in the v1 key form is converted through the seat on its first read, as before, and the File layout migration still converts it and the hold ledger under its registry lock; the File backend's export fence probe may be async (test seam). Two consequences, told in the reading of the #3299 section (above): `createMemoryDeployment` asks its own question, not `memoryGovernanceDurability`, and the challenge / lineage / settlement / session-account ledgers do not stay in the per-replica control plane when the backend carries a store.
430
+ - **Consumers.** @server: a pg / mysql `MemoryGovernanceStore` implements `readDoc` / `updateDoc` and passes the kit. **Switching a backend that already runs to a store that carries `governance` moves the four ledgers off the replica's disk: what each replica wrote under its control plane (`lineage.json`, `challenges.json`, `delegation-settlement.json`, `session-accounts.json`) is not read any more unless the host imports it first** — `fileGovernanceStore(<that control plane>).readDoc(name)` reads each one; merging several replicas' copies (challenge events by `eventId`, rows by their ids) is the host's step, core does not merge. A challenge not imported stops withholding its entry. @dgx: #2611's archive erase is unchanged (`eraseMint`); dgx not checked for the thirteen methods. @test (black box): a File deployment upgraded from 7.62.0 keeps its challenges, pending lineage, settlements, session accounts and holds (same files, same bytes).
431
+ - **Pins.** `test/backlog3308-governance-doc-seat.test.ts` — the kit over the File store and over an in-memory document store; the kit refusing six defective stores (one storage for every name, a dropped write, a read-yield-write interleave, malformed read as missing, a name outside the four given storage, an answer that is the stored object); each document at its 7.62.0 file name in the strict primitive's bytes with no journal or lock left; the journal law (a committed journal reads, a torn one refuses); a name outside the four — `holds` among them — refused and never a file; two engines over one store reading each other's challenge, pending lineage and delegation row with no ledger file in either control plane; the rebuild refused over a non-File store before any announcement, and the File leg still answering; a hold over a non-File store landing in the control plane beside its custody, read there, never in the store; a pollution mark nobody awaits, over a store that answers late, still withholding the session's entry on the next exclusion read. `test/backlog900-governance-store.test.ts` — the in-memory store carries the documents, the File kit corrupts them, the deployment face asks its own question. `test/backlog900-governance-two-replica.test.ts` — without a store replica B does not see replica A's challenge, with one it does and withholds the entry, and the reading still answers `"replica-local"`. Forty-odd test files follow the async faces (mechanical). Mutations: see the receipt.
432
+
433
+ ### The memory notice queue is the store's fifth governance document — `announcements`, on the same seat and under the same law as the other four; the engine files every notice through it and `MemoryEngine.inject` reads it asynchronously (#3307 = #900 ② C2c-α, ruled C-R1078 K2, its 加注 1 and 加注 3 Q1 (A) / Q2 (i); behavior change: none on the File backend for a readable queue — same file name, same bytes; behavior narrowing: two, below, open to veto; hard-breaking: four, three sentences each below, open to veto — `MemoryEngine.inject` answers a Promise, `MemoryEngine.rebuildCorruptControlPlaneLedger` answers a Promise, the three root queue faces change shape, `MemoryGovernanceDocName` +1; closed sets: `MemoryGovernanceDocName` +1 `announcements` (five names); codes: none; exports: +1 root value `MEMORY_GOVERNANCE_DOC_NAMES`, +2 root types `MemoryGovernanceDocName` / `MemoryGovernanceDocs`; members: −1 `ConsolidationDriverEngine.controlPlaneRoot`) (@server @dgx @cli @client-core @test)
434
+
435
+ - **The document.** The queue (per scope: its lines, its fold count; the bound `MEMORY_ANNOUNCEMENTS_MAX` per scope; a standing condition's `supersedesPrefix` sweep) is the governance document `announcements`. What it means stays in core: its shape check (`coerce`: a record of the wrong shape reads as an empty queue and its discarded lines are counted once) and every rule of the queue run inside `updateDoc`'s `fn`; the store only keeps the document. `fileGovernanceStore` keeps it at `announcements.json` with the 7.62.0 bytes (two-space JSON and a newline, the same record form `v: 2`), so a File deployment reads a queue its 7.62.0 engine left. The engine keeps it where it keeps the other four — `backend.governance` when the backend carries one, otherwise `fileGovernanceStore(controlDir)` — and the File backend files its own store notices into its own `governance`, the same document its engine drains.
436
+ - **One law for the five names.** The File store keeps the queue through the strict lock-and-journal protocol of the four ledgers. Every place that files a notice is still fail-open: a refused write is disclosed (`memory.announce_failed`, with the stage) and the operation that had something to say goes on; `inject` still delivers the injection when the drain is refused, and the notices stay queued.
437
+ - **Behavior narrowing — a damaged queue file (open to veto @server @dgx).** Before: an `announcements.json` that could not be parsed was silently replaced by an empty queue on the next write (its lines lost, nothing said). Now: it is refused loudly until it is repaired — every enqueue and every drain discloses `memory.announce_failed`, the damaged bytes stay as they were for the operator, and once the file is removed or restored the queue takes lines again. A corrupt-ledger rebuild needs its announcement to land, so over a damaged queue file the rebuild refuses as well (the ledger stays as it was). There is no rebuild verb for the queue itself; the repair is the file.
438
+ - **Behavior narrowing — a lock held past its deadline (open to veto @server @dgx).** Before: an enqueue that waited 3 s for the queue's lock wrote the file without it. Now: that enqueue is refused (disclosed `memory.announce_failed`) and its lines are not written; no write lands without the lock.
439
+ - **Every notice through one router.** The engine's own notices (harvest, gate, refusal, fuse, conflict, completion, orphan seat, discard, origin clearance, layer census, session-account residue, consolidation recommendation, force audit, the challenge attribution's lines) go through one async `announce`, awaited in the flow that has them; the consolidation driver's notices go through the store it already holds; the File backend's store notices go through its own store and a refused one is now said to the host (`memory.announce_failed`, stage `store-notice enqueue` — 7.62.0 dropped it without a word); an instruction-hold reconciliation hands each stranded-hold line to the engine (`reconcileHolds` takes an `onStranded` callback) and the engine files it after the reconciliation, even when the reconciliation throws.
440
+ - **The key-switch carry-over.** `transferMemoryAnnouncements(from, to)` moves every scope's queue between two documents (each line keeping its scope, the fold counts carried): the destination takes the lines in one update, appended after what it holds (a notice already there in the same words stays a separate notice); a destination that refuses leaves the source whole; a drain of the source while it moves, or a move retried after its retirement failed, can leave a line in both places (over-delivery, never loss — KL-3307-c), and the Runner moves a queue once per marker switch (its hint is read and recorded in one synchronous step). The Runner calls it on a project marker's first key switch only when the backend carries no `governance` — the two derived control dirs are then the queue's home; a store that carries the documents keeps the queue by scope, and nothing moves.
441
+ - **Hard-breaking — HB-1 `MemoryEngine.inject` answers a Promise (open to veto).** *What changed:* `inject(handle, opts?)` returns `Promise<MemoryInjection>`, and the Runner's memory session face and its `composeInjection` step are awaited by the task's preparation. *Who needs it:* a deployment whose store keeps the documents in a database — the drain is a document read-modify-write, and such a store answers asynchronously. *Who is affected:* a host that calls `inject` itself (must `await` it); server, cli and client-core origin/main have no call site; dgx not checked. *Compensation:* the injection's content and the drain-once rule are unchanged.
442
+ - **Hard-breaking — HB-2 `MemoryEngine.rebuildCorruptControlPlaneLedger` answers a Promise (open to veto).** *What changed:* the rebuild returns `Promise<ControlPlaneRebuildReceipt>` (the #3308 section above names it among the Promise-returning faces) and every refusal it threw is a rejection. *Who needs it:* its announcement must land before the ledger is replaced, and the announcement is now a document update through the async seat. *Who is affected:* a host that calls the rebuild (must `await` it); server, cli and client-core origin/main have no call site. *Compensation:* the order (announce, then replace) and the refusals (`memory.control_plane_not_corrupt`, `memory.control_plane_rebuild_unsupported`, `config.memory_rebuild_reason`) are unchanged.
443
+ - **Hard-breaking — HB-3 the three root queue faces change shape (open to veto).** *What changed:* `enqueueMemoryAnnouncement(docs, ann, opts?)`, `drainMemoryAnnouncements(docs, scopes)` and `peekMemoryAnnouncements(docs, scopes)` take the governance documents (`MemoryGovernanceDocs` — what `fileGovernanceStore(controlDir)`, `backend.governance` and `MemoryEngine.governance` are) instead of a control-plane path, and answer Promises; a refusal they threw (a missing scope, a bad option) is a rejection. *Who needs it:* a host reading the queue (the consumer `MemoryAnnouncement.reportId` names) reads it on the store that keeps it, which is not a path on every backend. *Who is affected:* a host that calls them with a path; server, cli and client-core origin/main have no call site. *Compensation:* `fileGovernanceStore(<the control plane>)` is the 7.62.0 place, one call away.
444
+ - **Hard-breaking — HB-4 `MemoryGovernanceDocName` +1 `announcements` (open to veto).** *What changed:* the closed set of governance documents has five names, and a `MemoryGovernanceStore` keeps a fifth document; `memoryGovernanceStoreContract` iterates the names, so its document cases (and `hooks.corrupt`) cover `announcements`, and its racing case races every document at once. *Who needs it:* a deployment with several replicas over one store — a notice filed on one replica is delivered by the session that mounts its scope on any replica. *Who is affected:* a store written against the four names of #3308 (server's pg / mysql store, not yet begun) must keep the fifth and pass the kit; code that switches exhaustively over the names. *Compensation:* the document is opaque to the store (core's `coerce` / `fn` decide what it means); `MEMORY_GOVERNANCE_DOC_NAMES` and the two types are root-exported so an implementer enumerates them.
445
+ - **Read with #3308 and #3299 (above).** The announcement queue does not stay in the replica's control plane when the backend carries a store, and the rebuild is a Promise — both told in the #3308 section from its side. `memoryGovernanceDurability` still answers `"replica-local"` for a backend that carries `governance` but publishes no control plane — the instruction holds and the default capture opt-out carrier are still kept there — so the multi-node consolidation refusal's meaning does not change. A `ConsolidationDriverEngine` no longer needs `controlPlaneRoot` (the driver's notices go through `governance`).
446
+ - **Consumers.** @server: a pg / mysql `MemoryGovernanceStore` keeps `announcements` and passes the kit. **Switching a running backend to one that carries `governance` moves the queue off the replica's disk: the lines each replica queued in `announcements.json` are not delivered unless the host moves them first** — for each scope, `drainMemoryAnnouncements(fileGovernanceStore(<that control plane>), [scope])` and `enqueueMemoryAnnouncement(<the store>, …)` per line (an import of several replicas appends their lines, replica by replica; their fold counts are not carried). The two narrowings above are open to veto. @dgx: the narrowings are open to veto; dgx not checked for the three faces. @cli @client-core: no call site found; nothing to do. @test (black box): a File deployment upgraded from 7.62.0 still delivers the notices its old engine queued (same file, same bytes); with `announcements.json` damaged, a session starts, discloses `memory.announce_failed`, and delivers no notice until the file is repaired.
447
+ - **Pins.** `test/backlog3307-announcement-queue-doc.test.ts` — F9 over a damaged queue file a session starts, discloses its enqueue and its drain, delivers nothing and keeps the bytes, and after the repair delivers again; F1 the File store's bytes for one line are the 7.62.0 bytes at `announcements.json` and a 7.62.0 file reads as written; F2 over an in-memory store the engine's harvest notice is queued in the store, delivered once by `inject`, the second `inject` repeats nothing, and no control-plane file holds a queue; F3 the standing-condition sweep reads the same over the File and the in-memory store; F4 twenty racing enqueues lose none over either; F5 the kit refuses a store that drops the queue's writes and refuses a damaged queue file through both faces; F6 `inject` answers a Promise and a Runner over a store-carrying backend puts a store-kept notice in the first prompt only; F7 a transfer moves a queue whole (File bytes, fold count, scopes; File to in-memory), and a damaged destination leaves the source whole; F7b a move keeps a notice the destination already holds in the same words, and a move retried after a failed retirement over-delivers rather than drops; F8 the File backend's out-of-session adoption notice lands in its store's document, the one the engine drains; F8b over a damaged queue file that notice's refusal is said to the host and the adoption goes on. The memory benchmark's five consumers of `inject` await it (`bench/memory-benchmark/`; the HTTP adapter reads block and index from one injection). `test/memory-engine-s2-announce.test.ts` — the damaged-file case re-pinned to the refusal (the bytes kept, repair by removing the file), a wrong-shape document read as empty, the two-process writers through the store. The kit's racing case now races every document at once. Thirty-odd test files follow the async faces (mechanical). Mutations: see the receipt.
448
+
449
+ ### Repo test lane: `scripts/db-lane.mjs` — the three-engine real-database lane (TiDB, PostgreSQL, InnoDB), one private database per engine per run, with a verdict that tells a test failure from an infrastructure failure; `vitest.db.config.ts` runs `test/db/`, which the default run no longer collects (#3231; behavior change: none in the package — the scripts and test files are not published, `mysql2` is a devDependency; hard-breaking: none; closed sets: none; exports: none) (@server @test)
450
+
451
+ - **Before.** The engines were on the test cluster and their DSNs reached every gate container (until #2427), but no test read them: the repo had no MySQL-protocol real-database test at all, and no lane that made, judged and removed a database of its own.
452
+ - **Now.** Inside a `scripts/remote-gate.sh` container, `node scripts/db-lane.mjs run -- <cmd>` reads the three base DSNs `TIDB_TEST_URL` / `PG_TEST_URL` / `INNODB_TEST_URL` (the closed set is read from remote-gate's `DSN_CLOSED` line); any one absent, empty, multi-line, not a URL of its leg's protocol, or carrying a query or a fragment (a driver reads its options there — mysql2's `debug` prints the handshake) ⇒ every bad one named (`DB_LANE_DSN_ABSENT` / `_EMPTY` / `_NEWLINE` / `_INVALID` / `_SCHEME` / `_QUERY`), exit 2, no engine touched — three legs or none. Each engine must answer who it is (the TiDB leg reaches TiDB, the InnoDB leg does not: `DB_LANE_ENGINE_MISMATCH`, exit 2) and when it started; a lane database `sema_core_<lane>_<suffix>` (lane = the lane directory's last segment folded to `[a-z0-9_]` ≤ 24; suffix = creation second + random, 12 characters) is created on all three, the wrapper opens a session of its own on it on each engine (kept and pinged every minute while the command runs — the MySQL family's default idle timeout is 8 h — so a live run's database always has a session and another run's reap never takes it; a failed hold is `DB_LANE_HOLD_FAILED`, infra-red, no command; a hold that broke during the command is `DB_LANE_HOLD_LOST`, infra-red: the database went unguarded for a while), and the command runs with the three names pointing at it. After the command: a start that moved (PostgreSQL's start time is exact — any move; the MySQL family's is `UNIX_TIMESTAMP() − Uptime` — more than 5 s), or a lane database gone, ⇒ `DB_LANE_ENGINE_RESTARTED` / `DB_LANE_DATABASE_LOST`, infra-red, exit 3 — the reading is void, not a test failure. The wrapper's sessions closed, the lane database is dropped on each engine on its own, only with no session on it within a few seconds (PostgreSQL's `DROP DATABASE` without FORCE, which waits that long itself; the MySQL family reads the process list right before the drop, giving a leaving session the same seconds); not dropped ⇒ infra-red. Each run first reaps `sema_core_*` databases older than 12 h with no session. One machine line: `DB-LANE verdict=<pass|test-red|lane-red|infra-red> exit=<0..3> child=<rc> db=<name>`. `node scripts/db-lane.mjs gate` runs `vitest -c vitest.db.config.ts` (test/db/, one file at a time) and judges its JSON report against `test/db/INVENTORY.json` — every listed file collected, its floor of passed cases met, nothing skipped or failed, nothing collected that is not listed (the live gate's verdict function, `scripts/live-gate-verdict.mjs`, gains the inventory's `floors`). `node scripts/db-lane.mjs leg` is the chain's optional leg: no `GATE_*_TEST_URL` set ⇒ one line `DB-LANE skipped=3`; any set ⇒ one `remote-gate.sh run --dsn` naming all three (remote-gate refuses the absent ones). `test/db/` holds the lane's self-test (per engine: the lane database, engine identity and start stamp, a table round trip, drop refused while a session is open, the wrapper's own session on the run's database, a hold the engine cut reads as broken, the reap) and its negative controls (a missing DSN, a bad DSN, swapped engines, a restart — each red of its class). Lines name DSNs, engines, databases and error codes, never a value or a driver message. `remote-gate.sh` hands every container `GATE_REMOTE_DIR` (the lane directory, beside the lane label).
453
+ - **Narrowing / widening.** `npx vitest run` with the default config no longer collects `test/db/**` (nothing lived there before). The TiDB leg is `unistore`, not TiKV (KL-3231-a); the MySQL family's drop has a window between the process-list read and the drop (KL-3231-b). Until the SQL stores have a driver the lane proves the lane only; the store suites join `test/db/` with the package's `ensureSchema()` as their table owner.
454
+ - **Consumers.** @server — the same three DSN names and the same refusal of a missing leg; the lane differs from `db-lane.mjs` there in three places: it runs inside the container (no tunnel, no `eval` export contract), a missing InnoDB leg is red (not an additive leg), and a run removes its own databases and reaps dead runs' (age ∧ no session). @test — the inventory's floors are the lane's surface; a database suite never skips.
455
+ - **Pins.** `test/db-lane-pins.test.ts` (no database): naming and the 63-byte bound · each DSN missing ⇒ exit 2 with zero engine calls · empty / multi-line / not a URL / wrong protocol / a query or fragment, all told · the real script with no DSN and with two · an engine that does not answer ⇒ 3, swapped engines ⇒ 2 · a moved start stamp (PostgreSQL any move, the MySQL family past 5 s) and a lost database ⇒ 3 over a green command · the wrapper's own session held from after the create to before the drop, a failed hold ⇒ 3 with no command, a broken hold ⇒ 3 over a green command, worst class wins, a signalled command ⇒ 3 · the command's three lane DSNs · own drop refused with a session ⇒ 3, each engine tried · the reap (old ∧ idle only, foreign names kept, a listing failure survived) · codes only · the inventory verdict (floor, skip, not collected, not listed) and the real inventory = the files on disk · `vitest list` default vs database config · the chain leg (skipped=3 with no ssh, one of three ⇒ remote-gate exit 2, all three ⇒ one run naming them) · the closed set read from remote-gate.sh and `GATE_REMOTE_DIR` on every container.
456
+
457
+ ### A parked row the engine cannot read is one row of the listing, and a row without its `pendingAction` is damaged for the judge — `listByScope` and `listOverdue` answer it in the same form, never a failed page, a skipped row or an approvable card (#3364, #3268; behavior change — a row that lacks its `gate`, `pendingAction` or `state` record, or that a summary cannot be made of, lists `damaged` instead of throwing the page or presenting as an `ok` card, and the overdue face answers a row it used to skip; behavior narrowing — one, below; hard-breaking: one, type level, three sentences below, open to veto; closed sets: none; exports: none; members: `CheckpointSummary.gateKind` optional in type; wire: no key added) (@server @client-core @cli @test)
458
+
459
+ - **Before.** The judge (`judgeCheckpointRow`, #3265) read a row's `gate` and `state` only by reaching into them — a row without either threw inside the judge and was caught as `damaged` — and never touched `pendingAction`: a row with no `pendingAction` (v1, no `version` member, or the baseline format alike; a stamped v10 row was caught by its digest) was judged `ok` while the summary projection read `pendingAction.kind` and threw. Two answers for one row (#3364, server S-3056): the verdict said resumable, the projection could not make the card. And the projection was not total: `listByScope` over a page holding one row with no `state`, no `pendingAction`, a `null` ledger or a member that throws when read rejected the whole page (`TypeError`), so `DB_BACKEND=local` operator queues, inboxes and task views answered 503 for everyone (#3268, server S-3050, test [12654] OBS 3), while `listOverdue` left such a row out of its page and disclosed it — one damaged row, two faces, two answers.
460
+ - **Now.** One table of the row's required records — `gate`, `pendingAction`, `state`, each an object — read by the judge right after the version ceiling and the reader words (a newer row is still `lacking` first): a row without one is `damaged` / `checkpoint.invalid_outcome` / `requirements_damaged` under the fixed sentence, its refusal naming the record (`detail` carries no `thrownName`: nothing was thrown to find it). `summarizeCheckpoint` is total, as the judge is: a row it cannot make a summary of is one row of the answer — `token`, `rowVerdict`, `sessionId`, `scope`, and each of `gateKind`, `createdAt`, `deadline` only when it reads (a registered gate kind, a finite number) — with a verdict that is never `ok` (the judge's own when it already refused the row, else the unreadable-row verdict, `damaged` / `requirements_damaged`), and one sentence to the store's disclosure seat naming the row by its identity and the thrown name, never its token or a value. A row the session face answers `unreadable` for its members — a pending action with no kind, an approval with no tool call id, a `createdAt` that is not a finite number, a state that is not an object — is unreadable on every face (the projection asks that one reading before it projects), and `deadline` rides a summary only when it is a finite number. Both first-party stores' `listByScope` and `listOverdue` build every summary through it, so the page beside a damaged row is the page it would be without it, and the same row is the same answer on both faces; a store's `put` is unchanged. `listBySession` keeps its own `unreadable` arm.
461
+ - **Narrowing / widening.** One narrowing, open to veto: a row that holds no `pendingAction`, `gate` or `state` object — which the judge used to call `ok` (no `pendingAction`) or `damaged` by a caught `TypeError` (the other two) — is refused by the named table, so a row that lacks a record AND carries a retired seat is told as damaged rather than as the retired seat; no row that resumed before is refused (the resume of a row without its `pendingAction` threw a bare `TypeError`, measured on the base; it is now refused with the row's sentence). One widening: `listOverdue` answers a candidate it used to leave out (a row with no `state`, no `pendingAction` kind or tool call id, a `createdAt` that is not finite, or a summary that threw) in the unreadable form, so a sweep that disposes of every row it is handed now sees it; a row whose gate kind does not read is still left out (it has no deadline facet to be placed in), disclosed as before. One narrowing of an echo, open to veto: a `deadline` that is not a finite number (a `NaN` a JSON round trip left, a value of another type) is no longer copied onto the summary — the row is still listed, and an overdue sweep still meets it as overdue.
462
+ - **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* `CheckpointSummary.gateKind` is optional in type, absent exactly on a row whose gate does not read (its `rowVerdict` is then not `ok`); at runtime every row that listed before lists with the same members. *Who is affected:* a TypeScript consumer that passes `summary.gateKind` where a gate kind is required, or switches on it exhaustively, no longer compiles (@server's SQL listing and operator queues, @client-core, @cli's inbox — inferred, not compiled here). *Compensation:* none at runtime; read the row by `rowVerdict` first (a non-`ok` row is rendered as such) and narrow `gateKind` after it.
463
+ - **Who needs it / who is affected / compensation.** *Needs it:* a deployment on the file or in-memory store that lists parked approvals — one damaged row no longer hides every other row, and no longer shows as an approvable card. *Affected:* an operator surface that listed only `ok` rows by position (the new rows are `damaged`, render them by `rowVerdict`); a sweep over `listOverdue` now meets a damaged row (it `expire`s it like any abandoned row). *Compensation:* none needed; a host that wants the old skip filters `rowVerdict.kind !== "ok"`.
464
+ - **Consumers.** @server: `pendings()` and the operator queue / subscription stream / inbox / task view / retention / expiry harvest can read `listByScope` for a local store again and drop the `listBySession`-based reading that stood in for it (S-3050 / S-3060); the two 🚧 store-feature cells flip, and a row without `pendingAction` is now `damaged` from the judge, which is what S-3056 / S-3061 asked. @client-core @cli: a list can now carry a `damaged` row without `gateKind`, `createdAt` or `deadline` — render by `rowVerdict` (its `sentence`), key by `token`. @test (black box): a store holding one row without its `state` lists every other row, and that one is `damaged` with the engine sentence; resuming it is refused `checkpoint.invalid_outcome` / `requirements_damaged` and the row stays pending and byte-identical.
465
+ - **Known limit.** The overdue face still cannot place a row whose gate kind does not read (no deadline facet): it leaves that row out and discloses it, and `listByScope` lists it — the one difference between the faces, inherent to a facet query. A row whose three records are objects but whose members do not read as the listing faces read them (`pendingAction: {}`, an approval with no tool call id, a `createdAt` that is not finite) listed unreadable while the judge, which asked for the three records only, said `ok` — closed in this release by #3383 (the section at the top: one member-shape table for the judge and every listing face). A stored value of the wrong type in a member the summary only echoes (`principal`, `sourceSessionId`, `toolName`) rides as stored, as it did.
466
+ - **Pins.** `test/backlog3364-pendingaction-judge.test.ts` — A1 the judge on the three forms of a row without `pendingAction` (v1, no `version`, the baseline format) · A2 the refusal names the record, no `thrownName` · A3 `gate` / `state` stay damaged by the same table · A4 the non-record forms · A5 the order against a newer row, a stamped v10 row · A6 / A7 a clean row, a retired seat, the one narrowing · B1 the resume refuses it with the row's sentence, the row byte-identical. `test/backlog3268-listing-total.test.ts` — C1–C4 `listByScope` over a mixed page in both stores: the page whole, the good row equal to its solo summary, each unreadable row's exact members, the disclosure sentences, finite-number members only · D0–D3 the projection of the three `pendingAction` forms, a member that throws when read (verdict of a row the judge calls `ok`), a newer row, a clean row · E1–E3 `listOverdue` answers the same rows as `listByScope`, the unplaced row left out and disclosed, paging through an unreadable row · G1–G2 a `createdAt` that is a BigInt, a pending action with no kind, an approval with no tool call id: unreadable on both faces and the page serializes; a `deadline` that is not a finite number is not echoed · F1–F2 `listBySession`'s unreadable arm untouched, InMemory ≡ File. `test/backlog3265-row-verdict.test.ts` P5 / P5′ and `test/backlog1468-p2-faces.test.ts` r1-projection re-pinned to the new answers.
467
+
468
+ ### A directory-pinned deployment's store set counts a mount whose root anchor, scope registry or registry journal stands damaged as holding a record, and a plane in the set that cannot be opened throws `ControlPlaneCorruptError` naming the errno — not the bare system error (#3360, #3361; behavior change — a mount that holds only a damaged named artifact stays in the set under #3345's narrower census, a `personal` directory that is a link leading nowhere is in the set, and a plane that cannot be opened throws a typed fault; behavior narrowing — one, below, open to veto; hard-breaking: none; closed sets: none; exports: none) (@server @test)
469
+
470
+ - **Before.** In 7.62.0 the set listed the personal plane's store once its mount existed under the engine root, whatever the mount held (#3345, above, narrows that to a mount that holds a record). A mount whose only content was a root anchor the store itself would refuse — `.engine/root-anchor.json` holding `{}` — was therefore in the set: `stores()` threw the store's `ControlPlaneCorruptError` and the session status answered the plane `fault` (measured on 7.62.0 `146310a6a`). And a plane in the set that could not be opened — a control plane that is a link leading nowhere — made `stores()` throw the bare `ENOENT` of its `mkdir`, while the session status answered the same plane `optOutSource: "fault"`: one fact, two faces. A `personal` directory that is itself a link leading nowhere was no store at all (the mount check looked below it): `stores()` answered the project store and the status had no personal row.
471
+ - **Now.** #3345's census matches the artifacts an open leaves by name alone, which would let a mount holding only a damaged anchor or registry out of the set; this section keeps it in. One reading of "damaged", the store's own: for each named artifact at the control plane's top level the census asks the readers the store opens by (`readStoreRootAnchor`, `readScopesRecord`), and a file they refuse — a link, no regular file, unreadable, not JSON, out of shape — is a record, as a directory that cannot be read is. A mount holding only such a file is in the set; opening it then refuses the anchor or the registry (`ControlPlaneCorruptError`), so `stores()` throws that and the session status answers the plane `fault`. A journal that is not JSON is read at the registry's first transaction, so the plane opens and the damage surfaces there. What stands at the registry's two files is judged before either is read — a pipe, a device or a link that leads nowhere is damage, and is never opened (the registry's reader follows links and an open of a pipe with no writer waits without bound). A store in the set that cannot be opened is one typed fault for every face of the deployment (`stores()`, a deployment-wide erasure that reaches the plane, the status): a bare system error becomes a `ControlPlaneCorruptError` that names the errno, the original as its `cause`; an error the engine already typed — a `ControlPlaneCorruptError`, a store-form refusal — stands as it was. The contract `memory.deployment.store_set` says both.
472
+ - **Narrowing / widening.** Narrowing, open to veto: against 7.62.0 the one new refusal is a `personal` directory that is itself a link leading nowhere — 7.62.0 read it as absent (one store); it is now in the set, so `stores()` throws `ControlPlaneCorruptError` and the status shows a `personal` row `fault` (the same change #3345, above, tells). A mount that holds only a damaged anchor or registry is the outcome 7.62.0 gave (the set then took any existing mount for a store, and the open refused the file) — one more store and one more throw than #3345's name-only census alone. A whole anchor and registry, an anchor that names another root, and every form of a record are unchanged.
473
+ - **Who needs it / who is affected / compensation.** *Needs it:* an operator whose personal mount lost the bytes of its anchor or registry — the set and the status say so before the first write. *Affected:* a host that called `stores()` on such a mount and expected one store, and one that branched on the bare `ENOENT` of an unopenable plane. *Compensation:* the `cause` of the typed error is the original system error; nothing is migrated or deleted.
474
+ - **Consumers.** @server: `stores()` over a damaged or an unopenable personal mount throws `ControlPlaneCorruptError` (the status row is `fault`, as before); your reading of the set has four cells — no record, a hand file, a damaged named artifact, an unopenable plane — and they are the contract row. @test: a root anchor holding `{}` on an otherwise empty personal mount — `stores()` throws, the status's personal row is `fault`; a personal directory that is a link leading nowhere — the same, the error naming `ENOENT`.
475
+ - **Pins.** `test/backlog3360-3361-store-set-damaged-artifact.test.ts` — the anchor damaged six ways (`{}`, not JSON, a relative path, an unknown version, a link, a directory) and unreadable, the registry damaged four ways, each ⇒ held, `stores()` throws, the status row `fault`, and the store's own opener refuses the same file; the journal that is not JSON ⇒ held, the plane opens, the registry's first read rejects; the registry or its journal as a pipe (census run in a bounded child, never opened) or as a link leading nowhere ⇒ held, and as a link to a whole registry kept elsewhere ⇒ no record; a damaged anchor beside a record; controls (the artifacts whole in three registry forms, an anchor naming another root, the same names below the top level or in the memory directory, a real open's own residue); an unopenable plane — a link above the mount, a link as the control plane, a control plane that cannot be entered — ⇒ the typed error with `ENOENT` named and the original as `cause`, an erasure that reaches it meets the same error, and an engine-typed refusal (a moved root) stands unwrapped. `test/backlog3345-store-set-census-walk.test.ts` — its anchor fixture is now a whole anchor (a `{}` anchor is a record).
476
+
477
+ ### `promptScreenDeclaredBy(registrations)` and `memoryScopePlaneOf(face, scope, scopeContract)` are package-root exports — the engine's readings of "does a set of registrations declare a prompt screen" and "which plane carries a scope key", for hosts that kept a copy of each (#3362, #3365; behavior change — two root functions added, and `memoryScopePlaneOf` refuses a bad `scopeContract`; hard-breaking: none; closed sets: none; exports: +2 root functions `promptScreenDeclaredBy`, `memoryScopePlaneOf`) (@server)
478
+
479
+ - **Before.** A host that holds registrations before any bus exists (an acceptance seat that must know, before it writes a byte, whether a prompt will be screened) had no engine reading of that: the engine's predicate, `promptScreenHasHandlers(bus)`, reads an admitted bus, so the host copied the engine's two-station test and its prefix expansion — a second copy that a third station would leave behind. And `memoryScopePlaneOf`, the scope key → plane reading the store resolution and the deployment face call, was not exported, so a host recomputed it with a failure arm of its own.
480
+ - **Now.** `promptScreenDeclaredBy(registrations)` answers whether some `uses.events` pattern, expanded on the engine bus as admission expands it, selects `prompt.submit` or `classic.UserPromptSubmit`. One list of those stations (`PROMPT_SCREEN_STATIONS`, in `stations.ts`) and one judgment (any station is heard) serve both readings — the bus's (`promptScreenHasHandlers`, the four entrances' predicate) and the registrations' — so a station added to the list is heard by both and by every host that calls this one. A declaration is the upper bound on what a registration hangs: one that declares a station and hangs nothing on it is declared here and unheard on the bus. A pattern admission would refuse selects nothing here; admission refuses the registration itself (`config.mods_invalid`). `memoryScopePlaneOf` is exported with the reading it always had; it now also refuses a `scopeContract` that is neither `"v2"` nor `undefined` (`config.memory_scope_key`) — every caller in the repository had already passed that check.
481
+ - **Narrowing / widening.** Widening: two root functions. Narrowing: none for an engine face; a direct caller of the newly exported `memoryScopePlaneOf` with a contract such as `"v3"` is refused instead of reading the absent opt-in — a narrowing, open to veto (@server @client-core: zero direct callers found on origin/main at merge; the refusal is `Error` with the offending value spelled).
482
+ - **Consumers.** @server: delete the mirrored two-station test and call `promptScreenDeclaredBy` over the registrations the acceptance seat holds; delete the `planeOf` recomputation and call `memoryScopePlaneOf(<your face's name>, layer, contract)` — a refusal names your face and carries `config.memory_scope_key`.
483
+ - **Pins.** `test/backlog3362-prompt-screen-declared.test.ts` — the root export; the truth table (names, both prefixes, unrelated names and prefixes, a surface-only name, typos, non-strings, no `uses`, `events` that is not a list); the two readings agree for the same registrations, exhaustively over every event name the engine bus reads and over every family prefix; the declared reading is the upper bound; the entrance asks and raises only listed stations, and nothing when none is heard. `test/backlog3365-memory-scope-plane-export.test.ts` — the root name is the engine's own function; typed keys under v2; trimming; the same plane `resolveMemoryScopeStore` answers over a table of keys under both contracts; the refusals (blank, non-string, a key the contract cannot read, a bad contract) name the caller's face and carry the code.
484
+
485
+ ### Repo pins: the store-set closure pin starts every probing walk from no case-fold verdict (#3378; behavior change: none — a pin-only export in `layout.ts`, no package surface; hard-breaking: none; closed sets: none; exports: none) (@test)
486
+
487
+ - **Before.** The closure pin's "every member of the list is created by some read path" was red on the k3s8 Linux container in one chain run and green in the one before it, on identical code. The member `.casefold-probe-*` is written by a read path only while the process holds no case-fold verdict for the memory directory's identity (`dirCaseFolds`, cached per process by `dev:ino`); a file system that hands a removed directory's identity to a new one (ext4, overlay: inode reuse) answers the new directory from an earlier walk's verdict and writes no probe. It is not a property of the volume: the probe is written on a case-sensitive volume as on a folding one (the pin passes with its temporary directories on a case-sensitive APFS volume).
488
+ - **Now.** `forgetCaseFoldVerdicts()` (`layout.ts`, exported for the pins like `dirCaseFolds`, not from the package root) drops the cached verdicts; the closure pin calls it before each walk that reaches the probe. A new pin stages the recycled identity (`statSync` answers one `dev:ino` for two directories) and shows the second directory gets its verdict from the first and no probe, and that after the reset it probes again. The list keeps its member and the contract `memory.deployment.store_set` its words; the `STORE_OPEN_ARTIFACTS` comment now states the condition (two labels that differ only in case registered, no verdict yet for that directory's identity — on any volume). The cached verdict is the same device's, and a device's case behaviour does not change with the inode, so no engine answer was wrong.
489
+ - **Narrowing / widening.** None in the package.
490
+ - **Consumers.** None: no package surface moves. @test: the pin was environment-shaped, not a regression of the store set.
491
+ - **Pins.** `test/backlog3378-casefold-verdict-identity.test.ts` — two directories of one identity (first probes, second no probe, same verdict) · after the reset the next call probes, another identity probes on its own · the same through `registerScope` of a scope whose label differs from a registered one only in case. `test/backlog3345-store-set-artifact-closure.test.ts` — the transient walk starts each block from no verdict.
492
+
493
+ ### The landing-admission loop and `NON_GOVERNANCE_MEMORY_CODES` are package-root exports — a memory backend outside the package runs the engine's own admission loop, round bound and code set instead of copies (#3406; behavior change: none — ten names re-exported, no behavior moves; hard-breaking: none; closed sets: none; exports: +6 root values `admittingLandings`, `cutPerLanding`, `requireLandingsAdmitted`, `LandingsNeedAdmission`, `MAX_LANDING_ADMISSION_ROUNDS`, `NON_GOVERNANCE_MEMORY_CODES`, +4 root types `AdmitLandings`, `PatchLanding`, `PatchShare`, `LandingCut`) (@server)
494
+
495
+ - **Before.** The landing-admission protocol — the loop a backend runs its batches under, the in-lock check that names the landings not yet admitted, the cut of an admitted batch into one transaction per landing, and the bound on how many times a moving spelling is asked about again — lived in a module no host could import, and so did the set of `memory.*` codes deliberately outside governance. A SQL memory leg therefore spelled its own round bound (`4`) and its own `memory.landing_unstable` literal beside the engine's: two sources for one number and one code.
496
+ - **Now.** The five values and four types of `core/memory-engine/landing-admission.ts` and `NON_GOVERNANCE_MEMORY_CODES` (`core/governance-codes.ts`) are exported from the package root, each the defining module's own binding. Neither module changed. `memory.landing_unstable`, the code a batch whose landings keep moving ends with, is a member of `NON_GOVERNANCE_MEMORY_CODES`. `docs/INTEGRATION-CORE.md` §7.2 states the contract: a SQL leg uses the same `admittingLandings` loop and keeps neither its own round count nor its own code spelling.
497
+ - **Narrowing / widening.** Widening: six root values and four root types. Nothing narrows; the file backend and every verb behave as before.
498
+ - **Consumers.** Affected: @server — the two SQL apply legs (the S-3082 pair) call `admittingLandings(admit, run)`, plan inside their lock with `requireLandingsAdmitted`, commit with `cutPerLanding`, and delete their own `MAX_LANDING_ADMISSION_ROUNDS` and `memory.landing_unstable` spellings. The imports move into the package that carries the SQL stores when that package lands.
499
+ - **Pins.** `test/backlog3406-landing-admission-root-exports.test.ts` — every name is a root export and the defining module's own value (identity, not a copy) · the four types compose · the loop through the root asks what is unadmitted, plans again, and ends after the exported bound with `memory.landing_unstable` (run `MAX + 1` times, asked `MAX` times; no `admit` runs once) · `NON_GOVERNANCE_MEMORY_CODES` is non-empty, carries the incident codes and `memory.landing_unstable`, and shares no member with `GOVERNANCE_CODES` · `requireLandingsAdmitted` names exactly the unadmitted landings and throws the root's class · the integration doc carries the contract sentence and names every member. `test/export-surface.test.ts` — the ten names added to the frozen surface.
500
+
501
+ ### The memory backend contract suite asserts three more things — a delete or an erase leaves the entry in no read face, a search answers only the scopes it was asked, and a stale `baseRev` conflicts even when its new bytes equal the committed bytes (#3368; behavior change: `memoryBackendContract` gains three cases, so a backend that passed the suite before can now fail it; no engine or backend behavior moves; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
502
+
503
+ - **Before.** The suite checked a deleted entry through `getByIds` alone, the scope fence through `listHeaders` alone, and a stale `baseRev` only with new bytes that differ from the committed ones. A backend whose header list or search index outlived a delete, whose search returned an entry of a scope it was not asked about, or that judged the compare on the bytes (a stale writer whose new content equals what a rival already committed is answered `applied`) passed it.
504
+ - **Now.** Three cases, none of which changes the `memoryBackendContract` signature or the hooks. (1) After a delete — and, on a backend that offers `eraseWithEvidence`, after an evidenced erase — the entry is absent from `listHeaders`, `getByIds` and `search` alike; the entry kept beside it is the control that shows each face reads. (2) `search(q, ["s1"])` never returns an `s2` entry, and `search(q, ["s2"])` returns it. (3) An update whose `baseRev` is stale and whose new content (so its `rev`) equals the committed state is a reported conflict that carries `currentRev`, applies nothing and leaves the committed state where it was — the compare is on the rev, as the `applyPatches` contract says ("a stale `baseRev` is a REPORTED conflict"). The File backend and the copy-out reference template pass all three; no backend in this package was changed.
505
+ - **Narrowing / widening.** Narrowing for a backend outside this package, open to veto: a backend that fails a case is no longer certified by the suite. @server reported its TiDB leg answering `applied` to the form in (3); the suite now names it.
506
+ - **Consumers.** @server, @dgx: run the suite against each leg; a red case names the face or the clause. Nothing observable on an engine or a File store moves.
507
+ - **Pins.** `test/backlog3368-backend-contract-faces.test.ts` — both backends pass the three · defective copies of each (a delete the header list, `getByIds` or search does not see; an erase the same, File only since the template offers no erase seat; a search that ignores the scope fence; a compare on the bytes) turn the case of their own defect red and every other new case green, and leave the older stale-`baseRev` case (different bytes) green under the byte-compare defect.
508
+
509
+ ### `docs/INTEGRATION-CORE.md` §7.2b states where a memory semantic lives and what a host writes around an erasure, and `evidenceCapability: "journal"` names a property and not a medium (#3370; behavior change: none — docs and one JSDoc; hard-breaking: none; closed sets: none; exports: none) (@server @dgx)
510
+
511
+ - **Before.** The `evidenceCapability` JSDoc defined `"journal"` as "the File evidence path" while the contract suite requires every backend that offers `eraseWithEvidence` to answer it: a third-party evidence face could only answer a word the documentation said was not its own. And nothing said, in one place, which memory semantics a backend owes inside its commit, what a host writes before it erases, what a restore of backups may not do, or whose job a read set's correctness is.
512
+ - **Now.** §7.2b, five statements. The rule: a semantic sits below the backend seam if and only if it has to hold in the same commit as the entry data, and everything else is computed by the host and handed in through the inputs the engine already takes. The host writes the request record `{requestId, operator, reason, select, episodeTargets}` durably before it calls `eraseMemoryEntries`, with the join keys of the two lanes, the replay behavior of each, and the reason `erased[].sessions` is not the pointer to episodes. `"journal"` is an append-only evidence chain of any medium (the JSDoc on `MemoryErasureAttestation.evidenceCapability` now says so). Tombstones and facts are backed up and restored separately; a whole-store rollback promises no erased entry stays erased. The read set is the host's to compute: KL-H1 (`docs/KNOWN-LIMITS.md`).
513
+ - **Narrowing / widening.** None; no code path moves.
514
+ - **Consumers.** @server, @dgx: the request-record statement is the host half of an erasure's audit trail; the backup statement is the boundary a deployment's backup plan keeps.
515
+ - **Pins.** `test/backlog3370-memory-semantics-docs.test.ts` — the section exists with each of its five statements, the JSDoc carries the property reading and no longer the File-only one, and the limit row is in the limits table.
516
+
517
+ ### A refused member of a batch redemption says why in a closed word and what may be claimed in a closed word — `RedeemedBatchMember`'s refused row carries `code` (`RuleRefusalCode`, one word per cause, no catch-all) beside `committed` (`RuleWriteCommitted`); `reason` stays the sentence for a person (#3363; behavior change — one, below: a tightening member whose standing could not be read back after its write is told as unreadable, no longer as removed; hard-breaking: one, type level, three sentences below, open to veto; closed sets: new `RuleRefusalCode` (`RULE_REFUSAL_CODES`, 17 words); exports: +1 root value `RULE_REFUSAL_CODES`, +1 root type `RuleRefusalCode`; members: `RedeemedBatchMember` refused arm +`code`, +`committed`, both required in type; wire: `redeemRuleBatch` member table, refused rows +2 keys, landed rows unchanged) (@server)
518
+
519
+ - **Before.** A refused row of `redeemRuleBatch`'s member table carried one sentence. A consumer could not tell "the store said nothing landed, a retry will not change it" (a layer-root record, a withheld allow, a lost compare-and-set) from "the write may have committed and lost its acknowledgement" (reconcile with `list()`) without reading the start of the sentence — `withheld:`, `unsupported.layer_root:`, `could not read the permission-rule store` — which is written for a person (server S-2976).
520
+ - **Now.** Each refused row carries `code: RuleRefusalCode` and `committed: RuleWriteCommitted` (the table the add and remove doors already share). The 17 causes, one word each: `unsupported.layer_root`, `ticket_invalid`, `record_missing`, `wrong_principal`, `record_schema_stale`, `not_confirmed`, `record_malformed`, `not_chosen`, `parse_rejected`, `store_unavailable`, `record_changed`, `withheld`, `store_read`, `store_write`, `session_ended`, `occ`, `dot_removed`. There is no `other`: every place that refuses names a word. `committed` is `no` wherever nothing was written or the store answered that nothing landed, and `unknown` only where a write or the read-back that would settle it did not settle (`store_write`: the write threw, answered unreadably, or reported a landing with no trace of its dot; `store_read`: the read-back after a write could not be taken). The redemption leg and the landing under it (`landRuleAdd`) mint the words; the batch walk copies them from the leg and mints `withheld`, `store_read` and `dot_removed` for its own rows. The sentences are unchanged. `redeemRuleTicket` (the single-ticket door) and the batch's own record-level refusal (`{ status: "refused", reason }`) answer the sentence alone, as before.
521
+ - **Narrowing / widening.** One behavior change, open to veto: a tightening member whose write was acknowledged and whose standing check could not read the store was told "removed since it was redeemed" (the read failure was taken as "not live"); it is now `store_read` / `unknown` under a sentence that says the read failed, and the allows of the batch stay withheld as before. A member whose dot a successful read finds not live is `dot_removed` / `no` under the old sentence. Nothing else narrows; the landed arms (`persisted`, `deduped`) carry neither key.
522
+ - **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* `RedeemedBatchMember`'s refused arm gains `code` and `committed`, required in type (every refused row carries both); at runtime no key is removed or changed and the landed arms are untouched. *Who is affected:* a TypeScript consumer that constructs a refused member literal (a mock, a test fixture) no longer compiles until it names both; a consumer that only reads the table is unaffected. @server reads the table (`src/rules-consent.ts` `refusedMembersOf`, `buildImportOutcomeMembers`) and builds no refused literal in `src` or `test` (grep of `status: "refused"` on its origin/main `96a91d82`; not compiled against this tree); @cli and @client-core have no read point. *Compensation:* add `code` (a word of `RULE_REFUSAL_CODES`) and `committed` (`"no"` | `"unknown"`) to the literal; read `committed` for retry-versus-reconcile and `code` for the cause, and stop reading the start of `reason`.
523
+ - **Known limit.** The single-ticket door `redeemRuleTicket` and the batch's record-level refusal (`{ status: "refused", reason }`, no member table) still answer the sentence alone: the door drops the two words its leg mints, and the batch-level refusal mints none. A host that needs the cause for a single ticket walks a one-member batch and reads its member row. Not part of this change.
524
+ - **Consumers.** Affected: @server — `ImportMemberOutcome` (`src/rules-consent.ts`, the `indeterminate`-for-every-refusal registration at :296-:320) maps `committed: "no"` ⇒ `refused` with `code` as the reason and `"unknown"` ⇒ `indeterminate`, and drops the "refusal cause is text only" reading and any read of the sentence's start (S-2976; its 🚧 feature pin flips); a transitional reader of the `could not read the permission-rule store … removed since it was redeemed` sentence for a tightening member must expect the new unreadable sentence. Not affected: @cli @client-core (no read point of the member table).
525
+ - **Pins.** `test/backlog3363-refused-arm-closed-keys.test.ts` — K1 one case per refusing place, driven through the real `redeemRuleBatch` (26: record-level causes by a record that moves between the batch's read and the leg's own, store-level causes by a bent backend) · K2 the cases name every word of the set · K3 `unknown` only for `store_read` / `store_write`, `store_write` never `no` · K4 the batch walk's `withheld` and the landing's preflight `withheld` are one word · K5 the standing check that could not read versus the dot a successful read finds not live · K6 a landed member carries neither key · K7 the single-ticket door's refused arm is `{ status, reason }` · K8 the set is a frozen, root-exported, catch-all-free array and a refused member without the two words does not compile.
526
+
527
+ no-notes: #2885(named only by the car-1456-s2a merge header, which cites the git-ref seat ticket as the neighbour of TaskSpec.workspace; nothing for #2885 lands here), #3313(named only by the s2a merge-bookkeeping commit: the J9 start-site row for session-checkout.ts carries `run: false` until the two-stage read floor lands; the design ticket itself ships nothing here), #860(named only by a #3330 car commit subject: one cell of the #860 pin re-pinned to dd's row — `dd of=` is a write; told in the #3330 entry), #1132(named only by a #3330 car commit subject: the #1132 pin's writer list re-pinned to the rows; told in the #3330 entry), #1685(named only by a #3330 car commit subject: the #1685 pin's ln / dd cells re-pinned to the rows; told in the #3330 entry and KL-1685-f), #11(the stage bookkeeping commit d859e7f30 names "chain #11" in its subject; it is the chain run, not a ticket), #1247(the stage bookkeeping commit 0646718ef re-argues the message-branching allowlist row to 2026-11-30; the ticket itself is 待排 and lands no behaviour here), #17(the stage fix commit 3f2f9f626 says "chain #17" in its subject; it is the chain run, not a ticket), #926(the stage fix commit ce1dbbc45 only routes one refusal message through the thrownText renderer the #926 gate names; nothing for #926 lands here), #3405(the ticket's claim does not hold: a failure inside the run lane's injection entry is the returned promise's rejection and the sink's discharge runs after the call, so a terminal frame's debt is settled whether or not the injection fails; this entry only gained one comment on the sink and test/backlog3405-lane-sink-discharge.test.ts pins it; no behavior moves), #714(named by a #3351 commit subject only: the #714 structure cell re-pinned — `cat {foo,bar}` is no unresolved operand any more, it is the words cat receives, vouched inside the root on both seats, told in the #3351 entry's widening; the cell keeps its point with `$V`), #921(named by a #3350 commit subject only: ``x='`id`'; let "a=$x"`` re-pinned — vouched where it carded, since the argument is a backtick in no subscript; told in the #3350 entry's widening), #945(named by a #3351 commit subject only: `cat .{env,bak}` and the F3/F4 slots re-pinned to the words a brace list makes, the unresolvable form kept with `$V` or a command substitution; told in the #3351 entry), #994(named by a #3351 commit subject only: the dual run records the fourteen corpus inputs whose station verdict moved under `brace_words`; told in the #3351 entry's widening)
528
+
1
529
  ## 7.62.0 — 2026-10-31
2
530
 
3
531
  ### The store contract type and the two store consolidation passes leave the package — `MemoryStore`, `consolidateScope`, `runMemoryConsolidation` and the thirteen root names only they read (#1654; retirement lines RL-1654-memorystore / RL-1654-consolidate-scope / RL-1654-run-memory-consolidation, ruled C-R1075 ① and its 加注 1; behavior change: none on the Runner path; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: −16 root names; members: −1 `FileStorageBackend.consolidationLock`) (@server @dgx @client-core @test)