@sema-agent/core 7.61.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.
- package/CHANGELOG.md +840 -0
- package/dist/agents/cascade.d.ts +11 -3
- package/dist/agents/cascade.js +1 -1
- package/dist/agents/peer-held-queue.d.ts +27 -4
- package/dist/agents/peer-held-queue.js +81 -36
- package/dist/agents/peer-session-drain.js +13 -3
- package/dist/agents/subagent-transcript-placement.d.ts +23 -0
- package/dist/agents/subagent-transcript-placement.js +14 -0
- package/dist/agents/subagent.d.ts +6 -1
- package/dist/agents/subagent.js +143 -58
- package/dist/agents/suspend-guard.d.ts +38 -16
- package/dist/agents/suspend-guard.js +9 -4
- package/dist/agents/verify.js +4 -3
- package/dist/brain/route-adjudicator.js +9 -4
- package/dist/core/approval-object.js +1 -1
- package/dist/core/arg-summary.js +1 -1
- package/dist/core/ask-question.d.ts +2 -2
- package/dist/core/canonical-json.d.ts +23 -13
- package/dist/core/canonical-json.js +4 -4
- package/dist/core/checkpoint-features.d.ts +722 -0
- package/dist/core/checkpoint-features.js +98 -0
- package/dist/core/checkpoint-queries.d.ts +47 -4
- package/dist/core/checkpoint-queries.js +36 -16
- package/dist/core/checkpoint-requirements.d.ts +12 -5
- package/dist/core/checkpoint-requirements.js +11 -5
- package/dist/core/checkpoint-row-verdict.d.ts +110 -0
- package/dist/core/checkpoint-row-verdict.js +245 -0
- package/dist/core/checkpoint-store.d.ts +76 -753
- package/dist/core/checkpoint-store.js +83 -144
- package/dist/core/compliance.d.ts +6 -2
- package/dist/core/compliance.js +3 -3
- package/dist/core/engine-attestation.d.ts +1 -1
- package/dist/core/engine-notice.d.ts +38 -7
- package/dist/core/engine-notice.js +9 -2
- package/dist/core/gate-fold.js +2 -2
- package/dist/core/git-worktree-env.d.ts +62 -3
- package/dist/core/git-worktree-env.js +91 -30
- package/dist/core/governance-codes.d.ts +9 -3
- package/dist/core/governance-codes.js +16 -3
- package/dist/core/hooks.d.ts +13 -0
- package/dist/core/human-input-projection.d.ts +1 -0
- package/dist/core/human-input-projection.js +3 -0
- package/dist/core/image-admission.d.ts +1 -1
- package/dist/core/locked-config.d.ts +2 -2
- package/dist/core/mcp-host-seat.js +6 -1
- package/dist/core/memory-engine/consolidation-driver.d.ts +33 -18
- package/dist/core/memory-engine/consolidation-driver.js +99 -98
- package/dist/core/memory-engine/consolidation.d.ts +73 -10
- package/dist/core/memory-engine/consolidation.js +167 -11
- package/dist/core/memory-engine/data-plane.d.ts +8 -4
- package/dist/core/memory-engine/data-plane.js +11 -6
- package/dist/core/memory-engine/delegation-settlement.d.ts +37 -35
- package/dist/core/memory-engine/delegation-settlement.js +53 -59
- package/dist/core/memory-engine/dual-root.d.ts +12 -6
- package/dist/core/memory-engine/dual-root.js +9 -5
- package/dist/core/memory-engine/engine.d.ts +98 -35
- package/dist/core/memory-engine/engine.js +477 -380
- package/dist/core/memory-engine/entry-scan.d.ts +8 -0
- package/dist/core/memory-engine/entry-scan.js +3 -0
- package/dist/core/memory-engine/file-backend.d.ts +29 -3
- package/dist/core/memory-engine/file-backend.js +66 -35
- package/dist/core/memory-engine/index.d.ts +7 -7
- package/dist/core/memory-engine/index.js +6 -6
- package/dist/core/memory-engine/landing-admission.d.ts +5 -3
- package/dist/core/memory-engine/landing-admission.js +3 -3
- package/dist/core/memory-engine/layout.d.ts +121 -45
- package/dist/core/memory-engine/layout.js +252 -102
- package/dist/core/memory-engine/memory-backend-contract.d.ts +19 -1
- package/dist/core/memory-engine/memory-backend-contract.js +320 -0
- package/dist/core/memory-engine/memory-deployment.d.ts +31 -8
- package/dist/core/memory-engine/memory-deployment.js +26 -12
- package/dist/core/memory-engine/scope-contract.d.ts +52 -11
- package/dist/core/memory-engine/scope-contract.js +68 -19
- package/dist/core/memory-engine/session-write-home.d.ts +3 -1
- package/dist/core/memory-engine/session-write-home.js +1 -1
- package/dist/core/memory-engine/sync-client.d.ts +3 -1
- package/dist/core/memory-engine/sync-client.js +7 -0
- package/dist/core/memory-engine/sync-report.d.ts +3 -2
- package/dist/core/memory-engine/sync-report.js +6 -2
- package/dist/core/memory-engine/tools.d.ts +2 -2
- package/dist/core/memory-engine/tools.js +10 -10
- package/dist/core/memory-engine/types.d.ts +118 -19
- package/dist/core/memory-engine/types.js +1 -0
- package/dist/core/memory-vector.d.ts +1 -1
- package/dist/core/memory.d.ts +10 -10
- package/dist/core/memory.js +15 -6
- package/dist/core/mode-policy.js +1 -1
- package/dist/core/mods/classic-events.d.ts +9 -1
- package/dist/core/mods/dollar.d.ts +32 -1
- package/dist/core/mods/dollar.js +13 -1
- package/dist/core/mods/kernel/events.d.ts +11 -3
- package/dist/core/mods/kernel/events.js +13 -10
- package/dist/core/mods/lifecycle-stations.d.ts +36 -4
- package/dist/core/mods/lifecycle-stations.js +44 -9
- package/dist/core/mods/session-append.d.ts +4 -1
- package/dist/core/mods/session-append.js +7 -0
- package/dist/core/mods/session-receive.js +12 -15
- package/dist/core/mods/stations.d.ts +70 -6
- package/dist/core/mods/stations.js +144 -1
- package/dist/core/own-property-receipt.d.ts +7 -0
- package/dist/core/own-property-receipt.js +3 -0
- package/dist/core/park-selfcheck.js +2 -2
- package/dist/core/pause-registry.d.ts +2 -0
- package/dist/core/pause-registry.js +3 -0
- package/dist/core/permission-rule-consent.d.ts +10 -3
- package/dist/core/permission-rule-consent.js +37 -24
- package/dist/core/permission-rule-store.d.ts +35 -1
- package/dist/core/permission-rule-store.js +27 -8
- package/dist/core/read-only-shell.js +3 -2
- package/dist/core/read-root-candidate.js +1 -1
- package/dist/core/redaction-marks.d.ts +8 -0
- package/dist/core/redaction-marks.js +6 -0
- package/dist/core/remote-env.d.ts +12 -1
- package/dist/core/remote-env.js +3 -0
- package/dist/core/resume-startup-cause.d.ts +5 -4
- package/dist/core/runner/child-tree.d.ts +29 -3
- package/dist/core/runner/child-tree.js +39 -16
- package/dist/core/runner/compact-session.js +5 -2
- package/dist/core/runner/contracts.d.ts +36 -17
- package/dist/core/runner/delegation-owner.d.ts +43 -0
- package/dist/core/runner/delegation-owner.js +59 -0
- package/dist/core/runner/gate-exit.js +2 -2
- package/dist/core/runner/inherited-ask-grants.js +1 -1
- package/dist/core/runner/lineage-reroot-view.d.ts +56 -0
- package/dist/core/runner/lineage-reroot-view.js +108 -0
- package/dist/core/runner/memory-consolidation-driver.d.ts +6 -3
- package/dist/core/runner/memory-consolidation-driver.js +4 -4
- package/dist/core/runner/memory-consolidation-write-judge.d.ts +2 -1
- package/dist/core/runner/memory-consolidation-write-judge.js +3 -2
- package/dist/core/runner/permission-rule-lanes.d.ts +2 -1
- package/dist/core/runner/permission-rule-lanes.js +2 -2
- package/dist/core/runner/person-path-rows.d.ts +23 -3
- package/dist/core/runner/person-path-rows.js +31 -4
- package/dist/core/runner/placement-fence.d.ts +12 -0
- package/dist/core/runner/placement-fence.js +20 -6
- package/dist/core/runner/prepare-acquire-reconcile.d.ts +4 -1
- package/dist/core/runner/prepare-acquire-reconcile.js +7 -2
- package/dist/core/runner/prepare-ask-lane.js +2 -2
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +5 -1
- package/dist/core/runner/prepare-caps-and-workflow.js +6 -3
- package/dist/core/runner/prepare-config-doors.d.ts +6 -6
- package/dist/core/runner/prepare-config-doors.js +3 -4
- package/dist/core/runner/prepare-execution-env.js +17 -6
- package/dist/core/runner/prepare-hands-readface.d.ts +3 -2
- package/dist/core/runner/prepare-hands-readface.js +32 -10
- package/dist/core/runner/prepare-inherited-gate.d.ts +12 -8
- package/dist/core/runner/prepare-inherited-gate.js +14 -6
- package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -4
- package/dist/core/runner/prepare-memory-engine-session.js +4 -4
- package/dist/core/runner/prepare-memory.d.ts +3 -2
- package/dist/core/runner/prepare-memory.js +28 -20
- package/dist/core/runner/prepare-park-ask.js +4 -3
- package/dist/core/runner/prepare-task.js +22 -16
- package/dist/core/runner/prepare-workspace-restore.js +3 -6
- package/dist/core/runner/resume-admission.d.ts +3 -3
- package/dist/core/runner/resume-admission.js +6 -3
- package/dist/core/runner/resume-apply.d.ts +4 -0
- package/dist/core/runner/resume-apply.js +11 -4
- package/dist/core/runner/resume-checkpoint-screen.d.ts +9 -0
- package/dist/core/runner/resume-checkpoint-screen.js +4 -84
- package/dist/core/runner/run-git-lane.d.ts +2 -0
- package/dist/core/runner/run-git-lane.js +4 -1
- package/dist/core/runner/run-harness-handlers.d.ts +2 -0
- package/dist/core/runner/run-harness-handlers.js +3 -2
- package/dist/core/runner/run-leg.js +25 -8
- package/dist/core/runner/run-settle-and-teardown.js +6 -4
- package/dist/core/runner/run-stop-and-final-verify.js +2 -1
- package/dist/core/runner/run-turn-boundary.js +7 -4
- package/dist/core/runner/runtask.js +6 -6
- package/dist/core/runner/steering-preview.d.ts +9 -0
- package/dist/core/runner/steering-preview.js +5 -0
- package/dist/core/runner/stream-steer-verb.js +8 -0
- package/dist/core/runner/terminal-account.js +1 -1
- package/dist/core/runner/tool-face-overlay.js +2 -0
- package/dist/core/runner/turn-attachments.d.ts +5 -0
- package/dist/core/runner/turn-attachments.js +1 -1
- package/dist/core/runner-deps.d.ts +8 -4
- package/dist/core/secret-env.d.ts +9 -6
- package/dist/core/secret-env.js +41 -22
- package/dist/core/session-checkout.d.ts +108 -0
- package/dist/core/session-checkout.js +485 -0
- package/dist/core/session-store.d.ts +13 -5
- package/dist/core/session-store.js +28 -4
- package/dist/core/session.d.ts +29 -5
- package/dist/core/session.js +3 -0
- package/dist/core/store-contracts/checkpoint-store-contract.d.ts +6 -12
- package/dist/core/store-contracts/checkpoint-store-contract.js +73 -6
- package/dist/core/store-contracts/session-store-contract.js +61 -8
- package/dist/core/task-event.d.ts +28 -1
- package/dist/core/task-notification.d.ts +9 -1
- package/dist/core/task-notification.js +8 -1
- package/dist/core/task-registry-agent.d.ts +40 -8
- package/dist/core/task-registry-agent.js +57 -24
- package/dist/core/task-registry-shared.d.ts +33 -11
- package/dist/core/task-registry-workflow.js +4 -3
- package/dist/core/task-registry.d.ts +27 -10
- package/dist/core/task-registry.js +19 -13
- package/dist/core/task-result.d.ts +5 -5
- package/dist/core/task-spec-members.js +1 -1
- package/dist/core/task-spec.d.ts +21 -1
- package/dist/core/terminal-cause.d.ts +6 -6
- package/dist/core/tool-face.d.ts +6 -2
- package/dist/core/tool-face.js +1 -1
- package/dist/core/tool-policy.d.ts +16 -13
- package/dist/core/tool-policy.js +11 -10
- package/dist/core/tool-roster.d.ts +4 -4
- package/dist/core/tool-spec.d.ts +42 -19
- package/dist/core/types.d.ts +2 -2
- package/dist/core/types.js +1 -1
- package/dist/core/untrusted-egress.d.ts +15 -4
- package/dist/core/untrusted-egress.js +23 -22
- package/dist/core/workspace-snapshot.d.ts +3 -1
- package/dist/core/workspace-snapshot.js +1 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +3 -0
- package/dist/engine/execution-env/node-execution-env.js +12 -5
- package/dist/engine/harness/types.d.ts +77 -1
- package/dist/engine/harness/types.js +108 -0
- package/dist/engine/session/import-validate.js +6 -1
- package/dist/engine/session/parent-chain-guard.d.ts +3 -3
- package/dist/engine/session/parent-chain-guard.js +1 -1
- package/dist/engine/session/path-to-root.d.ts +18 -3
- package/dist/engine/session/path-to-root.js +15 -1
- package/dist/engine/session/repo-utils.d.ts +12 -1
- package/dist/engine/session/repo-utils.js +41 -0
- package/dist/engine/session/session.d.ts +24 -1
- package/dist/engine/session/session.js +46 -2
- package/dist/engine/session/storage-base.d.ts +20 -0
- package/dist/engine/session/storage-base.js +28 -9
- package/dist/index.d.ts +16 -12
- package/dist/index.js +11 -8
- package/dist/internal/harness-types.d.ts +1 -1
- package/dist/internal/harness.d.ts +4 -3
- package/dist/internal/harness.js +3 -2
- package/dist/orchestration/run-workflow-tool.d.ts +7 -1
- package/dist/orchestration/run-workflow-tool.js +28 -11
- package/dist/orchestration/workflow-governance.d.ts +1 -1
- package/dist/orchestration/workflow.d.ts +6 -0
- package/dist/orchestration/workflow.js +5 -8
- package/dist/stores/file/checkpoint-store.d.ts +2 -0
- package/dist/stores/file/checkpoint-store.js +7 -6
- package/dist/stores/file/fs-atomic.d.ts +0 -22
- package/dist/stores/file/fs-atomic.js +0 -17
- package/dist/stores/file/index.d.ts +2 -9
- package/dist/stores/file/index.js +2 -4
- package/dist/stores/file/session-store.d.ts +13 -7
- package/dist/stores/file/session-store.js +42 -18
- package/dist/tools/fs/bash-program-position.d.ts +3 -2
- package/dist/tools/fs/bash-program-position.js +10 -10
- package/dist/tools/fs/program-read-model.d.ts +34 -10
- package/dist/tools/fs/program-read-model.js +37 -7
- package/dist/tools/fs/program-read-model.rows.js +13 -2
- package/dist/tools/fs/read-deny.d.ts +13 -1
- package/dist/tools/fs/read-deny.js +10 -2
- package/dist/tools/fs/removal-targets.js +5 -5
- package/dist/tools/fs/safety.d.ts +2 -0
- package/dist/tools/fs/safety.js +1 -1
- package/dist/tools/fs/shell-read-argv.d.ts +11 -2
- package/dist/tools/fs/shell-read-argv.js +45 -29
- package/dist/tools/fs/shell-read-bindings.d.ts +20 -2
- package/dist/tools/fs/shell-read-bindings.js +153 -69
- package/dist/tools/fs/shell-read-brace.d.ts +18 -0
- package/dist/tools/fs/shell-read-brace.js +79 -0
- package/dist/tools/fs/shell-read-check.js +29 -11
- package/dist/tools/fs/shell-read-establish.js +43 -22
- package/dist/tools/fs/shell-read-functions.js +2 -2
- package/dist/tools/fs/shell-read-judge.d.ts +11 -0
- package/dist/tools/fs/shell-read-judge.js +3 -3
- package/dist/tools/fs/shell-read-object-path.d.ts +59 -0
- package/dist/tools/fs/shell-read-object-path.js +119 -0
- package/dist/tools/fs/shell-read-plan.d.ts +18 -0
- package/dist/tools/fs/shell-read-plan.js +217 -104
- package/dist/tools/fs/shell-read-start.d.ts +76 -13
- package/dist/tools/fs/shell-read-start.js +97 -17
- package/dist/tools/fs/shell-read-word.d.ts +10 -0
- package/dist/tools/fs/shell-read-word.js +9 -5
- package/dist/tools/fs/shell-read-workdir.d.ts +54 -14
- package/dist/tools/fs/shell-read-workdir.js +103 -19
- package/dist/tools/fs/shell-read-write-targets.js +13 -8
- package/dist/tools/worktree.d.ts +3 -2
- package/dist/tools/worktree.js +7 -35
- package/package.json +3 -2
- package/test/export-surface.snapshot.json +93 -43
- package/wire-changes/core-stores-sql@7.62.0.json +30 -0
- package/wire-changes/core-stores-sql@7.63.0.json +30 -0
- package/wire-changes/core@7.62.0.json +2181 -0
- package/wire-changes/core@7.63.0.json +3523 -0
- package/wire-changes/mods-kernel@7.62.0.json +42 -0
- package/wire-changes/mods-kernel@7.63.0.json +30 -0
- package/wire-changes/primitives@7.62.0.json +30 -0
- package/wire-changes/primitives@7.63.0.json +445 -0
- package/dist/core/consolidate-scope.d.ts +0 -93
- package/dist/core/consolidate-scope.js +0 -98
- package/dist/core/credential-vocabulary.d.ts +0 -176
- package/dist/core/credential-vocabulary.js +0 -190
- package/dist/core/redaction-passes.d.ts +0 -82
- package/dist/core/redaction-passes.js +0 -377
- package/dist/core/runner/memory-consolidation.d.ts +0 -109
- package/dist/core/runner/memory-consolidation.js +0 -251
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,843 @@
|
|
|
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
|
+
|
|
529
|
+
## 7.62.0 — 2026-10-31
|
|
530
|
+
|
|
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)
|
|
532
|
+
|
|
533
|
+
- **Retired (C-R1075 ①).** hard-breaking: three exports removed (open to veto) — MemoryStore (type) / consolidateScope / runMemoryConsolidation — and, in the same cut, every root name only those two passes read: `CONSOLIDATION_SYSTEM_PROMPT`, `DEFAULT_CONSOLIDATION_BAND`, `DEFAULT_CONSOLIDATION_SEARCH_LIMIT`, `DEFAULT_CONSOLIDATION_MAX_NOTES`, `normalizeForExactMatch`, `advanceCursorAfterInline`, `createFileConsolidationLock`, and the types `ConsolidationParams`, `ConsolidationStats`, `ConsolidationNote`, `ConsolidationLLM`, `ConsolidateScopeDeps`, `ConsolidateScopeOptions` (`npm run handoff:diff origin/stage-7620 HEAD`: 16 removed / 0 added). `src/core/consolidate-scope.ts` and `src/core/runner/memory-consolidation.ts` are deleted; the file backend's per-scope consolidation lock (`FileStorageBackend.consolidationLock`, the `consolidation-locks/` directory it created under the data root) goes with its factory.
|
|
534
|
+
- **Hard-breaking — HB-1, sixteen root names and one backend member removed (open to veto).** *What changed:* the names above are no longer exported from `@sema-agent/core`, and a `FileStorageBackend` no longer carries `consolidationLock` nor creates `consolidation-locks/`. *Who is affected:* a host that imports any of the sixteen names, or calls `backend.consolidationLock`, fails to compile (a JavaScript caller reads `undefined`); the origin/main of server, cli, client-core, sdk and test, and the HEAD of the dgx checkouts that import core, carry no code reader of any of them. *What to read instead:* memory is the MemoryEngine behind `RunnerDeps.memoryBackend` and its consolidation is the engine driver (`runMemoryConsolidationDriver`, `resolveMemoryConsolidationDriver`); a host injects an engine backend, not a store.
|
|
535
|
+
- **What does not change.** The Runner never read these names (design/157 B19 removed `RunnerDeps.memoryStore`). The store implementations `InMemoryMemoryStore`, `FileMemoryStore`, `guardedMemoryStore`, `FileStorageBackend.memoryStore` and the store helpers of `src/core/memory.ts` stay exported until the store family retires (their faces now sit on one retirement line, RL-1654-store-family, `retireBy` 7.63.0, which also groups the ledger-v1 row). The anchor backfill arm is not touched: a control plane that holds a store but no root anchor still records the anchor at its next open and says `memory.root_anchor_backfilled` (RL-1103-anchor-backfill re-windowed to 7.63.0 with the store family's persisted-form retirement). The checkpoint version ladder is not touched: a v≤9 checkpoint row is read by its number as before (RL-1333-checkpoint-numeric re-windowed to 7.63.0, on the backends' census of v≤9 parked rows).
|
|
536
|
+
- **Who needs it / compensation.** *Needs it:* every reader of the root surface — sixteen names that read as a supported second memory path while no engine path used them. *Compensation:* none needed; zero code readers downstream.
|
|
537
|
+
- **Consumers.** @server: zero code readers on origin/main; the memory backend injection is unchanged. @dgx: zero readers; engine memory backends are injected as before. @client-core: zero readers; a generated export table regenerates on pickup. @test (black box): none of the sixteen names is a root export of the 7.62.0 dist (`import { consolidateScope } from "@sema-agent/core"` is a compile error, a runtime read is `undefined`).
|
|
538
|
+
- **Pins.** `test/backlog1654-store-exports-retired.test.ts` — R1 (the nine value names are no runtime export of the root; control: the engine driver is) · R2 (none of the sixteen names is spelled in `src/index.ts` outside a comment; control: the three store implementations still are) · R3 (the two pass modules are gone) · R4 (a file backend has no `consolidationLock` and creates no `consolidation-locks/`; control: `memoryStore` stays) · R5 (the retirement table: the three rows gone, RL-1654-store-family due 7.63.0 and grouping the ledger-v1 row, the three lines left for 7.63.0 untouched). The pins that exercised the retired passes and the lock are deleted with them (`consolidate-scope.test.ts`, `consolidate-scope-property.test.ts`, `memory-consolidation.test.ts`, `effect-seamB-mech.test.ts`, and the consolidation blocks of six mixed files).
|
|
539
|
+
|
|
540
|
+
### An extension sees the leg open, each model turn start, the context measured and a person's prompt before the classic screen, and may rewrite or drop that prompt — `session.start`, `turn.start`, `session.measure`, `prompt.submit`, `classic.SessionStart` / `classic.SessionEnd`; `$.session.turns` / `usage` / `version`, `$.session.messages({ agentId })` (#3010 / #3011, the last two slices of #1933; ruled C-R985 Q2 A / Q3′ A / Q7 A and C-R1071; behavior change; hard-breaking: four, three sentences each below, open to veto; closed sets: the event table +3 names (`prompt.change`, `session.identity`, `ui.view`, named only), +6 stations, +3 methods; exports: +5 root types `SessionStartEvent`, `SessionEndEvent`, `SessionUsage`, `SessionVersion`, `ContextOccupancy`; members: +1 optional `human_input.rewrittenBy` (wire +1 optional key), +1 method `TaskRegistry.anchoredSession`, `TaskRegistry.bindBackgroundAgentSession` +1 required parameter) (@server @cli @client-core @test)
|
|
541
|
+
|
|
542
|
+
- **Before.** The leg's opening, a model turn's start, the context measurement and a person's prompt before the classic screen had no station; `classic.SessionStart` and `classic.SessionEnd` were names with no station; `$.session.usage`, `turns` and `version` threw "not callable on the engine bus in this version"; `$.session.messages()` took no argument; an extension could only `block` a prompt through `classic.UserPromptSubmit`, never rewrite it.
|
|
543
|
+
- **Now — the leg's lifecycle.** `session.start` is raised first thing in the leg's body (its `$` seats bound, before its first model request) with `{ cwd, sessionId, agentId? }`, and its bottom raises `classic.SessionStart` with the same `e`; `turn.start` once per model turn, before that turn's request, with `{ turn }` (the number `turn.complete` carries for it); `session.measure` at a turn boundary whose context occupancy moved, with `{ context: { usedTokens, windowTokens, compactAtTokens }, changed: ["context"] }` — the boundary's `context_usage` numbers, so not where no `context_usage` is emitted (within-task compaction off, the leg ending, the compaction circuit open; KL-3010-c); `session.end` (unchanged place) now raises `classic.SessionEnd` in its bottom, and a resumed leg refused because its approved call's tool is gone (`resume.tool_unavailable` / `resume.tool_contract_mismatch`, the one exit that leaves without the settle) raises it too, `reason: "failed"`, before the error comes out. Every one is an observation (skip · grace); each is raised only when a handler hangs on it or on its classic event.
|
|
544
|
+
- **Now — the prompt's screen.** `prompt.submit` is raised at the four entrances that screen a person's prompt (an operator's objective, a live steer, a wake's message before its claim, a parked steer redelivered), before `classic.UserPromptSubmit`, which its bottom raises on the text handed down. `next({ ...e, text })` rewrites the prompt and the entrance delivers the rewritten text; `{ drop: <reason> }` refuses it as the classic screen's `block` does there; a failing handler refuses it (refuse · immediate; `source`, `inputId`, `actor` pinned). The classic screen's own refusal is final. The `human_input` account the entrance mints carries `rewrittenBy` (the `"applied"` frame of an objective, a wake's message or a parked steer; the `"queued"` frame of a live steer). Who changed the text is read off the chain as it runs, one reading for `prompt.submit` and `session.receive` (`received.rewrittenBy`): a handler is named when it hands on a different text, or answers a different text than the one that came up to it — **fix for `session.receive` (7.61.0)**: an outer handler that only carried an inner one's rewritten answer up (`return { ...(await next(e)) }`) was named as the rewriter and the inner one was not; now the inner one is named and the copier is not. One predicate decides whether an entrance screens: a handler on `prompt.submit` or on `classic.UserPromptSubmit` (the wake's pre-claim screen read only the classic event before). `$.prompt.submit` is not in this version; see #3284.
|
|
545
|
+
- **Now — the session's read faces.** `$.session.turns()` counts the transcript's prompts from its people (a row whose door is `prompt`; a steer is the engine's note, not one — KL-3010-a); `$.session.usage()` answers `{ context? }`, the leg's latest boundary measurement (none before the first boundary, none on `Runner.compactSession`); `$.session.version()` answers `{ version }`, the package's; `$.session.messages({ agentId })` reads a subagent's stored rows through the leg's own task list row (`TaskRegistry.anchoredSession`, the access the leg's task tools read with) and rejects with the reason for a row the leg does not reach, a row with no session, or a session its store cannot read (KL-3010-b). The child's rows are read in the store its row carries — the store the child's run holds its session through, bound with the session id when the spawn binds the row — never in the leg's own: a child the Agent tool runs on a runner of its own is read in that runner's store, and a leg-side session that happens to share the child's id is not read.
|
|
546
|
+
- **Hard-breaking — HB-1, the kernel contract is 8 (open to veto).** *What changed:* `KERNEL_CONTRACT_VERSION` is 8 (7 since 7.61.0): the closed set is the reference's 145 names (Claude Code 2.1.309 `_De`, cli309.js:253322), six events gained stations and three methods have bottoms. *Who is affected:* a mod package whose `hooks/hooks.json` says `"contract": 7` is refused by `loadModPackage` (server S-2388's real package, cli MODS155, test C-R915 fixtures; server `test/mods-loader-pickup.test.ts` pins 6); a host comparing a kernel copy's table (client-core's table generation: +6 stations, +3 methods, +3 names). *How to migrate:* write `"contract": 8`; regenerate the table copy from `MOD_EVENT_TABLE`; compensation = the kernel table and the station table (`docs/INTEGRATION-CORE.md` §10.16) ride the arrival post.
|
|
547
|
+
- **Hard-breaking — HB-2, `session.end`'s bottom raises `classic.SessionEnd` (open to veto).** *What changed:* a `session.end` handler wraps the `classic.SessionEnd` handlers (R-W4); one that answers without calling `next` keeps `classic.SessionEnd` from being raised. *Who is affected:* a deployment hanging both events and assuming they are independent (none in this tree or in the three neighbour repositories). *How to migrate:* call `next(e)` in a `session.end` handler that should let the classic event run; order-sensitive observers read `classic.SessionEnd` as inside `session.end`.
|
|
548
|
+
- **Hard-breaking — HB-3, `$.session.messages` takes `{ agentId }` (open to veto).** *What changed:* the method takes one optional key; with it, it answers the subagent's stored rows, and any other key is the caller's throw. *Who is affected:* code that passed an argument the method used to refuse (it still refuses every key but `agentId`), and type-level code that implements `EngineDollar["session"]["messages"]` (an overload was added). *How to migrate:* nothing for a call with no argument; a host's own `$` implementation adds the overload.
|
|
549
|
+
- **Hard-breaking — HB-4, `TaskRegistry.bindBackgroundAgentSession(id, sessionId, store)` (open to veto).** *What changed:* the bind takes the store the child's run holds that session through, keeps it on the row beside the id (process-local; the durable record keeps the id alone) and the release ends both; the store is judged where it is read (`$.session.messages` refuses, naming why, a row bound without a store or with one it cannot read through). *Who is affected:* a caller of the two-argument form — none in this tree outside the Agent tool's three bind sites; @server two test files bind directly (`test/background-session-reap-s745.test.ts`, `test/core-probe-parked-registry.test.ts`). *How to migrate:* pass the store the child's session lives in (the runner's `sessions` that runs the child); a test that never reads the transcript passes any `{ acquire }`. This closes #3293 (the 7.62.0 review leg's finding: the `$.session.messages({ agentId })` face read the parent runner's `sessions` for every child, so a child run on its own store answered "not a child", and a parent-store row with the same id answered an unrelated transcript — the anchor is now the (id, store) pair on the row, read through one function, `childSessionAnchorOf`); and the registry's `rowsUnder` reads that one source again (#2861 I1), nothing else of #2861 lands here.
|
|
550
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an extension that redacts or tags a prompt before the model sees it, or that observes the leg's lifecycle the way the reference's mods do. *Affected:* HB-1–HB-4. *Compensation:* the station table rides the arrival post; divergences D-3010-a (turns without steers), D-3011-a (the lifecycle classic answers are not read — `additionalContext` / `initialUserMessage` not taken), D-3011-b (a failing `prompt.submit` handler refuses where the reference skips) and D-3011-c (`turn.start` carries the turn's number, as `turn.complete` does, not the reference's `turnId`) are open to veto.
|
|
551
|
+
- **Consumers.** @server: the contract is 8 — S-2388's package and the `mods-loader-pickup` pin move from 6 to 8 at pickup; `human_input.rewrittenBy` passes through (additive); the two test files that call `bindBackgroundAgentSession` directly pass the store (HB-4). @cli: MODS155 at contract 8; the six stations render in the station view; a rewritten prompt's account names the extension. @client-core: the kernel table copy +6 stations, +3 methods, +3 names; `rewrittenBy` enters the `human_input` frame type. @test: black box — each station fires once where §10.16 says, in order; `$.session.messages({ agentId })` refuses another owner's agent; a rewritten objective is what the model reads.
|
|
552
|
+
- **Pins.** `test/backlog3010-3011-mods-s4.test.ts` — K1 (the six stations, the three methods, the three named-only names, contract 8) · S1 (order and shapes on a real Runner: `session.start` with `classic.SessionStart` inside before the first request, `turn.start` per turn, `session.end` with `classic.SessionEnd` inside last) · S2 (a cancelled leg: each once) · S3 (R-W4: a typed handler without `next` keeps the classic event from being raised; a classic handler alone is raised) · S4 (a throw on any of the six changes nothing) · S5 (a resume refused with `resume.tool_unavailable`: `session.end` `failed` pairs the resumed leg's `session.start`) · E1 (no registration and pass-through handlers on all seven send the same requests, store the same rows, end the same way; no frame carries `rewrittenBy`) · T1 (`turn.start` before the turn's request, the number `turn.complete` carries) · M1 (`session.measure` and `$.session.usage()` read the `context_usage` numbers) · M2 (the seat is written at every measuring boundary, the event raised only when the occupancy moved) · M3 (within-task compaction off: no `context_usage`, no `session.measure`, `usage()` is `{}`) · R1 (`$.session.turns()` = 1 with a live steer; `$.session.version()` = package.json) · A1 (`$.session.messages({ agentId })`: a reached row reads its rows; another owner's, an unknown id and an unbound row are refused, naming why) · A2 (a child the Agent tool runs on a runner of its own: the leg, whose store never held the child's session, reads the child's rows in the store the row carries) · A3 (the same session id in the leg's store with other rows: the read answers the child's transcript) · A4 (the bind keeps the store with the id, reached under the row's access only; the release ends both; A1 also reads a row bound without a store and one whose store cannot read, each refused naming why) · P1–P3 (the objective: rewritten text delivered and stored, the classic screen on it, `rewrittenBy`; a drop and a throw refuse; the classic block is final) · P4 (a live steer: the frame rewritten, the queued account names the rewriter) · P5 (a wake's message, screened once, before the claim) · P6 (a parked steer redelivered; the sibling unchanged, no `rewrittenBy`) · P7 (a `prompt.submit` handler alone screens the wake's message; `$` throws there) · P8 (`rewrittenBy` names a handing-on rewriter and an answering one, in order; the classic screen is then not asked) · P9 (an outer handler copying an inner redactor's answer up is not named; the redactor is) · P10 (the shared reading, unit). Mutations per fixture: `.gate-logs/criteria-3010-3011-mutations.md`. Re-pinned: `mods-kernel-296` (the 145-name fixture `cc309-mod-events.json` replaces `cc296-mod-events.json`), `mods-kernel-wave2` (the classic map's two keys; `prompt.*` selects `prompt.submit`; the not-callable sample is `session.identity`), `mods-kernel-registration` (the stationless classic sample is `classic.Notification`), `mods-methods` (the three read faces and `messages({ agentId })`), and the three mod package fixtures (`"contract": 8`).
|
|
553
|
+
|
|
554
|
+
### A place a substitution or a launched shell's text names itself stays where it is — the read boundary and the removal guard no longer move an absolute `cd`, `git -C` or `-C ~` at or under the working directory onto the segment the text sits in (#3235; behavior narrowing — security, thirteen forms below, the last one (an `eval` climb) open to veto; behavior widening — one form, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
555
|
+
|
|
556
|
+
- **Before.** A nested text — a `$( … )` body, a here-document's substitution, a launched shell's command string (`bash -c '…'`) — was planned as if it stood in the declared working directory, then re-based onto the segment it sits in by prefix: every base spelled at or under the declared working directory was taken to come from where the text starts and was moved. So a place the text names itself moved too. With the working directory at the home, `cd proj && echo $(cd <home> && cat .mcp.json)` was judged as reading the project's `.mcp.json`, while bash read the home's. The station vouched; on the default seat the substitution's own ask was the only question; on a seat that puts no ask the home's file was printed. The same happened to `git -C <home> show HEAD:.mcp.json`, `git -C <home> show HEAD:./.mcp.json` and `git -C ~ show HEAD:.mcp.json` in a substitution. With the working directory at `/`, every absolute place moved: `cd ./tmp && echo "$(cd / && rm -rf ./usr)"` was judged as removing `/tmp/usr`.
|
|
557
|
+
- **Now — one rule.** A nested text with no working directory of its own starts at a placeholder no text can spell (`nestedStartOf`, `src/tools/fs/shell-read-start.ts`). A base is moved onto the enclosing segment exactly when it was derived from that placeholder: the start itself, a relative move from it, a `-C` / `..` walk from it. Every other place stays where it is — an absolute `cd`, `git -C <dir>`, `-C ~`, `cd ~`, a `CDPATH` entry, the place a closed scope went that the held thread hands in. No `cd` or `-C` word is special-cased. A base is read as derived by the placeholder's own segment, not by the spelling above it, so a working directory spelled `/w/.` or `/w//` changes nothing. A lost `cd` target's deny floor keeps its `..` walk, so a climb from the start stays derived from it. `PWD` reads no start that holds the placeholder — the nested text's own, and an `eval` text's that the nested text runs: a climb there is lost and judged on its floor, never folded past the start. A derived floor with nowhere to land is no floor, and the judge reads the declared working directory as before.
|
|
558
|
+
- **Narrowing (security), by form.** Working directory at the home, deny row `~/.mcp.json` or `**/home/.mcp.json`; bash 3.2 reads the home's `.mcp.json` in each. On stage-7620 70cdb9681 the station vouched or could not place these, the default seat asked once, and the bypass seat printed the home's file. They are now refused:
|
|
559
|
+
- `cd proj && echo $(cd <home> && cat .mcp.json)`
|
|
560
|
+
- `cd proj && echo $(git -C <home> show HEAD:.mcp.json)`
|
|
561
|
+
- `cd proj && echo $(git -C <home> show HEAD:./.mcp.json)`
|
|
562
|
+
- `cd proj && echo $(git -C ~ show HEAD:.mcp.json)`
|
|
563
|
+
- the same read in a here-document's substitution: `cd proj && cat <<EOF` ⏎ `$(cd <home> && cat .mcp.json)` ⏎ `EOF`
|
|
564
|
+
- in a child shell's text: `cd proj && bash -c 'cd <home> && cat .mcp.json'`
|
|
565
|
+
- `cd proj && echo $(cd ~ && cat .mcp.json)`
|
|
566
|
+
- a substitution inside a substitution: `cd proj && echo $(echo $(cd <home> && cat .mcp.json))`
|
|
567
|
+
- `cd proj && echo $(cd <home>/proj && cat ../.mcp.json)`
|
|
568
|
+
|
|
569
|
+
Two more are refused under an unanchored row:
|
|
570
|
+
- `f(){ cd <home>; }; cd proj && echo "$(f; cat .mcp.json)"` — the home the body went to is on the floor, not moved onto the project.
|
|
571
|
+
- `cd proj/deep && echo $(cd ../.. && cat .mcp.json)` — the lost climb's floor.
|
|
572
|
+
|
|
573
|
+
The removal guard reads the same plan: `cd ./tmp && echo "$(cd / && rm -rf ./usr)"` (working directory `/`) is `dangerous_delete`.
|
|
574
|
+
|
|
575
|
+
One more is unplaced where it was placed (open to veto — such a text is judged on its floor and so asks more often): `echo "$(eval 'cd /x && cd ..' && cat f)"` was judged at `/`; an `eval` text inside a substitution now reads `PWD` as the substitution does, so the climb is lost and `f` is judged on its floor, as `echo $(cd /x && cd .. && cat f)` already was.
|
|
576
|
+
- **Widening — one form (open to veto).** `cd noproj && echo $(git -C <home>/proj show HEAD:.mcp.json)` (working directory at the home) was refused, and now asks on the default seat and runs on a seat that puts no ask. The absolute `-C` was moved under `noproj`, the repository-top probe started where nothing is, and every ancestor met the home's row. Git prints the project's own file. `KL-1726-c` is closed.
|
|
577
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* every deployment that guards a file under the working directory — the home most of all — from a model that can spell the file's directory absolutely in a substitution. *Affected:* a text that reads a guarded file through its own absolute `cd` / `-C` inside a substitution or a launched shell's text: refused where it ran or asked. *Compensation:* none needed; a project's own file read through an absolute `-C` runs (the widening above).
|
|
578
|
+
- **Consumers.** @cli @server: the engine you embed (7.61.0 and earlier) moves those places. The forms above vouch there, and on a seat with no ask they read the guarded file. They are refused once you take this engine. No wire change, no new code (`read_path_denied`). @test: please re-run the car-1726 cx-probe forms X1 / X2 / X3 / X6 (now refused) and X8 (now runs), and try the nested doors this pin does not cover. Not this root: the directory a launcher's own `-C` names was not where its shell's text started (`env -C <home> bash -c 'cat .mcp.json'` from a project, under an unanchored row) — closed in this release by #3275, the next section.
|
|
579
|
+
- **Pins.** `test/backlog3235-rebase-plan-nested.test.ts` has 119 cells. 27 forms are each read four ways: the station's verdict, the real Runner lane on the bypass and the default seat (`B3235_COLUMN=base` re-reads stage-7620 70cdb9681), and `/bin/bash` in the same world — a stand-in home that is a git repository, a project repository under it, and no host environment. Beside them sit the plan cells: an absolute place stays, a derived one follows; the working directory at `/`; a Windows-family working directory; the held-thread floor and the lost climb; an `eval` climb inside a substitution; a working directory spelled with `.`, `//` or `..` (and the station under `<home>/.`); no plan names the placeholder; a derived floor with nowhere to land; the removal guard; a command that spells the placeholder itself (the station asks, the executor does not start it). Eight mutations (M1–M8), each red on its own fixtures — M1–M3, M7 and M8 on the final tree, M4–M6 on an earlier tree of the same branch.
|
|
580
|
+
|
|
581
|
+
### A text a launcher hands a shell starts in the working directory the launcher settles — `env -C <dir> bash -c '…'` is judged in `<dir>`, not where the command line stands (#3275; behavior narrowing — security, ten forms below; behavior widening — four forms, open to veto; divergence D-3275-a, open to veto; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
582
|
+
|
|
583
|
+
- **Before.** A launcher that moves the working directory its program runs in (`env -C <dir>`, `env --chdir=<dir>`, `sudo -D <dir>`, `unshare -w <dir>`) was read only as "moved". The text it hands a shell, and the program's own relative words, were left unplaced, with the directory the command line stood in as their deny floor. From a project under the home, `env -C <home> bash -c 'cat .mcp.json'` was checked at `<home>/proj/.mcp.json`. Under a row anchored to the home (`~/.mcp.json`) it was refused anyway. Under an unanchored row (`**/home/.mcp.json`) the station could not place the read and did not meet the row. The default seat asked once, and a seat that puts no ask printed the home's file. `env -C <home> cat .mcp.json` did the same.
|
|
584
|
+
- **Now — one rule.** A launcher option whose value is a working directory (the row table's `base: "working-directory"` role; no launcher is special-cased) is where the text that launcher hands a shell starts, as after `cd <dir>`. The directory is taken from where the command line stands, by the kernel's walk of the spelling (`..` kept). Each launcher of a chain applies in turn. Of several such options on one launcher the last wins — so macOS `env` reads them (measured); GNU `env`, `sudo` and `unshare` are inferred, not run. The reference's worktree guard (Claude Code 2.1.309, `cli309.js:266249`) refuses an `env` with more than one ("passes more than one -C/--chdir to env (last-wins semantics), which cannot be verified"): divergence D-3275-a, open to veto. Which word is whose option is read off the program-position walk's own steps, the one reading of it: env steps a lone `-` and reads on, so `env -C <proj> - -C <home> …` runs in the home. The same chdir step now serves `git -C` (`chdirFrom`, `src/tools/fs/shell-read-object-path.ts`). The text is planned from its placeholder start and re-based onto that directory, so a place it names itself (`cd /x`) stays where it is. The segment's own relative words may belong to the launcher (`-C sub` is relative to the command line) or to the program. They stay unplaced, and their deny floor is now both places. Where the text does not say where the launcher runs the program, everything stays as before: a value that expands, an empty one, `~user`, a root or program-search move in the chain (`sudo -R`, `env -P`), `nsenter -w` with no value, an optional value attached as `=V` (`nsenter -w=V`, `--wd==V`: util-linux 2.41 drops the `=`, 2.38 keeps it, two places). A walk that already lost track stays lost, and the launcher's directory moves its floor. A redirection, and a substitution the shell runs itself, stay where the command line stands.
|
|
585
|
+
- **Narrowing (security), by form.** Working directory `<home>/proj`, unanchored row `**/home/.mcp.json`; bash 3.2 reads the home's `.mcp.json` in each. On stage-7620 092bfda61 the station could not place these and did not meet the row: the default seat asked, the bypass seat printed the file. They are now refused (`read_path_denied`):
|
|
586
|
+
- `env -C <home> bash -c 'cat .mcp.json'`
|
|
587
|
+
- `env -C <home> sh -c 'cat .mcp.json'`
|
|
588
|
+
- `env -C .. bash -c 'cat .mcp.json'` (and `cd proj && env -C .. bash -c 'cat .mcp.json'` from the home)
|
|
589
|
+
- `env -C ~ bash -c 'cat .mcp.json'`
|
|
590
|
+
- `env -C <home>/proj -C <home> bash -c 'cat .mcp.json'` — the last `-C` wins
|
|
591
|
+
- `nice env -C <home> bash -c 'cat .mcp.json'`
|
|
592
|
+
- `env -C <home> cat .mcp.json` — the program's own word, the launcher's directory on its floor
|
|
593
|
+
- `env --chdir=<home> bash -c 'cat .mcp.json'` — GNU env; the macOS env refuses the long spelling and runs nothing
|
|
594
|
+
- `env -C <home>/proj - -C <home> bash -c 'cat .mcp.json'` — the `-C` after env's lone `-`
|
|
595
|
+
- `env -C <home> -S 'cat .mcp.json'` — env's own split string; on that tree the default seat asked and the bypass seat refused it too
|
|
596
|
+
|
|
597
|
+
The removal guard reads the same plan: `cd ./tmp && env -C / bash -c 'rm -rf ./usr'` (working directory `/`) is `dangerous_delete`, not `unverifiable_delete`.
|
|
598
|
+
- **Widening — four forms (open to veto).** Each was refused, and now asks on the default seat and runs on a seat that puts no ask, as any child shell's text that meets no row does. Bash reads the project's own `.mcp.json` in each. The old floor — where the command line stood, or a walk from there — met the home's row. The text now starts where the launcher put it, the project.
|
|
599
|
+
- `env -C <home>/proj bash -c 'cat .mcp.json'` — working directory the home, row `~/.mcp.json`
|
|
600
|
+
- `env -C <home> env -C proj bash -c 'cat .mcp.json'` — the same
|
|
601
|
+
- `env -C <home>/proj bash -c 'cd deep && cat ../.mcp.json'` — working directory `<home>/noproj`
|
|
602
|
+
- `env -C <home> -C <home>/proj bash -c 'cat .mcp.json'` — working directory the home, row `~/.mcp.json`; the last `-C` wins (D-3275-a above)
|
|
603
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose deny rows are not anchored to the home (`**/name/file`), against a model that reaches the file by handing its directory to a launcher. *Affected:* a command that reads a guarded file through `env -C`, `sudo -D` or `unshare -w`: refused where it ran or asked. *Compensation:* none needed; a project's own file read through a launcher's `-C` asks instead of being refused (the widening above).
|
|
604
|
+
- **Consumers.** @cli @server: the engine you embed (7.61.0 and earlier) leaves these texts unplaced, so a seat with no ask reads the guarded file under an unanchored row. They are refused once you take this engine. No wire change, no new code. @test: please run the narrowing forms black-box on the bypass seat (no output, `read_path_denied`), the four widening forms (asked / run), and a launcher this pin runs only in the plan (`sudo -D`, `unshare -w`). Not this root: a directory the text computes at runtime (`env -C "$(…)"`, `cd "$(…)"`) stays unplaced, as before, and so does a `-C` written inside env's split string (`env -S '-C <home> cat .mcp.json'`: env reads it, the plan reads the string as a command line; the default seat asks, the bypass seat refuses it). Also not read: where `chroot <root>` runs a text — `env -C <dir> chroot <root> bash -c '…'` is placed at `<dir>` while chroot runs it at `<root>` (KL-3295-a, #3295; it needs root).
|
|
605
|
+
- **Pins.** `test/backlog3235-rebase-plan-nested.test.ts`, a `#3275` section in the #3235 world: 19 forms, each read four ways (`B3275_COLUMN=base` re-reads stage-7620 092bfda61); the #3235 table's `S2` cell is now refused. Plan cells cover each spelling of the family (`-C`, `-C/x`, `-iC`, `--chdir`, `--chdir=`, `sudo -D`, `sudo --chdir=`, `unshare -w`, `nsenter -w/x`, `nsenter --wd=/x`, a `-C` after env's lone `-`), relative, `..`, `~` and bound values, the last option winning, a chain, a substitution around the launcher, a place the launched text names, the moves left unsaid, a lost walk, the segment's own words, a redirection and a substitution, and no placeholder left. Removal-guard cells, the `=V` forms among them. Eight mutations (MA–MH), each red on its own fixtures. What bash opens for `env --chdir=` and for a `-C` after env's lone `-` is probed once on the host, since GNU env and the macOS env read the two apart (GNU takes `--chdir=` and ends its options at `-`); the engine's own readings are the same on both.
|
|
606
|
+
|
|
607
|
+
### Errata to the 7.61.0 section (that section is frozen; the corrections live here)
|
|
608
|
+
|
|
609
|
+
- The #3212 section's Consumers sentence "@cli (L-2225): the latch definition sentence reads `sourceSessionId`" was untrue. The shell's interrupt-marker latch compares `detail.taskId` and keeps comparing it: @cli (L-2225): no key change — the latch keeps comparing `detail.taskId`; L-2225 rewrites its comment only. (The #3213 section's sentence that the latch compares `detail.taskId` was true.)
|
|
610
|
+
- A #3155 sentence said the server, cli and client-core build none of the delegation handles outside a Runner and call no such verb; the server half was untrue: the server drives delegation tools outside a Runner at parked redemption and at operator resume.
|
|
611
|
+
- The #2940 / #2760 section said of `judgeMailboxAppendById`'s new signature "@server's twins today call it nowhere, so the version that will"; that was untrue of the server: its SQL mailbox store calls it (`mailbox-store-sql.ts:154`), so the new first parameter `{ held, consumed }` is a hit there, to be met at its pickup.
|
|
612
|
+
- The Before sentence of the #3059 section said an inherited `permissionMode` or `appendSystemPrompt` stopped at the first copy; only an inherited `appendSystemPrompt` did — `permissionMode` was already read through the prototype.
|
|
613
|
+
- The #3079 section said the placement probe reads one 64 KiB block whatever the log's size; that holds only when the row's header fits one block (a 100 KiB header reads two). The true bound is the header's size, not the log's.
|
|
614
|
+
- The #3202 section's Consumers named no change for the server's `TaskSpec`s. The server carries three host facts on a spec as symbol-keyed members (`sema-server.handsLane`, `runSkills`, `legSessionWitness`), and an engine at 7.61.0 refuses such a spec `config.spec_unknown_key`: a symbol own key is an own key (C-R996 K6, the #3059 section; ruling note 2 keeps that reading). @server: move the three facts to a side table keyed by the spec object (SPECCARRIER, server 7.143.0); nothing else moves.
|
|
615
|
+
- The #3156 section said "Claude Code … has no durable park" for a session note held to the serialization point. That was too strong: Claude Code 2.1.309 does carry a parked approval across workers (`cli309.js:289257`, read for #3255, divergence D-3156-a). The corrected reading: the reference keeps the note in place at once, and its cross-worker handoff reads a transcript that already holds the kept note, so no row rides the park there — the handoff chain was read from the entry point, not hop by hop (an inference). Sema's choice (the note rides the park checkpoint as `heldRows`) stands as a registered divergence; the sentence, not the design, is corrected.
|
|
616
|
+
|
|
617
|
+
### A row the engine parks says an absent member one way — by leaving it out — on every store, and a member is present exactly when its value is not `undefined` (#3277 = #3254 S1, ruled C-R1066 option B, open to veto; behavior change — the keys an in-process store holds for an engine-written row; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
618
|
+
|
|
619
|
+
- **Before.** The state serializer names every member of a parked row's `state`, an absent one as a key holding `undefined`, and the stamp kept such keys: an in-memory store held a fresh approval park with 26 of them in `state` and 2 at the top (`deadline`, `humanReview`), the File store none. Both stores' resolve wrote `reopenReason: undefined`, after which the File store answered `"reopenReason" in row` true before a compaction and false after it. By value every store already answered alike; by key no answer was stable, and the documentation held both readings (INTEGRATION-CORE: never branch on `in`; `CheckpointSummary`: test presence with `in`).
|
|
620
|
+
- **Now.** One reading: a member is present exactly when its value is not `undefined` — the receipt law's member half (which names a caller handed over stays the name half, read by key). One absence form on the rows the engine writes: the one stamp (`stampCheckpointRequirements`) writes a row's top level and its `state` with an absent member omitted, and a resolve removes `reopenReason`. Below those two levels the row is written as given — a tool call's arguments, a decision-read record and the resource ledger keep a key holding `undefined`, which the binding hash, the row digest and the park's argument comparison read (`StoreFidelity` keeps that loss on its list and now says its reach). A store's `put` is not normalized.
|
|
621
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an in-process reader of a row (`Object.keys`, a spread over defaults, `in`) that answered differently on the in-memory store, and the File store's own answer across a compaction. *Affected:* the bytes an in-memory or structured-clone store holds for an engine-written row (fewer keys). The requirement words and the row digest do not move (they read by value), so a row a 7.61.0 engine parked — its keys holding `undefined` included — judges `ok` on this engine; the wire is unchanged (JSON never carried those keys). *Compensation:* none needed.
|
|
622
|
+
- **Known limit (KL-3277-a).** A row a host `put`s itself with a member holding `undefined` is stored as given: the in-memory store keeps the key, the File store drops it — by key the two still differ, by value they agree.
|
|
623
|
+
- **Consumers.** @server (SQL twin, cc): a JSON store already reads this way; the contract kit's new cell holds while `get` and the listing read members by value. @test: two black-box cells — a row put with `deadline` / `state.compositionLeg` / `state.runOrigin` holding `undefined` reads them absent on both stores and judges as its twin without the keys; a row a 7.61.0 engine parked on a structured-clone store judges `ok`. A reading that counted keys on an in-memory row turns: read it by value.
|
|
624
|
+
- **Pins.** `test/backlog3277-member-presence.test.ts` C1–C9 (two stores, one answer; the 7.61.0 row `ok` bare, through InMemory and its listing, and through a v8 round trip; a real park leaves no key holding `undefined` at the two levels on InMemory and File, before and after a compaction and a restart; the stamp stops at the two levels (control); digest and words unchanged, bytes changed; no `reopenReason` key after a resolve on InMemory and on File live, replayed and compacted; a host's own put keeps the key on InMemory only (the known limit); the row judge reads every member of the row and state tables by the one presence; the predicate); contract kit cell "member presence" (`checkpointStoreContract`).
|
|
625
|
+
|
|
626
|
+
### The `steering_injected` echo has one display bound and one cut, and the post-compaction background-task table is echoed whole (#3232; behavior change — the length of one echo; hard-breaking: none; closed sets: none; exports: none)
|
|
627
|
+
|
|
628
|
+
- **Before.** Six places in the runner minted an echo's `preview` with a literal 220: four through the redact-then-cut (`redactThenCut`), two (`limit_approach`, `final_verification`) through a raw `slice(0, 220)` — one fact, two readings of the cut (the raw cut can leave a credential fragment or a lone surrogate at the bound; neither of those two texts carries a secret today, which is why it never showed). And the post-compaction `background_tasks` frame opens with a 126-character header, so the 220 bound left about 94 characters of the table: a client that renders the preview's rows saw one row, often cut inside its description, however many tasks were running. The table's own 80-character clip of a task description was a raw `slice` of the stored text, so a credential the bound split (for instance a registry token whose last character fell past it) left a fragment no later pass could match — in the table the model reads and in any echo made from it.
|
|
629
|
+
- **Now — one seat.** `STEERING_PREVIEW_BUDGET` (220) and `steeringPreview(body, bound?)` (`src/core/runner/steering-preview.ts`): redact, then a marker-aware cut. Every echo the runner pushes that carries text — the boundary bundle, a leg's first frames, the resumed leg's continuation frames, the limit-approach notice, the final-verification injection — reads its preview through it, and the raw cuts are gone. The three `git_status` echoes carry a fixed string per kind (`GIT_STATUS_ECHO_PREVIEW`), which no bound touches. The 220 is unchanged for every prose frame, and the text the two engine-minted notices echo is byte-identical to before.
|
|
630
|
+
- **Now — the table.** `TurnAttachment.echoBound`: a frame whose body is a list its renderer already bounds states its own echo bound. The `background_tasks` frame states the per-boundary attachment byte cap (`ATTACHMENT_BYTE_CAP`, 8 KiB), so its preview is the table the model received — the header, every listed row (at most 50, each description at most 80 characters) and the "(+N more …)" line — not the first 220 characters of it. No other frame declares a bound, and the cut does not branch on the frame's source.
|
|
631
|
+
- **Now — the table's own clip.** `renderBackgroundTaskTable` (the one renderer of every model-facing list of a run's background tasks) redacts a description and then clips it to 80 characters, marker-aware (`redactThenCut`), so a credential-shaped part of a description reads `[redacted]` in the post-compaction table, the echo and a whole-session loss line alike, and no bound can leave a fragment of it. A description with no such part is byte-identical to before, except one whose cut at 80 falls inside a surrogate pair (an emoji, say): the old raw cut left a lone surrogate there, the new one does not.
|
|
632
|
+
- **Wire.** `preview` is still a string and the contract still says "clipped to a display bound"; the `steering_injected` sentence of `docs/INTEGRATION-CORE.md` §1.12 now names the bound (220) and the one wider one. Only a `background_tasks` preview is longer (up to 8 KiB, once per compaction). No new key, no type change, no exported name.
|
|
633
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a client that renders the post-compaction table from the echo (it parses one row per line). *Affected:* a consumer that assumed every echo is at most 220 characters — only `background_tasks` is longer; and a task description that carries a credential-shaped part now reads `[redacted]` there. *Compensation:* none needed; the bound stays on every other frame.
|
|
634
|
+
- **Consumers.** @client-core @cli @web-client: a `background_tasks` preview now carries every row of the table, so a row parser sees all of them (its "last row may be cut" tolerance only fires at the cap now); the package-side gap that the echo shows a row or two is closed on this engine's side. @server: persisted `steering_injected` frames of that source are longer. @test: a cell that read the table preview as at most 220 characters reads the whole table.
|
|
635
|
+
- **Pins.** `test/backlog3232-steering-preview-budget.test.ts` — the seat (budget 220, the cut is the marker-aware one; no src file mints an echo with a raw slice or a literal bound, every push's preview comes from the seat, the six minted sites by file) · the frame declares its bound (the table frame the lane cap, every other frame nothing) · six tasks: every row, every full description, the header, a substring of the model's request · an empty description and a description past the row bound · sixty tasks: 50 rows and the "N more" line inside the cap · a credential crossing the description bound (80) and one beside the lane cap's clip: no fragment in the model's table or the echo · redact-before-cut at the echo's own bound · an output style past the bound: first-frame and boundary echoes are the 220 cut, and a key straddling column 220 ships no fragment at the first-frame, the boundary and the resumed-continuation sites · the limit-approach and final-verification echoes are the first 220 characters of what the model received. Mutations redden their fixtures (`.gate-logs/criteria-3232-mutations.md`).
|
|
636
|
+
|
|
637
|
+
### A cut staging name carries a digest of the whole target name, so a write's sweep of a dead process's staging files claims only its own (#3239; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
638
|
+
|
|
639
|
+
- **Before.** A target whose name would pass 255 bytes with its staging tail stages under a cut name (#3106), and the sweep of a dead process's staging files (#3160) claimed a name when it equalled that cut. Two long names that differ only at their tails cut to one prefix, so a write of one removed the other's dead-pid staging file and counted it in its own `fs.staging_file_swept` count.
|
|
640
|
+
- **Now.** A name whose staging name would be 252 bytes or more (three short of the maximum) is cut — whole characters, from its end — and followed by `~` and the first twelve hex digits of the SHA-256 of the whole target name, then `.tmp.<pid>.<hex12>`. A cut name is never shorter than 252 bytes and a whole one never reaches it, so no two targets mint one name (a file named like another target's cut prefix stages under its own cut name). The one function that mints the staging name is the one the sweep claims by, so a name is claimed only by the target it was cut from; a name whose staging name stays under 252 bytes is spelled as before. A cut name without the digest (a file an older build left) is no target's claim and stays.
|
|
641
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a directory of long generated names, where one write's sweep reached into a sibling's dead-process file and its count said so. *Affected:* a target whose name is within three bytes of the point where #3106 started to cut (staging name 252–255 bytes, a target name of about 223–226 bytes) now stages cut and marked, where it staged whole; and a dead process's staging file for a long-named target that an older build left stays in place (it is neither swept nor counted). The staged sibling's name is seen only in a "preserved at" sentence and a residue notice, as free text. *Compensation:* none — such a file was never recoverable, only a leftover.
|
|
642
|
+
- **Known limit.** The claim is exact for a target up to the digest (two names that share the kept prefix and 48 bits of digest), not unforgeable: a file somebody spells exactly like a target's own staging name under a dead pid is claimed by spelling, as for any staging name.
|
|
643
|
+
- **Consumers.** None: engine-internal; the name is free text in a sentence.
|
|
644
|
+
- **Pins.** `test/backlog3239-staging-name-owner.test.ts` (two 251-byte names differing only at the tail: a write of one leaves the other's dead file and counts nothing, each write removes and counts only its own; an older build's unmarked cut stays under either name; a name whose staging stays under 252 bytes is swept as before at its longest; the first cut length; a multi-byte name cut on whole characters; a file named like another target's cut prefix mints its own name and neither write sweeps the other's file; the minted name read off the staging open for every name length from 200 to 255); `test/backlog3160-dead-staging-sweep.test.ts` and `test/backlog3106-writefile-staging-edges.test.ts` re-pinned to the marked shape.
|
|
645
|
+
|
|
646
|
+
### A host pipe the engine holds reads closed once and carries nothing after: a message the host delivers is dropped, a send is refused (#3236; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
647
|
+
|
|
648
|
+
- **Before.** The engine's hold of a host pipe (`McpHostSeat.open`) read as closed at the engine's close, but a message the host delivered afterwards still went on to the engine's handler and a send still went on to the host's pipe. Through an SDK client this was not reachable (the client guards a closed transport), so nothing user-visible followed.
|
|
649
|
+
- **Now.** One fact — the connection reads closed, set by the engine's close or by the host pipe's own — is read by both arms: a message delivered after it is dropped (the pipe's own earlier callback still hears it), and a send after it is refused with `McpHostSeatFailure` (delivered `no`, nothing handed on) in the sentence the request-level adapter already used for the same state, now spelled once.
|
|
650
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* the "the engine's close is immediate" contract of a host pipe, which should include "after it, nothing is forwarded or sent" without leaning on the client library's guard. *Affected:* nobody — no connected client reached either arm. *Compensation:* none needed.
|
|
651
|
+
- **Consumers.** None: engine-internal.
|
|
652
|
+
- **Pins.** `test/backlog3236-taken-pipe-closed-gate.test.ts` (open: a message and a send go through; after the engine's close: the late message does not reach the engine and a send is refused with the host's forwarded count at none; after the host's own close the same, and the engine's close then rings `onclose` once; the pipe's own callback still hears; the late answer to a request sent before the close; the taken pipe and the request-level adapter refuse in the same words).
|
|
653
|
+
|
|
654
|
+
### `FileSessionRepo.create` judges the placement tuple it writes by the form judge that reads it back, so a tuple a reader would refuse is refused at the write (#3260; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
655
|
+
|
|
656
|
+
- **Before.** `create({ placement })` took the caller's tuple as it stood, stamping only `placedAt` when it was absent. A `kind` outside the placement kinds or a `placedAt` that is no finite number was written, and every reader of the row then refused it `corrupt_session` — a row the repo could write and could not read.
|
|
657
|
+
- **Now.** The create judges the tuple before the first byte by the very judgment the readers use (#3233): `kind` a placement kind, `placedAt` a finite number, `scope` / `handle` / `rootSessionId` / `parentSessionId` each a string when there; a cell that is no tuple (`null`, a string, an array) is refused too. A tuple that fails is refused `config.invalid_argument` naming the cell (`placement.kind`, `placement.placedAt`, …) and never the value, and nothing is written, so the id stays free. Only the exit differs from the read: a read refuses the row it found, a write refuses the call it was given. The re-open path of a create over an existing id still ignores a placement argument, as before.
|
|
658
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment or store swap that writes placed rows through the File repo. *Affected:* a caller that passed a tuple of a bad form (the engine's own spawner passes kind `"subagent"`, string members, and lets the store stamp `placedAt`). *Compensation:* none — the refusal is at the call, where the bad value is.
|
|
659
|
+
- **Consumers.** @server (the File session store's users): `create` with a placement of a bad form now rejects `config.invalid_argument` instead of writing a row that reads back `corrupt_session`. @test: the black-box face is `create({ id, placement })` with `kind: "other"` or `placedAt: "5"` — the call rejects naming the cell and `placementOf(id)` stays `undefined`.
|
|
660
|
+
- **Pins.** `test/backlog3260-placement-write-judge.test.ts` W1 (good tuples written and read back as given; `placedAt` stamped when absent; zero kept) · W2 / W3 (fourteen bad forms refused `config.invalid_argument` naming the cell, nothing on disk, value never echoed) · W4 (the writer and the reader name the same cell for the same form; a form the reader accepts the writer accepts) · W5 (a refused create leaves the id free) · W6 (the re-open path ignores a placement argument) · W7 (rows without a placement unchanged).
|
|
661
|
+
|
|
662
|
+
### A listing says whether this engine resumes a parked row, and the resume refuses it with the same sentence first — `CheckpointSummary.rowVerdict`, `judgeCheckpointRow` (#3265 = #3255 S1; behavior change — the order of refusals on a row that is faulty twice; hard-breaking: one, three sentences below, open to veto; closed sets: +1 `CheckpointRowVerdict["kind"]` (`ok` / `lacking` / `damaged`); exports: +1 root function `judgeCheckpointRow`, +1 root type `CheckpointRowVerdict`; members: +1 required `CheckpointSummary.rowVerdict` (wire +1 key on every summary), +1 optional trailing parameter `verdict` on `summarizeCheckpoint`) (@server @cli @client-core @test @sdk)
|
|
663
|
+
|
|
664
|
+
- **Before.** Only the resume judged whether this engine could resume a parked row, in a pre-CAS ladder spread over the admission rung, the gate screen and the checkpoint screen; a listing judged nothing, so every pending row listed as an approvable card. An approval parked by an earlier release whose reading this release changed (the rows a 7.60.0 engine parked, read by 7.61.0) was refused `requirements_damaged` only after a person approved it, and the sentence said no worker could resume it — untrue for a row a worker of the release that parked it still reads.
|
|
665
|
+
- **Now — one judge.** `judgeCheckpointRow(cp): CheckpointRowVerdict` (root export; pure, total, the verdict frozen) holds every resume refusal the row and this engine decide alone, in one order, the specific before the general: the version ceiling; a reader word this engine lacks; the retired mode-seed members, the retired single steer seat and the retired wall-clock axis; the reader-requirement list and the row digest; the recorded mode words; the real-approval bit; the read face, the write face, the skill grants, the skill scopes, the hands' coordinates; the frozen chain's tool names; the recorded run origin; the parent-constraint chain missing on a row of v7 or later, and the row's own chain against its digest. Each moved verbatim; the halves of those rungs that read the deployment, the re-supplied configuration, the inputs or the decision stay where they were (the checkpoint screen keeps `governed_unwired`, `resume_aborted`, `env_factory_missing`, `cwd_conflicts_restore`, the renamed mounts and the parent-constraint re-supply). The resume asks it first, right after it reads the row `pending`; the screen and the resume's configuration doors no longer repeat those rungs (the doors read nothing off the row; prepare still reads the run-origin word the leg runs under). Not in the judge: the row's recorded tool ceiling and own tool lists, which the checkpoint screen still reads at the resume — a row whose list holds a tool name in a form a row never records (`Read()`, say) lists `ok` and is refused `config.tool_face_control` when the resume runs, so those two faces answer differently there.
|
|
666
|
+
- **Now — the listing carries it.** Every `CheckpointSummary` carries `rowVerdict`: `{ kind: "ok" }`, or `{ kind: "lacking" | "damaged", code, reason?, requires?, sentence }` — `lacking` exactly for `checkpoint.unsupported_version` / `version_newer` (a newer engine's row), `damaged` for every other row refusal. `code` / `reason` are the refusal the resume throws; `sentence` is a fixed sentence per (`code`, `reason`) or per configuration refusal code, and it opens the resume's `message`. The verdict holds no row content: `requires` keeps only words spelled `^[a-z][a-z_]{0,39}$`, at most eight, never the row's token. `ok` is not "the resume will run": a deployment fact (`env_factory_missing`, `governed_unwired`) or a decision fault is still told when the resume runs. A listing and a `get` judge the same bytes. The in-tree stores keep each row's verdict with the row object they hold (a replaced row is judged again); the resume never answers from that memo. A store keeping its own memo keys it by the row's bytes and the engine build, `CONTRACT_KIT_ENGINE_VERSION` — never `MAX_SUPPORTED_CHECKPOINT_VERSION`, which two releases with different readings share — and passes it as `summarizeCheckpoint(cp, disclose, verdict)`; an external store keys it by the stored blob's sha256 plus that identity. A whole-row reader (`listBySession`, an operator queue) calls `judgeCheckpointRow(row)`.
|
|
667
|
+
- **Hard-breaking — HB-1, `CheckpointSummary.rowVerdict` is required (open to veto).** *What changed:* every summary carries the row's verdict, and `CheckpointSummary` declares it required. *Who is affected:* code that builds a `CheckpointSummary` by hand instead of through `summarizeCheckpoint` — a store's own projection, a test double — fails to compile, and the store-contract kit's two `rowVerdict` cases fail a listing that drops or rewrites the member (zero hand-built summaries in this tree); a BFF that re-projects summaries through a key allow-list carries no verdict until it adds the key (nothing breaks, the user-visible face is unchanged). *How to migrate:* build every summary through `summarizeCheckpoint` (a store with a memo passes it as the third argument, keyed as above); a reader of whole rows calls `judgeCheckpointRow(row)`; render a non-`ok` row with its `sentence`, not as an answerable card (`docs/INTEGRATION-CORE.md` §5.4, "A parked row across engine upgrades").
|
|
668
|
+
- **B-1 — the damaged-content sentence.** The `requirements_damaged` refusal opens with "This engine cannot resume this checkpoint: its content does not read the way it was written — it was parked by an earlier engine release whose reading this release changed, or it was changed in storage. The checkpoint stays pending; start the task again (a worker of the release that parked it may still resume it)." The sentence "no worker can resume it" is retired; code and reason are unchanged. A downstream pin that matches the old text reddens.
|
|
669
|
+
- **B-2 — the order on a row that is faulty twice (open to veto; C-R1065 note 3, the order law).** A row refusal is now told before any decision, deployment or signal refusal and before the configuration refusals that come after the resume config is read (the config's own door — a container that is no record, a member that cannot be read, a retired or unknown key, a store seat the engine cannot accept — and a token already consumed are still told first, as before): a bad decision on a damaged row reports the row's sentence (it reported the decision's); a v7+ row whose parent-constraint chain is missing, resumed without the parent constraints, reports `constraint_chain_missing` (it reported `resume.parent_constraint_missing`); an approval row that lost its bound input hash reports `requirements_damaged` (it reported `bound_input_hash_missing`); a row with the retired wall-clock axis on a worker with no organization wired reports `checkpoint.walltime_axis_retired` (it reported `governed_unwired`). Among the row's own refusals the order is one law, the specific before the general: a row that is newer (the version ceiling, or a reader word this engine lacks) reports `version_newer` first (a newer row that also carries a retired seat was told `seat_retired` by 7.61.0, and is told `version_newer` now); then a seat or axis a release retired (`seat_retired` for a retired mode-seed member or the retired steer seat, as in 7.61.0; `walltime_axis_retired`, which 7.61.0 told after the digest); then the reader-requirement list and the row digest (`requirements_damaged`, which says only that the content does not read the way it was written); then the rest. A row that was changed after it was parked and still carries a retired seat is told the seat — what to do about it — not the digest. A row with one fault is told as before.
|
|
670
|
+
- **B-3 — the judge is total.** A row the judge cannot read (a member that throws when read, a `state` that is not an object), which the resume used to throw raw (`TypeError`), is `damaged` / `checkpoint.invalid_outcome` / `requirements_damaged` on both faces; the resume's refusal says "the row could not be read" and names what was thrown in `detail.thrownName`, never its message. A listing whose projection reads past the judge (`state: null`) still throws as before.
|
|
671
|
+
- **B-4 — the message structure.** A row refusal's `message` is its fixed sentence, then `" Diagnostic: "`, then the message the rung used to throw; `code` and `detail` are unchanged. A downstream pin that compares the whole message compares the sentence prefix instead.
|
|
672
|
+
- **B-5 — a summary is a copy.** A summary no longer hands out a reference into the stored row: its `preview` is a copy (a preview that cannot be copied is disclosed and omitted), so editing a summary no longer edits the stored row.
|
|
673
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an operator or approval surface that lists parked rows across an engine upgrade. *Affected:* see HB-1 and B-1–B-5. *Compensation:* the verdict is the answer the resume would give; nothing about the row changes.
|
|
674
|
+
- **Consumers.** @server: the approval inbox's summary allow-list adds `rowVerdict`; the SQL store's `get` refuses a row above its version column with a bare `Error` before the judge reads it — align it so a listing and a resume give one answer; a memo, if kept, is keyed by blob sha256 + `CONTRACT_KIT_ENGINE_VERSION`; `listPending`'s subtree face judges as it decides. @cli: a card is rendered by its verdict (the shell decides how). @client-core: the three kinds and the sentence enter the render model; an unknown `kind` reads as not `ok`. @test: rows minted by 7.60.0 and 7.61.0, loaded under 7.62.0, black-box on the listing and the resume. @sdk: one additive key on the summary frame.
|
|
675
|
+
- **Pins.** `test/backlog3265-row-verdict.test.ts` — P0 (a real v10 park minus its bound input hash, approved with the parked call's own binding: both faces `requirements_damaged`, the row byte-identical; with a bad decision / a bad configuration / an aborted signal the row's sentence first) · P0′ (`requires` keeps words only, never the token, at most eight) · P1 (the 7.60.0 approval rows: damaged on both faces; the v9 row's read-face arm as before) · P2 (`lacking` for a newer format, an unknown word, a newer row with a retired seat) · P3 (seventeen row-only arms: listing = resume code / reason, the sentence first) · P4 (an `ok` park resumes) · P5 (total: a throwing member, `state: null`) · P6 (the member is required: a type error, and the kit fails a listing that drops it) · P7 (a row fault before a deployment fault) · P8 (`listOverdue` = `listByScope` = the judge) · P9 (the sentences; the closed set's three words) · P10 (`ok` with a deployment refusal at the resume) · memo (judged once per stored object, a replaced row judged again, the resume judges now). Mutations M1–M11 each redden their fixture (`.gate-logs/criteria-3265-mutations.md`). Re-pinned for B-2 / B-4: `backlog959` (the reference ladder runs the row's rungs first), `backlog1285` (sentence + diagnostic), `backlog1320` (the screen helper asks the judge first; the kit's preview reads registered), `concurrent-seam-scale` and `file-cross-backend` (the summaries carry `rowVerdict`), `checkpoint-bidi-projection` (the projection reads the preview once), and the pins that call the resume's configuration doors directly (the internal `refuseResumeDoors` no longer takes the row). The order law: `test/backlog3265-fix1-judge-order.test.ts` — a retired mode-seed member, the retired steer seat and the retired wall-clock axis on a v10 row whose digest no longer matches are told as themselves on both faces · a newer row (the ceiling, an unknown reader word) is told newer ahead of all of them · every pair of faults is told the first in order · the controls (the digest fault alone, a row with no fault, each fault alone). `backlog959` is re-pinned once more: its reference ladder tells the retired wall-clock axis ahead of the requirement list.
|
|
676
|
+
|
|
677
|
+
### A workflow script that throws a value that cannot be read still ends its run with its terminal frame — the failure summary reads the thrown value member by member (#3240; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
678
|
+
|
|
679
|
+
- **Before.** A workflow run's failure summary read the script's thrown value with plain property reads (`code`, then `message`). A script that threw a value whose reads throw — a `Proxy` whose `get` trap throws, a revoked proxy, an object whose `code` or `message` getter throws — made the summary builder throw inside the run's failure callback; the callback's own safety net swallowed that, and no terminal frame was ever sent. The run itself settled `failed` (durable row, registry row), but nobody listening for its completion was told: the model's turn and a host's notifier waited on a frame that could not come. One line of script text could hold a run's observer for good.
|
|
680
|
+
- **Now.** Every member of the thrown value is read once through the engine's one guarded member read (`readMember`): a member whose read throws is an absent member. The frame is always sent — `failed`, with the fixed sentence and the resume guide, plus the code and message words when those members are readable (a readable script error `code` survives a throwing `message`; a throwing `code` leaves the fixed sentence). The failure block of the run reads the thrown `code` through the same read (the hand-written guard beside it is retired). The frame has a floor that reads nothing (failed, the fixed sentence, the record unread): what the run and the thrown value add is read after, and a read that throws leaves the floor — a getter on the thrown value is script code and can reach the run the value rides out on (a direct caller of `runWorkflow` has no other vessel for it), so it can break the settle id the frame is built from; the frame goes out either way. The registry row reads the run's settle id before the thrown value's words, for the same reason. The registry row's failure text and the durable run's text were already total (`thrownText`) and are pinned beside the frame. The frame still carries no word of the thrown value beyond what a script error code already surfaced.
|
|
681
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment that runs scripts a model wrote, where a throw is a script's own object. *Affected:* only a run whose script threw such a value — it now ends with a `failed` frame instead of none; every other thrown value reads the same bytes as before. *Compensation:* none needed.
|
|
682
|
+
- **Consumers.** @server (workflow execution face): the run lane and the durable notifier now receive the `failed` frame for a hostile-thrown run; a deployment timeout that was the only way out of that wait sees the frame first. @test: a script that throws a throwing `Proxy` / revoked proxy / throwing-getter object ends with a `failed` frame (summary: the fixed failed sentence).
|
|
683
|
+
- **Pins.** `test/backlog3240-workflow-hostile-throw.test.ts` (a real `Runner`, the `Workflow` tool and the repo's vm script runner) — a throwing proxy · a revoked proxy · every trap throwing · a symbol · a prototype-less object · throwing `code` and `message` getters · a readable message beside a throwing `code` · a readable script `code` beside a throwing `message` (and the parked sentence's message read) · a typed script error and a plain `Error` (controls: unchanged bytes) · no thrown word in the summary or diagnostics · the registry row's text and no escaping rejection · a getter that breaks the run's settle id (the floor frame is sent; the row keeps the id and nothing escapes).
|
|
684
|
+
|
|
685
|
+
### A delegation tree binds a row's owner only when it is a name or anonymous — a number, an object or an absent owner cell does not bind (#3257; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
686
|
+
|
|
687
|
+
- **Before.** `ownRowDelegationOwner` (a run nobody spawned) and `rowOwnerReading` (a revived child's own row) bound whatever `headOf` answered as `owner`: a store answering `owner: 42`, `{}` or no cell at all made that value the tree's owner, and every row created for a child recorded it. The revival reading also folded an absent cell into anonymous (`head?.owner ?? null`).
|
|
688
|
+
- **Now.** One judge of the cell (`ownerCellReading`, `src/core/runner/delegation-owner.ts`) serves both readings: a string or `null` binds as it reads; any other shape is `{ bound: false, reason }` — the delegation is refused `delegation.owner_unbound`, nothing starts and no row is created. The reason names the kind of value (`number`, `object`, `none`) and never the value. A missing row (`undefined`), a store without the by-id read and a read that throws read as before; one exception, on a revival: a store that answers `null` for a missing row (off the `SessionHead | undefined` contract) read as anonymous before and is refused now, as a row that could not be read. The seat's first answer, bound or refused, still stands for every later read.
|
|
689
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose store could answer a malformed owner cell would have written it as the owner of every child's rows. *Affected:* only a store that answers an owner that is neither a string nor `null`, or a `null` head on a revival (the bundled stores never do either; a blank string stays the stores' own read fault). *Compensation:* none needed — answer a name or `null`.
|
|
690
|
+
- **Consumers.** @server: the two SQL stores' `headOf` answer the owner column as a string or `null`; nothing to do. @cli @test: a delegation over a row with a malformed owner cell is refused `delegation.owner_unbound` (it used to proceed with the malformed value recorded).
|
|
691
|
+
- **Pins.** `test/backlog3257-owner-cell-shape.test.ts` — S1 number (the reason names the kind, never the value) · S2 object · S3 absent cell · S4 a name and the anonymous owner bind · S5 the refusal stands for later reads · S6 a foreign occupant is told as the occupant, before the cell is judged · V1 revival: number / object / none · V2 revival controls (name, anonymous, missing row, no read, no session id) · V3 a read that throws. Mutations M1–M3 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
692
|
+
|
|
693
|
+
### A refused delegation says who holds the tree's slots — task ids, addressing names, synchronous children, and how a slot comes back (#3252; text change; hard-breaking: none; closed sets: none; exports: none; members: +1 method `TaskRegistry.activeDelegationOccupants` on the exported class, its return type not a root export)
|
|
694
|
+
|
|
695
|
+
- **Before.** The concurrency refusal answered "this session tree already has N agents running — the concurrency cap (…) refuses another" and a generic "wait or stop one". A model whose tree was full of agents it had not started — an extension's `$.agent.spawn`, an earlier turn's background children — read it as its own and retried for a cause it could not see.
|
|
696
|
+
- **Now.** The sentence adds the occupants the count was taken from: each registered agent the caller can address, by its `task_id` with its addressing name, up to five (the rest counted: "N more registered"), and the children running synchronously inside calls of the tree ("N running synchronously inside a call of this tree, no task_id"). When a task id is listed the way back says so: wait for one to complete, or stop a listed one with `TaskStop` and its `task_id`, then relaunch. The pool is the tree root's, so a nested agent's refusal counts rows of other branches too; those are counted and never named, and no `TaskStop` is offered for them — the registry's access predicate (the one the agent's own tools hold) decides what is addressable. The count, the cap, the code (`delegation.concurrency_cap`) and `details` are as they were. One mint (`concurrencyOccupants`, `src/agents/subagent.ts`) serves the four spawn lanes; `TaskRegistry.activeDelegationOccupants(scope, rootSessionId, caller?)` reads the rows `activeDelegationHandles` counts, each with its name and whether `caller` reaches it (same selection, same synchronous segment). A registry without that face, or whose face throws, names nobody and the refusal stands.
|
|
697
|
+
- **Known limit.** The sentence names the occupant, not who started it: a row records the leg that spawned it, and an extension's `$.agent.spawn` runs on that leg, so the model's own spawn and the extension's read alike there. Naming the origin needs the requester recorded on the row and its durable record.
|
|
698
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a model, or its operator, reading a refusal for a tree it did not fill. *Affected:* only the text of that refusal; a consumer that matched the whole sentence rather than its code sees the longer text. *Compensation:* none needed — read `details.code`.
|
|
699
|
+
- **Consumers.** @cli @server @test: assert and route on `delegation.concurrency_cap` by code; the sentence now carries `task_id`s a front end may link to running rows; `TaskRegistry.activeDelegationOccupants` is a new method on the exported class (additive).
|
|
700
|
+
- **Pins.** `test/backlog3252-concurrency-refusal-occupants.test.ts` — R1 one registered occupant (id, name, the way back) · R2 two listed · R3 past five counted · R4 a synchronous child counted without an id, no `TaskStop` offered · R5 both kinds together · R6 a registry without the naming face · R7 the naming face reads the rows the count does, and which of them a caller reaches · R8 a naming face that throws · R9 a nested agent is told the count and nothing it cannot address · R10 the root session of the tree reaches every row. Mutations M4–M8, M13, M14 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
701
|
+
|
|
702
|
+
### The warning for a `spec.tools` entry that collides with the built-in hands band says what the dispatcher does (#3250; text change; hard-breaking: none; closed sets: none; exports: none)
|
|
703
|
+
|
|
704
|
+
- **Before.** For a colliding entry the warning said "the built-in wins (registered later; the harness tool Map is last-write-wins) and the caller tool never dispatches this task". That is true for a caller tool sharing a band tool's NAME (it is replaced and never dispatches) and false for a caller tool whose ALIAS names a band tool: the alias resolves to the built-in (a canonical name outranks an alias) but the tool stays mounted under its own name, the model reads it in its tool block and runs it by that name — which a black-box run saw as the caller's alias tool running.
|
|
705
|
+
- **Now.** The warning is built from the dispatcher's own resolver over the mounted set the leg's tool valve leaves (`toolNameIndex` over `survivorsByName`, the rule a call is resolved by; a built-in the allow / deny lists unmount contests no name, and a caller tool they unmount is not warned about either: the warning is for a caller tool and a built-in that both stay mounted) and names each entry by its form: `"Read" is replaced by the built-in "Read", which serves that name (the caller tool never dispatches)`, or `"my_read" stays mounted under its own name, but its alias "Read" serves the built-in "Read"`. Still one warning per prepare (`onError`, phase `config`). Who serves each contested name is unchanged — the built-in — so no call resolves differently; only the sentence changes.
|
|
706
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* an operator reading the warning to learn which of a deployment's tools the model can still call. *Affected:* only a consumer that matched the old sentence's wording. *Compensation:* none needed.
|
|
707
|
+
- **Consumers.** @cli @server @test: the warning is the `onError` text (phase `config`) — a cell that read "never dispatches" for the alias form reads the corrected sentence now.
|
|
708
|
+
- **Pins.** `test/backlog3250-hands-collision-notice.test.ts` (a real `Runner` with an `executionEnv`) — C1 same name: replaced, the call runs the built-in · C2 alias naming a band tool: the alias serves the built-in · C3 the same alias form: the caller tool IS called by its own name and runs · C4 the old claim is gone · C5 two entries of both forms are one warning · C6 two aliases of one entry · C7 no collision is silent · C8 an alias that names no band tool is not a band collision · C9 the valve removes the built-in the alias names: no warning, the call of that name runs the caller tool · C10 the valve removes the caller tool: no warning, the built-in runs · C11 the valve leaves both: the warning stands. Mutations M9–M12, M15, M16 each redden their fixtures (`.gate-logs/criteria-small-h-mutations.md`).
|
|
709
|
+
|
|
710
|
+
### A placement cell that is no placement tuple is refused, and a placed row whose owner cell cannot be read is still in the placed listing — `FileSessionRepo` (#3233 / #3234; behavior change; hard-breaking: none; closed sets: none; exports: none)
|
|
711
|
+
|
|
712
|
+
- **Before.** A header's placement cell was passed through as it stood: `placement: "nope"` or `{ kind: 1 }` came back from `placementOf` and `open` verbatim, `placement: null` made `listPlaced` throw a `TypeError`, and a listing dropped such a row without a word. Separately, a PLACED row whose owner cell was neither a principal nor anonymous made the listings' whole-header decoding refuse, so `listPlaced` skipped it: a placed sub-agent transcript the deployment's review could neither see nor sweep.
|
|
713
|
+
- **Now — one form judge (#3233).** The header record's one read (the first-record rule every reader of the row goes through: `placementOf`, `open`, `headOf`, `exportEntries`, the listings) judges the placement cell: absent is no placement; otherwise it must be an object whose `kind` is a placement kind (`"subagent"`), whose `placedAt` is a finite number, and whose `scope`, `handle`, `rootSessionId` and `parentSessionId` are each a string when there. A tuple missing a join half stays a legal tuple (consumers still read it as `tupleIncomplete`, fail-closed); a member this reader does not know is tolerated as an additive one. Any other cell is `corrupt_session` naming the cell (`placement cell`, `placement.kind`, `placement.placedAt`, …) and never its value; a listing skips such a row and discloses it on `onCorruptRead`.
|
|
714
|
+
- **Now — the placed row with an unreadable owner (#3234).** The listings' one row reader answers such a row as what it is: `listPlaced` lists it (its tuple, or the `tupleIncomplete` variant; its age from the log's modification time, so `scope` and `olderThanMs` apply), the host `list` still leaves it out (placed rows never ride the host listing), and `onCorruptRead` is told once per listing, in one sentence that says the row is placed and its owner cell unreadable. The readers of the owner (`open`, `headOf`, `exportEntries`) still refuse the row. A row that is not placed, or whose placement cell is itself bad, is skipped and disclosed as before.
|
|
715
|
+
- **Behavior change.** A stored placement cell of a form above, which the repo used to answer as written, is now refused; and a placed row with an unreadable owner, which `listPlaced` used to omit, is now listed. The engine's own spawner writes none of the refused forms (kind `"subagent"`, string members, `placedAt` stamped by the store at creation), so only a hand-edited or damaged log is affected.
|
|
716
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a deployment whose placed-row sweep or store swap enumerates placed rows. *Affected:* a damaged or hand-edited log; a joint reap that now sees an unreadable-owner placed row and tries to release it (the release reads the head first and is refused, caught, and retried next sweep, as for any release fault). *Compensation:* none — the row is reported, not repaired.
|
|
717
|
+
- **Consumers.** @server: the swap gate that enumerates placed rows now sees a placed row whose owner cell is unreadable (its release stays refused `corrupt_session`); a placement cell of a bad form is `corrupt_session` on every by-id read instead of an answer. @test: the black-box faces are `placementOf` / `open` on a cell of each bad form, and `listPlaced` / `list` over a directory with a bad-cell row and an unreadable-owner placed row (the sink's sentence is the observable).
|
|
718
|
+
- **Pins.** `test/backlog3233-placement-cell-form.test.ts` P1 (fourteen bad forms ⇒ the four by-id readers refuse naming the cell) · P2 (the value is never echoed) · P3 (good forms answered as written) · P4 (no cell ⇒ `undefined`) · P5 (both listings disclose; `null` no longer throws) · P6 (neighbours unharmed); `test/backlog3234-placed-row-owner-unreadable.test.ts` Q1 (three unreadable-owner forms ⇒ listed, disclosed as placed) · Q2 (`tupleIncomplete`) · Q3 (host `list` leaves it out, same sentence) · Q4 (scope and age filters) · Q5 (unplaced bad owner still skipped) · Q6 (healthy placed row, silent) · Q7 (the owner's readers still refuse) · Q8 (bad owner beside bad placement ⇒ skipped) · Q9 (mixed directory).
|
|
719
|
+
|
|
720
|
+
### A delegated child's rows belong to its delegation tree's owner — the engine mints the owner once and every row created for a child records it; `SessionPlacement.owner` is required (#3149, ruled C-R1016; BREAKING; behavior change; hard-breaking: three, three sentences each below, open to veto — the bundled stores' placed rows, `SessionPlacement.owner` required, a fork child's row; closed sets: none — `delegation.owner_unbound` is a new code string outside any registered set; exports: none; members: `SessionPlacement.owner` becomes required, +1 optional `RunInternals.delegationOwner`, +1 optional `ToolExecuteContext.delegationOwner`, +1 optional second parameter on the `ensureChildSessionDurable` hook) (@server @cli @test)
|
|
721
|
+
|
|
722
|
+
- **Before.** A background child's placed transcript recorded the owner its store's placing write chose: the bundled stores recorded none (`null`, whatever the tree root's owner), and a deployment's store could derive one of its own (the root's, else the parent's, else a sentinel). A fork child's row recorded the principal the run executed as. Three answers to "whose is this child's row".
|
|
723
|
+
- **Now — one owner, minted once.** The delegation tree's owner is the owner cell of the tree root's row, as the root run read it: a run nobody spawned (a top-level run, a revived child, a parked child resumed on its own) reads its OWN row once, by id through its own store's `headOf`, and takes it only while the row still holds the occupant it acquired (`incarnation` equal to the acquired session's; both absent = a row written before occupants were minted). Every run it spawns — background, foreground, fork, workflow agents and their descendants — holds the same reading by reference, so the tree binds once; deleting or re-creating the root row after that changes nothing for the tree. Every row a delegation creates for a child records that value: the placed transcript (`SessionPlacement.owner`), the fork (`SessionStore.fork(source, owner)` is called with it), and the durable row a park promotes (`ensureChildSessionDurable(id, { owner })`). A revived child creates no row: its re-open declares no placement, and a park it makes promotes its own row with the owner that row records.
|
|
724
|
+
- **Now — a tree whose owner does not bind starts nothing.** When the first read finds the row gone, or holding another occupant (the same owner name included), the child is not started and no row is created for it: the tool result is the not-started form with `details.code` = `details.error` = `delegation.owner_unbound` (new code; a read fault refuses the same way and binds nothing, so a later spawn reads again; what the read threw rides `details.cause`, never the model's text). There is no sentinel owner.
|
|
725
|
+
- **Hard breaking 1 — the bundled stores' placed rows (behavior; open to veto with 3).** *Changed:* a placed row on `TtlSessionStore` / `FileStorageBackend` records the tree owner instead of `null`; rows placed before 7.62.0 keep their `null`. *Who is hurt:* an embedder that authorizes by `headOf(id).owner` on the File lane and relied on a child's row reading anonymous (open to every principal). *How to move:* judge a child's row by the owner it records, as any owned row.
|
|
726
|
+
- **Hard breaking 2 — `SessionPlacement.owner: string | null` is required; placement obligation 7 (type + store contract; open to veto).** *Changed:* the member is required; a store that declares `placements` records exactly `placement.owner` in the row's owner cell on the placing write (never in the persisted tuple — `SessionPlacementRecord` has no owner — and never an owner of its own), and answers `headOf` for its sessions with the occupant the acquired session carries. `sessionStoreContract` judges it ("the placing write records exactly placement.owner …"). The contract sentence on `headOf` that let a store's own placing write record a principal is retired. *Who is hurt:* a store whose placing write derives an owner (the kit's new case reddens), a routing store that declares placements and forwards no `headOf`, code that builds a `SessionPlacement` literal (tsc). *How to move:* the INSERT records `placement.owner` (drop the derivation and the claim of ownerless placed rows); forward `headOf` by id the way `acquire` is routed; add `owner` to the literal.
|
|
727
|
+
- **Hard breaking 3 — a fork child's row (behavior; open to veto).** *Changed:* a fork child's row records the tree owner, no longer the principal the run executes as. *Who is hurt:* an operator or delegated principal that read a fork child's transcript through an owner gate under its own name. *How to move:* read it as the tree owner; an operator arm that admits by role is untouched.
|
|
728
|
+
- **Additive.** `ensureChildSessionDurable` receives a second argument `{ owner }`; a one-argument hook keeps compiling and working (the root witness a deployment's hook needed to derive the owner is no longer needed). `RunInternals.delegationOwner?` / `ToolExecuteContext.delegationOwner?` are the trusted seat (Runner-filled; never a `TaskSpec` key).
|
|
729
|
+
- **Known limit (P-9).** A child placed on the bundled stores before 7.62.0 recorded `null`; revived, it reads that `null` off its own row, so the children it spawns record `null` too, whatever its tree root's owner — the same reading as 7.61.0, not a regression (`docs/KNOWN-LIMITS.md` KL-3149-a).
|
|
730
|
+
- **Consumers.** @server (the store-boundary stage two, S-2667–S-2670, waits on this): the two SQL stores' placing INSERT records `placement.owner` (the root / parent / sentinel derivation and the ownerless-placed claim retire); `ForkRoutingSessionStore` forwards `headOf` by the same id routing as `acquire` (it declares placements, so obligation 7 holds it); every `SessionPlacement` literal gains `owner`; the park hook's root witness retires (record `given.owner`). Read points: the session gate's owner cell (`sessionOwnerReadable` / `ownerlessRowOpen`) now reads the tree owner on new placed rows (the ownerless placed arm keeps serving rows placed before 7.62.0 and anonymous trees); a child transcript read goes through the same gate; an owner-guarded delete still answers `false` for a placed row. @cli: the local lane's root rows are created by `acquire` and never registered, so their children keep reading `null` — no visible change. @test: black-box cells — root registered alice ⇒ `headOf(child).owner === "alice"`; anonymous root ⇒ `null`; the root row replaced (same owner name too) before the first delegation ⇒ refused `delegation.owner_unbound`, no child row; replaced after a delegation ⇒ later children still record alice; fork child under an operator principal ⇒ alice.
|
|
731
|
+
- **Pins.** `test/backlog3149-delegation-owner.test.ts` (real `Runner` over a real `FileStorageBackend`: T1 / T1′ / T1″ background child, nested background grandchild, and a background grandchild under a foreground child — all alice; T2 anonymous; T5 / T5b a run nobody spawned on a placed row named alice / `null`; HB-3 fork; R1 / R3 read points; the seat: T4a / T4a′ replaced before the first read, T4b after, row gone; the tool with an unbound tree, background and fork lanes, and a read that throws; the seat's read fault binds nothing; the type pin) · `test/backlog1468-s1-session-store-kit.test.ts` (obligation 7 mutants M7a–M7c; K6 now pins the tree owner on both bundled File lanes). Mutations M1–M11 each redden their fixture (M9: `test/backlog1796-transcript-corrupt-cause.test.ts` T2 — a revival reads no owner before its re-open stood). Re-pinned with Hard breaking 3: the #2265 b7 fork cell (`test/backlog2265-principal-name-one-judge.test.ts`: the principal, a name included, never names a fork's owner — no seat ⇒ the source's, a seat ⇒ the tree's), `agent-tool-consolidation` and `agent-fork-governance` FG2c. (`.gate-logs/criteria-3149-mutations.md`).
|
|
732
|
+
|
|
733
|
+
### A host receives, structured, what the engine says where it holds no seat — `setDefaultEngineNoticeSeat`; and a credential value the host's own declaration refused is not said a second time by the engine's intake (#3248 / #3247; behavior change; additive wire; hard-breaking: none; closed sets: none; exports: +1 root function `setDefaultEngineNoticeSeat`) (@server @cli)
|
|
734
|
+
|
|
735
|
+
- **Before.** Four places take a credential value in without a notice seat in hand — a brain's construction `apiKey` and credential headers, a model entry's credential header (the route's read), a protocol peer's answer, a directly built distiller seat's key — and `RunnerDeps.onNotice` is not reachable from any of them. A placeholder or short key there (`EMPTY`, `lm-studio`, fewer than eight characters, one character repeated) made `config.credential_not_withheld` leave the one notice throat through its seatless arm as a bare `console.warn` line, so a server that starts the engine saw loose text it could not route. And the declaration (`declareWithheldEnv`) that refused the same value had already told the host, in its refusal, that it is no credential value; the intake's said-once account did not know, and the host got the fact twice, once structured and once as loose text.
|
|
736
|
+
- **Now — one default seat.** `setDefaultEngineNoticeSeat(seat | undefined)` (root export, `(notice: EngineNotice) => void`) installs the process's default notice seat; a second call replaces it, `undefined` removes it, anything else is refused (`config.invalid_argument`) and leaves the standing seat. The one throat (`deliverEngineNotice`) reads it where a notice arrives with no seat of its own — a seat that is present always wins (the `new Runner` receipt keeps delivering to its `onNotice`), and a present non-function seat is still a loud bad wiring on `console.warn`, never a fall-through to the default. A throw or a rejected promise from the default seat is swallowed as for every seat. With none installed nothing changes: the same line on `console.warn`. The four intakes take no new parameter.
|
|
737
|
+
- **Now — one account.** `declareWithheldEnv` refusing a value as no credential (the sentence that names `values[i]`) records that value on the same per-process said-once account the intake keeps (`config.credential_not_withheld`, once per value, keyed on the judged text); the intake then does not say it again. Only the member the refusal names is recorded, and only when the refusal is the no-credential reading (a NUL or unpaired surrogate, a non-string, an empty or blank string are told as something else or not said by the intake at all). One table, one writer.
|
|
738
|
+
- **Behavior change.** With a default seat installed, EVERY notice that reaches the throat with no seat of its own goes to it instead of `console.warn` — not only this one (the seatless arm of every station: fs timeout discards, listing truncations, and the rest). Route by `code` / `noticeAudienceOf` as for any notice sink. Install it before the first construction: a line a station already printed (and ledgered once per process) is not repeated to a seat installed later.
|
|
739
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host that starts the engine and wants every engine notice as data. *Affected:* only a host that installs the seat (its seatless notices stop printing); everyone else is byte-identical. *Compensation:* none needed — the seat is the structured form of the line.
|
|
740
|
+
- **Consumers.** @server (S-2864): `setDefaultEngineNoticeSeat` is the one place to receive the line that was a bare `console.warn` at start-up (`config.credential_not_withheld`, operator audience, `detail: { reason }`, never the value); your own refusal line stands alone for a value your declaration refused, so the zero-bare-line cells you hold as expected failures turn once the seat is installed. @cli: the same seat for a CLI that wants these as data; nothing to do otherwise.
|
|
741
|
+
- **Pins.** `test/backlog3247-credential-intake-one-account.test.ts` — A1 (three refusal kinds, then a brain built on the value: nothing on the seat, nothing on the console) · A1d (another padding of a refused value is the same value) · A2 (one row per door) · A3 (a value not told is still said once) · A4 (only the named member is told) · A5 (a refusal for another reason tells nothing) · A6 (the test seam clears the account) · B1 (one row per door: the notice arrives on the default seat, the kind and never the value) · B2 (removal returns to the console line) · B3 (a seat a station holds wins) · B4 (reinstall replaces) · B5 (null / string / object refused, standing seat kept) · B6 (a throwing or rejecting seat is swallowed) · B7 (a present non-function seat stays on the console) · B8 (any seatless notice reaches the seat through the one throat) · B9 (a host's start-up end to end).
|
|
742
|
+
|
|
743
|
+
### A host lists every held queue of its process, a held card says when it expires, and a held queue's shutdown answers once its receipts are in the senders' boxes — `listPeerHeldQueues()`, `PeerHeldEntry.deadlineAt`, `PeerHeldQueueSink.receipt` answers a promise (#3244 / #3245 / #3246; server S-1370; behavior change — `PeerHeldQueue.shutdown()` waits for its receipts and may reject; hard-breaking: two, three sentences each below; closed sets: none; exports: +1 root function `listPeerHeldQueues`, +1 root type `PeerHeldQueueSnapshot`; members: +1 optional `PeerHeldEntry.deadlineAt` (wire +1 optional key on a held card)) (@server @cli @client-core @test)
|
|
744
|
+
|
|
745
|
+
- **Before.** A host review face could reach a held queue only by its three coordinates (`peerHeldQueueIfAny(scope, sessionId, box)`): the registry was private, so a host listing the held letters of all its sessions kept its own table of (session, box) pairs fed from the notices. A card carried `heldAt` but not its deadline — the timer's instant lived only in the queue, so a host had to add `dialogExpiry` to `heldAt` itself, a second reading that is wrong after a cause move or a re-bind restarts the timer. `shutdown()` settled every held card and returned while the `expired` receipts it had sent were still being written: the drain's receipt seat was fire-and-forget, so a host that closed its pool after `shutdown()` could lose a receipt and had no handle to wait on.
|
|
746
|
+
- **Now — the enumeration face (#3244).** `listPeerHeldQueues(): readonly PeerHeldQueueSnapshot[]` (root export) — every held queue of the process's registry (the queues `peerHeldQueueFor` opened, which is how every drain opens its own; a bare `createPeerHeldQueue` is not listed), as a snapshot that opens none: `{ scope, sessionId, box, size, entries }`, `entries` as `PeerHeldQueue.list()` shows them and `size` their count at the same moment. The coordinates are the ones the registry minted the queue's key from (one reading for the key and the row), so a row's `(scope, sessionId, box)` handed to `peerHeldQueueIfAny` reaches that queue for its settle face; `sessionId` is the spelling the queue was first opened with (the key folds case), `box` is the session's own box or the principal inbox it also drains. An opened queue with no card is listed with `size: 0`. The notices `peer.inbound_disposition` / `peer.held_settled` do not carry a scope: the listing is where a queue's coordinates are read.
|
|
747
|
+
- **Now — the card's deadline (#3245).** `PeerHeldEntry.deadlineAt?: number` (ms epoch) — the instant the card's review deadline expires it unless someone answers first. It is written where the deadline timer is armed and removed where the timer ends, so it is present exactly while one runs: a review cause (`PEER_HELD_REVIEW_CAUSES`) ∧ a finite `dialogExpiry` ∧ the card still `held`. A re-judgment that moves the cause out of review clears it, one that moves it into review re-arms it from that instant; an approval, a hand-over, a `never` bind, the deadline itself and the card leaving clear it; a deadline whose expiry the store refused leaves the card held with none until the next bind re-arms it. `hold()`'s input does not take it (a caller's value is never carried onto a card).
|
|
748
|
+
- **Now — shutdown waits for its receipts (#3246).** `PeerHeldQueueSink.receipt` answers `Promise<void>`: it resolves once the receipt is in the sender's box, or has no reader there, and rejects when it could not be written. `shutdown()` settles every card as before, then waits for the receipts THAT settle sent (`Promise.allSettled`): it resolves when all landed, and rejects with an `AggregateError` whose message names each seq whose receipt did not (`PeerHeldQueue.shutdown: every held card was settled, but the expired receipt of seq 3, 7 did not reach its sender's box`) and whose `errors` are the receipts' own rejections. A receipt seat that throws instead of rejecting is the same refusal. A deadline's, a re-judgment's, an eviction's and an approval's receipt is still sent without waiting, and its rejection is never left unhandled. The drain's receipt seat now answers its route's append: a write fault on the sender's box is reported on `onError` (`peer-receipt-route`, once, as before) and is the receipt's rejection; a sender whose box is retired absorbs the receipt (no reader is not a fault).
|
|
749
|
+
- **Hard-breaking — HB-1, the receipt seat's answer.** *What changed:* `PeerHeldQueueSink.receipt` is `(entry, state) => Promise<void>` (was `=> void`). *Who is affected:* a host that implements the sink itself (`configure({ sink })` of its own) — it fails to compile; zero such implementations on server, cli and client-core `origin/main` (`git grep "receipt:"` there: 21 / 19 / 26 hits, none a held-queue sink; no file names `PeerHeldQueueSink`), and the server's S-1370 face reads the engine's own drain binding. *What to do:* return the write's promise — resolve when the receipt is stored or has no reader, reject when the write failed; an implementation with nothing to wait for returns `Promise.resolve()`.
|
|
750
|
+
- **Hard-breaking — HB-2, `shutdown()` may reject.** *What changed:* `PeerHeldQueue.shutdown()` used to resolve once the cards were settled; it now resolves once their receipts landed and rejects when one did not (every card is settled either way). *Who is affected:* a host that awaits `shutdown()` of several queues in one loop and lets a rejection end the loop — the queues after it would not be shut down (the server's S-1370 face shuts its queues down that way). *What to do:* shut each queue down on its own (`Promise.allSettled` over the queues, or a `try` per queue) and read a rejection as "these senders were not told"; the cards are settled.
|
|
751
|
+
- **Consumers.** @server (S-1370): `GET /v1/approvals` can list held letters from `listPeerHeldQueues()` and retire the coordinate table fed from the notices; a `peer_inbound` row can carry the card's `deadlineAt` instead of `heldAt + dialogExpiry`; the ordered shutdown can drop its fixed waiting window — `shutdown()` answers once the receipts are in the boxes — and reads HB-2 above. @cli: an approval card for a held letter can render `deadlineAt` (absent ⇒ no deadline runs). @client-core: a projection of the held card gains the optional `deadlineAt`. @test: a review-cause hold under `dialogExpiry: 60s` lists `deadlineAt = heldAt + 60000` and expires at that instant; a setting-cause hold has none; after a host's `shutdown()` resolves, the sender's box holds the `expired` receipt with no wait.
|
|
752
|
+
- **Pins.** `test/backlog3244-3246-held-queue-host-face.test.ts` (L1 three queues — two sessions' own boxes and a principal-inbox lane — listed with coordinates, size and cards; L2 the listing opens none and hands out copies; L3 a mixed-case session id, an explicit own box and the principal lane hand back to `peerHeldQueueIfAny` / `peerHeldQueueKey`; L4 no notice carries a scope; D1 `deadlineAt = heldAt + expiry` and the card expires at that instant; D2 none for a setting cause; D3 none under `never`, armed from a later finite bind, cleared by a `never` bind; D4 cleared by an approval, absent on a card adopted as approved; D5 cleared by a cause move out of review, re-armed by a move back; D6 a refused expiry leaves none until the next bind; D7 a caller's value is not carried; S1 a slow receipt holds shutdown's answer; S2 a rejecting receipt makes it reject naming only that seq, every card settled; S3 a throwing seat the same; S4 a deadline's and a re-judgment's receipt never waited on, no unhandled rejection; S5 shutdown waits only for its own receipts; S6 the drain's own seat — the `expired` receipt is in the sender's box when shutdown resolves, a write fault rejects it naming the seq with one `onError`, a retired sender's box does not; S7 a void-returning receipt seat is a compile error). Re-pinned on the new seat type: the receipt seats of `design385-slice4-held-idle`, `design385-slice4-receiving`, `backlog972b-fix1-delivered-uninjected`, `backlog1025-peer-inbox-wake` answer a promise.
|
|
753
|
+
|
|
754
|
+
### A session log that lost a record in its middle resumes from the break and says what it lost — `session.lineage_rerooted`; a stored log that does not hold together is `corrupt_session`, and `invalid_session` is the import gate's word only (#1077; behavior change; behavior narrowing and wire-meaning narrowing — `invalid_session` no longer reaches a resume, hard-breaking: none; that narrowing is open to veto; closed sets: `EngineNoticeCode` +1 `session.lineage_rerooted`, wire-additive; `SessionErrorCode` unchanged; exports: none) (@server @cli @client-core @test)
|
|
755
|
+
|
|
756
|
+
- **Before.** The file store's replay skips a record it cannot read and counts it (#1041's partial arm), and the session opens. The run's first branch read then walked from the leaf up into the skipped record and was refused `SessionError("invalid_session", "Entry <id> not found")` — the code the import gate refuses a caller's log with. A resume of a session whose second or third line was damaged failed with no model call and nothing said which history was lost; a damaged LAST line resumed (the leaf falls back one entry). The same code answered every other stored-log fault too (a leaf or a floor the loaded log does not hold, a parent chain that loops, a checkpoint leaf a lost tail took, a compaction whose first kept entry is not on the path), so `invalid_session` read two ways: this file's 7.30.0 entry says it stays "a caller-submitted log failed validation", its 7.52.0 entry reads it as "a leaf or parent entry is missing from the log".
|
|
757
|
+
- **Now — the run re-roots, loudly.** A run reads its session through the leg's view of the storage. When a branch read breaks at a parent the log does not hold AND the replay that loaded the log dropped at least one record, the branch ends at the entry that names the missing parent: the entries that survive below the break are the conversation the run continues, and the run announces `session.lineage_rerooted` once per break per leg — `detail: { break: true, missingParentId, rootedAt, recordsDropped, recordsTotal, leaf, entriesOnPath, entriesCut, sessionId, runId }` (`break` and `leaf` are the #3237 section's, which also says the notice for a branch that did not break) (audience `user`, minted by the engine on `RunnerDeps.onNotice`; `entriesCut` = the entries the log holds that do not descend from `rootedAt`). The stop is the walk's own floor stop applied at the break (one `pathToRoot`, no second walk); `rerootIfHeadless` (a fork copy's re-root at a declared floor) is unchanged. A break the replay cannot account for — it dropped nothing, so the log was written with a parent it never held — is refused `corrupt_session` and never re-rooted. A walk outside a run (a fork, the compact verb, the store kit) has no announcement and so no re-root: a break is refused `corrupt_session`, so a damaged log is never copied into a healthy-looking child.
|
|
758
|
+
- **Now — one meaning per session word.** `not_found` = no such session, or an entry id this session never held; `corrupt_session` = the session is stored but cannot be read as one (no header its store wrote, or a tree that does not hold together); `invalid_session` = a log a caller hands in did not pass the import gate (`validateEntriesForImport`, a log transfer's staging), and nothing else among `SessionError`'s codes (`CompactionError`'s own `invalid_session` — an entry on the path with no id — is a separate closed set and is unchanged). The 7.52.0 entry's reading of `invalid_session` as "a leaf or parent entry is missing from the log" does not hold from this version. Each place that answered otherwise, its old code → its new code: the walk's missing parent (`src/engine/session/path-to-root.ts`, every `getPathToRoot` and `selectForkRows`) `invalid_session` → `corrupt_session`, the sentence naming the entry that names it and, from a store whose replay dropped records, the count (`(1 of 4 records skipped as corrupt)`); a parent chain that loops (`ParentChainGuard`: `getPathToRoot`, the resume-at scan, `settledForkOptions`, `selectForkRows`) `invalid_session` → `corrupt_session`, the sentence unchanged; a loaded log whose leaf it does not hold (the `BaseSessionStorage` constructor) `invalid_session` → `corrupt_session`; a bounded window whose floor the loaded log does not hold (the constructor) `invalid_session` → `corrupt_session`; a leaf entry a write appended naming an entry the log does not hold (`getLeafId`) `invalid_session` → `corrupt_session`, the load's sentence — the stored fact is the one a cold load of the same log refuses, and a resume's acquire reads a cached session's leaf, where a `not_found` would read as "no such session" (`resume.session_not_found`); a checkpoint cut at an entry the transcript no longer holds (the resume rewind) `invalid_session` → `corrupt_session` (its `transcript_corrupt` cause is unchanged); a compaction whose first kept entry is not on its path (`buildSessionContext`) `invalid_session` → `corrupt_session`.
|
|
759
|
+
- **Who is hurt.** A host that branches on `invalid_session` to tell "the stored log is broken" now gets `corrupt_session` for it; the import gate's 422 is untouched. A store that implements `SessionStore` and walks the parent chain itself fails the two `[tree]` kit cases (a parent missing above the floor, a looping chain) until its walk answers `corrupt_session` — a store on `BaseSessionStorage` / `pathToRoot` / `selectForkRows` answers it already. A user who resumes a damaged session gets a run on the surviving history instead of a failure, and a notice that names what was cut.
|
|
760
|
+
- **Deviation from the reference (stated; open to veto).** The reference's chain builder (CC 2.1.309) also ends at a missing parent, but first bridges to the nearest earlier record of the same chain within 5 s, and says nothing to the user. This engine bridges nothing — a dropped record's content is unknowable, a timestamp neighbour is not its parent, and a bridged history can split a tool call from its result — and announces the cut.
|
|
761
|
+
- **Consumers.** @server: the session-open fault words — `invalid_session` is no longer minted by this package on an open, a resume or a fork walk (your `UnusableArchiveWord` reading and the `local-session-window` comment that read it as "the stored log's structure is broken" now meet `corrupt_session` for that fact); `selectForkRows` in the pg / tidb fork paths refuses a missing parent and a loop `corrupt_session`; the import gate's `invalid_session` → 422 mapping is unchanged; forward `session.lineage_rerooted` to the session's user stream (audience `user`). @cli / @client-core: render `session.lineage_rerooted` — its message says which entry is missing, where the conversation continues from and how many entries were cut. @test: a damaged middle line ⇒ the resume completes with a model call and one `session.lineage_rerooted` carrying the count, never `invalid_session`; a dangling parent with no record dropped ⇒ `corrupt_session`.
|
|
762
|
+
- **Pins.** `test/backlog1077-chain-walk-reroot.test.ts` (real `FileStorageBackend` + `Runner` resumes over hand-written logs: R1 / R2 the second / third line damaged in three forms — torn, wrong shape, truncated — completes on the surviving branch with one notice and its exact detail; R3 the last line damaged: nothing re-rooted, and (#3237) the run says the replay dropped a record; R13 a second run re-roots again; R14 a side branch below the break is not counted as cut; R4 a damaged header `corrupt_session`; R5 an import of a dangling log `invalid_session`; R6 an id never held `not_found`; R7a / R7a′ / R7b / R7c the constructor and leaf refusals by their class, the file store's carrying the count; R7d a resume of a cached session whose appended leaf names an entry the log does not hold fails `corrupt_session`, never `resume.session_not_found`, and a cold reopen answers the same; R8 no resume of any damaged shape answers `invalid_session` on its terminal, `onError` or a notice, and R8′ only `import-validate.ts` and `session-log-transfer.ts` mint it in `src/`; R9 a dangling parent with nothing dropped refused, no re-root; R10 a fork below the break refused, nothing written; R11 a looping log; R12 a compaction off its path). Re-pinned on the new codes: `backlog2239-session-path-cycle`, `backlog2565-fork-row-selection`, `backlog2092-path-to-root-linear`, `engine-internals-coverage`, `backlog1796-transcript-corrupt-cause` (#1796's cells: T3's sentence; T3b: an interior entry garbled in place re-roots a parked resume instead of failing its startup); the notice catalog count in `backlog1279-child-undrained-to-parent`.
|
|
763
|
+
|
|
764
|
+
### `git show HEAD:<path>` in a project under the home names the project's file, not the home's: an object path is judged where git resolves it — relative to the repository's top, or (spelled `./` / `../`) to where git starts — not at every ancestor of the command's directory (#1726; security widening — one placement, open to veto; behavior narrowing — `-C` and `--work-tree`, open to veto; hard-breaking: none; closed sets: none; exports: none; members: +2 optional — `ExecutionEnv.receivedEnvNames`, `ReadCandidate.repositoryTop`) (@cli @server @client-core @test)
|
|
765
|
+
|
|
766
|
+
- **Before.** The read station placed the path of a `<rev>:<path>` word (`git show`, `git cat-file`, `git archive`) at every directory the command may stand in and at each of their ancestors, because the text does not say where the repository's top is. A project under the home therefore met the home's rows: `git show HEAD:.mcp.json` was refused naming `~/.mcp.json` while `cat .mcp.json` ran, and so were `HEAD:./.mcp.json` and `:0:.mcp.json`. `git -C <dir>` was not read for the object path: the path stood where the command stood.
|
|
767
|
+
- **Now.** One rule — where git resolves it (gitrevisions(7)): spelled `./` / `../` ⇒ relative to where git starts; any other spelling ⇒ relative to the repository's top. Git starts in the command's directory moved by each `-C`. The top is `--work-tree`'s value where the text names it, else the one git's discovery finds walking up from where it starts — a filesystem fact the establishment reads through the station's door (`repositoryTopOf`, `src/tools/fs/shell-read-object-path.ts`): the first directory holding a `.git` DIRECTORY that is a repository (`HEAD` naming a ref or an object id as git reads it — `ref:` and `refs/` spelled exactly, case and all, with only a space, a tab, a line feed or a carriage return between them, or an object id in hex of either case; git skips a `.git` whose `HEAD` says `REF: refs/heads/main`, `ref: REFS/heads/main` or puts a vertical tab after `ref:`, and walks on to the repository above — #3292, a security fix on the repository-top probe: `HEAD` is judged on its first 255 bytes, as git reads it, and case-sensitively; a nested `.git` git would skip no longer counts as a repository top, open to veto —, `objects/` and `refs/` directories) whose own `config` names no work tree. Nothing is narrowed — every ancestor meets the rows, as before — where the text names the repository otherwise (`--git-dir`, `--bare`), the command's environment may carry a `GIT_*` variable (bound in the text, or received from the environment that runs it: `ExecutionEnv.receivedEnvNames` below), a `-C` / `--work-tree` value is one the text does not settle, the working directory is lost, the environment is an isolated sandbox, or the probe finds anything git might walk past or that names a repository kept elsewhere (a `.git` that is a `gitdir:` file or a link — a linked work tree's, a submodule's, or the home's own git directory, whose history git then reads under the project's name —, an empty or broken `.git`, a directory that is itself a repository, a configured work tree, no repository, a lookup with no answer). A home that is itself the repository's top keeps refusing `HEAD:.mcp.json`.
|
|
768
|
+
- **New member — `ExecutionEnv.receivedEnvNames?: readonly string[]` (additive).** The names of the environment the shell child receives, never a value — the one source for "may git read a `GIT_*` variable the text does not bind" (`GIT_DIR` inherited from a `vcsh` / `yadm enter` shell or a git hook points `git show HEAD:<path>` at the home's repository). `NodeExecutionEnv` declares it live off the same merge each exec gets (as `homeDir` and `cdPath`); omitted ⇒ the adapter cannot say, any name may be there, and an object path keeps every ancestor; a value that is not a list of names is read as omitted. Any `GIT_*` name keeps every ancestor (`GIT_PAGER` too: the rule does not track which variables git reads for its repository). Residual: a per-exec `env` adding one.
|
|
769
|
+
- **Narrowing 1 — `-C`.** An object path now stands where `git -C <dir>` starts, not where the command stands: `git -C ~ show HEAD:.mcp.json` from a directory outside the home ran and is now refused by the home's row (open to veto).
|
|
770
|
+
- **Narrowing 2 — `--work-tree`.** An object path is relative to the top `--work-tree=<dir>` names: `git --work-tree=<home> show HEAD:.mcp.json` from a project outside the home ran and is now refused by the home's row (open to veto).
|
|
771
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person in a project under the home who reads a committed file of a name the home's rows guard through git. *Affected:* the two narrowed forms. *Compensation:* none for the widened form; a person who means the home's file asks for it as such.
|
|
772
|
+
- **Consumers.** @cli @test: a cell pinned to the refusal of `git show HEAD:<file>` in a project under the home now runs on a `NodeExecutionEnv` whose shell receives no `GIT_*` name; the home's own repository, a linked work tree or submodule under the home, the narrowed forms and `cat ~/<file>` stay refused. @server @client-core: an adapter of your own keeps the reading it had (every ancestor) until it declares `receivedEnvNames`; an `ExecutionEnv` the station reads through answers a few more lookups per object path (`fileInfo` of `.git`, `HEAD`, `objects`, `refs`, `config`; `readTextFile` of `HEAD` / `config` up to 64 KiB); a lookup with no answer leaves the command `unanswered`, as any lookup does. Known limits: `KL-1726-a` (linked work trees and submodules), `KL-1726-b` (undeclared adapters), `KL-1726-c` (a substitution's absolute `-C` — closed in this release by #3235).
|
|
773
|
+
- **Pins.** `test/backlog1726-object-path-repository-top.test.ts` (each layout checked against what the real `git show` prints there: a project under the home at its top and from a subdirectory, `./`, `:0:`, `:`, `cat-file`, git listed and unlisted; outside the home; the home as the top, from below it and from a project with no repository; the home inside a larger repository; `-C` to another repository, `-C ~` from outside, relative and chained `-C`; a lost working directory; `--git-dir`, `--bare`, `GIT_*`, `--work-tree`; an empty `.git/`, a garbage `HEAD`, a `HEAD` git does not read (`REF:`, `REFS/`, a vertical tab or a form feed after `ref:`) and three it does (a tab and a space after `ref:`, an object id in upper and in lower case), a dangling `.git` link, a configured work tree, a linked work tree's `.git` file, a `gitdir:` file and a `.git` link naming the home's git directory, the inside of a `.git`, a bare repository with the home as its work tree, a working directory reached through a link; a `GIT_DIR` the shell receives, an adapter that declares no names or a malformed list, one that declares none received; `git grep` with no operand and with a pathspec).
|
|
774
|
+
|
|
775
|
+
### A slow or silent store of the person's permission rules holds the first model request once, not twice — the first request's tool table stands on the prepare read, and a request after a read the store left silent stands on that read (#3249; behavior change — wait time, and the first request's tool table stands on the prepare read (#3272); hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
776
|
+
|
|
777
|
+
- **Before (7.61.0).** The run's prepare read of the person's persisted rules and the first request's tool-table read (#3126) ran one after the other, each bounded by the reader's 14 s bound: a store answering every read in 3 s held the first model request 6 s (7.60.0: 3 s); a store that never answers held it two bounds (≈ 28 s), and two requests with a tool call between them were two bounds apart (the call's read, then the next request's own).
|
|
778
|
+
- **Now.** A request's tool table reads the store when the request is sent (a read asked earlier — a call's, a visibility probe's — may predate a rule a tool wrote, which binds the next request as in 7.61.0), except where an earlier read stands for it and asks the store nothing new: the prepare read, for the first request while no read has started after it; and the newest read asked since the previous request that the store left unanswered past its bound, while no read started after it has been answered — its verdict is the failure law's, the one a new read of the silent store would give. A read still pending is not joined. Readings on a virtual clock: a 3 s store — the first request at 3 s (7.61.0: 6 s); a store that never answers — the first request at one bound (7.61.0: two), the next request one bound after it, the tool call's own read (7.61.0: two).
|
|
779
|
+
- **Unchanged.** Every call takes a read of its own, pinned to its attempt; a visibility probe takes one; the failure law (a partition that could not be read lends the deny and ask rows of its last successful read, none of its allow rows), the run's one `permission.rule_store_unavailable` notice and the bound's value are as they were. Two requests with a tool call between them still read a store that answers twice (the call's read, then the next request's): a 3 s store, 6 s.
|
|
780
|
+
- **One consequence (KL-3272-a, #3272).** A whole-tool deny row written after the prepare read and before the first request (one a hook writes, say) is not in that request's tool table, because the request stands on the prepare read; in 7.61.0 the request read anew and saw it. The next request's table has it, and the call itself, which reads for itself, is still refused. So the model may be shown a tool for one request that the person's deny rows already refuse. Tracked as #3272 (7.63.0).
|
|
781
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person whose rule store is slow or unreachable — the first answer comes one store latency (or one bound) sooner. *Affected:* no call's decision changes (every call reads for itself); the first request's tool table can lack a whole-tool deny row written just before it (the consequence above); a silent store is said to be unreadable once per read asked, so a run's trace carries fewer such lines. *Compensation:* none needed.
|
|
782
|
+
- **Consumers.** @cli @server: user-visible wait — a rule store that never answers holds the first model request ≤ 14 s (was ≈ 28 s) and each later request ≤ 14 s beyond its tool calls' own reads; nothing to change in code. One more thing a black box can see (#3272): a deny row written between the prepare read and the first request is in the second request's tool table, not the first's. @test: re-check the first-request cell — ≤ 15 s against a store that never answers (was 28.02–28.04 s); a 3 s store's first request ≈ 3 s (was 6.05 s); in the two-request run the second request comes one bound after the first.
|
|
783
|
+
- **Pins.** `test/backlog3249-rule-store-one-bound.test.ts` (a real Runner, its store and every wait of 1–60 s on a virtual clock: F1–F4 the first request, H1 the clock's own control, B1–B3 two requests with a tool call between them, C1–C3 the judgments unchanged, R1–R8 the reader's request read); `test/backlog1293b-person-path-rows.test.ts` read numbering and `test/backlog3126-deny-tools-out-of-table.test.ts` ⑤d count re-pinned (the prepare read is the first request's).
|
|
784
|
+
|
|
785
|
+
### A run that continues a session whose log lost records says so whether or not the branch broke — `session.lineage_rerooted` with `break: false`, and `SessionStorage.getReplayLoss` (#3237; behavior change; wire-additive — `detail.break` and `detail.leaf` on the #1077 notice, a second form of it; hard-breaking: none; closed sets: none — no new code; exports: none; members: +1 optional `SessionStorage.getReplayLoss`) (@cli @client-core @server @test)
|
|
786
|
+
|
|
787
|
+
- **Before.** The #1077 notice (`session.lineage_rerooted`) was said only when a branch read met a parent the log did not hold. A log whose replay dropped records and whose surviving branch was whole resumed in silence: the log's last records unreadable (its head falls back to the last one still readable — a model shown `one` of a conversation of `one two three`), the middle and the last together, or damage off the branch. The person's latest turns were gone from the context and nothing said so.
|
|
788
|
+
- **Now.** The leg asks the storage it continues what the replay that loaded the log dropped — `SessionStorage.getReplayLoss(): { dropped, total } | undefined`, a new optional member (`BaseSessionStorage` answers it; the file store's storage carries its replay's tally, fixed at the load) — at the run's first branch read, and `dropped > 0` is one `session.lineage_rerooted` a leg (the acquire may read again after a lost write race and keeps one attempt: what the attempts found is said once the attempt that holds is known, so a discarded attempt's branch is never described). One code, two forms told apart by `detail.break`: `false` — the branch is whole: `detail: { break: false, recordsDropped, recordsTotal, leaf, entriesOnPath, sessionId, runId }`, `leaf` the entry the first branch read started from — the head, at every call site in this tree (`null` when nothing of the log is readable), and the message says the run continues from there and that what the unreadable records said, possibly its latest turns, is not in its context; `true` — the branch broke, as in the #1077 section, with `break` and `leaf` added to its members; a leg whose branch broke says that one notice and no whole-branch notice besides, as far as the acquire's own reads go (KL-3237-a: a whole-branch notice already said is not withdrawn if a later read from another leaf finds a break, which would give that leg two notices; every branch read after the acquire in this tree starts from the head, so no instance is built — inferred from the call sites). Counts and entry ids only, never a record's words. The log is not repaired by the run, so every leg over it says it again (the #1077 rule, now for both forms).
|
|
789
|
+
- **Unchanged.** A log whose replay dropped nothing says nothing; a break the replay cannot account for is refused `corrupt_session`; the count's sentence (`N of M records skipped as corrupt`); an unterminated crash tail is not a record and is not counted (the replay's rule).
|
|
790
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a person who resumes a session whose file lost its latest records. *Affected:* a front end that renders this code's notices shows one more line per such resume (audience `user`); a consumer that read the #1077 notice's `detail` as always carrying `missingParentId` now branches on `detail.break` first. *Compensation:* none needed; a store of rows read whole has no replay to lose from and need not implement the member.
|
|
791
|
+
- **Consumers.** @cli @client-core: render `session.lineage_rerooted` for both forms — `detail.break` says which members are there (`missingParentId`, `rootedAt`, `entriesCut` only when `true`); the message is complete as it stands. @server: forward it to the session's user stream as the #1077 notice (audience `user`); a SQL store of yours that skips rows it cannot read may answer `getReplayLoss`. @test: a log with its last records damaged ⇒ the resume completes on the surviving turns with one `session.lineage_rerooted`, `detail.break: false`, the count and the head; a healthy log ⇒ none.
|
|
792
|
+
- **Pins.** `test/backlog3237-replay-dropped-notice.test.ts` (a real `Runner` over the file backend: D1 the second and third of three messages damaged in three forms, written by the real repo ⇒ one notice, count 2, head = the first message · D2 only the last damaged · D3 only a middle one (the break form: one notice, `break: true`) · D4 a middle and the last under a surviving child ⇒ one notice · D5 a healthy log, two legs ⇒ none · D6 nothing readable ⇒ no head · D7 no record's words in the notice · D8 each leg says it again · D9 the wire face · S1 / S2 the storage's account · V1 the finding is the read's own, a head that moves under the read does not suppress it · V2 the seat's dedup · L1 the leg holds an attempt's findings until the acquire settles · D10 / D11 a lost write race in the acquire (whole then broken, broken then whole) says the branch that holds, once); `test/backlog1077-chain-walk-reroot.test.ts` R1's detail (`break: true`, `leaf`) and R3 (the last line damaged now says so).
|
|
793
|
+
|
|
794
|
+
### A `cd` inside a subshell, a pipeline member or an uncalled function no longer moves the command, and an array element the shell binds is never an environment value — the read boundary and the removal guard read where bash stands, and a `case` arm's command is read where its pattern really ends (#1082, with #3269; behavior change, relaxing by form and narrowing by form (security: #3269); the refusal says how a deny row was met; hard-breaking: none; closed sets: none; exports: none) (@cli @server @test)
|
|
795
|
+
|
|
796
|
+
- **Before.** The working-directory walk read a move inside a `( … )` group, a non-last pipeline member, a background job or an uncalled function body as a move of the whole command (KL-1554-a), so a relative read after it was also judged where the move went: `(cd && ls >/dev/null); cat .npmrc` was refused by the home's `.npmrc` row though bash reads the project's `.npmrc`; `(cd /); rm -rf ./usr` was a `dangerous_delete`. A subscripted element assignment (`a[0]=~/.npmrc`) was a deny candidate of its own, while a compound one (`a=(~/.npmrc)`) was not — one fact, two readings: `a[0]=~/.npmrc; cat ~/other.txt` was refused, `a=(~/.npmrc); cat ~/other.txt` asked.
|
|
797
|
+
- **Now — one visibility rule.** A move reaches a later segment exactly where a binding of the same segment would (the binding thread's rule): a move in a subshell group, a non-last pipeline member, a background job or a function body is no move outside it; the walk holds again what it held before it. The places such a scope went stay on the deny floor of a walk that later loses track (a call of the body, `source`, a text the walk does not follow), so `f(){ cd; }; f; cat .npmrc` and `f(){ cd; }; echo "$(f; cat .npmrc)"` are still refused. The last member of a pipeline may run in this shell (`lastpipe`): its move stays a candidate. A scope closes only where its own group or body does: a segment of closing words alone (`fi`, `esac`, `}`, a loop's `done)`), a function definition nested in the body (`f(){ cd userhome; g(){ :; }; cat .npmrc; }; f`) and a `case` arm's `)` leave the move standing. A `case` command's own words are read once, across the text's segments, for both the block structure and the argv projection: `case` at command position, its subject, `in` (a newline may stand before it), then each pattern — an optional `(` of its own, alternatives joined by `|`, ending at its first `)` whatever follows (`(cd userhome; case x in x) (true);; esac; cat .npmrc)`, `(cd userhome; case x in x|y) ;; esac; cat .npmrc)`) — and an arm ends at `;;` / `;&` / `;;&` or `esac`. The operands of a conditional `[[ … ]]`, an arithmetic command `(( … ))` and an extended glob `@( … )` are read once too, across the segments an `&&` / `||` / `|` inside them splits: no word there is a reserved word and no parenthesis a group's (`[[ x == x || case == in ]]`, `[[ x || } ]]`, `(( 1 || 0 ))`, `[[ x == @(a|b) ]]` close or open nothing). The old same-segment guess (a `)` a word follows ends a pattern) is retired, with the per-segment arithmetic and extended-glob skips.
|
|
798
|
+
- **Now — one predicate for array elements.** A compound value and a subscripted name (`a[k]=v`, `declare a[k]=v`) store array elements: where the shell itself binds them (an assignment statement) never an environment candidate (bash never exports an array — an element assigned to an inherited exported name makes it an array, gone from every child's environment), always the element floor a later `${a[k]}` / `${a[@]}` read meets. `a[0]=~/.npmrc; cat "${a[0]}"` is refused as before, now through the element floor. A word the shell may hand on keeps its candidate as before: a prefix `a[0]=~/.npmrc prog` (bash 3.2 puts `a[0]=<home>/.npmrc` in the program's environment; 5.x refuses the word and runs the program), a launcher's operand (`env a[0]=~/.npmrc prog`) and a declaration builtin's operand (`declare a[0]=~/.npmrc`: the name may be a function, which receives the word — `declare(){ cat "${1#*=}"; }; declare a[0]=~/.npmrc` reads the deny row on both bash versions) are still refused; the declaration builtin's element also leaves the element floor. A scalar statement assignment keeps its deny candidate (an inherited exported name stays exported): `A=~/.npmrc; cat ~/other.txt` is still refused.
|
|
799
|
+
- **Now — the refusal names how the row was met.** A deny refusal reached through a home word spelled with the declared home ends "The word was judged as spelled with the environment's declared home: …"; one reached through the floor of a move the command does not settle ends "The working directory at this word is not settled — …". A refusal of a word as the command places it is unchanged.
|
|
800
|
+
- **Behavior change — relaxing, by form (bash 3.2.57 / 5.3.15 in an isolated tree read the project's file or nothing):** refused → asked: `(cd && ls); cat .npmrc`, `(cd userhome && ls); cat .npmrc`, `(cd); cat .npmrc`, `cd | true; cat .npmrc`, `f() { cd; }; cat .npmrc`, `(pushd ~); cat .npmrc`, `(cd userhome; case x in x) ;; esac); cat .npmrc`, `f(){ g(){ cd userhome; }; cat .npmrc; }; f` (the nested body is never called), `a[0]=~/.npmrc; cat ~/other.txt` (the out-of-root read of `other.txt` is the ask); `a[0]=~/.npmrc; echo done` vouches on the read face. The removal guard reads the same walk: `(cd /); rm -rf ./usr`, `cd / | true; rm -rf ./usr`, `f(){ cd /; }; rm -rf ./usr` are judged as `rm -rf ./usr`.
|
|
801
|
+
- **Behavior change — narrowing (the removal guard):** a subscripted element now leaves the element floor a compound one always left, so `D[0]=/; rm -rf "$D"` and `declare D[0]=/; rm -rf "${D[@]}"` (bash removes `/`) are `dangerous_delete` instead of `unverifiable_delete`, as `D=(/); rm -rf "$D"` already was.
|
|
802
|
+
- **Behavior change — narrowing (a group's or an arm's command the old pattern guess hid, #3269):** the same-segment guess read a `)` with no word after it as a group's and one with a word after it as a pattern's, wherever it stood, so a command went unread: a `case` arm's command behind a group, a redirection or a newline before `in` (`case a in a) (cat ~/.npmrc);; esac`, `case a in a) 2>/dev/null cat ~/.npmrc;; esac`, `case a` ⏎ `in a) (cat ~/.npmrc);; esac`), and — with no `case` at all — a group a reserved word follows (`{ (cat ~/.npmrc) }`, `if (cat ~/.npmrc) then :; fi`, `while (cat ~/.npmrc) do break; done`). On stage-7620 1ca4d7b9f the read face vouched for all six and the default seat asked once (an answered yes printed the deny row; bash 3.2 / 5.3 read it); they are refused.
|
|
803
|
+
- **Behavior change — narrowing (a loop that loses track):** a loop whose first beat loses track of the working directory (`source`, a `cd -` with no settled previous directory, a bare `cd` the walk cannot follow) no longer keeps its body's reads placed where the first beat stood — a later beat runs where the loss left the shell, so the body's words are judged against the loss's floor, as an uncountable loop's body already was. `(for i in 1 2; do cat .npmrc; cd userhome; done); true` (bash reads the home's `.npmrc` on the second beat) was asked and is refused.
|
|
804
|
+
- **Still refused, by design (KL-994l, rewritten form by form):** the return move of `cd; cd - ; cat .npmrc`, `cd; cd "$OLDPWD"; …`, `pushd ~; popd; …` may fail like every move, so the home stays a candidate (open to veto: bash reads the project's file, so the home stays a candidate where bash would not need it; the reference appears to refuse these forms by its own deny rows too — an inference from its directory-candidate walk (`cKt`, `cli309.js:263950`), not run on the reference; D-1082-a); a prefix or a statement that rebinds HOME (`HOME=<x> bash -c 'cat ~/.npmrc'`, `HOME=<x>; cat ~/.npmrc`, its glob / traversal / symlink / `..` forms); a literal tilde (KL-1100a); `~+` / `~-` / `~user`, which the plan does not expand. KL-994l's old sentence "pushd / popd destinations do not enter the deny floor" was untrue and is withdrawn; KL-1554-a is closed.
|
|
805
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a user whose `( … )` / pipeline / function-definition text was refused or flagged dangerous where bash never left the project. *Affected:* a host or test that pinned those refusals (they now ask or pass). *Compensation:* none needed — every form bash really reads a deny row through is refused as before (the controls in the pin).
|
|
806
|
+
- **Consumers.** @cli: the refusal text gains one closing sentence on the shadow and floor arms (no code changes: `read_path_denied`). @test: please re-run the 21 home-shadow forms (bt1-core `core1082-still-red-forms`, fal1103 H25 / H12 / H13) — H10 / H22 now M; H09 / H16 / H25 R by design (KL-994l ①); H12 / H13 documented (KL-994l ④); and the six forms of #3269 (refused now; one approvable ask before). @server: no wire change; the removal guard's answers for the three KL-1554-a forms relax; a `case` arm's command and a group a reserved word follows are read now (#3269: a text that asked may be refused). @cli: the same — a refusal where such a text asked before (`read_path_denied`, no new code).
|
|
807
|
+
- **Pins.** `test/backlog1082-shell-read-shadow.test.ts` — the 21 forms and 48 scope / case-arm / operand / array-element / control forms on the real Runner lane (one letter column per tree: `B1082_COLUMN=base` re-reads stage-7620 1ca4d7b9f), 42 `/bin/bash` ground-truth cells in an isolated tree, the export behaviour of an element assignment (bound, and a prefix handed on), the two refusal sentences, the plan's scope, closing-word, nested-definition, case-arm and element cells, the removal guard's element floor, lost-scope floor, loop beat, nested definition and case arm, the read face on disk. Mutations, red cells per fixture (`.gate-logs/criteria-1082-mutations.md`, M1 – M20): every rule above reds a cell written for it. Re-expressed (old → new meaning): `test/backlog1554-where-the-command-stands.test.ts` — the four KL-1554-a removal cells (dangerous → the unmoved control's answer), `(cd /); cat ./x` (`/` and the start → the start), the two uncalled `eval`-defined bodies (`..` too → the start alone). The equivalence allow-lists: `program-read-model-equivalence.allowed.json` (192 entries gain `1082-case-words-one-reader`, 15 removed — their reading equals the baseline again) and `program-read-model-equivalence-1102c.allowed.json` (191 entries gain `1082-case-words-one-reader/write/{tighter,looser,same standing}` — 165 / 8 / 18 —, 16 removed); every moved entry is a corpus text bash does not parse (a `)` a plain word follows), and the new reading keeps the words the old guess dropped.
|
|
808
|
+
|
|
809
|
+
### The sentence of a nested durable pause names the entry that continues it — `resumeCascade` for a cascade, `resumeWithVerification` for a verification gate (#3276 = #3253 S1; text change; hard-breaking: none; closed sets: none; exports: none)
|
|
810
|
+
|
|
811
|
+
- **Before.** When a cascade rung or a verification gate's leg durably paused, the failed terminal (`unexpected.suspended` / `unexpected.needs_review`, the pause on `nestedPause`) said that durable suspend / resume and plan / dry-run review are "only supported at the top-level runTask". That was false for both: `resumeCascade` continues a parked rung from its card and `resumeWithVerification` continues a gate's leg. Five restatements repeated it (the mint's module header, `TerminalCause.failed.code` / `nestedPause`, the `TaskStatus` doc, INTEGRATION-CORE, the service guide) and `TaskSpec.durableApproval`'s doc said it a sixth time; three of the five also said the repair loop, a workflow and a subagent map the pause too — they do not (the repair loop hands the paused terminal back as it is, a workflow parks the run, a subagent reports `suspended.awaiting_approval`).
|
|
812
|
+
- **Now.** One mint, `mapNestedSuspend(result, resume)` (`src/agents/suspend-guard.ts`), takes the entry from its caller, and the sentence is one template: "…once the pause is decided, continue it with `resumeCascade` | `resumeWithVerification`, handing it this pause's token (`nestedPause.token`) and the decision…". A cascade also says where the parked leg comes from: the card's `CheckpointState.compositionLeg` when the task spec named a session; when it named none and the caller handed the run no leg through `internals`, the card records none (a known limit), and the sentence says the caller supplies the leg itself — `{ entry: "cascade", leg: <the result's finalRung>, hostSessionId: <a session of its own> }` is what `resumeCascade` takes. The mint's header is the one place that says which orchestrators map and how the pause continues; the other places point at it. `CascadeRunResult.cascadeOutcome`'s doc lists the four ways `"exhausted"` happens.
|
|
813
|
+
- **Unchanged.** The code, the `nestedPause` seat and its token, `cascadeOutcome: "exhausted"`, `finalRung`, `attempts[].errorCode`, the held session. Nothing is added to or removed from the exported surface (`mapNestedSuspend` is internal).
|
|
814
|
+
- **Behavior change — B-1.** `failed.message` on both codes is a different sentence. A consumer that matched the old words breaks; one that branches on `code` / `nestedPause` does not.
|
|
815
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host or an operator that read the old sentence and concluded a nested pause could only be resumed from a top-level run. *Affected:* only a consumer that matched the sentence. *Compensation:* none needed — branch on `code` and `nestedPause`.
|
|
816
|
+
- **Consumers.** @test: the cascade-park black-box cell that matched "only supported at the top-level runTask" (core761a G4.d) now reads `resumeCascade`, and `resumeWithVerification` for a gate. @cli @client-core: a front end that renders `failed.message` of these two codes shows the new sentence; nothing to change.
|
|
817
|
+
- **Pins.** `test/backlog3276-nested-suspend-sentence.test.ts` — P1 a cascade with a host session (the sentence; code, `nestedPause` and `cascadeOutcome` as before; `resumeCascade` continues the rung) · P2 a cascade without one (the "supply it yourself" clause; resuming that way works) · P2c a resumed rung that parks again (the supplied leg is now the card's first record, so the sentence points at the card) · P2b a cascade without a session but handed a leg through `internals` (the card records that leg, so the sentence points at the card; supplying another host is refused) · P3–P5 the gate's three stops (implementation leg, resumed leg, fix round; each continued through `resumeWithVerification`) · P6 one template · P7 the leg clause comes from the argument alone · P8 what the mapping keeps · P9–P11 the five places point at the mint and carry no retired phrase, the header names who does not map, exactly the cascade and the gate call the mint; `test/suspend-guard.test.ts` re-pinned on the new sentence.
|
|
818
|
+
|
|
819
|
+
### The closed set of approval card words gains `computer-access` and `computer-control`, the two consent cards of a tool that hands the model the user's screen; what either grants is per connection (#3282; additive wire; hard-breaking: type-level — `ToolApprovalCard` gains two members, so a consumer's `Record<ToolApprovalCard, …>` or exhaustive `switch` needs two keys, three sentences below; closed sets: +2 `TOOL_APPROVAL_CARDS` (10 → 12), +2 rows of `APPROVAL_CARD_REQUIRED_KEYS`; exports: none) (@client-core @computer-use @cli @server @test)
|
|
820
|
+
|
|
821
|
+
- **Before.** `TOOL_APPROVAL_CARDS` held ten words. A tool that asks the person to let the model use their screen had no word of its own: it asked under `generic`, so a shell had no way to pre-select its two consent dialogs, and a declaration of any other word was refused at the door with `config.tool_face_invalid`.
|
|
822
|
+
- **Now.** `computer-access` (the consent to use a named set of applications; the call carries `apps`, the list asked for) and `computer-control` (the consent to take the screen over; the call carries no member the card needs) are members of the set, with their rows in the required-keys table (`["apps"]` / `[]`). Neither is reserved: a caller tool or an MCP server's `toolFaces` overlay may declare either, on a schema that carries what the card needs (`computer-access` on a schema without `apps` is refused by the same judge as any other card). The word reaches the ask, the parked gate and the pending row through the one stamp, as every other word does, and it decides nothing: a parked row with either word reads the gate kind's deadline facet, never a question's. No existing word, row or answer moves, and nothing mints either word until a tool declares it.
|
|
823
|
+
- **Closed set +2, three sentences (open to veto).** *What changed:* `TOOL_APPROVAL_CARDS` gains `computer-access` and `computer-control` (10 → 12), and `APPROVAL_CARD_REQUIRED_KEYS` gains `["apps"]` and `[]`; both names follow the object-action kebab form of the ten (`file-edit`, `notebook-edit`). *Who is affected:* @client-core @cli @server @test — a reader that enumerates the card words, or that validates an ask, roster or checkpoint frame against the ten-word list, reads two more; a consumer's own `Record<ToolApprovalCard, …>` or exhaustive `switch` needs the two keys. An engine older than this version refuses a declaration of either word at the door (`config.tool_face_invalid`, the prepare fails), so a deployment declares them to an engine at this version or later. *Compensation:* none needed beyond the rows. `TOOL_APPROVAL_CARDS` is not registered in `docs/CLOSED-SETS.md` today — an existing bookkeeping gap this change does not widen.
|
|
824
|
+
- **Lifetime: per connection.** The card word adds no expiry of its own, and the engine's part is the connection's lifetime. What a person grants on either card is meant to last as long as the MCP connection the call was made on; that the grant follows the connection is the screen tool's (computer-use's) behavior, which this engine neither holds nor checks. The legs of one run tree share a connection and it closes when the last holder lets go (`release` and `close` of `src/core/mcp-connection-pool.ts`; a leg's materialization `dispose` releases its lease and closes the pool it owns, `src/core/mcp.ts:2501-2509`): ordinarily the end of the run that dialled it, but a background sub-agent still using it holds it, and the grant on it, open past that end (`test/backlog1433b-pool-background.test.ts`). A later run dials its own connection and asks again, a new card. `docs/sdk/04-tools-and-mcp.md`, "Approval card words", states it once. Not "valid for the session".
|
|
825
|
+
- **Claude Code 2.1.309.** No card-word layer to copy (a card is a shell component there); the required members agree with its tools: `request_access` takes `apps: string[]` (`cli309.js:279294`) and `request_full_control` takes no member (`:279298`). Its description of `request_full_control` says "for THIS SESSION" (`:279298`); this engine's consent is the connection's, which ends with its last holder, ordinarily the run (the pool's lifetime, `src/core/mcp-connection-pool.ts`): a divergence in the lifetime sentence only, open to veto.
|
|
826
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* the client that renders the screen tool's two dialogs by word instead of by tool name or server name. *Affected:* only a deployment that declares either word; nothing else reads a different answer. *Compensation:* none.
|
|
827
|
+
- **Consumers.** @client-core: regenerate the card-word table from ten words to twelve (read the word from the ask, never from a tool name). @computer-use: declare `renderHints.approvalCard` as `computer-access` on `request_access` and `computer-control` on `request_full_control` (the final names), to an engine at this version or later. @cli @server: the closed set is `TOOL_APPROVAL_CARDS`; a mixed-version fleet declares the words only to engines that carry them. @test: the G-CU skeleton can pin both words and the per-connection lifetime (a grant ends with the connection's last holder, not with the run when a background sub-agent still holds it).
|
|
828
|
+
- **Pins.** `test/backlog3282-computer-card-words.test.ts` (the set holds both words and the screen admits exactly them, other spellings and non-strings are no card; the required-keys rows and the key set equal to the closed set; neither word reserved; the overlay door over `apps` present, absent and empty, the schema-free reader, a reserved word and an unknown word; a real Runner over a real stdio MCP server — each tool asks under its card, an undeclared one under `generic`, an unknown word fails the prepare with `config.tool_face_invalid`; a real Runner over a caller tool; a parked `human` / `irreversible_ask` row with either word reads the gate kind's facet and is no question; the connection a pool lends is closed by its last holder's release and a pool's `close` leaves a held one open; the doc block states the lifetime once, by connection and last holder, with no session word).
|
|
829
|
+
|
|
830
|
+
### A resume's server lists are the deployment's current ones: the contract says so, and a parked call whose server was removed is refused, never dialed (#3242, ruled C-R1068 option A, open to veto; contract sentence; behavior change: none; hard-breaking: none; closed sets: none; exports: none; wire: none)
|
|
831
|
+
|
|
832
|
+
- **Before.** `ResumeTaskConfig`'s contract told the caller to re-supply "the same `TaskSpec` it ran with", and the admission note called the config's MCP / A2A entries "the frozen ones the doors judged". Both read as "replay the parked run's server lists". A host that did so — rebuilding the resume config from its record of the parked run — re-dialed a server its user had since removed (`sema mcp remove`) and ran the parked call on it.
|
|
833
|
+
- **Now.** The sentence says what the engine does. The checkpoint records no tool implementation, hand band or server list. The caller supplies the deployment's CURRENT `tools`, `mcp`, `a2a` and `skills` specs (the row keeps the names of the skills in force and their frozen grants and scopes — `state.skillGrants`, `state.skillScopes`). The resumed leg dials the `mcp` / `a2a` entries the resume hands, as the config doors judge them (a deployment-locked list in their place); an absent list declares none. The parked call is judged against what the resume mounts: a server the resume no longer declares ⇒ `resume.tool_unavailable` (that server never dialed, the call not run, the checkpoint reopened `pending`; a deny still resolves it); a replacement wearing the tool's name ⇒ `resume.tool_contract_mismatch`; a moved face or declaration ⇒ `resume.target_moved`, as before. Identity is kept: a contradicting `principal` is refused (`resume.principal_mismatch`), an absent one inherits the row's. The admission note (`ResumeAdmissionResult.config`) now says its MCP / A2A lists are "the doors' judged copies of THIS resume's (the row records none)". `docs/INTEGRATION-CORE.md` §4.1 says the same.
|
|
834
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a user who removes an MCP server or A2A peer while a call to it is parked. *Affected:* nobody in the engine (no code path changed). A host that replays the parked run's lists keeps re-dialing removed servers until it sends the current ones. *Compensation:* none needed; the refusal word is the existing one.
|
|
835
|
+
- **Known limit.** The same server name redefined to another command or URL, serving a tool with the same contract and face, runs the parked call on the new definition: the configuration in force decides, keyed by name, as in the reference.
|
|
836
|
+
- **Consumers.** @server (S-2883): the resume route sends the request's current `mcpServers` into `ResumeTaskConfig.mcp` (and its A2A peers into `a2a`), not the parked leg's lists. The refusal is the existing `resume.tool_unavailable`; no new code joins the closed set. @cli (L-2232): a resume request carries the current server lists. @test: black box — park an MCP call, remove the server, resume with the current lists ⇒ `resume.tool_unavailable`, the server never started again, the call not run, the row `pending`; a deny resolves it.
|
|
837
|
+
- **Pins.** `test/backlog3242-resume-mcp-current-config.test.ts` (real Runner, real stdio MCP servers and a real HTTP A2A peer, every start and call counted outside the engine). R1: server removed from the resume's `mcp` ⇒ never started on the resume, call not run, row `pending`, `resume.tool_unavailable`. R2: no `mcp` handed ⇒ no server started. R3: same server still declared ⇒ runs once (control). R4: A2A peer removed ⇒ its card never fetched on the resume, nothing sent. R5: A2A control. R6: a parked caller tool, `mcp` emptied ⇒ unaffected. R7: same name redefined ⇒ runs on the handed definition. R8: deny ⇒ resolves, server never started. Mutations (`.gate-logs/criteria-3242-mutations.md`): the resume dials the parked leg's MCP list instead of its own ⇒ R1 / R2 / R6 / R7 / R8 red; the same for A2A ⇒ R4 red; the session station takes an unmounted tool as a match ⇒ R1 / R2 / R4 red.
|
|
838
|
+
|
|
839
|
+
no-notes: #3079(named only by a merge header inside the car-1726-colon-form branch: the ticket shipped in 7.61.0 and nothing for it changes here), #3215(named only by a merge header inside the car-1726-colon-form branch: the ticket shipped in 7.61.0 and nothing for it changes here), #9(not a ticket: a number quoted in a merge-commit subject), #956(named by a #3275 commit only: the two start spellings of the shell-read start module reach the one path prelude through the existing anchor step `anchorSpelling` instead of joining a path themselves; no behavior beyond #3275, the prelude pin unchanged), #1498(named by a #3275 commit only: the launcher-base-move pins re-pinned to the #3275 reading, a text an `env -C /` launch hands a shell is judged at `/`; told in the #3275 section; one test file)
|
|
840
|
+
|
|
1
841
|
## 7.61.0 — 2026-10-30
|
|
2
842
|
|
|
3
843
|
### A placed row whose owner cell is damaged still says it is placed — `FileSessionRepo.placementOf` reads the placement cell by its own reader (#3215; behavior change)
|