@sema-agent/core 7.63.0 → 7.64.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 +408 -0
- package/dist/agents/cc-peer-directory.js +1 -0
- package/dist/agents/cc-peer-wire.d.ts +4 -0
- package/dist/agents/cc-peer-wire.js +1 -0
- package/dist/agents/cc-uds-peer-channel.js +5 -0
- package/dist/agents/cross-session-judge.d.ts +3 -1
- package/dist/agents/cross-session-judge.js +4 -1
- package/dist/agents/peer-directory.d.ts +8 -0
- package/dist/agents/peer-directory.js +4 -0
- package/dist/agents/peer-held-queue.d.ts +9 -3
- package/dist/agents/peer-held-queue.js +12 -9
- package/dist/agents/peer-idle.d.ts +20 -1
- package/dist/agents/peer-idle.js +23 -12
- package/dist/agents/peer-notice-route.d.ts +16 -5
- package/dist/agents/peer-notice-route.js +11 -9
- package/dist/agents/peer-notices.d.ts +25 -8
- package/dist/agents/peer-notices.js +6 -1
- package/dist/agents/peer-session-drain.d.ts +32 -6
- package/dist/agents/peer-session-drain.js +100 -26
- package/dist/agents/send-message-tool.d.ts +7 -0
- package/dist/agents/send-message-tool.js +18 -6
- package/dist/agents/subagent.js +20 -3
- package/dist/core/allow-entry.d.ts +4 -0
- package/dist/core/ask-origin.d.ts +1 -1
- package/dist/core/ask-origin.js +2 -2
- package/dist/core/ask-unresolvable-notice.d.ts +13 -4
- package/dist/core/ask-unresolvable-notice.js +10 -3
- package/dist/core/auto-compaction.d.ts +7 -5
- package/dist/core/background-agent-store.d.ts +7 -0
- package/dist/core/background-agent-store.js +3 -0
- package/dist/core/checkpoint-queries.d.ts +9 -6
- package/dist/core/checkpoint-queries.js +8 -3
- package/dist/core/checkpoint-store.d.ts +5 -1
- package/dist/core/context-settings.d.ts +40 -9
- package/dist/core/context-settings.js +32 -10
- package/dist/core/engine-attestation.d.ts +26 -6
- package/dist/core/engine-attestation.js +5 -1
- package/dist/core/engine-notice.d.ts +24 -1
- package/dist/core/extension-requester.d.ts +9 -0
- package/dist/core/extension-requester.js +7 -0
- package/dist/core/file-history-store.d.ts +28 -0
- package/dist/core/file-history-store.js +48 -5
- package/dist/core/fs-write-gate-policy.js +1 -1
- package/dist/core/gate-fold.js +2 -0
- package/dist/core/gate-lanes.js +2 -0
- package/dist/core/gate-outcome.d.ts +39 -2
- package/dist/core/gate-outcome.js +20 -1
- package/dist/core/governance-codes.d.ts +3 -1
- package/dist/core/governance-codes.js +4 -0
- package/dist/core/leg-identity.d.ts +19 -1
- package/dist/core/leg-identity.js +12 -0
- package/dist/core/mailbox-store.d.ts +39 -4
- package/dist/core/mailbox-store.js +14 -2
- package/dist/core/memory-engine/consolidation.d.ts +3 -2
- package/dist/core/memory-engine/consolidation.js +16 -0
- package/dist/core/memory-engine/control-objects.d.ts +25 -0
- package/dist/core/memory-engine/control-objects.js +151 -0
- package/dist/core/memory-engine/control-plane-adoption.d.ts +48 -0
- package/dist/core/memory-engine/control-plane-adoption.js +159 -0
- package/dist/core/memory-engine/delegation-settlement.d.ts +21 -5
- package/dist/core/memory-engine/delegation-settlement.js +217 -26
- package/dist/core/memory-engine/dual-root.js +2 -2
- package/dist/core/memory-engine/engine.d.ts +38 -23
- package/dist/core/memory-engine/engine.js +14 -14
- package/dist/core/memory-engine/file-backend.d.ts +41 -65
- package/dist/core/memory-engine/file-backend.js +59 -166
- package/dist/core/memory-engine/index.d.ts +3 -2
- package/dist/core/memory-engine/index.js +2 -1
- package/dist/core/memory-engine/layout.d.ts +6 -1
- package/dist/core/memory-engine/layout.js +12 -7
- package/dist/core/memory-engine/memory-backend-contract.d.ts +10 -3
- package/dist/core/memory-engine/memory-backend-contract.js +158 -2
- package/dist/core/memory-engine/memory-deployment.d.ts +11 -3
- package/dist/core/memory-engine/memory-deployment.js +31 -6
- package/dist/core/memory-engine/origin-clearance.d.ts +12 -3
- package/dist/core/memory-engine/origin-clearance.js +68 -9
- package/dist/core/memory-engine/session-write-home.d.ts +34 -1
- package/dist/core/memory-engine/session-write-home.js +37 -10
- package/dist/core/memory-engine/types.d.ts +44 -7
- package/dist/core/memory-engine/types.js +2 -1
- package/dist/core/mode-policy.js +3 -3
- package/dist/core/mods/agent-stations.d.ts +18 -0
- package/dist/core/mods/agent-stations.js +8 -6
- package/dist/core/mods/extension-call.d.ts +4 -0
- package/dist/core/mods/extension-call.js +8 -0
- package/dist/core/mods/tool-call.js +3 -4
- package/dist/core/parent-spec-seat.d.ts +2 -2
- package/dist/core/peer-channel.d.ts +5 -0
- package/dist/core/permission-rule-consent.d.ts +21 -10
- package/dist/core/permission-rule-consent.js +50 -23
- package/dist/core/permission-rule-store.d.ts +41 -16
- package/dist/core/permission-rule-store.js +2 -0
- package/dist/core/refusal-echo.d.ts +20 -0
- package/dist/core/refusal-echo.js +33 -0
- package/dist/core/retention.d.ts +180 -10
- package/dist/core/retention.js +45 -0
- package/dist/core/retired-keys.d.ts +5 -0
- package/dist/core/retired-keys.js +3 -0
- package/dist/core/rule-offer-read.d.ts +0 -4
- package/dist/core/rule-offer-read.js +2 -18
- package/dist/core/runner/classifier-ladder.d.ts +7 -1
- package/dist/core/runner/classifier-ladder.js +4 -2
- package/dist/core/runner/compact-session.js +10 -7
- package/dist/core/runner/compaction-call-options.d.ts +7 -7
- package/dist/core/runner/compaction-call-options.js +3 -2
- package/dist/core/runner/contracts.d.ts +21 -2
- package/dist/core/runner/delegation-owner.d.ts +10 -3
- package/dist/core/runner/delegation-owner.js +4 -1
- package/dist/core/runner/gate-exit.d.ts +6 -0
- package/dist/core/runner/gate-exit.js +11 -2
- package/dist/core/runner/memory-consolidation-driver.d.ts +4 -2
- package/dist/core/runner/memory-consolidation-driver.js +8 -5
- package/dist/core/runner/prepare-ask-lane.js +3 -3
- package/dist/core/runner/prepare-caps-and-workflow.d.ts +3 -1
- package/dist/core/runner/prepare-caps-and-workflow.js +2 -2
- package/dist/core/runner/prepare-config-doors.js +4 -0
- package/dist/core/runner/prepare-delegation-surface.d.ts +3 -0
- package/dist/core/runner/prepare-delegation-surface.js +2 -2
- package/dist/core/runner/prepare-gate-stations.d.ts +5 -0
- package/dist/core/runner/prepare-gate-stations.js +5 -5
- package/dist/core/runner/prepare-hands-readface.js +1 -1
- package/dist/core/runner/prepare-inherited-gate.d.ts +3 -1
- package/dist/core/runner/prepare-inherited-gate.js +4 -2
- package/dist/core/runner/prepare-memory.d.ts +4 -0
- package/dist/core/runner/prepare-memory.js +14 -20
- package/dist/core/runner/prepare-policy-chain.js +7 -7
- package/dist/core/runner/prepare-prompt-inputs.js +1 -1
- package/dist/core/runner/prepare-task.js +15 -10
- package/dist/core/runner/prepare-wiring-manifest.d.ts +3 -1
- package/dist/core/runner/prepare-wiring-manifest.js +3 -2
- package/dist/core/runner/resume-admission.d.ts +2 -2
- package/dist/core/runner/resume-admission.js +2 -23
- package/dist/core/runner/role-resolution-table.d.ts +98 -0
- package/dist/core/runner/role-resolution-table.js +62 -0
- package/dist/core/runner/run-compaction-machinery.js +2 -2
- package/dist/core/runner/run-identity-wiring.js +12 -9
- package/dist/core/runner/run-leg.js +8 -4
- package/dist/core/runner/run-notification-lane.js +22 -22
- package/dist/core/runner/run-recovery-lanes.js +3 -3
- package/dist/core/runner/run-terminal-adoption.js +1 -1
- package/dist/core/runner/run-turn-boundary.js +14 -15
- package/dist/core/runner/runtask.js +1 -1
- package/dist/core/runner/tool-occurrence.d.ts +4 -2
- package/dist/core/runner/tool-occurrence.js +2 -2
- package/dist/core/runner-deps.d.ts +1 -1
- package/dist/core/session-checkout.d.ts +63 -3
- package/dist/core/session-checkout.js +152 -58
- package/dist/core/shell-read-silence.js +8 -0
- package/dist/core/store-contracts/peer-directory-contract.js +8 -1
- package/dist/core/task-event.d.ts +9 -5
- package/dist/core/task-notification.d.ts +110 -31
- package/dist/core/task-notification.js +180 -100
- package/dist/core/task-registry-agent.d.ts +11 -0
- package/dist/core/task-registry-agent.js +11 -3
- package/dist/core/task-registry-shared.d.ts +7 -0
- package/dist/core/task-registry.d.ts +18 -0
- package/dist/core/task-registry.js +27 -8
- package/dist/core/task-spec.d.ts +7 -2
- package/dist/core/tool-errors.d.ts +14 -6
- package/dist/core/tool-errors.js +1 -1
- package/dist/core/tool-policy.d.ts +18 -1
- package/dist/core/tool-policy.js +16 -7
- package/dist/core/tool-result-store.d.ts +20 -0
- package/dist/core/tool-spec.d.ts +4 -0
- package/dist/core/trace.d.ts +3 -2
- package/dist/core/workflow-journal-store.d.ts +11 -0
- package/dist/core/workflow-journal-store.js +7 -0
- package/dist/core/workflow-run-store.d.ts +9 -0
- package/dist/core/workflow-run-store.js +6 -0
- package/dist/engine/compaction/compaction.d.ts +2 -1
- package/dist/engine/harness/types.d.ts +1 -0
- package/dist/engine/session/session.d.ts +7 -1
- package/dist/engine/session/session.js +5 -2
- package/dist/index.d.ts +7 -5
- package/dist/index.js +7 -5
- package/dist/orchestration/run-workflow-tool.d.ts +4 -0
- package/dist/orchestration/run-workflow-tool.js +7 -0
- package/dist/orchestration/workflow-types.d.ts +2 -1
- package/dist/orchestration/workflow.d.ts +3 -0
- package/dist/orchestration/workflow.js +2 -1
- package/dist/stores/file/checkpoint-store.d.ts +6 -0
- package/dist/stores/file/checkpoint-store.js +4 -1
- package/dist/stores/file/file-history-store.d.ts +13 -0
- package/dist/stores/file/file-history-store.js +75 -13
- package/dist/stores/file/index.d.ts +11 -1
- package/dist/stores/file/index.js +7 -11
- package/dist/stores/file/permission-rule-store.d.ts +23 -0
- package/dist/stores/file/permission-rule-store.js +75 -7
- package/dist/stores/file/tool-result-store.d.ts +14 -0
- package/dist/stores/file/tool-result-store.js +39 -2
- package/dist/stores/file/workflow-journal-store.d.ts +4 -0
- package/dist/stores/file/workflow-journal-store.js +17 -0
- package/dist/stores/file/workflow-run-store.d.ts +3 -0
- package/dist/stores/file/workflow-run-store.js +15 -0
- package/dist/tools/fs/read-deny.d.ts +15 -2
- package/dist/tools/fs/read-deny.js +10 -2
- package/dist/tools/fs/shell-read-check.d.ts +8 -2
- package/dist/tools/fs/shell-read-check.js +7 -7
- package/package.json +2 -2
- package/test/export-surface.snapshot.json +63 -1
- package/wire-changes/core-stores-sql@7.64.0.json +30 -0
- package/wire-changes/core@7.64.0.json +2653 -0
- package/wire-changes/mods-kernel@7.64.0.json +30 -0
- package/wire-changes/primitives@7.64.0.json +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,411 @@
|
|
|
1
|
+
## 7.64.0 — 2026-11-02
|
|
2
|
+
|
|
3
|
+
### A held instruction's quarantine seat is a function of its row, not of the clock — the row is written first, the custody bytes move second, and a death between the two converges instead of orphaning the bytes (#3464; behavior change: the seat's file name is `<first 16 hex of the content digest>-hold-<captureName>` and the row records it before the move; narrowing: none; widening: none; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
4
|
+
|
|
5
|
+
- **Before.** `disposeHold` named the seat `<now()>-hold-<captureName>`, renamed the custody file there, and only then wrote the row. A process killed between the two left the bytes in quarantine under a clock-derived name no row recorded; the re-call minted a different name, found custody gone, and recorded the disposal with no name — an orphan file (its sha256 the row's `contentDigest`), `readHoldCustody` blind to it, the row `disposed` with no seat. For an `expired` hold the host valve's `resolveHold(holdId, "release")` then answered `capture_lost` and committed nothing; for a hold disposed inside a harvest the warning lost its second half ("captured bytes moved to control-plane quarantine (…)"). `reconcileHolds` swept only `capturing` rows and could not find any of it (test, 7.62.0 and 7.63.0).
|
|
6
|
+
- **Now.** One function, `holdQuarantineNameOf(row)` (`src/core/memory-engine/delegation-settlement.ts`): the seat is `<first 16 hex of contentDigest>-hold-<captureName>` — the same row names the same seat in every process after any crash. `disposeHold` takes no clock any more and writes the row first (`disposed` + the terminal + that name), then moves the custody file there; a seat already holding the row's bytes means the move happened (the custody leftover is dropped), a seat holding anything else records the terminal with no seat (the verdict always lands — a refused intake stays terminal), leaves the custody bytes where they are, replaces nothing, and refuses with `ControlPlaneCorruptError` after the row is written; a row with no custody bytes anywhere records its terminal with no seat, as before. A death at either point leaves a row whose bytes are at the custody seat or the quarantine seat — both of which `readHoldCustody` tries — and `reconcileHolds` finishes the move at the next harvest (a seat it cannot use is disclosed on the same lane as a stranded copy, never thrown). The move is a no-replace hard link then an unlink; on a filesystem without hard links it is a rename after a look at the seat, so a stranger who writes the digest-derived name in the instant between the look and the rename is the one window left (never a content copy: a copy is not durable before the custody name goes and can stop half-way). Bytes the older writer already orphaned are found by what they are: a `-hold-` file no row names whose sha256 is a row's `contentDigest` — a `disposed` row with no seat (or a seat nothing stands at) records it as its seat, a `held` row with its custody gone takes the bytes back into custody and the next verdict disposes them under the row-derived name. The lost-bytes message of the release leg now carries the digest it looked for.
|
|
7
|
+
- **Narrowing / widening.** None on any surface a host drives. The seat's file name changes shape for rows disposed from here on; rows already carrying a recorded name keep it (the name on the row is what readers use). A host that listed the quarantine directory by the `<ms>-hold-` prefix sees `<digest16>-hold-` for new disposals.
|
|
8
|
+
- **Consumers.** @server @test: no verb, frame or wire member changed. `disposeHold`'s `now` parameter is gone (it only ever minted the name); it is not on the package root.
|
|
9
|
+
- **Pins.** `test/backlog3464-quarantine-name-deterministic.test.ts` — T1 two constructions of one row name one seat at any disposal clock · T2 / T3 / T3b a real SIGKILL right after / before the move into quarantine, and between the link and the unlink: the row already names the seat, a re-call changes nothing, `readHoldCustody` reads, exactly one file, `reconcileHolds` finishes a move that did not happen or drops the duplicate · T3d no hard links: a rename, never a copy · T4 / T4a / T4b / T4c a seat with other bytes (there before, or taken between the look and the move) is never replaced, the verdict still lands with no seat and the refusal is loud; the hold's own bytes at the seat are the idempotent "already moved" and a custody file with other bytes is never dropped; no custody means no name · T5b a move the seat cannot take is disclosed on the stranded lane · T6 an expired hold whose disposal died at the rename: the valve release commits it · T7 the same deaths inside a real harvest converge on one row, one seat, one file; T7b the live warning carries its whole sentence · T8 orphans of the older writer: a disposed row without a seat records the orphan, a held row takes its bytes back, another row's seat and a decoy with other bytes are left alone, two rows of one digest each get their own file whatever the ledger order, a row that met an old-order disposer takes the clock-named file, a file name that is not a safe segment is never recorded, and a refused intake stays terminal even with a stranger at its seat.
|
|
10
|
+
|
|
11
|
+
### Errata to the 7.63.0 section (that section is frozen; the corrections live here)
|
|
12
|
+
|
|
13
|
+
- The #2292 / #3004 section's Known limits sentence said "A bounded-tail store that has cut the first leg's entry answers `workspace.checkout_unavailable` (fail-closed …)", and `docs/INTEGRATION-CORE.md` §1.8a said the same. Untrue. A store that loads a window of the log (`SessionStorage.getFloorId`) and has cut the `session_checkout` entry is read as no record at all (`readSessionCheckout`, `src/engine/session/session.ts` at 7.63.0). A leg that declares `TaskSpec.workspace` is then refused `config.session_workspace_changed` as a session "that already ran without it" (`src/core/session-checkout.ts:359-360` at 7.63.0); a leg that declares nothing runs in the base checkout (`:356`); `releaseSessionCheckout` answers no trees. Nothing answers `workspace.checkout_unavailable`. The entry is still not restated at compaction. The true text is now in INTEGRATION-CORE §1.8a and KNOWN-LIMITS KL-3468-a; the record surviving the floor is #3468.
|
|
14
|
+
|
|
15
|
+
### Errata to the 7.56.0 section (that section is frozen; the correction lives here)
|
|
16
|
+
|
|
17
|
+
- The "The MCP failure text takes the request out of an endpoint's echo" section's "How to migrate" said "your second redaction that rewrites the engine's `[redacted]` to `«redacted»` is yours to retire (S-2027)". The ticket number is wrong: the server's second-redaction retirement is **S-2026**; S-2027 is the ticket for the `Cookie` / `Set-Cookie` header lines and the `x-amz-security-token` header. The instruction itself (the server retires its own second redaction) stands. Source: @server direct message, 11-02.
|
|
18
|
+
|
|
19
|
+
### The roles a task's prepare resolves itself are one table, and "will this model face make a prepare refuse on a role?" is one question — `ROLE_RESOLUTION_TABLE` and `modelFaceResolvable(face, { spec?, when? })` answer `{ ok: true }` or `{ ok: false, role, code }` by asking each row's own hop, the function prepare calls (#2672; behavior change: none that a plain deps object can see — the hops are the engine's own and run as before; hard-breaking: none; closed sets: +2, both new (`RoleResolutionWhen` `per-task` / `deployment`, `RoleResolutionAbsence` `throws` / `falls-back`; no existing set moved); exports: +2 root values `ROLE_RESOLUTION_TABLE`, `modelFaceResolvable` and 7 types) (@server @test)
|
|
20
|
+
|
|
21
|
+
- **Before.** A host that wanted to refuse, at adoption, a model face every task would meet a refusal on had `resolveTaskModel` (wider than the per-task compaction hop: its fallback chain reaches `default`) and a copy of the role walk — a role map cut down to one key, probed with the engine's resolver (S-2204). The copy answers a different question the day the walk moves. Inside the engine the same absence was also asked twice: the consolidation chain (`consolidate`, then `summarize`) was read by `consolidationSeatResolvable` and by the resolve verb as two written-out copies, and its list of roles was spelled in three places.
|
|
22
|
+
- **Now.** `src/core/runner/role-resolution-table.ts`: `ROLE_RESOLUTION_TABLE` has one row per role the engine resolves itself where a refusal can come — `default` (per task: `resolveTaskModel`, the task's own model), `summarize` (per task: `resolveCompactionModel`, also `Runner.compactSession`'s), `consolidate` (the deployment's own door `assertAutoConsolidationWirable`, read from the face alone) — in the order prepare reaches them, each with when it is read, the hop, and what an absent role does (`throws` / `falls-back`). The face is what a host hands `new Runner` for models, `{ models, tiers?, roles? }`, and the question applies the Runner's catalog door to it (so the tier bindings go in as `tiers`; a catalog the caller expanded by hand is a plain catalog, to a Runner and to the question alike). `modelFaceResolvable` receives the catalog and the role maps once, walks the rows the options select (`when`: `["per-task"]` by default, add `"deployment"` to ask the consolidation seat as armed), calls each row's hop, and answers the first that throws: its role and the `code` the hop's refusal carries (`config.unknown_role`, `config.auto_consolidation`; no code is minted, and a throw with no code is rethrown, not given one). `spec` is the task asked about; omitted, a task naming no model. Each member of the face and of the task is read once. A `summarize` seat that is unset or names a word the catalog does not hold is `ok: true` (the compaction pass rides the task's model); a face is refused only where the hop refuses.
|
|
23
|
+
- **What the table settles.** Which roles are resolved when: nothing resolves a role at `new Runner` (the constructor copies the deployment's seats; every role-map entry is judged at the first prepare). At prepare, the role map is screened as a whole by the hops, so one entry that is no model reference refuses a task whichever role it sits on, `compactionModel` named or not — a question that asked only the `summarize` hop would have said `ok` for such a face. The classifier seat and the next-prompt suggestion pass resolve a role and take the main model when it supplies none (they never refuse); the `subagent` and `verifier` seats resolve when a child is spawned; `sideQuery` resolves at the caller's call. None of them is a row.
|
|
24
|
+
- **Narrowing / widening.** None on any plain deps object. No hop changed; `consolidationSeatResolvable` and the resolve verb now read one `consolidationRoleModel` and one chain list, and take the seat's slice of the deployment (`ConsolidationSeatDeps`, no brain) instead of the whole. The one visible difference: `deps.roles` is read once per seat question where the two written-out reads read it twice, so a deps bag whose `roles` is an accessor answering differently on a second read now gets one reading (a Runner's own deps are copied at construction and never showed it).
|
|
25
|
+
- **Rules.** +1 table, +1 question, −1 (the consolidation chain written out in two reads, now one), −1 (the chain's list spelled three times, now once) = 0 net on the judgment side: the question holds no judgment of its own.
|
|
26
|
+
- **Consumers.** @server (S-2204 state B): replace the "roles cut to one key" probe with `modelFaceResolvable(face, { spec })` over the adopted `{ models, tiers, roles }` (what you hand `new Runner`, not a catalog you expanded yourself); refuse the face on `ok: false` and carry `role` / `code` as the refusal's words. A face with no `summarize` role is `ok: true` — whether a deployment must have a cheap compaction seat is a separate rule the engine does not hold. @test: nothing to change.
|
|
27
|
+
- **Pins.** `test/backlog2672-model-face-resolvable.test.ts` — A1 the rows frozen with their `when` / `absence` · A2 each hop exists where the row says · A3 every `roleModelIfSet` call in `src/` is one of the three hops' reads (AST census) · A4 `resolveTaskModel` callers are the `default` hop and the named non-rows · A5 prepare calls the three hops from one function; `Runner.compactSession` calls the same compaction hop · A6 the `absence` column against what each hop does · B1–B9 the verdicts (unset / unheld summarize, `compactionModel` held / unheld, malformed role entries, the default chain with and without a named model, the task's own role map, the rows asked, first refusing row in prepare's order, a face or option that is no object — or names a word that cannot be shown — refused coded, a code-less throw rethrown, each member read once) · C1 `roles.summarize = 42` with a compaction model named: the summarize hop returns, the question says not ok at `default` · C2 a face the summarize hop passes and `default` refuses · C3 over 25 faces × tasks, the verdict is `ok` exactly when a real Runner's prepare does not refuse, with the prepare refusal's code, and no battery face is refused at `new Runner` · C4 both answers and both refusing roles appear · C5 a face with tier bindings answers as a Runner built with them (a hand-expanded catalog is a plain catalog to both) · C6 a catalog `new Runner` would not accept is thrown, not a verdict · D1–D4 the consolidation row against `consolidationSeatResolvable`, the arming door's code, a real Runner armed with and without a seat (also under tier bindings, and with two rows refusing at once), the resolve verb's chain order.
|
|
28
|
+
|
|
29
|
+
### A session tree whose allocation mark reads leaves the disk through two doors only — a first leg whose record cannot be written keeps its tree and names it; `listOrphanSessionTrees` lists the trees no record holds and `releaseOrphanSessionTree` releases one (#3462, design #3420 / #3423; ruled C-R1118 K1–K5 and addenda 1–2; behavior change: the refused first leg's tree is kept, and a task root with no place in the tree is refused before the mint; narrowing: one, open to veto; hard-breaking: none; closed sets: +1 set `OrphanSessionTreeWhy` (3 words), no code added, no `ReleasedTree["kept"]` word added; exports: +2 root values `listOrphanSessionTrees`, `releaseOrphanSessionTree`, +1 type `OrphanSessionTree`; wire: frames +0) (@server @cli @test)
|
|
30
|
+
|
|
31
|
+
- **Before.** When a session's first leg minted its tree and the conditional append of its `session_checkout` record threw, the leg read the session back and decided from that snapshot: no record, or a record of this allocation, or (the 7.63.0 fix, #3419) a record whose cell named this tree's directory ⇒ keep; anything else ⇒ remove the tree and its branch. The snapshot was the race: another leg of the same session could take the clean tree back and record it after the read and before the removal, and the first leg then deleted a tree a record held (7.63.0 KNOWN-LIMITS KL-3419-a; an append that times out and lands late is the same form). A tree kept by that path, or left by a session the host deleted without releasing it, had no door at all: `releaseSessionCheckout` releases only the tree its own record holds. The one reader of a tree's allocation mark answered `undefined` for "no mark", "cannot read it" and "not this tree's own git directory" alike. A task root with no place in the session's tree was refused after the mint, removing the tree it had just made.
|
|
32
|
+
- **Now.** The rule is one sentence: a session tree whose allocation mark reads leaves the disk only through `releaseSessionCheckout` (the record's allocation is the mark's) or `releaseOrphanSessionTree` (it is not), and the engine's own failure paths remove only a tree whose mark is proved absent. A refused append reads nothing back and removes nothing: `workspace.checkout_unavailable`, its sentence naming the kept tree ("The tree is kept at <path>. If the record was written, the next leg reopens it and releaseSessionCheckout releases it; if not, the next leg of this session with the same declaration takes it back; a tree no record holds is listed by listOrphanSessionTrees."); an allocation with no tree (a declared source in place) names none. The mark reader answers three ways — marked, absent, unreadable — and a directory that is not its own checkout top answers absent (under the managed parent a plain directory's git directory is the base repository's). The failure path before the record (the mark write threw) removes the tree only when the mark reads absent; a mark that was written, or cannot be read, keeps the tree and says so. "Does this record hold this tree" is one predicate, allocation equality, read by the reopen, the release and the orphan doors; the 7.63.0 "or a cell names this directory" reading is retired with the read-back. `listOrphanSessionTrees(env, root, { sessionOf })` answers `{ repository, trees }`, each `{ path, branch?, sessionId, allocationId, baseSha, why, detail?, modifiedAt }`, `why` one of `unrecorded` · `record_unreadable` · `record_elsewhere` (CLOSED-SETS). `releaseOrphanSessionTree(env, path, { sessionOf })` judges the tree again and removes an orphan by the release's own judgment; the release (both doors) reads the mark once more just before `git worktree remove` and keeps the tree `not_owned` when another allocation's mark is there. `sessionOf` is the host's durable lookup: `undefined` asserts absence (contract sentence `session_checkout.session_of.absence_is_authority`), a throw is `record_unreadable`, which neither door removes. A log loaded from a bounded window that cut the record reads as no record carrying the window (`SessionCheckoutRead` none `window?: { floor }`, internal), and the doors read that as `record_unreadable`; a leg's open and the release read it as before.
|
|
33
|
+
- **Narrowing N1 (open to veto, @server @cli @test).** A first leg whose record append is refused and whose read-back would have answered no record (or another allocation's record) used to have its fresh tree and branch removed; now the tree is kept and listed by `listOrphanSessionTrees` (`unrecorded` / `record_elsewhere`), and a tree whose mark write reported failure but whose mark cannot be read back is kept too. The code is unchanged (`workspace.checkout_unavailable`, `workspace.isolation_unavailable` for the mark write); the sentence is rewritten by whether a tree exists. Of two first legs of one session at once, the refused one's tree now stays until a host releases it through the orphan door.
|
|
34
|
+
- **Behavior change N2 (no visible face).** A first leg whose task root has no place in the session's tree is refused before the tree is minted (`workspace.isolation_unavailable`), instead of after the mint with the new tree removed.
|
|
35
|
+
- **Not changed (K3).** `releaseSessionCheckout` still answers no trees when the session's log holds no record. The J9 start-site row of `session-checkout.ts` stays `run: false` (#3313).
|
|
36
|
+
- **Consumers.** @server S-1950 (the host carrier of the orphan list and the release door, C-R1118 K4): after `releaseSessionCheckout` in a session delete, list the repository's orphans, filter `sessionId` = the deleted session and release each; a retention sweep may release `unrecorded` / `record_elsewhere` trees past its own age by `modifiedAt` (a hint, not liveness); run one repository's removals — release, orphan door, cascade — one at a time and call the orphan door only for a session that runs no leg (KNOWN-LIMITS KL-3462-a); give `sessionOf` your durable store and throw when unsure; before a same-name retry in a new session after `checkout_unavailable`, release the old tree; show the new refusal sentences as they are. @cli: a startup sweep or a listing over the same two doors for a local repository. @client-core: nothing unless the server puts the list on the wire. @test: the cells below; the narrowing is the black-box case.
|
|
37
|
+
- **Rules.** K1: retired seven — the read-back, a read-back that throws read as unreadable, the two `holds` clauses (allocation, cell directory), the three-way undo decision, the three refusal sentences of the read-back (one now), the post-mint `placeInTree` removal arm; added two — the undo's "mark proved absent" guard and the three-valued mark reader (net −5). K2: one predicate where reopen and the release kept their own (−1); added the reason mapping, the door's re-judgment, the own-checkout-top guard and the mark read before removal (+4) (net +3). Total net −2.
|
|
38
|
+
- **Claude Code 2.1.316.** Deviation (inferred, D-3420-a / D-3423-a, to be registered): Claude Code's retention cleanup removes engine-named trees by name pattern on its own, and guards a take-back against a removal with a live lock (process id and start time, a one-machine fact); this engine sweeps nothing on its own, gives the host a list and an explicit door, and keeps no lock — it removes no tree another leg can read a mark of, and the host serializes the doors.
|
|
39
|
+
- **Pins.** `test/backlog3462-orphan-tree-doors.test.ts` (real git, the in-memory session store, zero model) — K1: X1 / T1 the first leg's append refused while the session's other leg takes the tree back and records it ⇒ the tree is kept and named, the next leg reopens it, nothing is read back · the append never landed ⇒ kept, next leg takes it back · the acknowledgement lost ⇒ kept, next leg reopens · a source-only allocation names no tree · T12 / T14 the mark write fails: written ⇒ kept, absent ⇒ removed, unreadable ⇒ kept · T13 a task root with no place ⇒ refused with no `git worktree add`. K2: T2 + T8 `unrecorded` listed with its mark, branch and mtime, the door removes it and its branch · T8 dirty / commits kept · T3 two first legs both minted before either recorded ⇒ the loser's `record_elsewhere`, the door releases it, the winner reopens · T4 `record_unreadable` ⇒ `unverifiable`, kept · T5 a held tree not listed, `not_owned` (also after a dirty release) · T6 the lookup's `undefined` and throw · T7 a mark-less worktree and a plain directory over a planted base-repository mark not listed · T9 taken back after listing ⇒ `not_owned` · T10 a cell spelled through a symlink alias still holds · T11 `name_in_use` names the doors · T15 a paused door, a removal by another door and a new session's tree at the same path ⇒ the new tree `not_owned` · a bounded window that cut the record ⇒ doors `record_unreadable`, open / release unchanged · bad values `config.invalid_argument`, a gone tree removed · control: the release is unchanged. Re-pinned: `test/backlog3419-checkout-undo-inconclusive.test.ts` (every refused-append form keeps the tree and reads nothing back), `test/backlog2292-session-checkout-ownership.test.ts` (the refused first leg's tree is kept, listed `record_elsewhere` and released by the orphan door), `test/backlog2944-read-floor-kept.test.ts` (the J9 row's reason names the doors). Mutations M1–M12 in the pin file's header; X1 (T1) and T13 are red on the 7.63.0 code.
|
|
40
|
+
- **Known limits.** KNOWN-LIMITS KL-3462-a (no lock between the doors, or between a door and the same session's take-back: the host serializes one repository's removals), KL-3462-b (a tree whose mark cannot be read is in neither door), KL-3468-a (a bounded window that cut the record; #3468). KL-3419-a is closed by this entry.
|
|
41
|
+
|
|
42
|
+
### What deleting a session erases is one table — `RETENTION_CASCADE` gives every engine store one row (the legs that erase its rows: domain, store verb, what it selects, the session-tree step; or the reason it is exempt), the bundled stores carry every verb it names, and the file backend takes the sweep runner's `retention` word (#2878; ruled C-R983 K5 / K6 and addendum 1; behavior change: four optional erase verbs, and the file backend accepts a word it refused; narrowing: one, open to veto; widening: one, open to veto; hard-breaking: none; closed sets: +1 set name `RetentionCascadeDomain`, the type of the three words `RETENTION_CASCADE_DOMAINS` already held — no word added to or removed from any set; exports: +2 root values `RETENTION_CASCADE`, `RETENTION_SESSION_TREE_STEPS`, +4 types `RetentionCascadeDomain`, `RetentionCascadeLeg`, `RetentionCascadeRow`, `RetentionCascadeStores`; members: +`WorkflowRunStore.deleteBySession?`, +`WorkflowJournalStore.deleteRun?`, +`FileHistoryStore.deleteBySession?`, +`ToolResultStore.deleteUnattributable?`, all optional, +`FileStorageBackendOptions.retention?`, +`FileCheckpointStoreOptions.retention?`, +`FileToolResultStoreOptions.retention?`, +`retention` on `FileCheckpointStore` and `FileToolResultStore`) (@server @cli @test)
|
|
43
|
+
|
|
44
|
+
- **Before.** The order of a session purge lived in the server's coordinator and in prose: `RETENTION_CASCADE_DOMAINS` named three domains and no store, verb or order, and the file backend held stores no domain covered (session rules, the workflow journal, file history, the roster, the mailbox, background-agent rows) with nothing saying whether they go with a session. File history had only `reap`, which keeps the v1 pristine baselines while a scope lives, so a deleted session's rewind history stayed on disk; a tool result stored with no owner record had only the age-only `reap`, which does not consult ownership; a workflow run and its journal outlived the session that started them; and `FileStorageBackend` refused a `retention` key by its presence (7.58.0), so a local deployment that runs the sweep could not say its stores' rows are deleted on schedule.
|
|
45
|
+
- **Now.** `RETENTION_CASCADE` (`src/core/retention.ts`) is the one table, typed complete against the backend's store members plus the memory store and the workflow-run store: a store left out, or a verb that is not the store's, fails to compile, and `test/backlog2878-local-retention.test.ts` Q7 holds the same against a real `FileStorageBackend`. One session's erasure is `RETENTION_SESSION_TREE_STEPS` — fences first, then: workflow journals → workflow runs → the background agents' boxes → background-agent rows → roster entries → checkpoints (guarded by the session row, so while it exists) → tool results → session rules → file history → the session's box → the session row last, so a failed leg leaves the row and a retry converges; a leg that finds what it erases through another store's rows (the journals through the run rows, the agents' boxes through the agent rows) runs before that store's leg, so a retry still finds them. Each executor domain has its legs (`checkpoints`: the scope's expiry `reap` and the session `unpin`; `orphan-tool-results`: `deleteUnattributable`). Exempt, with the reason in the row: the usage-window ledger (principal-keyed token and cost counts, no session content) and memory (not session data; the governance records about it stay `RETENTION_CASCADE_EXEMPT`). The new verbs, each in both twins where the store keeps the fact it needs: `FileHistoryStore.deleteBySession(scope)` erases the whole scope — boundaries, version records, the v1 baselines, the consumed-id ledger — and the blobs no other scope holds, refused (`conflict`) while this store runs a write of the scope (a capture, a first-touch record, a retraction or an import, counted from the call), and thrown when the File twin's blob pass cannot collect every blob only the scope referenced (another scope's history it cannot judge, a blob that will not unlink) — the records are gone and a repeat runs the pass again; `ToolResultStore.deleteUnattributable(cutoffMs)` deletes the entries with no owner record stored before the call's cutoff (an owned entry, or one whose owner record is present but unreadable, is never this verb's; a cutoff that is not a finite number is refused `config.retention_policy_invalid`; the in-memory store records no write time and does not implement it); `WorkflowRunStore.deleteBySession(sessionId, scope)` deletes the session's terminal runs and answers their ids (a running run is a live reference); `WorkflowJournalStore.deleteRun(runId, scope)` keeps the load wall. Every operation takes its own `cutoffMs`; `RetentionPolicy.maxAgeDays` is read by the startup check alone (pinned in the source). `FileStorageBackendOptions.retention` is one word for the three declaring stores (session, checkpoint, tool result), judged before the root is touched; the backend still carries no executor, so a deployment that says `"managed"` passes the executor it runs to `assertRetentionCapability`, which refuses `"managed"` beside `executor: null`. Image bytes (C-R983 K6): `retention.image_bytes_live_in_the_session_store` — one holder, the engine's session store, gone with the session row's leg.
|
|
46
|
+
- **Narrowing (open to veto, @server @cli).** A workflow run started in a deleted session goes with it, journal included. Before, the run and its journal outlived the session and a resume of the run from another session replayed it; now, where a run store is wired, that resume is refused `workflow.park_truth_unreadable` with `detail.reason: "record_missing"` — the word an absent prior record already answered, its message now naming deletion among the absences ("never recorded under it, reaped, or deleted with the session that started it"). No code was added. A deployment that wires a journal store without a run store has nothing that indexes runs by session, so the cascade cannot reach those journals and such a resume still replays (stated on the table's contract sentence).
|
|
47
|
+
- **Widening (open to veto).** `FileStorageBackend` accepts `retention` (7.58.0 refused the key by presence, `config.retention_capability`; C-R878 ⑥ read "the file backend runs no executor" and is amended by C-R983 K5: the party that runs the sweep states the word). A stray key beside it is now the options door's `config.invalid_argument`.
|
|
48
|
+
- **Not in core.** The executor is the server's — its first version audit-only, the deletion log its own. Host stores are not rows of the core table: with the core table as the skeleton, the server's E21 coordinator appends three host legs — resume anchors, the session-map projection, the run ledger (the server reports `boot/session-faces.ts:253` and `:438`; not verified here). The fence of the mailbox leg is the optional `retireRecipient` pair's; the bundled two stores keep no recipient lifecycle and have the box dropped. Moving a shell transcript's image bytes to a reference is the cli half of K6.
|
|
49
|
+
- **Consumers.** @server: run the legs from `RETENTION_SESSION_TREE_STEPS` instead of a hand-kept order and add your three host legs around them; give a local `FileStorageBackend` `retention: "managed"` when your local executor runs over it; the `record_missing` refusal passes through unchanged. @cli: a transcript keeps a reference to an image (session id, entry id, block index), never a copy; a resume of a run whose session was deleted is refused as above. @test: Q1–Q3 and Q7 below are the design's cells.
|
|
50
|
+
- **Pins.** `test/backlog2878-local-retention.test.ts` — Q1 both file-history twins erase a scope whole (boundaries, versions, the v1 baseline; the File twin collects the scope's blobs) and the other scope restores · Q1 both twins refuse while an import of the scope is still fetching its blobs, then erase it once the import settles · Q1 the File twin throws when another scope's damaged history stops the blob pass, and a repeat after the repair collects the blobs · Q1 tool results by owner · Q2 two cutoffs, two results; bad cutoffs refused before anything is touched; `maxAgeDays` read only by the startup check · Q3 unowned past the cutoff goes (both namespaces), unowned new / owned old / damaged-owner old stay · Q7 one row per store of a real backend plus the run store, each verb a function on the bundled store, one reading of the order (the agents' boxes before the agent rows, the journals before the runs), and the table's type as its coverage (a store left out or a verb the store does not carry does not compile) · W the run store's terminal-only, scope-walled, session-strict delete (both twins), the journal's load wall (both twins), and end to end a resume replays before the deletion and is refused `record_missing` after it with nothing spawned. `test/backlog1468-t4-retention-declaration.test.ts` re-pinned: the file stores join the construction matrix, and the backend's word reaches its three stores. `test/backlog3186-store-options-gate.test.ts` and `test/backlog2847-store-options-door.test.ts` re-pinned: `retention` is a backend option like the others (an accessor on it is read once, off the copy; one that throws is the door's `config.invalid_argument`). Mutations M1–M15 in the pin file's header.
|
|
51
|
+
|
|
52
|
+
### A steer queued while a run ends: read by the same run, or named by its `inputId` on the run's undrained row — the handoff a host re-sends from, stated as one contract and pinned on a real Runner (#3457; behavior change: none — contract sentences and pins; hard-breaking: none; closed sets: none; exports: none) (@cli @client-core @server @test)
|
|
53
|
+
|
|
54
|
+
- **Before.** The engine already read a steer queued while the run's final turn was in flight (the loop drains it after that turn and runs one more), and a steer still queued when a stop ended the run was on the leg's `task.user_steer_undrained` row with its `inputId` in `detail.inputIds`. Neither half was stated where a host reads it, and the row's sentence ("They are NOT redelivered; re-send against a live run if still wanted") was the only word on what a host may do next.
|
|
55
|
+
- **Now.** One contract, `notice.user_input_undrained.handoff`, on `undrainedUserInputNotices` (`src/core/engine-notice.ts`), and an INTEGRATION-CORE paragraph ("A steer queued while a run ends"): the extra turn for a steer queued during the final turn counts toward `limits.maxTurns`; a steer still queued when `maxTurns`, the token / $ budget, `interrupt()` or the task `signal` ends the run is not read and is not handed to the session's next run by the engine (a durable park is the one carrier: the resume delivers it under the same id, or — when the deployment's prompt screen withholds it on redelivery — `steering.parked_input_blocked` names it by that id, not the row); `detail.inputIds` names the unread inputs; re-sent under the same `inputId` to a later run, an input is read there (no row) or is on that run's own row (same id, that run's `runId`) — the leg's own rows naming one id count the runs that ended with it unread (a parent's copy, the row carrying `childSessionId`, repeats its child's row), with no engine state across runs. The row's sentence is unchanged, byte for byte.
|
|
56
|
+
- **Narrowing / widening.** None. No line of the loop, the gates or the notice changed.
|
|
57
|
+
- **Consumers.** @cli @client-core (L-2347): the key is the `inputId` the caller hands the steer verb. A steer sent without one gets an engine-minted id that appears only on its `human_input` frames (no text on them), and neither `steer()` nor `CheckpointStore.setPendingSteer` returns it, so it cannot be tied back to the call — a host embedding core directly sends every steer with its own `inputId` if it means to re-send from the row. An input parked on a checkpoint keeps its id through the resume. @server: the id on the row is the `inputId` you hand `live.steer` — by the cli's reading of 7.144.0 your receipt's `messageId` (not checked here); please confirm the parked-for-wake receipt carries the same one. A `crashed` row you mint is the same family and the same key. A host counting rows per `inputId` counts the leg's own rows (a copy addressed to a parent carries `childSessionId`), and reads a withheld parked input from `steering.parked_input_blocked`. @test: the shapes below on your side — the row count per `inputId` after a re-send that is read (stays 1) and one that is not (becomes 2).
|
|
58
|
+
- **Pins.** `test/backlog3457-steer-at-end.test.ts` — P0 no steer: one call, no row · P1 queued during the final turn: the same run reads it in one more turn, `applied` frame, no row · P2 `maxTurns: 1` and queued during that turn: one call, the row carries `inputIds: ["in-p2"]`, `cause: "leg_end"`, the run's `runId` · P3 the token budget spent at that turn's end: the same · P4 a durable park carries it: no row on the parked leg, the resumed leg's model reads it under an `applied` frame naming `in-p4`, no row · P4b the deployment's prompt screen withholds it on redelivery: no row, one `steering.parked_input_blocked` naming `in-p4b`, a `blocked` frame · P5 the task `signal` stops the run with it queued: the row names it, the session's next run never sees it · P6 re-sent under the same id: read ⇒ still one row for the id; not read again ⇒ a second row under the later run's `runId`.
|
|
59
|
+
|
|
60
|
+
### The listing names the tool a parked approval's binding digests — `CheckpointSummary.toolName` is the name the row's `boundInputHash` is over, so two parks of one call id over the same arguments by two tools list two names (#3285; behavior change: none — #3302 moved the digest and this states and pins the listing's half; hard-breaking: none; closed sets: none; exports: none) (@server @cli @test)
|
|
61
|
+
|
|
62
|
+
- **Before.** A host reconciling a decision against the listing (S-2918) saw `toolCallId` and `toolName` on the summary and `boundInputHash` only on the drilled-in row, and 7.62.0's hash digested the arguments alone — a call of another tool over the same arguments under the same call id carried the same hash. 7.63.0 (#3302) bound the tool into the digest; no sentence said that the listing's `toolName` is the name the digest is over.
|
|
63
|
+
- **Now.** Stated on the type (`CheckpointSummary.toolName`) and in INTEGRATION-CORE (the `boundInputHash` row of the resume-outcome table): the listing's `toolName` is the tool name as the row records it — the name `exactBoundInputHashOf(toolName, args)` was minted over (an alias call records the tool's own name) — so a listing row and its drilled-in row hold both halves of the binding, and the hash stays opaque, echoed and never re-derived by a host. No second reading was added: the ticket's two candidates (fold the name into the digest / a separate `boundToolName` position) were one question, and #3302's digest is the first.
|
|
64
|
+
- **Narrowing / widening.** None; no line of the digest or of the projection changed.
|
|
65
|
+
- **Consumers.** @server (S-2918): nothing to change — the ask identity you bound in 7.143.0 and the engine's digest now agree on the tool. @cli @test: nothing to change.
|
|
66
|
+
- **Pins.** `test/backlog3285-summary-tool-name.test.ts` — S1 the hash recomputed from the summary's own tool name and the row's arguments is the row's · S2 one call id and the same arguments by two tools list two names and hold two hashes, each reproduced by its own name only · S3 an alias call lists and digests the tool's own name, not the alias · S4 the listing and the one-call projection read the same name.
|
|
67
|
+
|
|
68
|
+
### A refusal from the second store of a deployment erasure says which stores had already executed — a copy of the refusing store's own error, class and code and cause unchanged, with its message opened by the stores that executed and how many entries they erased (#3288; behavior change: the message of a later store's refusal gains an opening sentence — no code, class or member moved; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
69
|
+
|
|
70
|
+
- **Before.** `MemoryDeployment.eraseMemoryEntries` executes its reached stores in order (project plane first). A later store's refusal — most plainly `memory.erasure_census_incomplete` from a personal store whose scope directory cannot be read — carried the store's own sentence, "nothing was deleted, nothing was recorded", which was true of that store and read as the request's: the project store had already executed and kept its anchor. S-2937.
|
|
71
|
+
- **Now.** One function in `memory-deployment.ts` opens such a refusal with the sentence that says what stands: "this request had already executed in the project store (N entries erased there; each keeps its anchor and a replay of the same requestId converges every store) when the personal store refused it — what follows describes the refusing store alone: ", then the store's own sentence. The thrown value is a copy of the store's own error — its class (a `ControlPlaneCorruptError` stays one), `code`, `cause` and every other own member kept — and the store's object itself is left as it was, so an error object a store throws again for another request carries no earlier request's sentence; a value that is not an `Error` is handed back unchanged. A refusal in the FIRST store executed nothing and keeps only its own sentence. The ticket's other candidate — judge every store's census before any store executes — was not taken: it needs a new probe face on `MemoryBackend`, and covers only the census, while the sentence is right for every later-store failure.
|
|
72
|
+
- **Narrowing / widening.** None. Who is refused, and by which code, is unchanged; only the message grows.
|
|
73
|
+
- **Consumers.** @server (S-2937): the `409 memory.erasure_census_incomplete` you map is the same code; show the message as it comes — it now tells the operator that a replay of the same requestId converges the stores that did not execute. Do not parse it. @test: a two-store erasure with an unreadable personal scope ends with the project entry gone, the personal ones standing and the code unchanged; after the fault clears, a replay of the same requestId completes.
|
|
74
|
+
- **Pins.** `test/backlog3288-erasure-later-store-refusal.test.ts` — E1 project executes and the personal census cannot read a scope (a real mode-000 directory; skipped as root): the code, the opening, the executed count, the entries' state, and the replay after the fault clears · E2 a first-store refusal carries no opening · E3 control: a clean erasure across both stores is one merged receipt · E4 a `ControlPlaneCorruptError` stays one with its cause and `facet` (a copy; the store's object keeps its own sentence) · E5 a thrown value that is not an `Error` is handed back · E6 one error object thrown for several requests carries none of them and accumulates nothing.
|
|
75
|
+
|
|
76
|
+
### `screenAllowedToolsValue` is on the package root — the allow list's own screen, the one judgment of its declared bases, so an admission door meets the run's refusal (`config.invalid_permission_rules`, `unsupported.path_base`) in the run's words (#3289; behavior change: none; hard-breaking: none; closed sets: none; exports: +1 root value `screenAllowedToolsValue`) (@server @cli @test)
|
|
77
|
+
|
|
78
|
+
- **Before.** A user layer's `/`-form allow entry under a configuration directory that is not an absolute path (a relative `SEMA_CONFIG_DIR`) was refused only when the run started — `config.invalid_permission_rules` with one `unsupported.path_base` issue — while a deny / ask rule of the same form is refused at the host's admission door by the engine's dry-run (`validatePermissionRules`). The allow list's screen was internal, so the door had nothing to call for the allow side (S-2951; S-2790 waits on it).
|
|
79
|
+
- **Now.** The root exports the screen the run reads: `screenAllowedToolsValue(list, seat)` with `seat` `"TaskSpec.allowedTools"` or `"RunnerDeps.allowedTools"`. It returns the frozen copy the run would hold (`undefined` for `undefined`) or throws what the run refuses with — the same `code`, the same `issues`, the same sentence naming the entry's index and the list in words. It is the same function as the run's, not a copy; no second judgment exists to drift.
|
|
80
|
+
- **Narrowing / widening.** None; the run's refusal is unchanged and now reachable from a door.
|
|
81
|
+
- **Consumers.** @server (S-2951 / S-2790): call it at the allow-list admission with `"TaskSpec.allowedTools"` and answer the thrown `code` / `issues` as your deny / ask door answers its own (422); read `issues[].code`, never the message text. @cli @test: nothing to change.
|
|
82
|
+
- **Pins.** `test/backlog3289-allow-screen-root-export.test.ts` — A1 the root export is the run's function · A2 a user layer's `/` allow under a relative configuration directory is refused with the run's code and one `unsupported.path_base` issue naming the rule · A3 the run's failed terminal (request list) and a Runner's construction (deployment list) answer the door's code and sentence · A4 the deny / ask dry-run meets the same issue code for the same base · A5 controls: an absolute base reads, a command rule reads no base, no list is no list.
|
|
83
|
+
|
|
84
|
+
### A file bucket's refusal tells its kind by code — `permission_rules.bucket_damaged` for a bucket the engine deterministically refuses, `permission_rules.bucket_unreadable` (with the system error's name in `errno`) for a read that failed (#3287; behavior change: additive — a refusal that carried no code now carries one, and a failed read now carries its `errno`; hard-breaking: none; closed sets: +2 codes beside `permission_rules.later_grammar`, same table; exports: +2 root values `PERMISSION_RULES_DAMAGED_BUCKET_CODE`, `PERMISSION_RULES_UNREADABLE_BUCKET_CODE`) (@server @test)
|
|
85
|
+
|
|
86
|
+
- **Before.** The file rule store's read leg threw one bare `Error` for a bucket it refuses on its bytes (a link, not JSON, a shape or a checksum that does not hold, a grammar stamp that is no whole number, a behavior word outside the set, an unusable store directory) and for a read that failed (`EIO`, `EACCES`, …). Only a bucket a newer engine wrote had a code (`permission_rules.later_grammar`). A host that must tell "this bucket will not read until a person acts" from "the read failed, it may read next time" could only read the sentence (S-2936: the server's one-time migration could not decide to skip a damaged bucket and refuse start on an I/O failure, as its SQL leg does by the refusal's type).
|
|
87
|
+
- **Now.** Every face of a file bucket (`list`, `quarantined`, a write's read of its base, `readRaw`) refuses with one of three codes: `permission_rules.bucket_damaged` (deterministic: the same bytes are refused the same way on every read), `permission_rules.bucket_unreadable` (the read failed; the system error's name is the refusal's own member `errno`, a string as the system gave it, absent when the failure carried none — never inside `code`, which keeps one vocabulary), and the unchanged `permission_rules.later_grammar`. No new error class. The sentence, the disclosure and the zero-rules posture are unchanged. The two new codes are exported beside `PERMISSION_RULES_LATER_GRAMMAR_CODE` (package root). A directory this engine refuses to use (a link, another user's, group- or world-writable, or a file where the directory should be — `EEXIST` / `ENOTDIR`) is the first kind, on the read faces and on the write path's directory check alike: it is a verdict about the location, repeated on every read. The org state file and the adoption marker are not buckets and keep their own refusals.
|
|
88
|
+
- **Narrowing / widening.** None: nothing is read or refused differently. A caller that tested "the refusal has no code" to mean damage (the old pin on a non-integer grammar stamp did) now reads `permission_rules.bucket_damaged`.
|
|
89
|
+
- **Consumers.** @server (S-2936, the M36 File leg): decide on `code` — `bucket_damaged` ⇒ skip that bucket by name (it loads zero rules, so it allows nothing); `bucket_unreadable` ⇒ refuse start (the bucket is not known to be empty; `errno` says why); `later_grammar` as before. Never read the sentence. @test: a mode-000 bucket file answers `bucket_unreadable` / `errno: "EACCES"`; a file that is not JSON answers `bucket_damaged` with no `errno`.
|
|
90
|
+
- **Pins.** `test/backlog3287-bucket-refusal-codes.test.ts` — D1 eight deterministic faults (not JSON; a shape that is no bucket; an older schema; a checksum that does not match; a non-integer grammar stamp; a behavior word outside the set; a link at the path; a directory at the path), each on the read, the quarantine read and the write's base read: `bucket_damaged`, no `errno` · D2 a mode-000 bucket (skipped as root): `bucket_unreadable`, `errno: "EACCES"`, bytes untouched · D3 controls: a later grammar keeps its code, an absent bucket is no refusal · D4 / D5 the codes are exact words on the root, three distinct, `errno` beside `code`. `test/backlog2229-rule-store-grammar-stamp.test.ts` R2 is re-pinned from "no code" to `bucket_damaged`.
|
|
91
|
+
|
|
92
|
+
### The file rule store lists the owners its directory can name and counts the buckets it cannot — `FileDurableRulePartitionProvider.listBucketOwners()` answers `{ owners, unnamedBuckets }` (#3286; behavior change: none — a new read-only method; hard-breaking: none; closed sets: none; exports: +1 method on the exported class, no new root name) (@server @test)
|
|
93
|
+
|
|
94
|
+
- **Before.** A bucket's file is named by a one-way digest of its owner and holds no owner name, so the File provider had no way to list buckets, and the server's one-time migration over every owner's rules (M36) could visit only the owners its own approval records named. A bucket an adoption renamed to an identity no record names was never visited (MIGRATION item 37, known gap ⑤; S-2935): a mis-anchored global allow in it kept allowing in every project.
|
|
95
|
+
- **Now.** `listBucketOwners()` (a method of the provider, not a root export) answers `{ owners: readonly RuleOwner[], unnamedBuckets: number }`, names only — no bucket is opened, nothing is written, no lock is taken. `owners` are the owners the directory can name that hold a bucket here: `{ kind: "local-owner" }` when the local-owner bucket file is present, and the principals the adoption marker names (the adopted principal, and a principal source) when their bucket file is present — so after an adoption the renamed bucket is listed as the adopted principal whether or not any approval record names it. Every other digest-named bucket file is counted in `unnamedBuckets`: present, not nameable by the directory, and not dropped. Only an ABSENT directory lists nothing (and it is not created) — a directory that cannot be looked at for any other reason (a parent that cannot be searched, …) is told, never read as an empty census; an unusable directory refuses `permission_rules.bucket_damaged`; a directory that cannot be examined or listed refuses `permission_rules.bucket_unreadable` with its `errno` (#3287); a corrupt adoption marker refuses with the marker's own refusal. The choice recorded: a listing that returns owners can only return the names the directory records — handing back a handle per digest-named file (opening a bucket without its owner) was not taken, since it widens the API for buckets whose owner nobody can state.
|
|
96
|
+
- **Narrowing / widening.** None; no existing face changed.
|
|
97
|
+
- **Consumers.** @server (S-2935, M36 File leg): `candidateOwners()` = the import-record owners ∪ `listBucketOwners().owners` (dedupe by owner key as you do), each visited through `forPrincipal` / `forLocalOwner` as now; `unnamedBuckets > 0` means the census is incomplete by that many — say it in the start-up report (as an unnamed-bucket count), do not treat the buckets as empty. The migration's known gap ⑤ closes for the adopted bucket; a digest-named bucket no marker and no record names stays unnamed and counted. @test: adopt local-owner → alice with no approval record, then `listBucketOwners()` lists alice.
|
|
98
|
+
- **Pins.** `test/backlog3286-bucket-owners.test.ts` — L1 an absent directory lists nothing and is not created · L2 the local-owner bucket · L3 digest-named buckets no marker names are counted · L4 the real adoption arc (local-owner → alice): the renamed bucket is listed as alice with no approval record, the local-owner file is gone so it is not listed, another principal's bucket is counted, alice's partition reads the rule · L5 a marker naming a principal source and its target (before the rename only the source; both once both files are present) · L6 names only: a damaged bucket is listed, nothing is written · L7 refusals: an unusable directory (`bucket_damaged`), a corrupt marker, an unlistable directory (`bucket_unreadable`, `EACCES`; skipped as root) · L8 files that are not buckets are not counted.
|
|
99
|
+
|
|
100
|
+
### A background agent's row says when an extension started it — `requestedBy?: ExtensionRequester` on the registry row, the durable record and its summary and `TaskRegistry.list()`, and the concurrency refusal names the extension; an extension's call ids come from one mint and are read by one predicate (#3262; ruled C-R1113; wire +1 additive; behavior change: the concurrency refusal's occupant clause gains `started by extension "X"` for such a row; hard-breaking: none; closed sets: none; exports: none — one optional key on `TaskListRow`, `BackgroundAgentRecord`, `BackgroundAgentRowSummary` and `DelegationOccupant`) (@server @client-core @test)
|
|
101
|
+
|
|
102
|
+
- **Before.** A running `background_agent` row recorded the leg that spawned it and nothing about who asked: the model's own spawn and an extension's `$.agent.spawn` read alike on the row (`TaskRegistry.list()`, the durable record), so the concurrency refusal could name an occupant by task id and addressing name but not say that an extension held the slot (core762a, the refusal naming the occupant without its origin). The `ext-` prefix of an extension's call ids was spelled at two mint sites (`$.tool.call`, `$.agent.spawn`) and read nowhere.
|
|
103
|
+
- **Now.** The row carries `requestedBy?: ExtensionRequester` (`{ kind: "extension", name }`, the shape `tool_start` / `tool_end` and the approval card already carry): written once at the registration from the extension's own `$.agent.spawn`, on the live row, the durable record, the record's summary and `TaskRegistry.list()`'s row; ABSENT on every other row — the model's own spawn, the host's, and every row an earlier release wrote. That is the one reading: no word exists for "the model" or "the host". A revival keeps it (the row's origin, not the waker's). A stored value that is not exactly an extension's requester (another `kind`, a blank, whitespace-only or missing `name`, a list) is read as none, by one function (`readExtensionRequester`). The refusal's occupant clause reads `task_id a… ("worker", started by extension "ext")`; the extension name is the sanitized registration name. `mintExtensionCallId()` is the one mint of an extension's call id (both doors call it) and `isExtensionCallId(id)` its one reading; the agent station's `extensionSpawn` asks it before it looks up the call's record.
|
|
104
|
+
- **Narrowing / widening.** None: nothing is refused, allowed or ordered differently. The one visible difference is the occupant clause of the concurrency sentence for a row an extension started.
|
|
105
|
+
- **Wire / exports.** One optional key `requestedBy` on `TaskListRow`, `BackgroundAgentRecord`, `BackgroundAgentRowSummary` and `DelegationOccupant`; the package root gains no name. The key is additive and absent on an old row: a store that files the record as columns needs a nullable `requested_by` (or keeps the record's JSON as it does for the other optional members); a reader reads the key's absence as "not an extension's spawn".
|
|
106
|
+
- **Consumers.** @server (the row projection): project `requestedBy` beside `agentType` on the background-task row when present, and drop nothing when it is absent; a SQL record store carries the optional member. @client-core ([11937], the background task list): `requestedBy.name` is the label for "started by extension X"; its absence is "not an extension's". @test: an extension's `$.agent.spawn` ⇒ the row names it; the model's spawn ⇒ no key.
|
|
107
|
+
- **Choice recorded.** The ticket listed three origins (extension / model / host); only the extension is a word. Both other origins are the absence of the member — a second reading ("model" written on the row) would make an old row's absence mean "unknown" instead of "not an extension's".
|
|
108
|
+
- **Pins.** `test/backlog3262-requested-by.test.ts` — Q1 the mint and the predicate (minted ids are extension ids; a model's ids and non-strings are not) · Q2 a real extension's `$.agent.spawn` on a real Runner: the live row, the durable record and the list row name it, the extension's own second spawn meets a sentence that does, and the frames of `$.tool.call` and `$.agent.spawn` carry ids the predicate reads · Q3 an extension-started and a model-started row side by side: only the first carries the member (list row, record, summary) and the sentence names it for that row alone · Q3b a stored value that is not exactly an extension's requester is read as none · Q4 a revival keeps the row's origin · Q5 the reading function.
|
|
109
|
+
|
|
110
|
+
### A hold receipt says which hold it is — a hold a person there can answer is still `held`; a hold by the recipient's own settings or state is `held_by_policy`, which asks no one and runs no deadline, so the sender is no longer told to expect an approval that cannot come (#3335; behavior change; hard-breaking: one, three sentences below, open to veto; closed sets: `PeerDeliveryReceiptState` +1 and `MailboxPeerNoticeState` +1, the same word `held_by_policy`, appended; exports: none new; wire: +1 additive closed-set member, no key added) (@server @cli @client-core @test)
|
|
111
|
+
|
|
112
|
+
- **Before.** Every hold sent its sender `held`, rendered "… was held for the recipient user's approval … its user must approve first" (v7.63.0 `src/agents/peer-held-queue.ts:498` / `:505`). For a hold by the recipient's own settings or state — a managed `crossSessionInbound: "hold"` (server's `CROSS_SESSION_INBOUND=hold`), the user's or a repository's `hold`, an unrecognized value, a permission mode that could not be determined — no deadline was armed (`armDeadline` runs for `PEER_HELD_REVIEW_CAUSES` only) and a host review face presents only those causes (server's `peer-inbound-face.ts` reads that set): the sender was told to wait for an approval nobody was asked for, and the letter did not expire on a clock either. On the recipient side the held disclosure said "expires with a receipt under dialogExpiry" for every session-lane hold, and the judge's `cross-principal-default` sentence said "held for your review" of a cause that is not a review cause.
|
|
113
|
+
- **Now.** The hold receipt's word is read from the hold's cause by one reading, `peerHeldReceiptStateOf` (beside `PEER_HELD_REVIEW_CAUSES` in `src/agents/peer-notices.ts`): a review cause (`mode-mismatch`, `no-mode-asserted`, `invalid-mode-attestation`) is `held`, its line, deadline and every byte unchanged; every other cause (`explicit-setting`, `managed-setting`, `repo-setting`, `invalid-setting`, `mode-unknown`, `bypass-default`, `cross-principal-default`) is `held_by_policy`, rendered "[Cross-session delivery notice] Your message to another session was held by the recipient session's own settings or state (recipient: …), not for anyone's approval. Not delivered to that session's assistant; no one there is asked to approve it and there is no expiry deadline: it waits for those settings or that state to change. Do not wait for a reply; continue, or choose another approach." Both places a hold sends its receipt read it (a fresh card, and a hold the full queue could not card). Expiry is unchanged: no deadline is armed for a policy cause; a review hold whose deadline is already firing when that deadline's own re-judgment finds a policy cause is still ended `expired`, as before (KL-3335-c); and eviction at the cap and a graceful shutdown still end any hold with an `expired` receipt. The recipient's held disclosure names the dialogExpiry deadline only for a review cause and otherwise says "has no expiry deadline: its cause is this session's own settings or state, not a review". The `cross-principal-default` sentence says "… so it is held until that setting says how to treat it (it is not put up for review and has no expiry deadline)" — the cause stays a policy cause; `PEER_HELD_REVIEW_CAUSES` is unchanged and is the one set the deadline, the receipt word and a review face read.
|
|
114
|
+
- **Wire.** `PEER_DELIVERY_RECEIPT_STATES` gains `held_by_policy` as its seventh member and `MAILBOX_PEER_NOTICE_STATES` as its tenth (appended; the store validator admits it, and the drain renders it on a `delivery_notice` only). The receipt body keeps its keys (`state`, `refSeq`, `recipient`); the record's `content` mirror is the new line. A record written by an engine before this release is read as before.
|
|
115
|
+
- **Hard-breaking — one, three sentences (open to veto).** *What changed:* the receipt-state closed set gains `held_by_policy`, so a hold by the recipient's settings or state reaches its sender under that word instead of `held`. *Who is affected:* a TypeScript consumer with an exhaustive switch over `PeerDeliveryReceiptState` or `MailboxPeerNoticeState` (it no longer compiles until it names the word), a reader that takes `state === "held"` to mean "any hold", and a mixed fleet on one mailbox — an older engine reading the sender's box settles such a receipt `notice_unrouted` (shown to its host, not to the model), and on server's SQL mailbox an older replica's `readMailboxPeerMeta` refuses the record so its `claimLease` of that box fails closed until it upgrades (KL-3335-a, the KL-969c form). @server reads `PEER_HELD_REVIEW_CAUSES` and no receipt state (`src/peer-inbound-face.ts` on origin/main); @cli and @client-core draw `crossSessionNotice.text` whole and hold no receipt-state set (grep of their checkouts; not compiled against this tree). *Compensation:* add the arm (a hold no one is asked to approve, or the engine's line as it is); read "any hold" as `held` or `held_by_policy`; upgrade every replica that drains a shared mailbox before this release writes receipts into it.
|
|
116
|
+
- **Rules.** Added: one reading (`peerHeldReceiptStateOf`) of the one set, so the set answers three questions — whether the deadline runs, which hold word the sender gets, whether a review face presents the card. Retired: the second reading of `cross-principal-default` (a sentence promising review against a set that does not hold it) and the held disclosure's unconditional deadline clause. No second table of reviewable causes.
|
|
117
|
+
- **Known limits.** KL-3335-b — the receipt is the word at hold time: a re-judgment that moves the cause across the line re-announces it to the recipient's host and sends the sender nothing new (the reference's form). KL-3335-a — the rolling upgrade above. KL-3335-c — the deadline callback re-judges and then expires what is still held whatever its cause, so a review hold whose recipient turned on a `hold` setting after the last boundary and before the deadline is expired instead of kept (unchanged; a change to expiry is another ticket). KL-3335-d — the lines that end a policy hold still name an approval: `delivered` ("approved and released") when a setting change releases it, and `expired` ("not approved before expiry") at eviction or shutdown; and `PeerHeldQueue.settle(seq, "approve")` does not read the cause, so a host that presents a policy card to a person releases it (server's approval face lists and accepts only review cards, `peer-inbound-face.ts`). Neither is part of this change.
|
|
118
|
+
- **Consumers.** @server: nothing to change — `peer-inbound-face.ts` already reads core's `PEER_HELD_REVIEW_CAUSES`, and the review face, the deadline and the receipt word now agree by construction; a replica fleet sharing the SQL mailbox upgrades before this release writes receipts. @cli @client-core: the line is engine-rendered and drawn whole; a renderer that switches on `notice.state` adds the arm. @test (black box): with the recipient on a managed `crossSessionInbound: "hold"`, the sender's box holds a `delivery_notice` whose `notice.state` is `held_by_policy` and whose line is the one above, no approval row appears, and nothing expires after the dialogExpiry window; with a mode-parity hold, `held`, the old line, an approval row, and an `expired` receipt after the window.
|
|
119
|
+
- **Claude Code 2.1.316.** Divergence (a sema split the reference does not make): Claude Code sends `held` for every hold cause (the hold arm's `sendPeerReceipt(…, "held")`, `cli316.js:288223`) and renders it as awaiting the recipient user's approval "(permission-mode parity)" (`mn("held")`, `cli316.js:289027`), so its sender cannot tell a setting hold from a parity hold; the recipient-side host frame does carry the cause (`peer_message_hold.cause`, `cli316.js:261649`).
|
|
120
|
+
- **Pins.** `test/backlog3335-held-receipt-reviewable.test.ts` — R1 / R2 every cause classified once and the `held` half equal to the review set · W1–W3 the receipt-state set, the store's notice-state set as the union of the lane's two, the validator · T1 / T2 the new line (one and several), the `held` line byte for byte, the judge's sentences agreeing with the set · Q1–Q4 both mint points, no deadline for a policy hold, eviction and shutdown still `expired`, a cause move re-arms the deadline and re-sends nothing · K1 / K2 the two known limits held as they are (KL-3335-c: a firing deadline that re-judges onto a policy cause still expires; KL-3335-d: `settle` approves a policy card) · D1–D3 over a real file mailbox: a managed hold reaches the sender `held_by_policy` and renders, a parity hold stays `held` (control), a user `hold` then `next-turn` is `held_by_policy` then `delivered`. Re-pinned: the setting-cause receipt cells of the slice-4 suite (receipt section). Mutations (receipt).
|
|
121
|
+
|
|
122
|
+
### `TaskRegistry.countRunningBackgroundShells({ includeRetained })` — one process-level, read-only number: how many background shells the exit-boundary hard face would take down now, counted by the hard face's own row reading (#3425; behavior change: none; hard-breaking: none; closed sets: none; exports: none — one new member on the existing `TaskRegistry`, additive) (@server @cli)
|
|
123
|
+
|
|
124
|
+
- **Before.** The registry counted running shell rows only per reach: `list(access)` (the caller's own tasks, every type and status, capped at its `limit`), `liveTasks(access)`, `countRunningBackgroundForOwner(owner)` (one owner key, background agents included), `runningShellIds(env)` (one env). None is process-level and none speaks the hard face's rule for retained rows, so a host that wanted the number a coming `killAllBackgroundShellsNow({ includeRetained: false })` would take down (server S-750, the handover lane: how many background shells the exit would end) had to walk `list` per session — a walk that misses every session it holds no access for and stops at the display cap — and then re-derive the retained rule, a second copy of the rule the hard face holds.
|
|
125
|
+
- **Now.** `countRunningBackgroundShells({ includeRetained })` — `includeRetained` required, no default, the same shape as the hard face — answers a number: the registry's `running` `background_bash` and `monitor` rows over the WHOLE registry (no owner, session, scope or env narrowing), a retained row counted only under `includeRetained: true`. The hard face and the count choose their rows through one function (`hardFaceVisitOf`): a row that is not a shell-lane row, or is `completed`, is not visited; a retained row not already settled `killed` by an explicit stop is left alone under `includeRetained: false`; every other row is visited, and a visited `running` row is the one the seat's kill settles. The walk of `killAllBackgroundShellsNow` reads its rows through the same function, so the count equals the reaping set row state by row state. Synchronous and read-only: the count calls no seat and changes no row; like the hard face it reads each row's env declaration of retention (`backgroundCapabilities.retainBackgroundProcesses`, host-provided data), so a host whose env makes that read throw makes the count throw as it makes the hard face throw. It counts registry rows, not process truth — a row whose seat later answers `already_gone` or `no_pgid` stays `running` and stays counted until its watcher settles it; a `killed` row inside a softer stop's grace window and a `failed` row (a watcher that lost its process) are visited by the hard face but are not running, so they are not counted.
|
|
126
|
+
- **Not these numbers.** Not `list(access)`'s length (the caller's reach, capped, every type and status), not `liveTasks(access)` (the caller's reach, every live type), not `countRunningBackgroundForOwner(owner)` (one owner key, agents included; owner-equality, not reach), not `runningShellIds(env).length` (one env).
|
|
127
|
+
- **Narrowing / widening.** None. The hard face's receipts, row states and the order of its checks are unchanged; only where the selection is written moved. The one difference only an accessor-backed options object could tell: `opts.includeRetained` is now read when a row is considered, before the type test, where it used to be read after the retained test.
|
|
128
|
+
- **Wire / exports.** `TaskRegistry` gains one public member. The package root gains no name (`TaskRegistry` is already exported); the type keys of the published class grow by one.
|
|
129
|
+
- **Consumers.** @server (S-750, the che-S750 handover lane): read `countRunningBackgroundShells({ includeRetained: false })` for "how many background shells the exit would take down" and `{ includeRetained: true }` for "how many the exit with the retained ones would"; the difference is the retained running rows. It is the number for THIS process's registry, over every session it holds — not a per-session number; for one session keep `countRunningBackgroundForOwner` (owner key) or the session-narrowed hard face's own receipts. @cli (L-686): `list()`'s `retained` still splits "will stop" from "keeps running" per row; this is the same split as a number.
|
|
130
|
+
- **Rules.** Retired: none. Added: none. The hard face's selection (shell-lane type, session reach, `completed`, the retained skip) was one inline block of `killAllBackgroundShellsNow`; it is one function now, read by the walk and by the count, and the skip rule is written once.
|
|
131
|
+
- **Claude Code 2.1.316.** No anchor claimed: the count reads this engine's own exit-boundary reap (`docs/background-process-lifetime.md`); not checked against the corpus.
|
|
132
|
+
- **Pins.** `test/backlog3425-running-shell-count.test.ts` — C1 the contract table, cell by cell: `background_bash` and `monitor` × {running, killed, failed, completed}, each unretained / task-retained / env-retained, under `includeRetained` false and true — the count and the hard face's receipt class match the table, the count equals the running rows the hard face acted on, and the count leaves the row in the state it found it · C2 a mixed registry: both modes, receipts and counts agree, after the walk only the spared retained rows remain · C3 both shell lanes count, a background agent row does not · C4 process-level: two sessions in two scopes (count 2, each owner's count 1, the session-narrowed hard face visits one, the count stays whole) · C5 rows on different envs and run owners all count · C6 not `list`'s length (60 own rows + 1 other: list 50, live tasks 60, count 61) · C7 read-only: a number, no seat call, no row change, same answer twice, a throwing seat never called and a throwing seat accessor never read · C8 registry rows, not process truth (`already_gone` / `no_pgid` rows stay counted) · C9 `includeRetained` is required (`@ts-expect-error` on the empty options and on no argument) · C10 the skip rule is spelled once and both faces walk with `hardFaceVisitOf` (source fence).
|
|
133
|
+
|
|
134
|
+
### A deny refusal files the literals its sentence quotes — `tool_end.gate.disposition.echoed` lists the refused path (with its canonical target), the spelling the row matched, and the row, minted with the sentence from one finding (#3410; wire +1 additive; behavior change: none; hard-breaking: none; closed sets: +1 set `RefusalEchoKind` (`path`, `command`, `pattern`); exports: +2 root values `REFUSAL_ECHO_KINDS`, `isRefusalEchoKind`, +2 types `RefusalEchoKind`, `RefusalEcho`) (@cli @server @client-core)
|
|
135
|
+
|
|
136
|
+
- **Before.** When the read station refused a shell command on a deny row (`deniedBy: "read_boundary"`, no ask raised), the refused path, the spelling the row matched and the row's pattern reached a consumer inside one sentence (`readDenySentence`, `src/tools/fs/read-deny.ts`) and nowhere else on the record: a consumer that draws the path by itself — one line, hidden characters made visible — had to take the sentence apart to find where the path starts and ends. For a read the call's `read_path_denied` card named the target and the pattern; a refused write carried no card.
|
|
137
|
+
- **Now.** The denied arm of `GateDisposition` gains `echoed?: ReadonlyArray<{ kind: "path" | "command" | "pattern"; value: string; canonical?: string }>`: the literals the sentence quotes, in the order it quotes them — the target as a `path` (with `canonical` where the sentence names a canonical target that differs), the view the row actually matched as a second `path` when that is another spelling, and the row as a `pattern`. The sentence and the list are one mint (`readDenyRefusal`: one finding, two readings; `readDenySentence` is its sentence and is byte for byte what it was). `value` is whole where the sentence elides the middle of a long operand. Present when `deniedBy` is `read_boundary` and the refusal is a deny-row hit (and, by the next section's change in the same release, beside `ask_resolution`), on every exit that refuses so: the first pass, the approved edit's re-judge, the shell read admission after the gate let the call go (live leg and resumed leg) and the resumed leg's belt — the frame and the filed `executionOutcome` hold the same value. Absent beside every other layer word, beside a read-boundary refusal that quotes no deny row (a containment or identity finding), and on a record from an engine before this release: absence reads as "the sentence is the whole account". The station's answer (`ShellReadVerdict`) carries it on a refusal; an answer carrying a malformed list is not received and the call is refused fail-closed with the engine's own sentence. Invariant I13 screens it against one table (`DENIED_BY_MAY_ECHO`) the mint and the archive reading both read.
|
|
138
|
+
- **Consumers.** @cli: the refused path of a deny refusal can be drawn from `value` / `canonical` instead of taking the sentence apart. The sentence of a person's refusal of an approval (`approval denied for "<tool>": approve write to "<path>"?`) is a different sentence, minted by the ask and not by the deny table: its list is the next section's (#3442, the same release). @server: projects `gate` whole — no key to add. @client-core: mirrors the type. `command` is in the set and has no minting site yet.
|
|
139
|
+
- **Rules.** Retired: none. Added: one table (`DENIED_BY_MAY_ECHO`) and one invariant (I13); `readDenySentence` is now the sentence reading of the one mint, not a second mint.
|
|
140
|
+
- **Known limit.** The list holds the path exactly as the sentence quotes it, so a path whose name has the shape of a key is the same literal on both; the sentence never redacted its operands and the list opens nothing it did not.
|
|
141
|
+
- **Claude Code 2.1.316.** No anchor claimed: the member annotates this engine's own gate record (not checked against the corpus).
|
|
142
|
+
- **Pins.** `test/backlog3410-refusal-echoed.test.ts` — the mint over eight forms (a plain read, a different canonical, a matched spelling, both together, a canonical equal to the target not repeated, a write-list hit, a read row reached through a link, a read row reached directly); the sentence's quoted spans equal the list's literals in order, both ways, on every form; a 5 kB path whole in the list and elided in the sentence; a key-shaped name one literal on both; I13 in both readings (nine wrong lists, a wrong layer, an allowed arm); absence screens clean and the mint writes no key; the station's answer received whole or not believed; the real lane (a denied `cat`, a redirection into a write-list path, a write through a link whose chain passes a read row, the text quoting every literal, the sentence's bytes as the mint's); controls (a policy refusal, an allowed read, an identity refusal carry none); the admission refusing after the gate allowed the call, the resumed leg's belt and its admission (frame equals the filed row).
|
|
143
|
+
|
|
144
|
+
### A person's refusal of the engine's own question files the path the question quotes — `tool_end.gate.disposition.echoed` beside `deniedBy: "ask_resolution"` when the refused question is the write gate's or the plan mode's generic question about a path (#3442; wire: the existing `echoed` member gains a second layer, additive; behavior change: an ask-resolution refusal of such a question now carries `echoed`; hard-breaking: one, type level, three sentences below, open to veto — the wire member is not one: `echoed` ships with #3410 in this release, so no released contract named its layer; closed sets: none (the list's kinds are #3410's `RefusalEchoKind`); exports: none by name; members: `EngineAttestation` −`genericQuestion` +`sentence?`) (@cli @server @client-core)
|
|
145
|
+
|
|
146
|
+
- **Before.** A person who refused the write gate's question (`approve write to "<path>"?`) or the plan mode's (`Cannot write to <path> while in plan mode.`) left a refusal whose sentence quotes that question whole (`approval denied for "<tool>": approve write to "<path>"?` …), and the path it names lived only inside that sentence: a consumer that draws the path by itself — one line, hidden characters made visible — had to take the engine's sentence apart to find where the path starts and ends. The record told the generic question apart (`genericQuestion`, read by the policy chain's entry mint so the engine's own question names no asker) but carried nothing of what it quotes.
|
|
147
|
+
- **Now.** The engine's record of a sentence it composed is one member, `sentence: { text, generic?, echoed? }` (it retires `genericQuestion`: `generic` is that bit, `echoed` the literals the sentence quotes in #3410's list form), read through one function (`engineSentenceOf`) that answers only while the decision's `message` IS `text`. The write gate's generic question and the plan mode's write question list their path (as the call spells it — the tool's declared target, so a NotebookEdit's `notebook_path` and never a decoy `file_path`; not a canonical path); the plan mode's call question is generic and quotes nothing. The resolver's arms whose refusal sentence quotes the question — a person's no (boolean or object arm, with or without a note), the approver's own window, the deployment policy's or a PermissionRequest hook seat's no, nobody reachable, no approver wired (headless), the denial-limit fallback's window, and the refusal of a blanket or policy allow on an ask that needs a person — carry the question's list on the refusal's record when the question the engine's station put to the approver is still the engine's sentence; the gate's exit files it as `GateDisposition.echoed` beside `ask_resolution`. Arms whose sentence does not quote the question (an abort, an approver that threw, an out-of-contract answer, arguments or an edit no approval binds) carry none.
|
|
148
|
+
- **When the list is absent.** The list stands only while the sentence does: a card that appended to the question (an outranked allow rule's account), a persisted rule's appended account, a hook's or a policy's own words folded over it, a layer that rewrote the refusal's sentence on the way out, and a question the engine did not compose (a deployment policy's ask, even one that copies the engine's words) — none files a list. A policy that calls the exported `resolveAsk` itself never gets one, whatever it puts on the request: the list's only source is the record of the station that composed the question. The durable leg's refusal (the parked call refused on resume) quotes no question and files none. The contract-failure refusals the gate's exit composes itself (a resolution with the retired `settlement` member, an allow over a refusal record) file none.
|
|
149
|
+
- **Narrowing / widening.** None of the call: what runs, what is refused and every sentence's bytes are unchanged. The policy chain's entry mint (#3203) reads the generic bit through the new member exactly as it read `genericQuestion`.
|
|
150
|
+
- **Wire / exports.** `GateDisposition.echoed` (#3410, this release) is present beside `ask_resolution` as described above; it never was released beside `read_boundary` alone, so its contract simply names two layers. The engine record's type is on the package root (`EngineAttestation`, type only — no mint is exported); its member change is the hard-breaking item below. `resolveAsk`'s signature is unchanged. The package root gains no name.
|
|
151
|
+
- **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* `EngineAttestation` loses its optional `genericQuestion` member, and gains the optional `sentence` member, whose `generic` bit is what it carried; no record carries `genericQuestion` again. *Who is affected:* no repository reads the member — grep of the server / cli / client-core / sdk / test / desktop / web-client / web-admin / connectors / settings-schema origin/main finds it only in the cli's consumption manifest text and the web-admin's list of a past release's type keys, no code; a host that read it off a decision's record no longer compiles against this release. *Compensation:* a host reads `attestation.sentence` and holds it only while the decision's `message` is `sentence.text` (the engine's own reading, `engineSentenceOf`, is not exported) — the same equality `genericQuestion` was read under; `sentence.generic === true` is the old member's meaning.
|
|
152
|
+
- **Consumers.** @cli (KL0382): the consumption rule is three sentences — when the list is present, draw the refused path from it; when it is absent, draw what was asked from the call's own arguments; in neither case take the sentence apart. `value` is the call's spelling (it may be relative) — never read it as a canonical path. It rides the wire byte for byte as the call spelled it: control characters (an ESC or a CR in a directory name reaches `value` as it is) are neither escaped nor stripped, so a shell that prints a `value` escapes them itself. @server: projects `gate` whole — no key to add; a server policy layer that calls `resolveAsk` itself gets refusals with no list by design (its consumer falls back to the call). @client-core: mirrors `GateDisposition` — no new member; the `EngineAttestation` member change (above) has no client-core reader.
|
|
153
|
+
- **Rules.** Retired: the record member `genericQuestion` and its inline reading. Added: one record member (`sentence`, net zero), one reading of it (`engineSentenceOf`, used by the entry mint, the resolver and the gate's exit), one resolver flag spread by the arms that quote the question (`quotesQuestion`, never on the resolution), one module-level resolver entry that takes the asked decision (`resolveAskFor`, the four engine stations; the exported `resolveAsk` is it with none), one exit reading (`refusalEchoOf`, both channels through the one layer table); the layer table admits `ask_resolution`. The merge of records is unchanged (a later decision missing the sentence group takes the earlier's; the equality decides whether it is read).
|
|
154
|
+
- **Claude Code 2.1.316.** Claude Code's refusal text quotes no literal (`cli316.js:261614`) and its interface draws a rejected call from the call's input (`cli316.js:294724`): it answers "how does the shell draw a refusal" from structure, never from the sentence — the same rule; this engine's refusal quotes its question, so the engine lists what the question quotes, the half Claude Code gets from the input. No divergence entry (additive metadata, model-facing bytes unchanged).
|
|
155
|
+
- **Pins.** `test/backlog3442-ask-refusal-echo.test.ts` — J1 the real Runner: Write's generic question refused with a path holding a tab and a newline (the list, the text's bytes, the JSON round trip), NotebookEdit's target with a decoy `file_path`, the plan mode's write question (listed) and call question (nothing), headless with the remedy after the mint (listed); A every resolver arm table-driven (eleven quoting arms listed and quoting the question, seven non-quoting arms bare; the exported resolver bare on every arm; an approval bare); K7 a card's appended account, a persisted rule's appended account, a hook's folded question, the exit's own equality over a rewritten refusal; J3 a policy's literal copy of the engine's words, a policy calling the exported resolver with forged keys, the exported resolver handed a forged fifth argument; K10 the merge fills the group and the equality decides; controls (the read station's list unchanged, a policy-layer deny carrying the question's record bare, the minted literals frozen, `genericQuestion` gone from the record and from every source file). `test/backlog3203-ask-reasons.test.ts` holds the generic bit's reading unchanged. Three source censuses of the resolver's request mints — `test/backlog1214-ask-class-on-request.test.ts` F1, `test/backlog1688-bound-grant-absence.test.ts` B4 and the two ask-mint scans of `test/permission-rule-wiring.test.ts` — count the stations' calls of `resolveAskFor` (the same sites, counts and carries). Mutations: `.gate-logs/criteria-3442-mutations.md` (receipt).
|
|
156
|
+
|
|
157
|
+
### The execution environment's namespace is one class — every terminal code in `env.` (the platform lifetime stop and a factory's refusal to mint, such as `env.home_unconfirmed`) folds to `config` by prefix, and the exact row is retired (#3336; behavior change — `errorClassOf` answers `config` instead of `unknown` for an `env.` code other than `env.lifetime_expired`; hard-breaking: none; closed sets: none; exports: none; widening: one, open to veto) (@server)
|
|
158
|
+
|
|
159
|
+
- **Before.** In 7.63.0 `errorClassOf` knew exactly one code of the namespace, `env.lifetime_expired`, as an exact row; every other `env.*` code folded to `unknown` — including the code a deployment's `executionEnvFactory` throws to refuse to mint, which the run's terminal carries verbatim (#3230, below), such as `env.home_unconfirmed`. The prefix had been kept out because `env.context`, `env.get` and `env.set` are not error codes. That is true and was never a reason: those strings never reach a terminal code, and a terminal code is the fold's whole domain.
|
|
160
|
+
- **Now.** One rule: `env.` is a row of the prefix table (`DOTTED_PREFIX_CLASS`, `src/core/tool-errors.ts`) with the class `config` — the class of a refusal or a limit answered by changing the environment or the configuration and retrying, which `env.lifetime_expired` always had. The exact row for `env.lifetime_expired` is deleted (the prefix answers it, the same class). A code a later deployment mints in the namespace (`env.home_mismatch`) needs no registration here. `memory.*` is unchanged and stays a mixed bag on purpose: most of its codes are tool-call incidents, not task rejections.
|
|
161
|
+
- **Narrowing / widening.** One widening of the fold, open to veto: an `env.`-prefixed terminal code other than `env.lifetime_expired` reads `config` where it read `unknown`. Nothing is rewritten — the fold is derived and read-side, no code and no result changes.
|
|
162
|
+
- **Who needs it / who is affected / compensation.** *Needs it:* a host that classifies a failed run by class and wants a factory's refusal to read as what it is — a configuration answer, not an engine fault. *Affected:* a host that read `unknown` as "an engine fault" and alerted or retried on a factory's `env.*` refusal. *Compensation:* none needed; a host that switches on the code itself sees the same code.
|
|
163
|
+
- **Wire / exports.** None. `TaskResult.terminal.code` is unchanged and `WorkerErrorClass` gains no member.
|
|
164
|
+
- **Consumers.** @server: the S-2997 observation ticket that waited on this can be resolved — `env.home_unconfirmed` reads `config`, and the `config` bucket your side already consumes needs no change.
|
|
165
|
+
- **Rules.** Retired: the exact row `env.lifetime_expired`, the comment that `env.` cannot be a prefix, and the pin that asked the fold to answer `unknown` for `env.context` (a string outside its domain). Added: one prefix row — the namespace is answered by one rule instead of a rule plus a copy of its first member, and no deployment's code is registered in this module.
|
|
166
|
+
- **Claude Code 2.1.316.** No anchor (inferred): `errorClassOf` folds this engine's own terminal codes and Claude Code has no counterpart of it; nothing to register.
|
|
167
|
+
- **Pins.** `test/backlog3336-env-namespace-class.test.ts` — E1 the namespace's codes read `config` (the lifetime stop, `env.home_unconfirmed`, `env.home_mismatch`, an unseen `env.something_new`) · E2 the exact row is gone and the prefix row is the one rule · E3 the dotless word, a longer word, another case and a leading character stay `unknown` · E4 `memory.*`, `model.*` and the other prefixes keep their answers · E5 no code, an empty code and an unrecognised dotted code stay `unknown` · E6 src sets no `env.context` / `env.get` / `env.set` as a code and every `env.` code it does mint reads `config`; `test/error-class-of.test.ts` — the cases moved from the exact-code list to the prefix list.
|
|
168
|
+
|
|
169
|
+
### A factory that refuses to mint ends the run at prepare with its own code and sentence — stated as a contract in INTEGRATION-CORE §4.5b′ and pinned over a real Runner (#3230; behavior change: none — 7.63.0 already carried the refusal, this release states and pins it; hard-breaking: none; closed sets: none; exports: none) (@server @test)
|
|
170
|
+
|
|
171
|
+
- **Before.** In 7.63.0 an `executionEnvFactory` that threw an error with a `code` ended the run at prepare with that code, but no document said so and no pin held the code and the sentence on the terminal (the existing factory-throw pins hold the session's cleanup and that the run fails): the integration note spoke of a typed refusal for a device-bound factory and nothing of what the caller then receives, so a deployment choosing between refusing at the factory and refusing per command had no sentence to build on.
|
|
172
|
+
- **Now.** §4.5b′ of `docs/INTEGRATION-CORE.md` states it. On a task's first leg the refusal is the run's whole account: the factory ran once, no environment was built, the model was never asked (so no command reaches a read boundary), the run is `failed`, `result.terminal.code` is the code the factory threw (read down the `cause` chain) and `result.terminal.message` its sentence, after the credential screen every failed terminal's sentence goes through. The engine rewrites neither and mints no code of its own; a refusal with no code is a `failed` run with no `code`. A code the factory refuses with MUST be in the `env.` namespace, which reads `config` by prefix (#3336, above); a code outside it is carried the same way and classified by its own namespace.
|
|
173
|
+
- **Narrowing / widening.** None. No line of the prepare path changed.
|
|
174
|
+
- **Wire / exports.** None.
|
|
175
|
+
- **Consumers.** @server (S-2778): refuse at the factory — throw an `env.*`-coded error (`env.home_unconfirmed`); it reaches the caller as the run's `failed` terminal with that code, and the same sentence for a first command that names a path and one that does not, because no command is ever run. @test: pins F1–F9 hold the carried refusal over a real Runner, with a factory that mints an environment as the control.
|
|
176
|
+
- **Rules.** None added or retired; this release states a rule the engine already followed.
|
|
177
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code has no execution-environment factory; the refusal and its code are this engine's.
|
|
178
|
+
- **Pins.** `test/backlog3230-factory-refusal-carried.test.ts` — F1 `env.home_unconfirmed` is the terminal's code, its sentence is carried, class `config` · F2 the factory ran once, no environment was built, the model was asked zero times · F3 a rejected promise is carried the same way · F4 an unseen `env.something_new` is carried and reads `config` · F5 a code outside `env.` is carried as stated and keeps its own class · F6 a refusal with no code is `failed` with no `code` (class `unknown`) · F7 a factory that mints an environment runs to completion with the same harness · F8 the code is read down the `cause` chain · F9 the sentence goes through the credential screen · D1 / D2 §4.5b′ sits between §4.5b and §4.5c and states the carried refusal and the namespace rule.
|
|
179
|
+
|
|
180
|
+
### The single-ticket door says why a ticket was refused in the same two closed words a batch member's row carries — `redeemRuleTicket`'s refused arm is `{ status, code, committed, reason }`, and the shell that stripped the words off the leg's own refusal is gone (#3414; behavior change: none at runtime; hard-breaking: one, type level, three sentences below, open to veto; closed sets: none new; exports: none; members: `RedeemResult` refused arm +`code`, +`committed`, both required in type; wire: `redeemRuleTicket` refused result +2 keys, redeemed result unchanged) (@server @cli)
|
|
181
|
+
|
|
182
|
+
- **Before.** The redemption leg minted `code: RuleRefusalCode` and `committed: RuleWriteCommitted` for every refusal (7.63.0, #3363), and the single-ticket door `redeemRuleTicket` dropped both before answering `{ status: "refused", reason }`. The same fact — "this ticket was refused, and for this cause, and the store did or did not change" — had two faces: a member row of `redeemRuleBatch` said it in two words, the door said it only in a sentence a host may not parse. A host that needed the cause of a single ticket had to walk a one-member batch and read its row.
|
|
183
|
+
- **Now.** One shape. The door returns the leg's refusal as it was minted: `{ status: "refused", code, committed, reason }`, `code` one of the 17 words of `RULE_REFUSAL_CODES`, `committed` `"no"` | `"unknown"`, `reason` the unchanged sentence. The stripping shell (`redeemRuleTicket` over a private `redeemTicketLeg`) and the leg-only refusal type are retired: `redeemRuleTicket` is the leg, and the batch walk calls it per member. The redeemed arm is untouched.
|
|
184
|
+
- **Narrowing / widening.** None. Nothing is refused that was not refused; no sentence changes; the words were already computed.
|
|
185
|
+
- **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* `RedeemResult`'s refused arm gains `code` and `committed`, required in type (every refused result carries both); at runtime no key is removed or changed and the redeemed arm is untouched. *Who is affected:* a TypeScript consumer that constructs a refused `RedeemResult` literal (a mock, a test fixture) no longer compiles until it names both; a consumer that only reads the result is unaffected — @server reads `redeemed.reason` after `status !== "redeemed"` (`src/rules-consent.ts:1456-1457`, read in its local checkout at `96a91d82`, not fetched, not compiled against this tree) and builds no refused literal there. *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`.
|
|
186
|
+
- **Consumers.** Affected: @server — the single-ticket arm may branch on `committed` / `code` instead of the sentence (its card lane today answers `redeem-refused` with the sentence). Not affected: @cli @client-core (no match for `redeemRuleTicket` in their `src`, grep of the local checkouts, not compiled; they consume the wire receipt).
|
|
187
|
+
- **Rules.** Retired: the stripping shell and the second refusal type (`LegRefusal`, `RedeemLegResult`), and the known limit of 7.63.0 that said the door answers the sentence alone. Added: none. One refusal shape, one mint (`refusal()`).
|
|
188
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code keeps no approval-record or ticket-redemption protocol; nothing to register.
|
|
189
|
+
- **Pins.** `test/backlog3414-refusal-one-shape.test.ts` — S1 one case per refusing cause of the single-ticket door, through the real `redeemRuleTicket` (15: eleven leg causes, four landing causes, both claims) · S2 the door and a batch member's row, built over the same fixture, carry the same words and sentence (4) · S3 control: a redeemed ticket — first time and replay — carries exactly its old keys and neither word · S4 the refused arm is exactly `{ status, code, committed, reason }`, and one built without the words does not compile. `test/backlog3363-refused-arm-closed-keys.test.ts` K7 (the door answers the sentence alone) is retired with it.
|
|
190
|
+
|
|
191
|
+
### The batch's own refusal, before it has a member table, says why in the same two closed words — `redeemRuleBatch` on a record it cannot walk answers `{ status, code, committed, reason }`, and every refusal this module mints, the single ticket's, the walk's member rows' and this one's, comes from the same function (#3415; behavior change: none at runtime; hard-breaking: one, type level, three sentences below, open to veto; closed sets: none new, no word added; exports: none; members: `redeemRuleBatch` refused result +`code`, +`committed`, both required in type; wire: `redeemRuleBatch` record-level refusal +2 keys, member table unchanged) (@server)
|
|
192
|
+
|
|
193
|
+
- **Before.** A batch that could not start — the record missing, another principal's, stale, pending or malformed, or the owner's store not resolvable — answered `{ status: "refused", reason }`, minted by seven hand-written literals beside the refusal function the rest of the module used. 7.63.0 (#3363) gave a refused member row the two words and left this arm out, so "the batch could not start" was the one refusal of the redemption protocol a host could only tell by the start of a sentence.
|
|
194
|
+
- **Now.** The same shape and the same words, all already in `RULE_REFUSAL_CODES` (no word is added): `record_missing`, `wrong_principal`, `record_schema_stale`, `not_confirmed`, `record_malformed` (the structural precondition, and a settled record that names no valid chosen offer), `store_unavailable`; `committed` is `"no"` at all seven — nothing was written. The sentences are unchanged. The walk's member rows are minted by the same `refusal()` (a row is the refusal plus the member's identity), so no hand-written refused literal is left in the module.
|
|
195
|
+
- **Narrowing / widening.** None. The same records are refused for the same reasons; the arm gains two keys.
|
|
196
|
+
- **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* the refused result of `redeemRuleBatch` (the arm without a member table) gains `code` and `committed`, required in type (the wire manifest reads it as `signature changed: redeemRuleBatch — return type`, its refused arm now being `Extract<RedeemResult, { status: "refused" }>`); at runtime no key is removed or changed and the member table is untouched. *Who is affected:* a TypeScript consumer that constructs that arm as a literal (a mock, a test fixture) no longer compiles until it names both; a consumer that tests `"status" in result` and reads `result.reason` is unaffected — @server does exactly that at `src/rules-consent.ts:1379` and `:1641` (read in its local checkout at `96a91d82`, not fetched, not compiled against this tree) and builds no such literal. *Compensation:* add `code` (a word of `RULE_REFUSAL_CODES`) and `committed` (`"no"` | `"unknown"`) to the literal; read `code` for the cause and stop reading the start of `reason`.
|
|
197
|
+
- **Consumers.** Affected: @server — the import lane's top-level refusal (`indeterminate(result.reason)`, released for retry because "the engine refused before any member loop") may read `committed: "no"` and `code` instead of reading that off the arm's position; its cause classification stops depending on the sentence. Not affected: @cli @client-core (no match for `redeemRuleBatch` in their `src`, grep of the local checkouts, not compiled).
|
|
198
|
+
- **Rules.** Retired: seven hand-written `{ status: "refused", reason }` literals and five hand-written member-row literals (`withheld`, `store_read` ×2, `dot_removed`, the copy of the leg's words) — all now `refusal()`; the 7.63.0 known limit that the batch-level refusal answers the sentence alone. Added: none.
|
|
199
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code keeps no approval-record or ticket-redemption protocol; nothing to register.
|
|
200
|
+
- **Pins.** `test/backlog3414-refusal-one-shape.test.ts` — B1 one case per record-level refusing site of `redeemRuleBatch`, each with its word, its claim and its sentence (7), plus the census of the seven sites · B2 one cause, one word at the batch and at the door (three causes) · B3 control: a batch that walks answers its member table (`members`, `rev`), a refused row is the leg's refusal plus the member's identity (eight keys), and the refused result built without the words does not compile.
|
|
201
|
+
|
|
202
|
+
### `committed` is read one way — `no` is "the store settled that nothing this call wrote stands", which a `dot_removed` member (its add landed, a read that succeeded found it removed) is, and the table's own sentence now says so once (#3416; behavior change: none; hard-breaking: none; closed sets: none; exports: none; contract sentence: the definition of `RuleWriteCommitted` in `permission-rule-store.ts` and in `docs/CLOSED-SETS.md`) (@server)
|
|
203
|
+
|
|
204
|
+
- **Before.** `RuleWriteCommitted` was defined twice. The table's sentence (`permission-rule-store.ts`, `docs/CLOSED-SETS.md`) read `no` as "the store itself answered that nothing landed"; the batch member's doc (`RedeemedBatchMember`, 7.63.0) read it as "the rule does not stand because of this call". 7.63.0's `dot_removed` row is `committed: "no"` for a member whose add HAD landed and was then found removed — true under the second reading, false under the first: one word, two definitions (7.63.0 review R-1).
|
|
205
|
+
- **Now.** One reading, written once, in the table's own sentence: the word answers "has the store itself settled whether anything this call wrote stands?" `no` = it has, and nothing does — nothing was written, or the store answered that nothing landed, or what landed is found removed by a read that succeeded (`dot_removed`); `unknown` = it has not (the apply threw or answered unreadably, or the read-back that would have settled it could not be taken). The member row's doc and the closed-set entry point at it, and the add and remove doors' failed-arm docs say they read it as the table reads it. No word, key or value changes.
|
|
206
|
+
- **Why `dot_removed` stays `no` and is not `unknown`.** Two readings were open: widen `no`'s sentence, or give `dot_removed` `unknown`. The second does not hold, on two facts. (1) The read-back that finds the dot removed SUCCEEDED, so the question is settled; `unknown` is the word for a look that did not settle, and saying it here sends a caller to reconcile with `list()` for an answer the store already gave. (2) `unknown`'s own domain is `store_read` / `store_write` (the apply threw, answered unreadably or left no trace, or the read-back could not be taken; #3363's K3 pins it): `dot_removed` would be the one `unknown` with nothing indeterminate in it, and `unknown`'s sentence would need widening as well. The first reading touches one sentence and no code.
|
|
207
|
+
- **Narrowing / widening.** None.
|
|
208
|
+
- **Hard-breaking — none.** No type, key, value or word changes; a consumer that mapped `committed: "no"` to "refused, nothing to reconcile" reads a `dot_removed` row exactly as it did.
|
|
209
|
+
- **Known limit.** `no` on a `dot_removed` row is about the rule's standing, not about the bytes' history: the add's dot is in the raw state under its tombstone (pinned). A host that wants the history reads the store; a retry of the same ticket re-reads the same tombstone — what lands the rule again is a new consent, which is what `code: "dot_removed"` says.
|
|
210
|
+
- **Consumers.** @server: per the 7.63.0 entry above, `ImportMemberOutcome` maps `committed: "no"` to `refused` with `code` as the reason, so a `dot_removed` row maps as before; nothing to change (not re-read in its checkout).
|
|
211
|
+
- **Rules.** Retired: the second definition of `no` (the member row's) and the first one's "nothing landed" as the whole of `no`. Added: none.
|
|
212
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code keeps no permission-rule write table; nothing to register.
|
|
213
|
+
- **Pins.** `test/backlog3414-refusal-one-shape.test.ts` — D1 a `dot_removed` row is `no`, its add IS in the raw state under a tombstone, the effective view does not hold the rule · D2 the contrast: a write that committed and lost its acknowledgement is `unknown` and the rule DOES stand · D3 over every `no` the single-ticket door answers, the redeemed candidate does not stand afterwards · D4 the table's sentence names the removed-since case, the closed-set entry carries the same reading, the member row's doc restates no second definition.
|
|
214
|
+
|
|
215
|
+
### The member-shape table names the resource ledger and the checkpoint id — a row whose ledger is not an object or whose id is not a string is `damaged` on the judge and on every listing face, where a `null` ledger listed `damaged` while the judge said `ok` and `listBySession` handed the row back whole (#3411; behavior change; behavior narrowing — one, 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)
|
|
216
|
+
|
|
217
|
+
- **Before.** `ROW_MEMBER_SHAPES` (7.63.0) named five members; the summary projection reads two more, and those two had no entry. Measured on `bbc88f833` (an unstamped row over an in-memory store): a `resourceLedger` that is `null` — the form a JSON column left as `null` hands back — made the projection throw on `ledger.spentMicroUsd`, so `listByScope` and `listOverdue` listed the row in the unreadable form (`damaged`) while `judgeCheckpointRow` said `ok` and `listBySession` answered the row whole: a card the list called damaged could be approved. A ledger that is a number, a string or a list, and a `checkpointId` that is `null`, a number or a record, were `ok` on every face and the summary echoed the id as it was (`checkpointId: 7` on a summary typed `string`); a `checkpointId` that is a BigInt threw in the projection's own disclosure and listed unreadable while the judge said `ok`.
|
|
218
|
+
- **Now.** Two entries, after `deadline` (the table's order is its reading order, so the older members are still told first): `resourceLedger` absent or a record ("its resource ledger is not an object"), `checkpointId` absent or a string ("its checkpoint id is not a string"; a non-empty one since #3429, below). `rowMemberProblem` reads the seven members, each once. For every such row the judge, `summarizeCheckpoint`, `listByScope`, `listOverdue` and `listBySession` answer `damaged` / `unreadable` in the table's words, and the resume's diagnostic carries the session face's `problem` verbatim. A shape, never a particular value: `{}` is a record (the empty string stood as a string here and is no id since #3429). This closes the Known limit of the 7.63.0 section on the member-shape table (the `resourceLedger: null` disagreement).
|
|
219
|
+
- **Narrowing — one (open to veto).** A row whose `resourceLedger` is not a record, or whose `checkpointId` is not a string, is refused before the claim at the resume (`checkpoint.invalid_outcome` / `requirements_damaged`, the member named; the row stays `pending` and byte-identical) and lists `damaged`; it resumed before. No release of this engine writes either member in another shape (the id is `mintCheckpointId()`'s string or absent; the ledger is a record or absent).
|
|
220
|
+
- **Hard-breaking — one, three sentences (open to veto).** *What changed:* a parked row whose `resourceLedger` is not an object (a `null` a JSON column left) or whose `checkpointId` is not a string is no longer resumable on this release, and every face reads it `damaged` / `unreadable`. *Who is affected:* a deployment writing its own rows with such a value, and a mixed fleet whose 7.63.0 workers still resume such a row (the row is left pending and byte-identical here, so it can still finish there). *Compensation:* write the member absent, not `null`; finish the row on a worker of the release that parked it, or expire it (`CheckpointStore.expire`) and run the task again.
|
|
221
|
+
- **Affected.** A deployment or store that hands back a row with a `null` / non-object ledger or a non-string id (none known in-tree; no release of this engine writes either shape). Every row with a ledger record or none, a string id or none, reads and resumes exactly as before.
|
|
222
|
+
- **Rules.** One table where the projection and the judge each had a member the other did not read: the ledger's and the id's reading is the table's entry, and the projection's own throw on a `null` ledger is no longer the only thing that says so. Added: two entries. Retired: none.
|
|
223
|
+
- **Consumers.** @server: a store's listing built on `summarizeCheckpoint` carries the judge's verdict for these rows; an SQL-backed store that rehydrates an absent id or ledger as `null` must hand it back absent (read, not run — no in-tree store does). @client-core @cli: nothing new to render — such a row is a `damaged` row. @test (black box): a v1 plan review row with `resourceLedger: null` ⇒ its approval is refused `checkpoint.invalid_outcome` / `requirements_damaged` naming `resourceLedger`, the row pending; `listBySession` lists it `unreadable`.
|
|
224
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no durable park row store or listing.
|
|
225
|
+
- **Pins.** `test/backlog3411-row-shape-ledger-id.test.ts` — A1–A5 the judge, the projection and the listing faces over eight forms (a `null` / number / string / list ledger; a `null` / number / record / BigInt id), the File store over the forms its JSON keeps · P1 the refusal names the member in the listing's words · K1–K3 a ledger record and a string id read, absent members are no damage, an empty record reads · O1–O2 the table's order, newer before damaged · R0 / R1 a legacy plan review with such a member is refused, the row pending. Mutations (receipt).
|
|
226
|
+
|
|
227
|
+
### The member-shape table reads the gate × pending-action pair the pause registry declares — a row whose pending action is not the one its gate kind pairs with is `damaged` on the judge and on every face and is refused at the resume, where a decide consumed it and ran nothing (#3412; ruled C-R1104; behavior change; behavior narrowing — three, 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)
|
|
228
|
+
|
|
229
|
+
- **Before.** The registry (`PAUSE_REGISTRY`) pairs each gate kind with one pending kind and `pauseOf` refuses any other pair at the mint, but nothing read the pair on a row a store hands back: the judge and every listing face answered `ok` to a `human` gate holding a `plan_review` pending action, and the resume ran on it. Measured on `bbc88f833` (a legacy row over a real session leaf, real `Runner`): (M1) a `human` gate holding a `plan_review` pending action, a person's bare `policy_ask` allow (no bound call: the lane keys on the gate, the call binding on the pending action, and an absent bound call equals the absent one) ⇒ resumed, the row `resolved`, the parked tool not run — a person's approval consumed and nothing done; (M2) a `plan_review` gate holding a tool approval, a plan approval ⇒ resumed, `resolved`, the parked tool call dropped; (M3) a `human` gate holding a `resource_limit` pending action ⇒ refused only because that row has no origin word (`checkpoint.unsupported_version`), by accident; (M4) a `task_done` gate holding a tool approval, a wake ⇒ refused `wake.gate_pending` by the wake screen's own belt ("inconsistent row") — the one place that called the pair a row fact.
|
|
230
|
+
- **Now.** One more clause in the pending action's entry of the table, read after the gate's entry and after "a registered pending kind": the kind is the one the gate kind's registry row names ("its pending action is not the one its gate kind pairs with"). For all 24 pairs of the registry's six gate kinds × five pending kinds that the registry does not declare, the judge, `summarizeCheckpoint`, `listByScope`, `listOverdue` and `listBySession` answer `damaged` / `unreadable` in those words, and the resume (a decide or a wake) is refused before the claim — all four of M1–M4 are `checkpoint.invalid_outcome` / `requirements_damaged`, the row `pending`, nothing run. The six declared pairs are unchanged.
|
|
231
|
+
- **Narrowing — three (open to veto).** (1) A stored row whose pair the registry does not declare is refused at the resume and lists `damaged`; M1 and M2 resumed before, consuming the row. (2) `listBySession` answers `unreadable` where it answered the row. (3) A wake over a `task_done` gate holding a gate-typed pending action is refused `checkpoint.invalid_outcome` / `requirements_damaged` by the row's verdict, where the wake screen refused it `wake.gate_pending` (the row stays pending both ways).
|
|
232
|
+
- **Hard-breaking — one, three sentences (open to veto).** *What changed:* a parked row whose pending action is not the one its gate kind pairs with is no longer resumable on this release, and every face reads it `damaged` / `unreadable`. *Who is affected:* a deployment that writes its own rows with a pair `pauseOf` would refuse, and a store holding rows an engine from before the pause registry wrote (a `needs_review` row on another arm's seat, a `plan_review` row on a `resource_limit` placeholder — `checkpoint-store.ts`'s own account of that history); which release introduced the registry's pairing is inferred, not measured, and no row of this shape is known to exist; a mixed fleet whose 7.63.0 workers still resume such a row. *Compensation:* finish the row on a worker of the release that parked it, or expire it (`CheckpointStore.expire`) and run the task again; a deployment writing rows builds them with `checkpointFrom` / `pauseOf`.
|
|
233
|
+
- **Affected.** A store that holds, or a deployment that writes, a row whose pair the registry does not declare (`pauseOf` and `checkpointFrom` refuse such a pair at the mint, so this engine writes none; the old-engine shapes above are inferred). A person who approved a `human` gate over a `plan_review` pending action on 7.63.0 got a consumed row and no action; the same decide is now refused with the row pending. The six declared pairs, and every wake over a `task_done` park, read and resume as before.
|
|
234
|
+
- **Rules.** One pair read, by the verdict, where the wake screen read it for one gate kind and the resume lanes assumed it (`decide-continuation.ts`'s own "unreachable by the gate-match invariant"). Retired with it: the wake screen's pending-action switch (see the section below). Added: one clause of an existing entry.
|
|
235
|
+
- **Consumers.** @server: a store's listing carries the judge's verdict for these rows; the question is whether any stored row holds a pair the registry does not declare — a census of the stored rows (`gate.kind` × `pendingAction.kind`) answers it. @client-core @cli: `rowVerdict` damaged is rendered as it is; its "why" words gain one cause. @test (black box): a v1 row with a `human` gate and a `plan_review` pending action ⇒ a bare allow is refused `checkpoint.invalid_outcome` / `requirements_damaged`, the row pending; a wake over a `task_done` gate holding a tool approval is refused the same way.
|
|
236
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no durable park row store or listing.
|
|
237
|
+
- **Pins.** `test/backlog3412-gate-pending-pairing.test.ts` — P0 the written-out pairs are the registry's column · A1–A3 all 24 undeclared pairs on the judge, the projection, `listByScope`, `listOverdue`, `listBySession` · K1 the six declared pairs read · O1–O4 the table's order (gate, pending kind, pair, tool call id; newer before damaged) · P1 the refusal's words · R0 controls (a plan review approved, a `task_done` park woken) · R1 M1–M4 on a real `Runner` (base: M1 and M2 resumed). Re-pinned: `wake-resume` (6) and (9) (the belt is now the verdict's: `checkpoint.invalid_outcome` / `requirements_damaged`, the row pending). Mutations (receipt).
|
|
238
|
+
|
|
239
|
+
### The wake screen is the gate whitelist alone — the arms the row's verdict made unreachable are retired: the fallback decide for a gate kind the registry does not hold, the runtime `default:` for a pending kind it does not hold, and the pending-action switch's four gate-typed arms (#3413; behavior change: none for any row a store can hand to the screen — a wake over a row the registry does not hold, or whose pair it does not declare, is refused `checkpoint.invalid_outcome` by the verdict, as #3412 and 7.63.0 state; hard-breaking: none; closed sets: none; exports: none) (@test)
|
|
240
|
+
|
|
241
|
+
- **Before.** The wake pre-ladder of the resume's admission rung ran after the row's verdict (`checkpointRowRefusal`) and still carried arms for rows the verdict had already refused: the decide-entry copy fell back to "its own gate outcome" for a gate kind the registry does not hold; the pending-action switch refused `task_done`-gate rows holding a gate-typed pending action with "inconsistent row", and its `default:` refused a pending kind the registry does not hold as "unrecognized pendingAction kind (newer-version row?)". With #3383 the last and the fallback were unreachable; with #3412 reading the pair, the four gate-typed arms are too (the one test that reached them, `wake-resume` (6) / (9), now meets the verdict).
|
|
242
|
+
- **Now.** The screen is `gk !== "task_done"` ⇒ `wake.gate_pending` with the decide that answers the gate, taken from the registry's `resume` column (five gate kinds, four decide copies); the pending action needs no look of its own — a `task_done` gate pairs with a `task_done` pending action, and the verdict refuses every row that does not. The copy table drops its `task_done: undefined` placeholder (a wake is the answer to that gate). Adding a pending kind to the registry no longer needs a classification here: the pair is the registry's.
|
|
243
|
+
- **Rules.** Retired: the decide-entry fallback, the `isGateKind` ternary beside it, the switch with its runtime `default:` and four gate-typed arms, the table's placeholder entry. Added: none.
|
|
244
|
+
- **Affected.** No row a store can hand to this screen sees a different answer; the sentences that left are reachable only through a row the verdict refuses first. A reader who matched the retired sentences ("inconsistent row", "unrecognized pendingAction kind") now meets `checkpoint.invalid_outcome` / `requirements_damaged` for those rows.
|
|
245
|
+
- **Consumers.** @test (black box): a wake over a registered non-park gate is still `wake.gate_pending` naming the decide; over a row the registry does not hold, `checkpoint.invalid_outcome`.
|
|
246
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no durable park row store or wake verb.
|
|
247
|
+
- **Pins.** `test/backlog3413-wake-screen-judge-first.test.ts` — W1 / W2 a row of a pending / gate kind the registry does not hold is refused by the verdict, the screen not asked · W3 the five registered non-park gates still get `wake.gate_pending` with their decide · W4 the retired wording is gone from the source. Mutations (receipt).
|
|
248
|
+
|
|
249
|
+
### The background fork lane's terminal notifier takes no `ending` because the only ending it can receive is `killed` — pinned, with the half it cannot reach pinned as well (#3417; behavior change: none; hard-breaking: none; closed sets: none; exports: none) (@test)
|
|
250
|
+
|
|
251
|
+
- **Before.** A review of 7.63.0 read the notifier the fork lane hangs on its row (`attachAgentTerminalNotifier(taskId, () => …)`, `src/agents/subagent.ts`) as one with no caller after #3346: it ignores the landed `ending` and always sends `killed`, while the agent lane's reads `ending.status`, `ending.error` and `ending.parkLane`. The ticket's premise ("no caller") does not hold: the registry calls it for a RUNNING row it reaps — a session release (`reapSessionBackground`) and a stale-row sweep (`reapStaleSessionBackgroundAgents`) — and `killed` is the only ending such a row has. What this lane cannot receive is a `failed` ending or a park lane: the fork lane never parks its row (`parkBackgroundAgent`, with its `completionSink`, is called only from the agent lane), and the registry announces a parked ending only to the lane a park recorded.
|
|
252
|
+
- **Now.** No change to the notifier. Two cells pinned: the notifier is live (both reaps send exactly one `killed` frame on both faces, the instant the reap returns, and the child's later unwind stays silent), and the unreachable half is a tripwire: a fork lane that starts to park or to record a completion lane fails the pin until its notifier reads `ending` as the agent lane's does.
|
|
253
|
+
- **Affected.** Nobody: nothing a consumer can see changes.
|
|
254
|
+
- **Pins.** `test/backlog3417-fork-terminal-notifier.test.ts` — F1 a session release reaps a running fork (one `killed` frame at once, the row's own facts, silent after) · F2 the stale sweep does the same · F3 the fork lane records no park and no completion lane, so a notifier that ignores `ending` is correct there · F4 the control for F3's reading of the source. Mutations (receipt).
|
|
255
|
+
|
|
256
|
+
### A frame for a session goes to the session's occupant, not to its id — a session deleted and created again under the same id (by another principal or the same one) is another destination, and what the earlier occupant's background work sends after that is discarded and said once, `delegation.delivery_discarded` (#3431, ruled C-R1109; behavior change; behavior narrowing — four, below, open to veto; hard-breaking: none; closed sets: `EngineNoticeCode` +1 (`delegation.delivery_discarded`), additive; new `DiscardedDeliveryPath` (`live` | `box` | `drain`, the notice's `detail.path`); exports: none; members: +1 optional `rootSessionIncarnation` on each of `ToolExecuteContext`, `RunInternals`, `RunWorkflowOptions`, `RunWorkflowToolDeps` (there a getter, `() => string | undefined`); wire: one notice code added) (@server @cli @client-core @test)
|
|
257
|
+
|
|
258
|
+
- **Before.** 7.62.0 completed a parked background agent that a host's decide drive resumed through the mount's own sink (`resolveCompletionSink(ctx.onTaskNotification, opts.background.notify)`, `src/agents/subagent.ts` :3830 at v7.62.0) — the server's relay into its session door, which checks the session's owner again (the server reports its completion inbox purges on delete and checks the owner on drain, `session-faces.ts:309-314` in the server; not read here). 7.63.0 (#3334) sent that completion to the lane the park recorded instead (`ctx.onTaskNotification ?? parkedLane`, :3836-3837 at v7.63.0): the spawning run's lane, which once that run has ended routes by the session id alone, to the id's live lane or its parked store. A session id the server lets its caller choose can be deleted and created again, and the in-process seat could not tell the new row from the old one, so the earlier occupant's background agent's completion, its summary with it, reached the new occupant's conversation: on its live turn boundary, or at its next run's turn-open drain. For the parked-resume completion this is a 7.63.0 regression. The id-only route itself is older: in 7.62.0 the run's lane already parked by id (`routeOrParkNotification(…, ownSession, …)`, `src/core/runner/run-notification-lane.ts` :210 at v7.62.0), and the live lanes, the parked records, the durable box binding and the delegation root anchor's escalation were keyed the same way, so a never-parked background task's late completion or a monitor event took the same road.
|
|
259
|
+
- **Now.** A session address is (session id, occupant). The occupant is the row's `SessionMetadata.incarnation` as the run's acquire read it; the repository mints one per created row, and a row created again under the id gets another. Every seat of the Runner's in-process notification store is held for one address. A live lane is registered under its run's address and offered only frames addressed to it. A parked record, its eviction tombstone and its delivered and durable keys belong to one occupant. The durable box a frame parks into is the one its own occupant's leg bound. The session's current occupant is the one its latest leg in this process acquired (the leg's drain mount admits it). From then on a frame addressed to another occupant of the id is refused before any lane, box or record (the injector answers `refused`), and what the store still keeps for the earlier occupant is discarded at the admission. That covers a dead producer's late completion, the parked-resume completion (the park's recorded lane captured its run's address) and a root-anchor escalation (the tree carries its root's occupant beside the root anchor). Each discarded frame is said once: `delegation.delivery_discarded` (operator; minted by the engine, in one place). Its `detail` is `{ taskId, taskType, sessionId, path, addressed, current }`. `path` is the seat the frame would have reached under the current occupant (`live`, `box` or `drain`); `addressed` / `current` say whether each side carried an occupant (`known` / `unknown`), never the token. The frame's text never rides the notice. A session no leg of which this process admitted (a restart) keeps parking frames under their own address, and the leg that drains it discards what belongs to another occupant. A seat ages out of its bound only while the store keeps no record for its session, so a parked record is always judged against the occupant that parked it, never replaced by whichever frame arrives next. The parked-resume drive still completes into the park's recorded lane, not the mount's relay (C-R1085). The relay still carries only the cross-process shape.
|
|
260
|
+
- **Narrowing (open to veto).** (1) A frame addressed to an earlier occupant is no longer delivered to the session's later occupant. It was delivered to that occupant's model, which is the defect. (2) A revived background agent's tree records no root occupant: a claim-driven revival, the parked-resume drive included, builds its child's root anchor from the durable row, and the row carries none. So a terminal frame such a tree escalates to the delegation root anchor is discarded whenever the root has an occupant on record, said with `addressed: unknown`. It used to reach the root's next run. The copy on the child's own session is kept (KL-3431-a; #3434 records the root occupant on the row). (3) A host that mounts `createRunWorkflowTool` itself and names the root only through `originatingSessionId` (no `rootSessionId` / `rootSessionIncarnation` on its deps, and a ctx that does not name that session) addresses the same unknown root occupant, with the same result (KL-3431-a). (4) A leg whose own occupant read throws (the session's metadata read at prepare) is no admission: it moves no current occupant and is drained nothing, and what the store keeps for the session waits for the next leg that reads its occupant. Its address is nobody's: no live lane is registered for it, and a frame routed to it (its background tasks, its parked lane) is discarded and said. Its children's root-anchor escalations carry an unknown occupant and are discarded and said whenever the session has an occupant on record. They used to be delivered (KL-3431-a).
|
|
261
|
+
- **Rules.** The comparison is the one the delegation owner already reads (`sameOccupant`, `src/core/runner/delegation-owner.ts`: equal tokens, and both absent is one row, the literal reading). Every seat of the store calls it; no seat carries a copy. The address is minted in one place (`sessionAddressOf`). Retired: the session id alone standing for its row on the store's seats. Added: one rule, that a leg which could not read its occupant holds nobody's address: no admission, no drain, no live lane, and what is routed to it is discarded. This is the fail-closed reading of a read fault, so that a fault neither discards what the session's occupant is owed nor delivers it to a leg that cannot say which row it holds.
|
|
262
|
+
- **Claude Code 2.1.316.** Not checked against the corpus. Inferred: a Claude Code process holds one conversation, and a task notification goes to that process's queue, so an id re-created under another owner is not a destination there.
|
|
263
|
+
- **Consumers.** @server: add `delegation.delivery_discarded` to the operator notice whitelist (audience `operator`, minter `engine`; the `detail` shape above), and keep it off the user wire. Its `detail` names the earlier occupant's task id and task type, and the notice throat lifts `detail.sessionId` to the top level, which is the id the new occupant also holds, so a router that sends by session id alone would show those two values to the new occupant's viewers. The session door's owner check does not retire. The engine's store judges only the in-process seat; a completion that crosses processes (another replica, a restart) still reaches your relay and your door, and the engine holds no record of the earlier occupant there. @cli: an operator notice; no user-face text is expected. @client-core: the `EngineNoticeCode` mirror gains one member. @test (black box): delete a session and create it again under the same id as another principal while the earlier occupant's background agent is still running (or parked on an approval and then decided). When it completes, the new occupant's conversation never contains its report, and the operator sink carries one `delegation.delivery_discarded` with `addressed: known, current: known`.
|
|
264
|
+
- **Known limits.** KL-3431-a (a revived tree's root occupant is unknown; a leg whose occupant read threw sends under an unknown occupant). KL-3431-b (a durable box record carried no occupant, so the box drain did not judge it) is closed in this release by #3453 (its section below, ruled C-R1114): a box record names the occupant it is for, and the drain hands it only to that occupant. This section covers the in-process seats and which box a frame parks into; what a box already holds was left as it was when #3431 landed, and #3453 completes it.
|
|
265
|
+
- **Pins.** `test/backlog3431-session-occupant-address.test.ts` — P1 real Runner: deleted and created again by another principal ⇒ the earlier occupant's parked child terminal is discarded at the new occupant's first leg, never in its model, one notice (`drain`); a later frame from the dead producer is refused · P2 the same principal ⇒ still another occupant · P3 control: the same occupant ⇒ delivered at the next leg, no notice · P4 control: the same occupant live ⇒ queued on its boundary · P5 the new occupant live ⇒ refused before any lane, one notice (`live`) · P6 control: the root anchor under the root's own occupant ⇒ delivered · P7 the root's id created again ⇒ discarded at the root address, the child's own session keeps its copy · P8 a tree with no root occupant ⇒ discarded, `addressed: unknown` · P9 a delegated child's ctx carries the spawner's root occupant · P13 the parked-resume drive (#3334), a real host decide on a background child the same caller spawned: the park's recorded lane after the spawner's id was created again ⇒ discarded, the relay untouched · P10 the earlier occupant's task ids never reach the later one through the drop disclosure · P11 a lane of one occupant is never offered another's frame, even with no current occupant on record · P12 one occupant's durable box is never another's park target; a token-less pair is one occupant · P14 a route that asks for no receipt still parks (the root anchor's escalation asks none) · P15 a drain with no admission before it hands out only its own occupant's record · P16 real Runner: a leg whose prepare-time occupant read throws is handed nothing and discards nothing; the next leg gets the session's own frame · P17 a seat that holds a record survives the bound filling up, and a stale arrival is judged against it · P18 an unread address moves no seat and drains nothing · P19 an unread leg is no destination: a token-less occupant's frame never reaches its lane, and a frame routed to it is discarded and said. Re-pinned to the address (string ids → `at(…)`; a root anchor test now opens the root first and passes its occupant): `test/backlog1279-…` (the closed-set count 117 → 118), `backlog1608-…`, `backlog2940-…`, `backlog3025-…`, `backlog7300-fix-2-…`, `backlog744-…`, `backlog969-engine-frame-codec`, `backlog969-main-park-seat`, `backlog988-…`, `defectscan-div-team-storeseams`, `defectscan-mutation-survivors`, `defectscan-notify-budget-surface`, `defectscan-rt-team-b`, `design393-s5-run-seat-lanes`, `injection-ladder-373`, `monitor-pending-notifications`, `prepare-caps-and-workflow`, `prepare-inherited-gate`, `rb375-a2-descendant-terminal-anchor`, `send-message-tool`.
|
|
266
|
+
|
|
267
|
+
### Compaction is switched by two seats — `autoCompact` for the passes the engine starts by itself, `manualCompact` for the passes a caller asks for — on a task, on a `Runner.compactSession` request and on the deployment's `contextSettings` overlay; the single switch `enabled` is retired and refused by name (#3426; ruled C-R1106; behavior change; behavior narrowing — one, below, open to veto; hard-breaking: one, three sentences below, open to veto; closed sets: one new internal pair, `CompactionSeat` (`autoCompact`, `manualCompact` — the seat argument of `compactionEnabled`; module-private, not on the package root; told in the notes of `docs/CLOSED-SETS.md`, not a registry row) — no word added to or removed from any published set; exports: none; members: `TaskSpec.compaction` +`autoCompact` +`manualCompact` −`enabled`, `ContextWindowOverlay` +`autoCompact` +`manualCompact` −`enabled`, `Runner.compactSession` request `compaction` +`manualCompact` −`enabled`; contract sentence: `compaction.two_seats`) (@server @cli @client-core @sdk)
|
|
268
|
+
|
|
269
|
+
- **Before.** One switch gated every pass. `compaction: { enabled: false }` (and its deployment twin `contextSettings[word].enabled: false`) turned off the threshold pass, the prompt-too-long recovery pass, the end-of-task summary *and* every requested pass together — `stream.compact()` answered `"disabled"`, `Runner.compactSession` answered `"disabled"` (measured on `c559a781f`). A host that wanted "no automatic compaction, but `/compact` still works" — the reference's `autoCompactEnabled: false` / `DISABLE_AUTO_COMPACT` — had no way to say it; a request that wrote `autoCompact: false` was read as nothing at all (the member was not one, and the run compacted as usual).
|
|
270
|
+
- **Now.** Two seats, each a boolean, each on when nothing declares it. Which pass reads which seat is the contract sentence `compaction.two_seats` on `compactionEnabled`, the one function every lane asks with the seat of the pass it is about to run:
|
|
271
|
+
- `autoCompact` — the three lanes the engine starts: the turn-boundary pass at the window threshold (with the trim-pressure pass it forces), the recovery pass (a provider's prompt-too-long rejection, the request guard's compaction arm) and the end-of-task summary; also the within-task line of the system prompt, which says whether a mid-task pass can come. The trim-pressure force (a boundary after the request layer had to drop messages) is read under the same admission as the threshold pass (`withinTaskCompaction`: `autoCompact` and `withinTask`), so a requested pass on a run whose automatic passes are off is never upgraded to it — it keeps `trigger: "manual"` and a `preCompact` block holds.
|
|
272
|
+
- `manualCompact` — the passes a caller asks for: `TaskStream.compact`, an extension's `$.session.compact` (from `turn.complete`) and `Runner.compactSession` (whose request takes `manualCompact` only — `autoCompact` there is an unknown member, `compact.invalid_request`).
|
|
273
|
+
- Per seat, the request authors it, the deployment overlay's twin of the same seat fills an unset one, nothing declared is on. Switching one seat off never switches off the other: with `autoCompact: false` a requested pass runs at the next boundary (or out of run) and lands with `trigger: "manual"`; with `manualCompact: false` a requested pass is answered `"disabled"` with its `compaction_outcome` frame (`trigger: "manual"`) and no model call, and the boundary goes on with its own pass.
|
|
274
|
+
- With `autoCompact: false` no recovery pass runs: a request the provider rejects as too long is neither summarized nor retried, and the run ends on the rejection as its terminal failure — the provider's code and sentence (in the pin, `failed` / `invalid_request` / "prompt is too long: …") — the same terminal `enabled: false` produced (measured on `c559a781f`), never a silent retry.
|
|
275
|
+
- The event vocabulary is unchanged: `"disabled"` is still the outcome word and `compaction.disabled` the trace kind; the frame's `trigger` names the seat (a pass the engine starts is not started under `autoCompact: false`, so a `"disabled"` frame is always a requested pass's).
|
|
276
|
+
- **Retired, refused by name.** `enabled`, with no alias and no translation: a task that carries it — `true` and `false` alike, and beside the new seats too — ends at prepare `config.spec_retired_key` (the resume's pre-claim screen refuses it the same way, the door being shared); a `compactSession` request is refused `compact.invalid_request`; a `Runner` construction or `swapDeps` whose overlay carries it throws, the current settings staying in force. Each sentence names the two seats and what each switches. A seat with a value other than a boolean is refused the same way (`config.invalid_argument` on a task), naming the seat; an explicit `undefined` reads as absent.
|
|
277
|
+
- **Hard-breaking — one, three sentences (open to veto).** *What changed:* the single switch `enabled` is retired on three doors — `TaskSpec.compaction.enabled`, `RunnerDeps.contextSettings[word].enabled` and the `compactSession` request's `compaction.enabled` — and refused by name instead of read, and its meaning is split across two seats, `autoCompact` and `manualCompact`. *Who is affected:* a host that writes `enabled` — its runs fail at prepare, its out-of-run compaction requests are refused, its Runner does not construct — and a TypeScript consumer whose literal or type mirror names it; no `enabled` write was found in the `src` of @server (`96a91d82`), @cli (`f973e484`), @client-core (`426331e`) or @sdk (`d5aed66`) — grep of the local checkouts, not compiled against this tree. *Compensation:* drop `enabled: true` (the default); write `autoCompact: false` for "no automatic compaction"; where `enabled: false` also meant "and refuse `/compact`", write `manualCompact: false` beside it.
|
|
278
|
+
- **Narrowing / widening.** Widening — one (open to veto): `autoCompact: false` with `manualCompact` unset now lets a requested pass run where `enabled: false` refused it; a host gets that only by writing the new seat. Narrowing — one (open to veto): under `withinTask: false` a requested pass at a boundary where trim pressure was armed and the trim-force backoff not engaged ran as the trim-pressure force — `trigger: "forced"` on its `preCompact` call and frames, a `preCompact` block ignored, the pass went on to its summary (unless it found nothing to cut or failed); it now runs as the requested pass it is — `trigger: "manual"`, a block holds (the pass answers `"blocked"`, no summary) — because the force is the automatic lane's and `withinTask: false` turns those passes off (read on base `c559a781f` `run-turn-boundary.ts`: `trimPressure` was the armed bit and the backoff only; not run there).
|
|
279
|
+
- **Consumers.** @server (S-3131 / S-1073): the prompt-too-long recovery arm hangs on `autoCompact` — "only auto off" switches recovery off too, and an overflowing request ends the run with the provider's rejection as its terminal failure, loudly, as `enabled: false` did; a settings surface that offers "auto-compact off" maps to `autoCompact: false`, and one that offers "compaction off" to both seats `false`. @cli: the shell's `autoCompactEnabled` setting (taken out because the engine had no seat for it) now has one, `autoCompact`; `DISABLE_COMPACT` maps to both seats `false`, `DISABLE_AUTO_COMPACT` to `autoCompact: false`. @client-core @sdk: type mirrors of `TaskSpec.compaction` / `ContextWindowOverlay` drop `enabled` and gain the two members; a renderer of `compaction_outcome: "disabled"` reads it as "requested pass refused by the manual seat".
|
|
280
|
+
- **Rules.** Retired: the one-switch reading and its two copies (the request's `enabled`, the overlay's `enabled`). The same `compactionEnabled` reads both seats (one function, a seat argument), and one judgment (`compactionSeatsDefect`) refuses the retired name and a non-boolean seat on all three doors, each door minting its own code. The boundary's in-pass `"disabled"` arms are gone: the boundary answers a parked request `"disabled"` before its pass when the manual seat is off, so a pass it runs is never a disabled one. The engine's per-pass `CompactionSettings.enabled` stays: it is the gate of one pass, which each lane now fills from the seat of that pass — not a third switch a host writes.
|
|
281
|
+
- **Claude Code 2.1.316.** `cli316.js:268490` (`vp()` gates the automatic passes on `autoCompactEnabled` and the two environment variables), `:271413` (`R7n`, the reactive prompt-too-long compaction, is gated on `vp()` — the recovery lane is the auto seat's), `:272006` (`spr`, the threshold check, returns false unless `vp()`), `:269593` (`/compact` is enabled iff `DISABLE_COMPACT` is unset, and `$.session.compact` is refused with "compaction is switched off in this session (DISABLE_COMPACT), for /compact and plugins alike" — the manual passes are not gated on `autoCompactEnabled`), `:261651` (the worker's `autocompact_state` says the same: "DISABLE_COMPACT also disables manual /compact"). Divergence D-3426-a: the reference switches its manual `/compact` off only together with its automatic passes, by one environment variable; here the manual seat is its own, on a task and on the deployment, independent of the automatic one.
|
|
282
|
+
- **Pins.** `test/backlog3426-compaction-two-seats.test.ts` — real Runner, scripted brain: T1–T2 the threshold pass under each seat · T3 prompt-too-long recovery under each seat, the rejection ending the run loudly under `autoCompact: false` · T4 the end-of-task summary under each seat · T5–T7 `stream.compact()` under each seat, a disabled request beside a landing threshold pass · T8 `compactSession` · T9 `$.session.compact` from `turn.complete` · T10 both off · T11–T13 the deployment default and the request's override, per seat · T14–T17 the retired name and a non-boolean seat on the task, `compactSession` and overlay doors · T18 a requested pass at a trim-pressure boundary under a blocking `preCompact` hook: `autoCompact: false` and `withinTask: false` keep it `"manual"` and blocked, the default seats run it `"forced"`. Mutations: `.gate-logs/criteria-3426-mutations.md` (receipt). Every test that wrote `enabled` is re-pinned to the seat it meant (receipt lists them).
|
|
283
|
+
|
|
284
|
+
### `DeploymentSessionMemoryStatus` answers the session's write home at the top level — `writeHome?`, the `writeHome` of the one store whose row names the newest home, chosen and never merged (#3427; ruled C-R1107; wire +1 additive; behavior change: none; hard-breaking: none; closed sets: none; exports: +1 method `MemoryEngine.sessionMemoryStatusRead` (on the engine class) and one type-level reading `SessionWriteHomeReading` (module-level, not on the package root)) (@server @cli @client-core @test)
|
|
285
|
+
|
|
286
|
+
- **Before.** `writeHome` is a fact of one store (the directory of the session's write home IN that store), so a deployment of two stores (project plane, personal plane) answered it per store only, in `planes[].status.writeHome`, and the top level carried the five folded keys. A host that wanted "where does this session write" chose a store itself — a second reading of which store holds the session's write, outside the engine.
|
|
287
|
+
- **Now.** The top level carries `writeHome?: string` beside the folded keys: the `writeHome` of one `planes[]` row, handed back unchanged. Which row: the law one store applies to its own two sources (the account row's (re-)open and the newest committed contribution, the newer wins), taken across the stores — the row naming the newest home. Absent when no store names one (a session that never opened an account and never committed); absent while any store's reading could not be taken (a `fault` row because the store could not be opened, a source of it faulted, or its scope registry cannot derive a home — that store may hold the newer write, and another store's word would be a stand-in); absent when two stores name theirs at the same instant (there is no newer one; one store's own tie goes to its account row). A deployment of one store answers its row's key. `planes[]` is byte-for-byte what it was. To read the instant of the winning source without a second pass, the engine gains `sessionMemoryStatusRead(sessionId)` — the status (exactly what `sessionMemoryStatus` answers, which now calls it) beside one reading, `named` (the home and its instant) / `none` / `unreadable`; the choice is the one function `chooseSessionWriteHome` and its ranking is the function the store's own two sources are ranked by.
|
|
288
|
+
- **Known limit (KL-1222-b, across stores).** A store holds no account row for the session and its newest contribution's note cannot be read — deleted, or a read that failed (the file backend skips an unreadable note and cannot tell the two apart) — reads `none`, so the key names the other store's older home where a store alone would have answered absent; the fix is #1261 (the scope recorded on the contribution row), as for the single-store reading. Pinned (D9).
|
|
289
|
+
- **Rules.** One choice where the host made its own: the deployment's answer is the store's own value, picked by the store's own law. Added: one function (the choice), one engine face (the read), one contract sentence (`memory.deployment_status.write_home`); the store-bound key's note now reads "never merged across stores; the session-level key is one store's own value". Retired: none.
|
|
290
|
+
- **Affected.** Nothing a consumer read changes: no existing key moves, and the new key is optional (absent = nothing to say, not a version signal). A host that chose a store from `planes[]` itself may read the key instead.
|
|
291
|
+
- **Consumers.** @server: `GET /v1/sessions/:id/memory-status` projects the key as it does the folded ones and chooses nothing (zero new code; the three pins that read `planes[].writeHome` may read the top level). @cli: L-855 reads the top-level key. @client-core: nothing new. @test (black box): a session that wrote under a project scope and then a personal scope answers the newer one; faulting one store's lineage makes the key absent while the other row still answers its own home.
|
|
292
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no two-store memory deployment or per-session memory status.
|
|
293
|
+
- **Pins.** `test/backlog3427-deployment-write-home.test.ts` — U1 the choice over readings (none / one / several / tie / unreadable) · U2 one store's tie goes to its account, two stores' tie names nobody · E1 / E2 the engine's read face, one pass · D1–D8 the deployment over real stores (one store, the newer of two, a tie, a faulted store either side, an unopenable personal store, a session that wrote nowhere, the key is the row's value, a one-store deployment unchanged). Mutations (receipt).
|
|
294
|
+
|
|
295
|
+
### The member-shape table reads an empty checkpoint id as damaged — `checkpointId` is absent or a non-empty string, where `""` passed as a string and each reader took it its own way (#3429; behavior change; behavior narrowing — one, open to veto; hard-breaking: none; closed sets: none; exports: none; wire: no key added) (@server @client-core @cli @test)
|
|
296
|
+
|
|
297
|
+
- **Before.** `ROW_MEMBER_SHAPES` (#3411) read `checkpointId` as absent or a string, so a row carrying `checkpointId: ""` was `ok` on the judge and every listing face, and the member's readers each did something different with the empty string: the summary echoed `checkpointId: ""`, the disclosure sentences named the row `checkpoint ""`, and the background-agent card read (a raw row, never judged) dropped it as absent. Measured on `c559a781f`: the judge answered `ok`, the summary carried `checkpointId: ""`.
|
|
298
|
+
- **Now.** The entry reads absent or a non-empty string ("its checkpoint id is not a non-empty string"): for a row with `checkpointId: ""` the judge, `summarizeCheckpoint`, `listByScope`, `listOverdue` and `listBySession` answer `damaged` / `unreadable` in those words and the resume refuses it before the claim (`checkpoint.invalid_outcome` / `requirements_damaged`). The one predicate is the table's; no reader gets a guard of its own, and the background-agent card read's own existing guard (a raw row that never passes the judge) is unchanged. The empty string is the only value the entry names; a one-character id reads.
|
|
299
|
+
- **Narrowing — one (open to veto).** A stored row whose `checkpointId` is `""` is refused at the resume and lists `damaged`; it resumed before. No release of this engine writes one (`mintCheckpointId()` is `cp_<uuid>`; a legacy row has no id, which is absent) and the server's trust boundary already reads an empty id as no id.
|
|
300
|
+
- **Affected.** A store holding, or a deployment writing, a row with an empty-string `checkpointId` (none known in-tree or in the server; only a hand-edited or damaged row). A row with a minted id or none reads and resumes exactly as before.
|
|
301
|
+
- **Rules.** Added: none — the entry's predicate is stricter by one value. Retired: none.
|
|
302
|
+
- **Consumers.** @server: a store that rehydrates an absent id as `""` must hand it back absent (read, not run — no in-tree store does). @client-core @cli: nothing new to render — such a row is a `damaged` row. @test (black box): a row with `checkpointId: ""` lists `damaged`.
|
|
303
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no durable park row store or listing.
|
|
304
|
+
- **Pins.** `test/backlog3429-checkpoint-id-non-empty.test.ts` — Z1 the judge, the summary and every listing face over an empty id, in the table's words · Z2 absent, a minted id and a one-character id still read · Z3 the summary echoes no empty id · Z4 no writer mints one · Z5 the File store hands the same verdict · Z6 control: the card read's own answer; `test/backlog3411-row-shape-ledger-id.test.ts` — the empty id joins the damaged forms (A1–A5, P1) and K3 no longer reads it. Mutations (receipt).
|
|
305
|
+
|
|
306
|
+
### A failure of the approval-record store inside a redemption is a refusal — `redeemRuleTicket` and `redeemRuleBatch` answer a throwing `get` as `store_read` / `no` and a throwing `cas` or `nextDot` as `store_write` / `unknown`, where they let the rejection out (#3428; behavior change; behavior narrowing — one, open to veto; hard-breaking: none; closed sets: none (two definitions widened by a clause); exports: none; wire: no key added) (@server @cli @test)
|
|
307
|
+
|
|
308
|
+
- **Before.** The redemption leg answered a permission-rule store that could not be resolved as `store_unavailable` and one whose read failed as `store_read`, but a failure of the approval-record store it reads and compare-and-sets the record in (`get`, `cas`) and of the writer's `nextDot()` escaped as a bare rejection from `redeemRuleTicket` and `redeemRuleBatch` (cx-small-b X5). A rejection midway through a batch walk lost the member table the walk promises complete, and the members already landed had no row.
|
|
309
|
+
- **Now.** One reading, the closed-set table's own, one mint (`refusal()`), no new word: a `get` that throws is `store_read` / `no` (a read that failed before anything was written); the `cas` that records the redemption's dot, and the writer's `nextDot`, that throw are `store_write` / `unknown` (a backend can commit and lose its acknowledgement — reconcile with `list()`, or retry the ticket: a replay reuses a recorded dot). The batch's first record read answers the refused arm (no table, as for its other record-level refusals); a member's failure answers that member's row and the walk goes on, so the table stays complete. The sentence names the step and carries the store's own message. The `store_read` / `store_write` definitions beside `RULE_REFUSAL_CODES` say they cover the approval-record store's failures as well.
|
|
310
|
+
- **Narrowing — one (open to veto).** `redeemRuleTicket` and `redeemRuleBatch` resolve with a refused result where they rejected, for a failure of the approval-record store or of the writer's dot allocation. A host that caught the rejection reads the result now.
|
|
311
|
+
- **Rules.** Retired: the rejection escape of the redemption leg's store steps. Added: none (one helper, `storeStep`, routes the steps through the one mint). The confirm, prepare and card-edit entries keep their rejection on that store: their closed sets name no storage word, so naming one is a ruling (#3430).
|
|
312
|
+
- **Affected.** @server: the single-ticket path (`redeemRuleTicket`) of a rules-consent door whose approval-record store fails answers `redeem-refused` with `store_read` (or `store_write`) where it answered its route's error arm (a 5xx) — a behavior narrowing, open to veto; the batch path (`redeemRuleBatch`) is unchanged for the server: a top-level refusal and a rejection are both put back for a retry there, and no code is read.
|
|
313
|
+
- **Consumers.** @server @cli: map `store_read` / `store_write` as for a permission-rule store failure (retry / reconcile by `committed`). @test (black box): an approval-record store whose read throws ⇒ the redemption is refused `store_read` / `no`, nothing landed, a retry redeems.
|
|
314
|
+
- **Claude Code 2.1.316.** No anchor: Claude Code keeps no persisted permission-rule redemption protocol.
|
|
315
|
+
- **Pins.** `test/backlog3428-approvals-store-failure.test.ts` — R1–R4 the single-ticket door over a throwing read, a throwing compare-and-set, a lost compare-and-set then a throwing re-read, a throwing dot allocation · R5–R7 the batch over a first read, a member's read and a member's compare-and-set (the table complete) · R8 `unknown` only with `store_write` · R9 controls · R10 the two definitions. Mutations (receipt).
|
|
316
|
+
|
|
317
|
+
### Retired (C-R1075 ②): a stored batch member with no `kind` is no longer read — `readRuleOffers` drops its batch as `malformed`, and the reading's `kindlessForm` mark is gone with it (#2164, retirement line RL-2164-kindless-batch-member; behavior change; behavior narrowing — one, open to veto; hard-breaking: one, type level, three sentences below, open to veto; closed sets: none; exports: none by name; members: `RuleOfferRead` −`kindlessForm`) (@server @test)
|
|
318
|
+
|
|
319
|
+
- **Before.** `readRuleOffers` kept a second reading for one stored form: a batch member with no `kind` and the four text members of a command member (rows written before batch members carried a `kind`) read as a `command` member, and the offer's reading was marked `kindlessForm: true` so a backend holding parked rows could count how many still depended on it. The retirement line waited on that count.
|
|
320
|
+
- **Now.** One reading. A batch member's `kind` is a closed-set word read like the offer's own: absent, `undefined`, or not a string is `malformed`, so the whole batch is dropped with its index (never shortened), siblings stand, and the drop is in `dropped` like any other. The mark has nothing left to mark and is removed from `RuleOfferRead`. The consumer census the line waited on is in ([12603], [12800]): the server mints neither form any more (its own writes carry `kind`; the parked-row blob is the engine's, which carries `kind`), its SQL stores have counted kind-less rows at every start since server 7.141.0 (`approval_batch_kindless_rows`; the local store has no such count), and dgx has no reader.
|
|
321
|
+
- **Narrowing / widening.** Narrowing — one (open to veto): a stored offer list holding a kind-less batch member no longer offers that batch; a card built from it shows the other offers, and the backend's dropped count (`problem: "malformed"`) is what discloses it. The ask itself, and every other offer of the list, is unchanged. A kind-less member whose `match` was outside the closed set was `unknown_word` and is now `malformed` (its other members are not read).
|
|
322
|
+
- **Hard-breaking — one, type level, three sentences (open to veto).** *What changed:* `RuleOfferRead` loses its optional `kindlessForm` member, and no reading carries it. *Who is affected:* @server — `countKindlessBatchOffers` reads `o.kindlessForm` (`src/approval-card.ts:210`) for the startup census `runApprovalBatchKindlessCensus` (`src/approval-batch-census.ts`, S-2684), so it no longer compiles against this release (read in its local checkout at origin/main `96a91d82`, not compiled against this tree); no other repository reads the member (grep of the cli / client-core / sdk / web-client / desktop origin/main and the dgx checkouts, zero matches). *Compensation:* retire the census with the line it measured — a kind-less member is now counted where every unreadable offer already is, the `dropped` list with `problem: "malformed"` (`server.rule-offers.offer-dropped`).
|
|
323
|
+
- **Consumers.** Affected: @server (above). @test — black box: a parked row whose `pendingAction.ruleOffers` holds a batch with a kind-less member reads back with that batch in `dropped` as `malformed` and no `kindlessForm` anywhere. Not affected: @cli @client-core (they read the wire card with their own readers, which never accepted a kind-less member).
|
|
324
|
+
- **Rules.** Retired: the kind-less member reading (`readKindlessBatchMember`), the mark that counted it, and the retirement row. Added: none.
|
|
325
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code persists no rule-offer list; nothing to register.
|
|
326
|
+
- **Pins.** `test/backlog2164-kindless-member-retired.test.ts` — K1 the kind-less form at the head, middle and tail of a batch and alone drops its batch as `malformed`, siblings keep their indices · K2 `kind` present but `undefined` / `null` / a number / an object / a list reads the same way; a string outside the set stays `unknown_word` · K3 control: the same four members with `kind: "command"` read · K4 no reading carries a key beyond `index`, `offer`, `uncoveredDetailDropped` · K5 no src reader or mark, no retirement row, the integration guide row says `malformed`. `test/backlog1468-p1-checkpoint-facts.test.ts` R5 re-pinned to the retired form (`p1-offers-kindless-mark` → `p1-offers-kindless-retired`). Mutations: `.gate-logs/criteria-rl-7640-mutations.md` (receipt).
|
|
327
|
+
|
|
328
|
+
### Retired (C-R1075 ②): the pre-binding committed-rev ledger form — a file memory store reads only the enveloped `revs.json`; a bare id → rev map, and a transaction journal whose ledger snapshot is one, are refused with `ControlPlaneCorruptError`, and `readMemoryLedgerForm` answers three words (#1654, retirement line RL-1654-ledger-v1; behavior change; behavior narrowing — three, open to veto; hard-breaking: two, three sentences each below, open to veto; closed sets: `readMemoryLedgerForm`'s answer −`"v1"`; exports: none by name) (@server @dgx @test)
|
|
329
|
+
|
|
330
|
+
- **Before.** The file backend kept a second reading of its own ledger file: a `revs.json` that was the bare id → rev map (the form before rows carried a scope and slug, upgraded since 5.33.0) was served in a compatibility window and upgraded in place at the next uncontended entry — a census rebind under the txn lock, a one-off `revs.v1.json.bak` beside it, and one `migration` summary row in `transfers.jsonl`; a journal carrying the v1 snapshot (`ledger`) was restored and announced as an old writer. `readMemoryLedgerForm` answered four words, `"v1"` for the bare map.
|
|
331
|
+
- **Now.** One reading. The ledger is the `{ v: 2, rows }` envelope or it is refused: a bare map (any JSON object with no `v`, the empty object included) and a journal whose snapshot is the `ledger` key are refused with `ControlPlaneCorruptError` at every seat that reads the ledger as the store's account, the message naming the form and the way out ("open the store once with an engine at or below 7.63.0, whose locked migration upgrades it to the v2 envelope"); nothing is upgraded, backed up or written. Two seats read the ledger otherwise and keep their own posture. The lock-free retrieval view (`retrievalView`: `listHeaders`, `getByIds`, `search`) serves the entry files on disk and reads no account; only its resurrection guard reads the ledger, when delete evidence exists, and it takes the refusal as it takes every unreadable ledger: ids carrying delete evidence are withheld, the other entries serve, and the host is told once (the operator notice quotes the refusal). A journal that an engine ≤ 7.63.0 committed for its own upgrade (its snapshot the v2 `ledger2`) over a still-bare `revs.json` is a committed transaction: recovery rolls it forward like any other, installing the v2 snapshot and appending its evidence, and the bare map is replaced without being read. The unbound rows such a migration left still converge from the census, each with its `migration-bind` row (design/186 §3.4); the `migration` summary row is no longer minted (an engine ≤ 7.63.0 appended it, and the evidence reader still reads it). `readMemoryLedgerForm` answers `"absent"`, `"v2"` or `"malformed"`, the bare map `"malformed"` — the answer the contract paragraph already promised for the day the form retired. The census the line waited on is in ([12603], [12800]): the server mints neither form and never writes `revs.json` itself, and dgx has no reader (sema-home runs with the memory engine off).
|
|
332
|
+
- **Narrowing — three (open to veto; @server @dgx).** (1) A file store whose `revs.json` is still the bare map — one no engine since 5.33.0 has opened — is no longer served or upgraded: every read and write seat that reads the account refuses it with `ControlPlaneCorruptError` where the reads served it and the first uncontended entry upgraded it (the lock-free retrieval view above excepted). A journal with a v1 snapshot is kept and refused instead of replayed with a warning. (2) Over such a store the governance slice `governanceExport` throws `ControlPlaneCorruptError` where it answered `{ complete: false }` with the reason "the committed-rev ledger is still schema v1 (migrate first)": a caller that branched on `complete` meets a throw. (3) The custody read `custodyOf` throws `ControlPlaneCorruptError` for an id no evidence row names — that branch reads the ledger for its evidence-loss check — where it answered the empty chain without judging a v1 ledger; for an id the evidence log names it reads no ledger and answers from the log, as before, whatever the ledger's form. The faces that already refused such a store refuse it with the one class now: the export composite `exportSnapshotOf` throws `ControlPlaneCorruptError` where it threw the coded `memory.export_incomplete` refusal, and the two audit reads `committedSnapshotOf` / `committedSnapshotsOfScopes` throw it where they threw a plain `Error` ("still schema v1 … migrate first").
|
|
333
|
+
- **Hard-breaking — two, three sentences each (open to veto).** (1) *What changed:* a file memory store holding the pre-binding ledger (or a crashed pre-v2 writer's journal) does not open on this release. *Who is affected:* a deployment whose file store no engine since 5.33.0 has opened — the server's file memory engine on a local data root, a dgx home deployment that runs a file memory store, a cli user's store left untouched since before 5.33.0. *Compensation:* open the store once with an engine at or below 7.63.0 (its locked migration upgrades it to the envelope) and then move to this release; `readMemoryLedgerForm(controlDir)` answers `"malformed"` for such a store, so a census can find it first (`docs/INTEGRATION-CORE.md`, "Upgrading a file store that still holds the pre-binding ledger"). (2) *What changed:* `readMemoryLedgerForm`'s answer type narrows from four words to three (`"v1"` removed). *Who is affected:* a caller that switches over the answer (zero callers found in the server / cli / client-core / sdk / dgx checkouts). *Compensation:* drop the `"v1"` arm; a bare map is `"malformed"`.
|
|
334
|
+
- **Consumers.** @server — the file memory engine opens a pre-5.33.0 store only after the upgrade step above (the server's SQL stores do not hold this file); over such a store the bundle export route, which maps `memory.export_incomplete` to 409 (`src/http/routes/memory-bundle.ts`, `sentCoreCode`), now receives an uncoded `ControlPlaneCorruptError` and answers it as an unclassified error (read at origin/main `96a91d82`, not run). @dgx — none today (memory engine off); a future file store is created in the envelope. @test — black box: a `revs.json` written as the bare map ⇒ the store's reads reject with `ControlPlaneCorruptError` naming "pre-binding v1 form" and 7.63.0, the file byte-identical, no `revs.v1.json.bak`; `readMemoryLedgerForm` ⇒ `"malformed"`. Not affected: @cli @client-core (no reader of the file or the function).
|
|
335
|
+
- **Rules.** Retired: the v1 parse arm (the second reading of `revs.json`), the v1 journal restore arm, the v1 writer and its one-off backup, the compatibility-window announcement, the old-writer journal notice, the v1 branches of the export composite, the governance slice, the custody read and the audit faces' ledger read, and the retirement row. Kept: the unbound-row convergence (its own rows, one reading). Added: none.
|
|
336
|
+
- **Claude Code 2.1.316.** No anchor (inferred): Claude Code's memory files carry no committed-rev ledger.
|
|
337
|
+
- **Pins.** `test/backlog1654-ledger-v1-retired.test.ts` — L1 a bare-map ledger refused at five read seats with the form and the way out, bytes kept, no backup, no evidence; the form reader says `"malformed"` · L1b the export composite (not the coded `export_incomplete` refusal), the governance slice (no `complete: false`), the per-scope snapshot and the custody read for an id no evidence row names refuse with the same class and message; the custody read for an id the log names answers from the log · L1c the lock-free retrieval view serves the disk entries over a bare map; with delete evidence its guard withholds the re-added id, the bystander serves, one host notice names the form · L2b an older engine's committed v2 journal over the bare map rolls forward (v2 snapshot installed, its `migration` evidence row appended, the store serves) · L2 a v1 journal refused by recovery, journal and ledger untouched · L3 controls (a v2 envelope reads at the same seats; an unbound v2 row converges with one `migration-bind` row) · L4 no row, no v1 writer or backup name in the tree, the contract paragraph answers three words. Re-pinned to the retired form: `memory-ledger-v2` (§3 → unbound-row convergence; the #251 notice → the refusal), `backlog3310-memory-ledger-form` (F / J / R), `backlog3329-ledger-form-unreadable` (C: the closed outcomes are three words), `memory-txn-lock` (the convergence's swap fence), `design178-v2a-provenance` (the audit faces' refusal; the `__proto__`-keyed journal cell now over the `ledger2` snapshot, the v1 one refused), and three journal fixtures (`memory-engine`, `memory-engine-s20`, `hardening-memory-engine`) moved to the `ledger2` snapshot. Mutations: `.gate-logs/criteria-rl-1654-mutations.md` (receipt).
|
|
338
|
+
|
|
339
|
+
### A session's box is drained for one occupant — every record names the occupant it is for, the drain hands it only to that occupant, and a record for an earlier occupant of the id is discarded and accounted for, `delegation.delivery_discarded` with `path: "box"` (#3453, with #3454; ruled C-R1114; behavior change; behavior narrowing — two, the first and the fourth hard-breaking items below, open to veto; hard-breaking: four, three sentences each below, open to veto; closed sets: none; exports: none by name; members: `MailboxPeerMeta` +`occupant?` +`fromOccupant?`, `PeerSessionRecord` +`occupant` (required, `string | null`), `PeerChannelSelf` +`occupant` (required, `string | null`), the options of `peerHeldQueueFor` and `peerIdleMachineFor` +`occupant?`, the second parameter of `routePeerDeliveryReceipt`, `routePeerDroppedReceipt` and `routePeerIdleNotice` is the addressee `{ sessionId, occupant }` where it was the session id; contract sentence +1 `mailbox.session_box_outlives_its_occupant`; wire: a box record's `peerMeta` +2 optional keys, a directory row +1 required key, the socket listener's registration row +1 key) (@server @client-core @cli @test)
|
|
340
|
+
|
|
341
|
+
- **Rule.** Every delivery seat of a session holds things by one address, (session id, occupant). Each durable mailbox record states which occupant it is for. The drain hands a record only to the occupant `sameOccupant` judges the same. Any other record is discarded, accounted for, and announced as `delegation.delivery_discarded`.
|
|
342
|
+
- **Before.** In 7.63.0 a durable box record carried no occupant: `MailboxPeerMeta` named its sender (`fromSession`, `fromRoot`, `senderKey`, `fromScope`, `gateReceiptId`, `src/core/mailbox-store.ts` :234 at v7.63.0) and nothing about its recipient, and the drain judged no recipient. #3431, earlier in this release, holds the in-process seats by address and left the box as it was (KL-3431-b). A session deleted and created again under the same id drained, into the later occupant's model and with no notice, whatever the earlier occupant's children (`agentMessage`, parked into the box whether or not `sessionBoxEngineFrames` is set), its engine frames, its peers' letters and receipts and its idle subscriptions had left there. The server's session delete drops the box, which left the window between the delete and the later occupant's first leg; a host that embeds core and has no box-clearing hook leaked the stock outright. The same-tree skip of the parity hold (`fromRoot` equal to the draining session, #969) compared the id alone, so a teammate's words for the earlier occupant also skipped the hold under the later one.
|
|
343
|
+
- **Now.** All seven writers of a session box stamp the recipient's occupant (`peerMeta.occupant`): the park seat's peer words and engine frames, a cross-session `SendMessage` letter and `notify_when_idle` subscription (from the recipient's directory row), the delivery and dropped receipts and the idle notices (from the letter's or the subscription's `fromOccupant`), and the socket listener (from its `PeerChannelSelf`). A writer that wants an answer stamps its own (`peerMeta.fromOccupant`). One validator (`readMailboxPeerMeta`) reads both keys, a non-empty string each, a bad value refused `mailbox.invalid_peer_meta`. The drain judges every claimed snapshot by address before anything else is decided on it (`adoptAddressedOccupant`, beside the final decisions, on the session lane only; `src/agents/peer-session-drain.ts`). A record whose occupant `sameOccupant` judges the leg's own is the leg's. Any other record is discarded only after one `SessionStore.headOf` read per claim confirmed that the leg's session still holds the occupant the leg acquired: it is acked out of the box, told once on `delegation.delivery_discarded` (`detail.path: "box"`, `addressed` / `current` say `known` or `unknown`, never the token; no body), and a peer's letter (a `peer_message` with no `fromRoot`) answers its sender's occupant with a `refused` receipt: "that session was deleted and created again before the message was read" when the record named an occupant, "the message did not say which session of that id it was for" when it named none. A receipt or an idle notice for another occupant is discarded the same way and answered with nothing. A leg that cannot confirm (it is stale — its session's row now holds another occupant —, the row is gone, or the read failed, the last one reported on `onError` as `peer-box-occupant`) leaves the record exactly as it is, for the session's current occupant. The process-level held queue and idle machine are seated by address (`peerHeldQueueFor` / `peerIdleMachineFor` take `occupant`; a seat of another occupant of the id is crashed and replaced), so a letter held for the earlier occupant is taken off at the later occupant's first claim and never released to it, and the earlier occupant's idle subscriber is never told the later occupant's idle. A seat is replaced only where a leg is admitted as the session's occupant (its drain mount, the point #3431 reads the session's current occupant at); a leg still running after its session was deleted and created again never takes the seat back from the leg admitted after it — its `notify_when_idle` is refused (`peer_send.other`, "this session was deleted and created again after this run started …") and the admitted occupant's machine keeps its asks. #3454: the same-tree skip now sees only records the address judged the leg's own (the judgment runs before the per-record loop), so the skip compares two trees of one occupant.
|
|
344
|
+
- **Hard-breaking — four, three sentences each (open to veto).**
|
|
345
|
+
- (1) *What changed:* a record in a session box that is not for the draining occupant is no longer delivered; it is discarded, acked out and accounted for — and that includes every record a writer of 7.63.0 or earlier parked, which names no occupant, whenever the draining session's row holds one (the bundled stores mint one per created row). *Who is affected:* a deployment that mounts the session-box lane (a `crossProcessSafe` mailbox and a grammatical session id; every server `DB_BACKEND` deployment): the first drain after the upgrade drops what the older engine parked and had not delivered — unread cross-session letters, a background child's parked words — with one operator notice each and a `refused` receipt to each letter's sender. *Compensation:* let the old workers drain their boxes before the upgrade (INTEGRATION-CORE §5.5, "A session's box is drained for one occupant"); the notice code is the one #3431 adds in this release, whitelisted once for both (C-R1109).
|
|
346
|
+
- (2) *What changed:* a record written by this release carries two keys an older engine's validator refuses (`carries an unknown key`, `src/core/mailbox-store.ts` :276 at v7.63.0). *Who is affected:* an engine of 7.63.0 or earlier that shares one mailbox with an upgraded one during a rolling upgrade: its claim of a box holding such a record fails (the server reports it as `mailbox_message_column_corrupt`; reported by the server, not run here), and the records stay in the box. *Compensation:* finish the rollout; nothing is lost, the upgraded engines drain the box, and no schema changes (the keys ride the existing `peerMeta` column). @server: one MIGRATION sentence for multi-replica deployments — replicas of mixed releases over one mailbox fail each other's claims of a box until every replica runs this release.
|
|
347
|
+
- (3) *What changed:* the host's side of the address is required — `PeerSessionRecord.occupant` and `PeerChannelSelf.occupant` are `string | null` (the session row's `SessionMetadata.incarnation`, or `null` for a row the store mints no occupant for), and the three root-exported notice routes (`routePeerDeliveryReceipt`, `routePeerDroppedReceipt`, `routePeerIdleNotice`) take their addressee as `{ sessionId, occupant }` (`occupant` the occupant of the record the notice answers, `undefined` when that record named none) where they took the session id. *Who is affected:* a host that writes directory rows (a row without the key is refused `field_invalid: occupant` by the engine's row reader and faults the whole listing), calls `PeerChannel.listen` (a value that is neither a non-empty string nor `null` throws a `TypeError` at `listen`) or routes a notice itself (a string addressee no longer compiles); TypeScript hosts see all three at compile time — the server's directory projects its rows from `listSessions` (`src/peer-directory.ts`, design coordinate, not compiled here), and no call of the three routes was found in the `src` of @server, @cli, @client-core or @sdk (grep of `origin/main`). *Compensation:* project the session row's occupant, the one the session's legs acquire, in the same release that takes this core (a directory that projects another column makes every letter to that session a letter for another occupant, discarded on arrival), and pass a route the record's `fromOccupant` beside its `fromSession`.
|
|
348
|
+
- (4) *What changed:* the session-box lane mounts only over a session store that reads a row by id (`SessionStore.headOf`) beside a `crossProcessSafe` mailbox — one judgment, `sessionBoxMountVerdict`, read by the drain mount, the peer-lane mount and the send face. *Who is affected:* a third-party deployment whose session store has no `headOf`: no session box is drained or appended to, a cross-session send is refused with the verdict's reason, and `config.peer_lane_unmounted` names the missing read where a directory is wired (the bundled stores have the read; the server reports its stores have it). *Compensation:* implement `headOf` (the `SessionStore` contract; `sessionStoreContract` carries its cases).
|
|
349
|
+
- **Rules.** Readings: two → one (the box held "for the session id" while every in-process seat held "for the address"; now every seat and every record hold for the address). Predicates: +0 (`sameOccupant`, `src/core/runner/delegation-owner.ts`, the one the delegation owner and the in-process seats read; absent on both sides is one occupant, absent on one side is another). Mount conditions: +1 (the by-id read). Contract sentence: +1 — deleting a session does not delete its box, and clearing it on delete is a retention obligation only, since what stays behind is never handed to another occupant (`MailboxStore.drop`). No verb added: the engine still ships no "delete the session's box" hook. Retired: the id alone standing for the recipient of a box record, and the same-tree skip's id-only comparison.
|
|
350
|
+
- **Claude Code 2.1.316.** Divergence D-3435-a (a superset, open to veto): the reference has no durable session box that outlives its session (a session id is usable only while no transcript file stands under it and `--session-id` refuses an id in use, a teammate's inbox is read once and deleted, a cross-session message rides a socket) — coordinates from the design, `cli316.js` :269489 / :280671 / :268241 / :268024, not re-read here. Sema keeps the durable box (design/385) and a session id its caller chooses and may reuse, so a record says which occupant it is for.
|
|
351
|
+
- **Consumers.** @server: project `occupant` on every directory row from the session's `session_meta.incarnation` and give a listener its session's occupant; add the MIGRATION sentence of (2); the `delegation.delivery_discarded` whitelist entry #3431 asks for also carries `path: "box"` from this seat; your stores' `headOf` is the read the mount requires. @client-core: the `PeerSessionRecord` / `PeerChannelSelf` / `MailboxPeerMeta` mirrors gain the members above; the token is an addressing fact on rows and frames, never rendered (KL-3453-a). @cli: no user-face text; `ListAgents` renders no occupant. @test (black box): with a cross-session letter unread in session X's box, delete X and create it again under the same id; X's next run never shows the letter, the operator sink carries one `delegation.delivery_discarded` with `path: "box"`, `addressed: known`, `current: known`, and the sender's next run reads a `refused` receipt that says the session was deleted and created again. Control: the same without the delete delivers the letter and announces nothing.
|
|
352
|
+
- **Known limits.** KL-3431-b is closed. KL-3453-a (the occupant token is an addressing fact visible to same-scope peers and on frame provenance, not a secret and not a credential). KL-3453-b (a host that calls `peerHeldQueueFor` / `peerIdleMachineFor` without `occupant` over a token-minting store replaces the live leg's seat). KL-3453-c (the review face reads the held seat by id, so between the delete and the later occupant's first leg it still lists the earlier occupant's cards; a decision on one reaches no one).
|
|
353
|
+
- **Pins.** `test/backlog3453-durable-box-occupant.test.ts` — real Runner over a file mailbox and one shared session store: P1 / P14 a teammate's record for occupant A, the id deleted and created again as B: never injected, the same-tree skip never reached, one notice (`box`, known / known), acked out · P2 the same for an engine frame · P3 a letter for A drained by B: discarded, the sender's occupant gets a `refused` receipt ("deleted and created again"), which its next leg reads · P4 a record that names no occupant under a token-holding drainer: discarded, `addressed: unknown`, the receipt says the message did not say which session it was for · P6 control: the same occupant delivers. Drain level: P5 control, a store that mints no tokens: delivered, no by-id read · P15 a stale leg leaves B's letter as it is, and B reads it · P16 a by-id read that faults or finds no row leaves the record, the fault disclosed at each claim that asked · P7 a letter held under A is taken off at B's first claim, never released to B, acked out · P19 the pull face (a pass that delivers and never settles) judges the address before it hands anything over · P8 the idle machine by address: A's subscriber never told B's idle · P20 a leg whose session was created again never takes the idle seat from the leg admitted after it, its `notify_when_idle` refused, the admitted occupant's own call served · P9 a receipt for A discarded, no receipt answers it · P12 a delivered frame's provenance carries the record's `peerMeta` member for member · P13 the account carries no token and no body · P17 the receiving station's consume (pull face and live lane) answers the sender's occupant · P11 a directory row without `occupant` refused, `null` and a token read · HB-2 the validator refuses a non-string occupant · P18 a session store without `headOf` mounts no box, the send side and the drain side answer one sentence, the default store has the read. `test/design385-s3-cc-uds-channel.test.ts` P10: the listener stamps its occupant, refuses a bad one at `listen`, and a `null` listener's frame under a token-holding drainer is discarded as `unknown`. Re-pinned to the address (seed after the session row exists via `bornOccupant`, multi-leg worlds share one session store, directory rows carry their occupant, seats read with `…IfAny`): `backlog969-session-box-drain`, `backlog969-peer-directory-contract` and `backlog971-session-where` (the directory kit gains a sixth case: a row's occupant is listed as written), `backlog2589-2591-…`, `backlog2616-2617-…`, `backlog2940-mailbox-window` (a run's reads are what it added after the previous run's reply — two processes over one session store share one transcript), `backlog7300-fix-b4-…`, `design385-slice4-held-idle`, `design385-slice7-principal-inbox`. Mutations: `.gate-logs/criteria-3453-mutations.md` (receipt).
|
|
354
|
+
|
|
355
|
+
### The control-plane carrier seat — a governance store keeps the engine's control objects (five verbs, one law: written once, never overwritten, damage refused rather than read as absence) and two more documents (`holds`, `origin-clearances`); the File store is today's directories and bytes, an origin clearance's custody text leaves the account's row, and a replica's records can be named and copied into a store by an explicit call, which removes nothing from the replica (#3465, #3478, C-R1119 S1 and addenda 2 and 3; behavior change: one — the custody text's place on disk, HB-6; behavior narrowing — one, open to veto; hard-breaking: three, three sentences each below, open to veto — HB-1 type level, HB-6, HB-3 first half zero behavior; closed sets: +1 set `MemoryControlObjectKind` (six kinds), `MemoryGovernanceDocName` +2 (`holds`, `origin-clearances`), governance codes +1 `memory.control_object_unknown`; exports: +3 root values `MEMORY_CONTROL_OBJECT_KINDS`, `adoptReplicaControlPlane`, `replicaControlPlaneStrays`, +3 types `MemoryControlObjectKind`, `ControlPlaneAdoptionReport`, `ReplicaControlPlaneStrays`; members: `MemoryGovernanceStore` +`putObject` +`getObject` +`listObjects` +`moveObject` +`deleteObject` (required), `MemoryEngine` −`controlPlaneDir`; contract sentence +1 `memory.governance.object_written_once`; wire: none) (@server @dgx @client-core @test)
|
|
356
|
+
|
|
357
|
+
- **Rule.** What an engine keeps in its control plane that decides what may enter a prompt, be written or travel with a bundle — the pollution markers, import receipts, the bytes moved aside or captured by a hold, the origin clearances' custody text, the capture opt-outs, the hold ledger and the clearance account — is kept through one seat, the backend's `MemoryGovernanceStore`, under one law: an object is written once under a kind and a name core minted and is never replaced; an object that stands but cannot be read is refused, never read as missing; an enumeration that fails is refused, never answered empty.
|
|
358
|
+
- **Before.** In 7.63.0 the seat kept five documents (`readDoc` / `updateDoc`). The hold ledger was named as an exception (a row and its captured bytes were one record, the bytes control-plane files), and the origin-clearance account, the pollution markers, the import receipts, the quarantine and hold captures and the capture opt-outs had no seat: each was a directory or a file the engine read and wrote in its own control plane, by a law each module spelled for itself. An origin clearance's row carried the full text of the cleared entry inline (`entryText`). The rebuild targets (`lineage`, `challenges`) were named twice, once as two file constants and once as ternaries over the ledger name, beside the document table that already located them. The engine answered its control plane on two accessors, `controlPlaneDir` and `controlPlaneRoot`, with the same value.
|
|
359
|
+
- **Now.** `MemoryGovernanceStore` has five more required members — `putObject(kind, name, bytes, meta?)` (`"created"` | `"existed"`), `getObject` (a copy, or `undefined` only when nothing stands), `listObjects` (sorted), `moveObject(from, to)` (`"moved"` | `"already-moved"`, never over other bytes) and `deleteObject` — over a closed set of six kinds (`MEMORY_CONTROL_OBJECT_KINDS`: `pollution`, `import-receipt`, `quarantine`, `hold`, `clearance-custody`, `capture`); a kind outside it, or a name that is not one opaque segment, is refused `memory.control_object_unknown`. The documents are seven: `holds` and `origin-clearances` join, and the exception sentence is gone. `fileGovernanceStore` keeps each kind in the directory its records have always lived in (`session-pollution/`, `import-receipts/`, `quarantine/`, `hold/`, `session-capture-optout/`, and `origin-clearance-custody/` for the one kind that rode a row), stages a write under `.control-object-stage/` and publishes it with `link` (exclusive, never a half object), and keeps the two documents at `holds.json` / `origin-clearances.json` under the lock-and-journal protocol — the same bytes. The rebuild targets are one table beside the document table (`STRICT_CONTROL_PLANE_LEDGERS`, located by `fileGovernanceDocOf`; the export fence reads the same list, in the same order). `memoryGovernanceStoreContract` carries the object law, the two documents and the adoption cells. The package root carries two operator faces for a replica whose backend comes to carry a store that is not the File store over its control plane: `replicaControlPlaneStrays(controlDir)` names the documents with a file or a journal and the objects by kind, and `adoptReplicaControlPlane(controlDir, store)` copies them one record at a time, objects before documents and no document while any object is refused — written where the store lacks it, converged where it holds the same value, refused by name where it holds another (no merge invented) — and, once the store's copy reads back the same, writes its row in a body-less receipt (`control-plane-adoption.json`, one row per record and digest; a re-run converges and adds no row). `adopted` says the store now holds the replica's value, nothing more: the replica's records stay where they are, because the engine's readers still read them there — removing them would drop a pollution marker or a capture opt-out out of the runtime verdict after a restart (#3478). It is an explicit call over a replica no engine is running on; over the File store of that same directory it answers an empty report. In this release the engine still reads and writes these records in its own control plane: its readers and writers move onto the seat with S2 (#3466), and with them the removal of an adopted record from the replica, the construction refusal over a store that is not the File store over that plane while the plane still holds such records (`memory.control_plane_strays`, HB-5) and the settlement seat losing its directory (HB-3, second half). Nothing constructs, adopts or refuses on its own in this release.
|
|
360
|
+
- **Narrowing — one (open to veto).** A 7.63.0 engine refuses an origin-clearance account a 7.64.0 engine wrote (`ControlPlaneCorruptError`, "row is malformed"): its reader requires the inline text. Replicas sharing one control plane upgrade together; an account no 7.64.0 engine has written to reads on both.
|
|
361
|
+
- **Hard-breaking — three, three sentences each (open to veto).**
|
|
362
|
+
- (HB-1, type level) *What changed:* `MemoryGovernanceStore` gains five required members and `MemoryGovernanceDocName` two names, and the kit's `corrupt` hook (`MemoryGovernanceStoreContractHooks.corrupt`) is also handed `{ object, name }` (make that object stand unreadable) and `{ listing }` (make that kind's enumeration fail). *Who is affected:* an implementation of the store outside core, and its kit run (none in the server's or the cli's or client-core's `src` at origin/main — grep for `readDoc(` / `claimRun` / `MemoryGovernanceStore` implementations; dgx inferred none, it runs with the memory engine off) and a caller that switches over the document names exhaustively. *Compensation:* add the five members (`memoryGovernanceStoreContract` checks them; a SQL store keeps one row per object with an optional scope column) and the two names' storage.
|
|
363
|
+
- (HB-6) *What changed:* an origin clearance's row stores the custody text's sha-256 (`custodyDigest`) and the text stands as its `clearance-custody` object, written before the row; a row written before this release still reads, and the account's next locked write moves its text out (object first, then the row). *Who is affected:* anything that reads `origin-clearances.json` directly rather than through `listOriginClearances`, and a 7.63.0 replica over the same control plane (the narrowing above); `listOriginClearances` answers `entryText` exactly as before, so @server's `memory-origin` route reads what it read. *Compensation:* read through `listOriginClearances`; upgrade replicas that share a control plane together.
|
|
364
|
+
- (HB-3, first half, zero behavior) *What changed:* `MemoryEngine.controlPlaneDir` is removed; `controlPlaneRoot` answers the same value and is the one accessor (the runner's settlement handle and the capture floor's plane coordinate read it). *Who is affected:* a host that read `controlPlaneDir` (none in the server's, the cli's or client-core's `src` at origin/main). *Compensation:* read `controlPlaneRoot`.
|
|
365
|
+
- **Consumers.** @server — HB-1 and HB-6 above; the two operator faces are what the switch to a carried store will call (S2 wires the refusal; your S-3068 package store implements the five members). @dgx — HB-1 if you implement the seat; an object row carries `meta.scope` when the writer knows one (`dgx` §1: no body column in documents — HB-6 moves the last one out). @client-core — no wire change (`OriginClearanceRow` is unchanged). @test — black box: open an origin clearance, then read `origin-clearances.json`: no `entryText` on the row, a `custodyDigest`, and `origin-clearance-custody/<id>.md` holding the cleared entry's text; `listOriginClearances` answers the text. Control: an account written by 7.63.0 reads unchanged until the next clearance call, which moves its text out.
|
|
366
|
+
- **Known limits (rows to be registered with the merge).** KL-3465-a — a pre-7.64.0 row whose account is never written again keeps its text inline and is read by the inline arm (the dual read retires with a census of zero such rows). KL-3465-b — the erasure census does not yet sweep the `clearance-custody` kind (the custody of an erased entry stands until #3463). KL-3465-c — after an adoption a record stands in the replica and in the store; the readers still read the replica's copy, a document the engine rewrites afterwards differs from the store's (a re-run refuses it by name), and S2 (#3466) switches the readers and removes the source.
|
|
367
|
+
- **Rules.** Retired: the hold-ledger exception, the two-constant and ternary naming of the rebuild targets (one table), the hand-listed fence files (derived), the nine literal copies of the hold ledger's label (one table row), the second control-plane accessor. Added: the object law (one, for six kinds; their per-module laws retire as S2 moves each writer onto it), the custody seat's two forms (KL-3465-a), the two operator faces.
|
|
368
|
+
- **Claude Code 2.1.316.** Divergence D-3407-a (a superset, open to veto; to be registered with the merge): the reference's memory has no governance control plane (lineage, challenges, pollution, holds, clearances, quarantine, receipts) and so no seat for one; its one memory control artifact, the consolidation lock, sits in the same key space as the entries, which is the direction this seat takes (the design's reading, `3407-control-plane-carrier-r1` §K6, not re-read against `cli316.js` here).
|
|
369
|
+
- **Pins.** `test/backlog3465-control-plane-carrier.test.ts` — C1 each kind lands in its 7.63.0 directory with the bytes handed in, once, owner-only, no stage file left; a record a 7.63.0 writer put there is the object the seat reads · C2 a directory, a dangling link, a file where the kind's directory is: refused, never missing · C3 a kind or a name outside the sets refused `memory.control_object_unknown`, nothing on disk · C4 a crashed move resumes, equal bytes converge, other bytes refuse and leave both · C5 the two documents at their 7.63.0 files, the seat reads what the hold writer wrote · C6 the rebuild targets located by the document table · C7 the strays (a journal-only document counts; a broken listing refuses) · C8 adoption, objects before documents, a body-less receipt, the replica's records and documents unchanged · C9 adoption refuses another value by name, holds every document back while an object is refused, and converges what an earlier run wrote (one receipt row per record) · C10 adoption into the File store of the same directory, however spelled, is a no-op · C11 construction adopts and refuses nothing (the wiring rides S2) · C12–C14 HB-6: the digest row, the custody object, refusal of a missing / unreadable / different / non-UTF-8 custody, a legacy row read and moved at the next locked write · C15 adoption moves inline custody out first · C16 one accessor · C17 the kit refuses an overwriting store, a store that reads damage as absence, and a store that keeps every kind in one map · C18 a receipt that cannot be written leaves the record refused only; a re-run converges and writes its row once; a committed journal over a stale main file is what is adopted, and both files stay; a document the engine rewrites after the adoption is refused by name on a re-run, the store's copy left as adopted · C19 a journal-only clearance account has its inline text moved out; a custody the store holds with other bytes keeps the account in the replica · C20 (#3478) adopt, then an engine restarted over the same plane with its backend carrying the store: the pollution marker and the capture opt-out still decide (red on the pre-fix module: the marker reads `undefined`). The kit runs over the File store and in-memory stores in `backlog3308-governance-doc-seat`, `backlog900-governance-store` and `backlog3307-announcement-queue-doc`; `backlog3308` P6 / P9 re-pinned (`holds` is a document name; its writer moves with S2). Mutations: `.gate-logs/mutations-1.md` / `-2.md` (receipt).
|
|
370
|
+
|
|
371
|
+
### A memory write moves the system prompt once — the memory band carries the store's state, and a notice the engine drained rides the leg's first request, once, never the system prompt (#1123; ruled C-R1120; behavior change; behavior narrowing: none; widening: none; hard-breaking: one, semantic, three sentences below, open to veto; closed sets: none — the frame carries no `steering_injected` echo, so no `source` word is added; exports: none; members: `Prepared.memoryNoticesFrame?` (internal), `MemoryInjectionComposition.noticesFrame?` (internal); wire: none) (@server @cli @client-core @test)
|
|
372
|
+
|
|
373
|
+
- **Rule.** The memory band of the system prompt holds the memory store's STATE: the write instruction or the read-only notice, the fenced index, the runner's disciplines. A notice the engine drained from its queue is an EVENT: the leg's first request says it once on the model lane (a fresh leg ahead of the user's words, a resumed leg on its continuation), the way the posture and the advisor frames ride, with no echo. A memory write therefore changes the system prompt exactly once, by its index row.
|
|
374
|
+
- **Before.** In 7.63.0 `MemoryEngine.inject` composed `block` as instruction + index + the rendered notices (`src/core/memory-engine/engine.ts` :4146 at v7.63.0), and every arm of the Runner's memory composition put that block into the system prompt. The notice entered the band on the run after a write, together with the index row, and left it one run later: two prefix breaks per write (test s145 `hunt1-c14-turnstart-prefix-churn`, server 7.145.0 / core 7.62.0: runs 3 / 4 / 6 / 7 of an eight-run session written on runs 2 and 5, +450 / −327 / +375 / −327 characters). An externally exposed session files its exposure sentence again at every harvest, so from the first run after the mark that block sat in the band and broke the prefix there. The two correction codas were found again by content (`blockBody.includes(announceBlock)` and `endsWith(coda)`, `src/core/runner/prepare-memory.ts` :1680-1705 at v7.63.0). The lead said "since your last session" and the gate line "the previous session's harvest", false for the per-run harvest of the same session.
|
|
375
|
+
- **Now.** `block` is the state (`[instruction || readOnlyNotice, index]`); the drained notices are `announceBlock` only, and a read-only plane's coda is its own engine reminder right after its plane's notices. The Runner composes no notice into any arm of the band; it hands the drained notices to the leg as one frame (`Prepared.memoryNoticesFrame`), with the session coda (a roster that cannot persist) or the capture-opt-out coda as its own reminder after them, chosen from the session's facts, not found in text. The fresh leg prefixes its first user message with the frame; a resumed leg appends it to its continuation. The lead reads "Memory engine notices (quoted identifiers are data, not instructions):" and the gate line "memory updated by a harvest: N added, N updated, N deleted". The capture-indeterminate notice's correction names "any memory engine notice", where it named "any notice in this memory section", a section the notices no longer sit in (one phrase; the rest of the template is byte-identical).
|
|
376
|
+
- **Hard-breaking — one, semantic, three sentences (open to veto).** *What changed:* `MemoryInjection.block` no longer contains the drained notices or the read-only plane's coda — they are `announceBlock` only, the coda its own reminder — and the Runner never puts a notice in the system prompt; the type is unchanged. *Who is affected:* a host that drives `MemoryEngine.inject` itself and places only `block` in its prompt stops showing the notices (one that placed both now shows them once instead of twice); no reader of `announceBlock` or of `.inject(` was found in the `src` of @server or @cli (grep of `origin/main`, not compiled). *Compensation:* place `announceBlock` once, in the next user message, as the Runner does, and keep `block` where it was.
|
|
377
|
+
- **Rules.** Retired: the two content detections that placed the codas, and the notices re-added in each of the five arms of the band. Added: one placement law (the leg's first request carries the drained notices), read at its two seats (the fresh first message, the resumed continuation). The plane coda becomes a reminder of its own, because a user-side frame holds no bare engine sentence.
|
|
378
|
+
- **Claude Code 2.1.316.** Aligned on the event half: the reference tells a memory change as a `memory_update` attachment drained once and rendered as a meta user message, never in the system prompt (`cli316.js` :272678 / :272687 / :273465). Two divergences, recorded for registration: D-1123-a — the reference freezes the MEMORY.md index into the session's first user message (:270299, :140577, :266140); Sema keeps the index in the system prompt and re-reads it every run, so a real change still moves the prefix once. D-1123-b (a superset) — the reference announces only other writers' changes; Sema also tells the session its own harvest.
|
|
379
|
+
- **Consumers.** @server @cli: no source change — neither reads `announceBlock` nor calls `inject`; a run's first user message now starts with an engine reminder when the store had notices, on the same lane as the posture frame (a renderer that hides engine reminders hides this one; inferred, not run). @client-core: no mirror of `MemoryInjection` found. @test (black box, the s145 criterion): two memory writes in an eight-run session ⇒ the request-side system prompt changes exactly once per write, by the index row; no notice in any system prompt; the notice in the next run's first user message, once; a control with no write ⇒ zero changes; a later run on the same session (`--resume`) neither restates the notice nor moves the prefix.
|
|
380
|
+
- **Known limits.** A leg whose first message is never sent — a `userPromptSubmit` hook blocks it, the usage window or a pre-call budget refuses it, the walltime is already spent, or an abort lands first — drops the notices its prepare drained, as it did when they rode that leg's system prompt: the queue is drained at prepare, and this frame is not settled on a receipt the way the git-status and listing frames are (`frames.commit_on_receipt`). An externally exposed session's harvest files its exposure sentence again every run, so each later run's first message carries one more copy of it in the transcript (before, the band held one; the cached prefix no longer pays, the history does).
|
|
381
|
+
- **Pins.** `test/backlog1123-memory-notice-prefix.test.ts` — real Runner over a file memory store: P1 eight runs written on runs 2 and 5 move the system prompt on runs 3 and 6 only, by the index row, each notice in that run's first message once · P2 control, no write, zero moves · P3 a later Runner on the same session neither restates nor moves · P4 a roster that cannot persist: the session coda its own reminder after the notices · P8 (carry, off) a session marked externally exposed: zero moves, the exposure sentence in the first post-mark run's first message · P9 a resumed leg (an approval answered) carries the notices its prepare drained on its continuation, once, never in its system prompt, never echoed · P5 / P6 the engine face (the plane coda its own reminder; `block` is instruction + index) · P7 the wording. Re-pinned to the event face (the notices read off `announceBlock` or the first user message; privacy and secret checks read `block` and `announceBlock` together, so no negative check went vacuous): `backlog3307-announcement-queue-doc`, `design383-capture-optout-rescan` (the indeterminate notice's byte pin, with the one phrase swapped back reproducing the old bytes), `memory-dual-root`, `memory-engine-runner`, `memory-engine-s2-announce`, `backlog1896-announcement-scope`, `hardening-memory-engine`. Mutations M1–M7 (receipt).
|
|
382
|
+
|
|
383
|
+
### A delegated agent's refused call is told to the session a person watches — the gate station's user-face notices on a delegated leg are addressed to the delegation tree's root session and name the leg they came from (`detail.sourceSessionId`, `detail.agentId`), so `delegation.ask_unresolvable` and its three siblings reach the parent's stream where they reached only the child's (#3083; ruled C-R1121 K1 and scope (b); behavior change; hard-breaking: one, three sentences below, open to veto; closed sets: none; exports: none; wire: +2 optional detail keys on four notice codes, and the value of `detail.sessionId` on a delegated leg moves) (@server @cli @client-core @test)
|
|
384
|
+
|
|
385
|
+
- **Before.** The gate station minted its user-face notices with the leg's own session id, and the throat lifts that id onto the notice's typed `sessionId`, the key a deployment routes a notice by. A delegated child's session has no reader, so a child's fail-closed refusal was said to nobody: measured on `bd3b14137` (real `Runner`, five child forms — a roster child, the same with `forwardSubagentEvents`, with `retainSubagentSessions`, the built-in general-purpose child, a background child — under no approver and under an approver that answers `unavailable`), 0 / 10 notices addressed to the parent's session; the parent's model read the refusal only inside its child's transcript (test s145: 0 / 5 forms on the parent's SSE, session read and durable event stream).
|
|
386
|
+
- **Now.** One rule, one helper (`noticeAddressOf`, `src/core/leg-identity.ts`, minted once per leg beside the ask source): a top-level leg's user-face notice is addressed to its own session and carries no source keys — byte-identical to before; a delegated leg's is addressed to the tree's root (`rootSessionId`; an intermediate parent at depth ≥ 2 has no host leg of its own) and carries `sourceSessionId` (the leg whose call it is) and `agentId` (the id the spawner's card and the leg's events carry). The station's four user-face notices take it: `delegation.ask_unresolvable` (whose sentence adds "a delegated agent's call"), `permission.ask_released_by_mode`, `permission.read_deny_unapplied`, `classifier.unavailable` (the gate station's; the ancestor station's in `prepare-policy-chain.ts` and the user-face codes minted outside the gate station keep the leg's own session — census #3469). One notice per refused call, through the one throat; no second route, no new code.
|
|
387
|
+
- **Hard-breaking — one, three sentences (open to veto).** *What changed:* on a delegated leg, `detail.sessionId` (and the typed `sessionId` lifted from it) of these four codes names the delegation tree's root session, no longer the delegated leg's own; the leg's own session moves to `detail.sourceSessionId`. *Who is affected:* a consumer that read `detail.sessionId` of these codes as "the session whose call was refused" on a delegated leg, and a deployment's documentation that says `delegation.ask_unresolvable` on a delegated child does not reach the parent's stream, or that on a delegated child the detail's session is the child's own. *Compensation:* read `detail.sourceSessionId ?? detail.sessionId` for the session the call ran in; route on `sessionId` as before.
|
|
388
|
+
- **Affected.** Every notice of a top-level leg is unchanged. A background child refused after its parent's leg ended is addressed to a root with no live leg; what a deployment does with a notice for a session it holds no leg for is the deployment's (KL-3083-a).
|
|
389
|
+
- **Rules.** Readings: two → one (the station addressed user-face notices by the leg's session while the ask source already named the leg; now every station notice reads one address). Added: one helper, two optional detail keys. Retired: the bare session id at the four mint sites.
|
|
390
|
+
- **Consumers.** @server: the router needs no change (it routes on `sessionId`), but what it routes on has moved on a delegated leg: `detail.sessionId` of these four codes is now the delegation tree's root, so a router that sends notices by session alone delivers a child's refusal to the root session's viewers, and the child's own session is `detail.sourceSessionId` (its agent id `detail.agentId`) for any route that wants the child. The address names the root's session id and no occupant, so a router that holds per-viewer state across a session's delete and re-create judges the occupant itself. The session-detail sentence for a delegated child in the engine-notice wire and the usage guide's sentence that `delegation.ask_unresolvable` on a delegated child does not reach the parent's stream are stale. @client-core: two optional keys on these four codes' detail. @cli: render "a delegated agent's call was refused" from `sourceSessionId` / `agentId`. @test (black box): a roster child under no approver calling a gated tool ⇒ one `delegation.ask_unresolvable` on the parent's stream, `detail.sourceSessionId` = the child card's `sessionId`, `detail.agentId` = its `taskId`, non-empty `remedies`.
|
|
391
|
+
- **Claude Code 2.1.316.** Same shape: a subagent's permission denial is one `system/permission_denied` message on the top-level session (`session_id`) naming the subagent (`agent_id`) (`cli316.js:288215`, and the engine's own at `:278324`). Divergence D-3083-a (a superset): this notice also carries the ways out (`remedy` / `remedies`) where the reference carries the message and the decision reason.
|
|
392
|
+
- **Known limits.** KL-3083-a (a background child refused after its parent's leg ended: the notice is addressed to the root, which a deployment may hold no live leg for).
|
|
393
|
+
- **Pins.** `test/backlog3083-3084-delegation-refusal.test.ts` — five child forms × two no-approval-seat deployments, each over four faces (the routing key, the detail's session, delivery inside the parent run's window, the source attribution) and the parent's Agent result carrying no second copy of the remedies · the card's `sessionId` / `taskId` equal the notice's source keys · depth 2 addressed to the root · positive control: a top-level refusal's detail keys unchanged · the mode-release notice on a delegated child · the classifier notice's address · the station's four sites spread the address. Base: 15 of these 16 cells red (the positive control is the green one). Mutations M1–M9 (receipt). Re-pinned: `test/backlog642-workflow-park-lane.test.ts` ① (the #642 six-grid) — the three no-park lanes (sync, background, workflow) asserted the notice named the child's session at the top level; they now assert the parent's session there and the child's in `detail.sourceSessionId`, beside `detail.agentId`.
|
|
394
|
+
|
|
395
|
+
### A failed delegation's tool result is an error on every face — the synchronous card and the fork card read `isError` from the same predicate the background polls already answered with, `agentOutcomeIsError` (#3084; ruled C-R1121 K2 and addendum 1; behavior change; behavior narrowing — one, open to veto; hard-breaking: none; closed sets: none; exports: none; wire: `isError: true` on a failed `Agent` tool result) (@server @cli)
|
|
396
|
+
|
|
397
|
+
- **Before.** A synchronous or fork delegation whose child failed returned its card with `status: failed` and no `isError`, while the background lane's poll, live and durable, answered `isError: true` for a failed row: measured on `bd3b14137`, a roster child that cannot start (`denyTools: ["*"]`, `config.tool_face_control`) and a child whose model request was refused (`invalid_request`) both reached the parent as `isError: false` (test s145 e1 / e3).
|
|
398
|
+
- **Now.** One predicate, `agentOutcomeIsError` (`src/core/task-registry-agent.ts`): a failed outcome is an error result. The synchronous card and the fork card read it over the card's own status word; the live poll and the durable poll read it over the row's. A completed child is not an error; nor is a synchronous child that ended `blocked` (a cut-off with its partial output — C-R1121 addendum 1, the reference's partial-history shape); the refusals that never start a child (a refused call, a held park, an unavailable isolation) keep their own constructors and are unchanged.
|
|
399
|
+
- **Narrowing — one (open to veto).** A failed synchronous or fork delegation now reaches `PostToolUseFailure` instead of `PostToolUse`, and the parent's model sees the result as an error.
|
|
400
|
+
- **Affected.** A hook keyed on `PostToolUse` for the `Agent` tool no longer sees a failed delegation there; a host that read `isError: false` beside `status: failed` as "the call itself succeeded". A background child's row that ended `blocked` still settles `failed` and polls `isError: true` (KL-3084-a: the row's word set has no `blocked`; root fix #3470).
|
|
401
|
+
- **Rules.** Readings: two → one (the polls' inline `failed ⇒ isError` and the cards' none). Added: one predicate. Retired: two inline reads.
|
|
402
|
+
- **Consumers.** @server: the usage guide's account that a synchronous delegation's failure reads `isError: false` is stale; `tool_end.isError` is `true` for it. @cli: a `-p` script reading `is_error` on a failed delegation now reads `true`.
|
|
403
|
+
- **Claude Code 2.1.316.** Same shape for a child that failed with nothing to hand back (`cli316.js:276866`: the error is thrown, the tool result is an error); a child with partial history returns completed with a cut-off note. Divergence D-3084-a (stricter): a `failed` child with salvaged partial output is an error here.
|
|
404
|
+
- **Known limits.** KL-3084-a (a background `blocked` row polls `isError: true` where the synchronous card's `blocked` does not — the row's words, not the predicate; root fix #3470).
|
|
405
|
+
- **Pins.** `test/backlog3083-3084-delegation-refusal.test.ts` — the synchronous card for a child that cannot start and for a refused model request, the fork card, the real chain (a roster child with every tool removed ⇒ the parent's `Agent` result is an error), the live and the durable poll, controls (completed, `blocked`, an unknown subagent type). Base: 4 of 6 cells red. Mutations K2-M1–K2-M5 (receipt).
|
|
406
|
+
|
|
407
|
+
no-notes: #2424(the 91f03555c stage bookkeeping re-read the released 7.63.0 state for two pins; no behaviour), #2913(the RL-2164 merge head names it; retired with RL-2164 in that section)
|
|
408
|
+
|
|
1
409
|
## 7.63.0 — 2026-11-01
|
|
2
410
|
|
|
3
411
|
### 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)
|