@llblab/pi-state-flow 0.27.1 → 0.27.2

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.
@@ -4,9 +4,9 @@ This document describes the implemented lazy-state contract. [BACKLOG.md](../BAC
4
4
 
5
5
  ## Thesis
6
6
 
7
- State Flow provides `lazy` as an object-root semantic plane in every scope's runtime view.
7
+ State Flow supports the optional object-root `lazy` plane in every participating scope.
8
8
 
9
- - It may be absent from stored state. Reads then use `{}` or values inherited through the effective overlay, without rewriting storage.
9
+ - It may be absent from stored state. Exact reads preserve that absence; an absent top-level lazy value returns `null`, while effective reads can inherit a selected broader owner's value. Only default-bearing internal/library compatibility views supply `{}`; no read rewrites storage.
10
10
  - Nested lazy values are ordinary JSON. They are durable and versioned with the same causal lineage as hot state, but excluded from ordinary baseline hydration.
11
11
 
12
12
  The model-facing surface remains small:
@@ -37,7 +37,7 @@ The model-facing surface remains small:
37
37
 
38
38
  ## Semantic model
39
39
 
40
- Runtime views select present documented semantic planes in intent-first order, omitting absent fields, empty responses and unknown fields:
40
+ Runtime views select present built-in planes in intent-first order, plus metadata v4-declared external roots under the [public module contract](public-module-contract.md), omitting absent fields and empty responses. The built-ins are:
41
41
 
42
42
  ```text
43
43
  global | CWD | session
@@ -45,14 +45,14 @@ global | CWD | session
45
45
  ├── strategy
46
46
  ├── tactics
47
47
  ├── artifacts
48
- ├── response (session-owned; empty structural slot in Global/CWD)
48
+ ├── response (new answers are Session-owned; optional on disk)
49
49
  └── lazy
50
50
  ```
51
51
 
52
52
  Hot planes:
53
53
 
54
- - `intents`, `strategy`, `tactics` and `artifacts` stay hot in every scope.
55
- - Session-owned `response` is also hot. New Global and CWD states use an empty structural slot, and stored scopes may omit it. Effective uses the highest-priority present response, and each newly accepted answer is written only in Session.
54
+ - Present `intents`, `strategy`, `tactics` and `artifacts` contribute hot memory from selected available owners.
55
+ - Active projects the highest-priority present nonempty `response`; Passive omits it automatically. New answers are written only in Active participating Session. No stored structural slot is required, and readable legacy Global/CWD answers do not grant new shared authorship.
56
56
  - `intents` may keep compact active direction while referring to large supporting detail in `lazy`.
57
57
 
58
58
  `lazy` differs only in projection policy:
@@ -138,7 +138,7 @@ Ownership evaluates canonical references after model anchoring. A sole-CWD model
138
138
  - missing targets;
139
139
  - keys outside the `read_state` key grammar `[A-Za-z_$][A-Za-z0-9_$-]*`, for example keys with spaces, dots or non-Latin letters.
140
140
 
141
- **Receipt.** `state_updates.cascaded` lists all owner-scoped targets cleared in the intermediate ownership phase, even if later authored writes recreate them, for example `["session.lazy.plans.x", "session.tactics.draft"]`. Paths only, never lazy bodies or deleted values. The list is deterministic (Global, CWD, Session, then each scope's cascade order), absent when no target cascaded, and never omitted as a predictable write. Nested lazy deletions are reported even when the top-level `lazy_navigation` catalog is unchanged.
141
+ **Receipt.** `state_updates.cascaded` lists targets cleared in the intermediate ownership phase, even if later authored writes recreate them. With multiple wanted owners paths stay scoped, for example `["session.lazy.plans.x", "session.tactics.draft"]`; with exactly one wanted owner they are relative, for example `["lazy.plans.x", "tactics.draft"]`. Canonical ownership and result details remain scoped. Paths only, never lazy bodies or deleted values. The list is deterministic (Global, CWD, Session, then each scope's cascade order), absent when no target cascaded, and never omitted as a predictable write. Nested lazy deletions are reported even when the top-level `lazy_navigation` catalog is unchanged.
142
142
 
143
143
  **Edge cases:**
144
144
 
@@ -151,7 +151,7 @@ Ownership evaluates canonical references after model anchoring. A sole-CWD model
151
151
 
152
152
  The explicit `effective.lazy` path recursively overlays `global.lazy → cwd.lazy → session.lazy` using the existing scope precedence and conflict semantics. It is read-only as an effective view and is not inserted into ordinary hot baseline state.
153
153
 
154
- Explicit paths such as `global.lazy`, `cwd.lazy`, and `session.lazy` preserve direct ownership access. Deleting a key from an upper scope reveals a lower-scope value exactly as ordinary scope-local deletion does. Hiding an inherited value without changing its owner is not a separate lazy feature.
154
+ Explicit paths such as `global.lazy`, `cwd.lazy`, and `session.lazy` preserve direct ownership access only for wanted, available owners; excluded-owner access rejects without widening selection. Deleting a key from an upper scope reveals a lower-scope value exactly as ordinary scope-local deletion does. Hiding an inherited value without changing its owner is not a separate lazy feature.
155
155
 
156
156
  Active obligations, current constraints, unresolved next actions, and facts required for the next correct action remain hot.
157
157
 
@@ -295,8 +295,7 @@ A multi-path value response is positional:
295
295
  {
296
296
  "meta": {
297
297
  "type": "object",
298
- "size": 3,
299
- "sources": ["global", "cwd"]
298
+ "size": 3
300
299
  },
301
300
  "keys": {
302
301
  "memory": "array",
@@ -306,7 +305,7 @@ A multi-path value response is positional:
306
305
  }
307
306
  ```
308
307
 
309
- For an explicitly scoped object, redundant ownership is omitted:
308
+ An explicitly scoped object uses the same structural-only metadata shape:
310
309
 
311
310
  ```json
312
311
  {
@@ -359,7 +358,6 @@ The read-level `meta` object is intentionally narrow and unrelated to persisted
359
358
  - `type` always.
360
359
  - `size` for objects, meaning immediate named-key count.
361
360
  - `length` for arrays and strings.
362
- - `sources` only when an effective view actually combines or resolves scope ownership.
363
361
 
364
362
  It never exposes temporal boundaries, runtime identity, revisions, publication state, provenance registries, timestamps, encoded sizes, cache/index details, diagnostics, or arbitrary copied fields from `meta.json`. Adding a metadata field requires evidence that it changes the agent's next read decision; diagnostic convenience alone is insufficient.
365
363
 
@@ -520,7 +518,7 @@ Lazy mutations inherit existing guarantees:
520
518
  - One lock/CAS publication cohort.
521
519
  - Atomic hot-plus-lazy multi-scope changes.
522
520
  - Scope-local deletion and effective revelation semantics.
523
- - Exact retained-boundary selection on restore and branch navigation.
521
+ - Exact retained boundaries for explicit historical reads; reload/resume/tree attach current same-session memory rather than rewinding it.
524
522
  - Read-only discovery with no commit, timestamp update, or transition.
525
523
 
526
524
  Lazy trees are co-located in canonical scope checkpoints/tails and use the same bounded lineage as hot state. The [performance guide](performance.md) owns current synthetic workloads and measurement limits. No separate lazy index or sharded authority exists; any future layout change requires measured need and must preserve canonical semantics, ownership, and one causal lineage.
@@ -536,7 +534,7 @@ Lazy trees are co-located in canonical scope checkpoints/tails and use the same
536
534
 
537
535
  ## Normative invariants
538
536
 
539
- 1. **Object root, ordinary JSON children**: Every runtime scope view has a lazy object, defaulting to `{}` when absent from stored semantics. Its nested values contain domain semantics, never mandatory State Flow record wrappers.
537
+ 1. **Object root, ordinary JSON children**: Present lazy content is an object with ordinary domain JSON children, never mandatory State Flow record wrappers. Sparse semantic/read views preserve absence; `{}` defaults belong only to internal/library compatibility views.
540
538
  2. **Semantic snapshots**: `value` contains only the selected state snapshot and `patch` only the selected semantic patch; `keys` alone adds closed structural `meta` before `keys`.
541
539
  3. **Exact success**: A successful read returns everything requested; it never truncates or paginates silently.
542
540
  4. **Runtime-owned concurrency**: Revisions, locks, and CAS remain internal unless explicitly needed for diagnostics.
@@ -566,7 +564,7 @@ Before release, implementation evidence must prove:
566
564
  - `effective.lazy` follows global → CWD → session overlay while explicit scope paths preserve ownership.
567
565
  - Reads create no semantic transition, Git commit, publication, freshness update, or future activation.
568
566
  - Whole-array replacement and indexed scalar, array, object, nested, multi-index, and stale-basis patches remain atomic.
569
- - Restore and fork select lazy state from the same retained canonical boundary as the rest of the owning session scope.
567
+ - Reload/resume/tree attach current lazy state with the rest of the owning scope; a supported fork copies parent-current lazy content only when private acquisition is admitted. Historical reads select the same retained causal boundary as other planes.
570
568
  - Malformed canonical lazy data fails closed without rewriting the store; rejected queries and patches preserve accepted hot state.
571
569
  - Unsupported store formats and `read_state` inputs fail actionably without rewriting retained bytes.
572
570
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Scope and accepted decision
4
4
 
5
- The subsequent explicit request for a general internal module API is implemented separately in the [internal semantic-module contract](semantic-module-contract.md). It supersedes this checkpoint's no-extraction disposition only for that bounded internal contract. The historical review/evidence below is not retroactively upgraded, and protocol trust/order and public-loader deferral remain applicable.
5
+ The subsequent explicit request for a general internal module API is implemented separately in the [internal semantic-module contract](semantic-module-contract.md). Together with the later [public registration contract](public-module-contract.md), shipped in 0.27.0, it supersedes this checkpoint's no-extraction disposition only within those bounded module responsibilities. The historical review/evidence below is not retroactively upgraded; protocol trust/order and dynamic-loader deferral remain applicable. All M4 milestone statuses and validation counts below describe that historical checkpoint, not current implementation prerequisites.
6
6
 
7
- M4 is an earned-composition investigation, not a requirement to ship descriptors. **Retain the existing plain render functions and shared trusted snippets; do not extract another semantic module layer now.** No source, public API, emitted protocol, storage format, schema, runtime hook or lifecycle change is proposed. The complete actual terminal follow-up review is **APPROVE — R1 verified; retain implementation/defer further extraction**. [BACKLOG](../BACKLOG.md#12-ordered-implementation-backlog) alone owns subsequent work; M5 and gated quality evidence are not approved by this decision.
7
+ M4 is an earned-composition investigation, not a requirement to ship descriptors. **Retain the existing plain render functions and shared trusted snippets; do not extract another semantic module layer now.** No source, public API, emitted protocol, storage format, schema, runtime hook or lifecycle change is proposed. The complete actual terminal follow-up review is **APPROVE — R1 verified; retain implementation/defer further extraction**. [BACKLOG](../BACKLOG.md) alone owns subsequent work; M5 and gated quality evidence are not approved by this decision.
8
8
 
9
9
  The question is whether a further Core/Intents/Strategy/Tactics decomposition solves observed duplication, conflicting ownership or maintenance friction. It is not whether all code can be represented as a descriptor array. The accepted [M3 functional checkpoint](single-scope-interface-contract.md#deterministic-m3-checkpoint) already supplies actual scope-free required arguments and typed outputs; M4 must not reopen its admission/source/private contracts or infer model quality from a different source layout.
10
10
 
@@ -2,13 +2,15 @@
2
2
 
3
3
  ## Status
4
4
 
5
- Candidate public API v1. Native-host registration and retirement have local supported-Node validation and bounded independent acceptance; **Metadata4 codec/opaque retention has bounded independent acceptance. The local candidate now binds registered mutable external roots to the existing read/patch tools and atomic descriptor admission; this new activation slice is not independently accepted. Public input/context execution is now implemented in the local candidate; Active asynchronous producers now propose complete replacements through that same selected publisher. Local end-to-end acceptance is complete: the ordinary public-only consumer also proves current-only forks and opaque current/history retention through folding, incompatible or absent definitions, reload and re-registration, in SOURCE and the built SDK/package entry. Per the later user instruction, activation implementation and final audit were performed inline without actors; no new independent activation approval or real-model quality result is claimed.** [BACKLOG](../BACKLOG.md#12-ordered-implementation-backlog) alone owns unfinished implementation and acceptance. This is an unpublished local candidate, not a released compatibility promise.
5
+ Public API v1 is published through `@llblab/pi-state-flow/modules` since **0.27.0** and remains supported in **0.27.1**. It includes native-host registration/disposal, metadata v4 descriptors and opaque retention, external-root read/patch tools, captured Active/Passive context, and cohort-atomic Active producer replacements. The package export and source types in `api/modules.ts` and `lib/semantic-module.ts` define the executable surface; this document owns its integration and trust contract.
6
+
7
+ Registration and codec/retention received bounded independent acceptance during development. Later activation implementation and final audit were performed inline under the owner's instruction; publication does not retroactively grant independent approval to those subphases. Scripted native-SDK and built-package consumer checks are deterministic integration evidence, not live-model quality or installed-client certification. See [compatibility](compatibility.md) for evidence limits and [BACKLOG](../BACKLOG.md) for outstanding work.
6
8
 
7
9
  Pi loads ordinary companion extensions. StateFlow provides a thin public registration membrane; it does not discover or load plugin code. The [internal evaluators](semantic-module-contract.md) remain separate from native/source admission and atomic publication.
8
10
 
9
11
  ## Public entry and lifecycle
10
12
 
11
- Import `registerStateFlowModule` and its types from `@llblab/pi-state-flow/modules`. Local source consumers may import `api/modules.ts`; compiled consumers use `dist/api/modules.js`. These membranes do not import the extension composition root.
13
+ Import the runtime function `registerStateFlowModule` from `@llblab/pi-state-flow/modules`. The same entry exports types `StateFlowModule`, `StateFlowModuleSource`, `StateFlowModuleFrame`, `StateFlowModuleInput`, `ModuleContextContribution`, `JsonObject` and `JsonValue`; there is no exported loader or publisher. Local source consumers may import `api/modules.ts`; compiled consumers use `dist/api/modules.js`. These membranes do not import the extension composition root.
12
14
 
13
15
  Register synchronously in the consumer's `session_start` handler, with StateFlow loaded first. Pass `ctx.sessionManager` only as the native-host identity key, not raw runtime context. Host absence, competing ownership of the same manager, duplicate IDs and incompatible API versions fail explicitly. Two different SDK managers in one process have independent catalogs. A retained native identity check also fences manager reuse for another session/address.
14
16
 
@@ -40,7 +42,7 @@ export default function (pi: ExtensionAPI) {
40
42
  }
41
43
  ```
42
44
 
43
- With this companion registered, a sole participating owner can persist `{"x_acme_notes":{"entries":["accepted"]}}` through `patch_state` and read `x_acme_notes` through `read_state`. Multiple participating owners retain explicit scope wrappers. The context callback now executes on admitted Active/Passive provider contexts; its data is transported as fallible user-level data, not system instructions. Pi 1.0.0 uses `session_shutdown`, not `shutdown`.
45
+ With this companion registered, a sole participating owner can persist `{"x_acme_notes":{"entries":["accepted"]}}` through `patch_state` and read `x_acme_notes` through `read_state`. Multiple participating owners retain explicit scope wrappers. The context callback executes on admitted Active/Passive provider contexts; its data is transported as fallible user-level data, not system instructions. Pi 1.0.0 uses `session_shutdown`, not `shutdown`.
44
46
 
45
47
  Registration returns an idempotent disposer for that exact instance. It cannot revoke a later equal-ID registration or another host generation. Catalog changes abort old catalog signals; host retirement removes only its own binding before signaling cancellation. Snapshots capture immutable policy, callback identities and definition order. Constructor-injected services remain bound to their original instance. Trusted callbacks are not an effects sandbox, and a catalog snapshot alone is not publication authority.
46
48
 
@@ -50,7 +52,9 @@ The public `StateFlowModule<Content, Input>` has the internal identity/immutabil
50
52
 
51
53
  - **`apiVersion: 1`:** Version of callback/frame assumptions, independently of the runtime package resolved by an older companion's import.
52
54
  - **`schemaVersion`:** Positive safe integer for one exact persisted content/policy contract; not the package or host metadata version.
53
- - **`captureInput?`:** Acquire module-specific JSON input and return `{ value, assertCurrent }`. The synchronous assertion throws if that captured source is obsolete; it does not reacquire data or perform asynchronous work under exclusion.
55
+ - **`captureInput?(source, signal)`:** Optional synchronous or asynchronous acquisition of module-specific JSON input, returning `{ value, assertCurrent }`. It runs outside exclusion; the synchronous receipt throws if that captured source is obsolete and never reacquires data or performs asynchronous work under exclusion.
56
+ - **`context(content, frame)`:** Synchronous contribution computation; an asynchronous return is not admitted. Contributions are user-level data or admitted native conversation indices, never arbitrary system-prompt text.
57
+ - **`produce?(content, frame, signal)`:** Optional synchronous or asynchronous complete-replacement proposal, invoked only by an owned Active preparation. It is not a publisher or independent scheduler. Abort/currentness fences abandon stale asynchronous work even if the callback ignores its signal; trusted synchronous JavaScript is not preempted or sandboxed.
54
58
 
55
59
  External durable content is initially a JSON object. Validators admit complete resulting values, not recursive partial patches. `immutable` denies main-agent writes, not authorized producer proposals. `produce?` returns a complete replacement object or `undefined`; it never publishes itself. Constructor-injected narrow services avoid a generic capability registry or raw `ctx`.
56
60
 
@@ -58,14 +62,20 @@ Activation must pass a detached `StateFlowModuleFrame` to both context and produ
58
62
 
59
63
  Context proposals are data or exact source-message indices, not system instructions or arbitrary context mutation. Session conversation contains only the completed native segment before a uniquely anchored current user run; ambiguity withholds that segment. Shared frames carry no dialogue/prompt and cannot propose conversation replacement. At most one Session module may select completed conversation; competing selectors fail closed. A selection must preserve whole native tool-call/result units and original identities/order. The host preserves current-run and foreign frames, removes duplicate completed messages, and only alters provider context, never the native journal. Data-only contributions do not themselves remove history. Scope order then captured module order determines data placement before native conversation, after the owned core head. Off invokes none of these callbacks; metadata registration itself neither acquires nor writes memory.
60
64
 
65
+ ## Historical local acceptance
66
+
67
+ Before 0.27.0 publication, ordinary public-only SDK consumers exercised mutable/immutable current-only forks from older native points, unchanged parent semantic-file bytes, retained descriptors, a fresh child aligned origin and child reload. Pre-origin materialized reads reject; this does not claim that retained per-owner tail bytes are absent from child storage. Global/CWD/Session/all-three fixtures at history limits 0/1/7 crossed actual folding, retained every still-available current/historical opaque value through missing or incompatible definitions, refused incompatible callbacks/writes and resumed after cold re-registration.
68
+
69
+ That local checkpoint recorded **1695/1695 on Node 22/24**, **145 package files**, the same two final compiled SDK properties, earlier 16 public and seven codec properties; sets overlap and are not summed. Registration/lifetime and codec retention had their separately bounded independent approvals; activation and final audit were inline. The earlier global **REQUESTCHANGES** verdict was not retroactively upgraded by scoped remediation or publication. The [exact pre-release record](https://github.com/llblab/pi-state-flow/blob/f9128d9eaa2b94133d992f51f80f16aec0d43653/BACKLOG.md#12-ordered-implementation-backlog) retains original counts, review boundaries and superseded execution instructions. These are historical results, not fresh 0.27.2 tests, installed-client certification or model-quality evidence.
70
+
61
71
  ## Recorded compatibility decision
62
72
 
63
- The external-plane path will use owner metadata **version 4**, retaining the same checkpoint, patch-tail and metadata files. This decision preceded codec implementation. The local candidate now admits descriptors and opaque external values through the existing codec/replay/publication path; absent stream descriptors retain legacy three-key streams and v3 output. Integrated SOURCE/build/package and complete compiled-property checks pass on both supported Nodes; independent retention and acceptance reviews approved this storage slice with disclosed coverage limits. The new manual tool path adds a descriptor only with the first nonempty accepted content transition through the same selected publisher; registration, empty proposals and context-only observation cannot mint a slot. Validators receive a detached complete result, not a partial patch, and must be pure synchronous content guards (no acquisition/inference). Definition/schema/policy mismatches reject model writes before validators. Exact reads and patch history use retained descriptors without calling definitions. Current catalog revocation fences queued old calls, including equal-ID re-registration. Input and context callbacks are activated as described above; Active producer publication is now activated through the same engine. Results are complete JSON-object replacements, never recursive merges; `undefined` is no proposal and `{}` clears content without removing its descriptor or fabricating a new slot. Main-agent immutable restrictions remain intact. All applicable producer jobs compute outside exclusion using narrow constructor-injected services, not ambient runtime/storage/model tools. Before publication, the host rechecks original input, content/descriptor, captured source-scope stream, registration generation, native owner/model/selection and cancellation; model or thinking-level changes revoke the original request even after A→B→A. A fresh transaction cannot launder stale work. One invalid/stale result rejects the proposed cohort. After its own accepted publication, context receives the accepted content using the original input receipt and a lease pinned to that exact acceptance. Late cancellation/context/checkpoint failure never rolls accepted memory back.
73
+ The external-plane path uses owner metadata **version 4**, retaining the same checkpoint, patch-tail and metadata files. The recorded decision preceded codec implementation; that implementation shipped in 0.27.0. Descriptors and opaque external values use the existing codec/replay/publication path; absent stream descriptors retain legacy three-key streams and v3 output. Historical integrated SOURCE/build/package and compiled-property checks passed on both supported Nodes; independent retention and acceptance reviews approved that storage slice with disclosed coverage limits. The new manual tool path adds a descriptor only with the first nonempty accepted content transition through the same selected publisher; registration, empty proposals and context-only observation cannot mint a slot. Validators receive a detached complete result, not a partial patch, and must be pure synchronous content guards (no acquisition/inference). Definition/schema/policy mismatches reject model writes before validators. Exact reads and patch history use retained descriptors without calling definitions. Current catalog revocation fences queued old calls, including equal-ID re-registration. Input and context callbacks are activated as described above; Active producer publication is now activated through the same engine. Results are complete JSON-object replacements, never recursive merges; `undefined` is no proposal and `{}` clears content without removing its descriptor or fabricating a new slot. Main-agent immutable restrictions remain intact. All applicable producer jobs compute outside exclusion using narrow constructor-injected services, not ambient runtime/storage/model tools. Before publication, the host rechecks original input, content/descriptor, captured source-scope stream, registration generation, native owner/model/selection and cancellation; model or thinking-level changes revoke the original request even after A→B→A. A fresh transaction cannot launder stale work. One invalid/stale result rejects the proposed cohort. After its own accepted publication, context receives the accepted content using the original input receipt and a lease pinned to that exact acceptance. Late cancellation/context/checkpoint failure never rolls accepted memory back.
64
74
 
65
75
  - **Identity:** External roots match `x_[a-z][a-z0-9_]*`; use package-derived names. IDs do not authenticate package ownership. Existing built-ins and retired-root reservations remain distinct.
66
76
  - **Retained descriptors:** Owner metadata maps each written external root to `{ schemaVersion, immutable }`. Persist the descriptor in the same accepted cohort as its first write and retain it through deletion, folding and fork. Do not recycle a root for unrelated semantics.
67
77
  - **No new content envelope:** External objects remain semantic roots, not `{ immutable, content }` wrappers. Policy/version data remains outside model-patchable state. No mixed schema epochs or automatic module-schema conversion is introduced initially.
68
- - **Available:** Execute a registered definition only when its exact schema version and authoring policy match the retained descriptor. Validate complete candidate content before publication.
78
+ - **Available:** A registered new root without a retained descriptor can receive absent content and propose its first accepted value. Once a descriptor exists, execute only when schema version and authoring policy match it exactly. Registration/observation alone never mint a descriptor; complete candidate content must validate before publication.
69
79
  - **Unavailable:** Missing, disposed or incompatible definitions leave opaque retained data. Exact current/history reads may return raw data; automatic context and model writes are unavailable. Unrelated writes, pruning, folding, reload and fork must preserve current values and every still-retained historical boundary without invoking missing callbacks.
70
80
  - **Legacy:** Preserve declared v1/v2/v3 meanings and detect raw external-namespace collisions before conversion; formerly ignored roots cannot be silently adopted. Only admitted semantic acceptance may convert complete cohorts through existing backup/byte-CAS safeguards. Inspection and runtime-only policy persistence cannot migrate.
71
81
  - **Writer limit:** Version refusal is evidence for inspected old writers, not universal deployed-writer protection. Existing quiescence and unsupported-writer requirements remain. No working-store migration, live reload or release is authorized by this decision.
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## Status and baseline
4
4
 
5
- **Native seven-selection integration is implemented through the existing selected runtime, with retained typed SDK regressions and held-exclusion cancellation/ABA witnesses; fresh integrated validation and independent authority/test-integrity reviews approve this bounded configured/captured integration. [Public mode-command scope overrides](#public-mode-command-scope-overrides) now compose the same owners and are accepted on fresh integrated validation plus independent authority/test-integrity review. The [M2 functional boundary](#m2-functional-acceptance-boundary) is now complete on deterministic SDK/control and legacy-proof evidence; M3 flat/schema and the remaining roadmap stay separate. No settings chooser is required.** On 2026-10-24 the owner lifted the M0-only restriction and requested roadmap implementation before live-model comparison. Use the recommended concrete-selection, private-acquisition, response-suppression and deferred-fork policies below as the starting design; settle exact representations in code and acceptance tests. Earlier review-gate language identifies proof obligations, not a blanket approval-only stop. Record evidence-based departures instead of silently weakening invariants. [BACKLOG.md](../BACKLOG.md#6-configurable-scope-selection) alone owns remaining work.
5
+ **All seven nonempty selections and public command/completion controls shipped in 0.27.0.** The [M2 functional boundary](#m2-functional-acceptance-boundary) records bounded deterministic acceptance, including captured policy, private acquisition, Session-excluded response suppression, deferred forks and mode-only Telegram controls. The [flat model interface](single-scope-interface-contract.md) also shipped in 0.27.0; it does not change these scope/private authorities. No settings chooser is required. [BACKLOG.md](../BACKLOG.md) owns outstanding work.
6
+
7
+ This document owns selected-scope policy and its authority boundaries; [usage](usage.md) owns operator syntax/configuration. The proposals, candidate gates and validation totals in implementation-checkpoint sections below are historical at their named M0/M2 source boundaries. Later retained integration superseded their all-three-only, pending-selector and deferred-copy implementation limits, not their preservation duties or original review verdicts. They are not current prerequisites.
6
8
 
7
9
  Source baseline: package 0.26.5, commit `4494fee9da8258cdf5f02c42672a0eb9866a512a`, matching repository-local Pi SDK 1.0.0. At that baseline `SnapshotConfig` contained only mode, while Session config and retained-checkpoint codecs rejected the proposed scopes field. The legacy mode-only reader can extract a mode while ignoring such a field; selected policy admission cannot reuse it as full validation. Current internal v2 admission and the aggregate-validated default-all-three bridge are described below.
8
10
 
@@ -18,7 +20,7 @@ This contract complements the [semantic handoff contract](semantic-handoff-contr
18
20
  - Off exposes neither memory tools nor State Flow context. Its automatic lifecycle remains canonically memory-inert, even if selection must be remembered.
19
21
  - Cancellation before acceptance installs no candidate. Cancellation after acceptance cannot undo accepted memory. Publication remains exact-cohort, lock/CAS guarded, and owned by the existing runtime/storage boundary.
20
22
 
21
- ## Recommended operator policy
23
+ ## Current operator policy
22
24
 
23
25
  ### Parsing
24
26
 
@@ -30,7 +32,7 @@ Global configuration accepts a nonempty unique array under `scopes`; missing mea
30
32
 
31
33
  ### Default and branch precedence
32
34
 
33
- **Recommended design for D3:**
35
+ **Implemented D3 policy:**
34
36
 
35
37
  1. A command with valid explicit scopes proposes that concrete selection for the current session branch.
36
38
  2. Without arguments, retain the already established branch/session selection, across mode changes and Off. A same-mode command with different scopes is not an “already active” no-op.
@@ -40,7 +42,7 @@ Global configuration accepts a nonempty unique array under `scopes`; missing mea
40
42
  6. A fork inherits its source branch's concrete policy into a fresh child owner. It is not an independent `/new` default, and it cannot share a mutable selection object with its parent.
41
43
  7. Canonical session config mirrors accepted lifecycle policy when memory-enabled acceptance is allowed. A newer owner-local native Off/deferred/failure marker overrides older canonical policy without becoming semantic authority.
42
44
 
43
- The selected D3 direction is concrete capture at the first upgraded/new native attachment, after validating branch policy and before canonical acquisition. It is not a permanent coupling to live global defaults. Native persistence, precedence and malformed-policy fencing still need their owning integration witnesses; the internal value tests below do not establish them.
45
+ The selected D3 direction is concrete capture at the first upgraded/new native attachment, after validating branch policy and before canonical acquisition. It is not a permanent coupling to live global defaults. Native persistence, precedence and malformed-policy fencing have their retained integration witnesses below; the internal value tests alone do not establish them.
44
46
 
45
47
  ## Internal value boundary and lifecycle encoding direction
46
48
 
@@ -234,7 +236,7 @@ First private acquisition, parent-current fork copy and existing-current selecte
234
236
 
235
237
  The independent native origin grant and synchronous policy/memory checks remain mandatory. The author sees unpersisted candidate state, stages through the same selected compiler/ownership rules and commits origin, semantic replay and lifecycle in one publication; no empty persisted origin precedes validation. Rejected prepublication authoring installs no owner/cache; a later callback failure cannot undo an already accepted publication. A valid semantic no-op may accept the explicitly authorized origin/lifecycle, as on the prior Session route, but creates no semantic transition, step or revision. Shared-only acceptance remains unacquired with no Session semantic triple; known existing/private authority cannot be replaced by a new origin.
236
238
 
237
- New properties cover every selection × Active/Passive × retention 0/1/7/100, exact one runtime publication, values/revisions/causal window and excluded-file absence; invalid/no-op first calls, competing source-byte edits, rollback/retry, selection mutation during a held wait, cancellation before lock release and explicit-origin/known-authority refusal. The runtime-transactions family passes 26 tests (15 new top-level properties); full `npm run validate` passes **1174/1174**, build/typecheck/import/package125. Five compiled cases pass; the fifth proves lower-runtime first shared authoring without an intermediate lifecycle or private stream. This is lower-owner completeness, not native seven-selection activation. Independent review supported dispatch/atomicity but reproduced an inherited unused-publisher lifetime escape: after authoring rejected for no synchronous publication, a retained transaction could write under a later foreign lock. A negative-first regression now covers all seven selections × normal/exceptional callback exit. The storage-owned inner publisher checks its callback lifetime before planning and is revoked in `finally`; late stage/commit cannot write files, install cache or mark a stage committed. The compiled probe also refuses escaped shared/private publishers under a held lock. This is callback-scoped capability enforcement, not another engine or asynchronous acceptance API. The narrow follow-up independently passed 123 related owner tests and all five compiled cases, plus six direct lifetime/finality checks. It approved HIGH-1 closure, including exact ended-before-consumed ordering, ignored async continuations receiving no renewed authority and accepted publication surviving a later callback throw. The slice is accepted within those boundaries, not as whole-M2 delivery. Remaining native/public integration lives only in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog); counts overlap and are not summed.
239
+ New properties cover every selection × Active/Passive × retention 0/1/7/100, exact one runtime publication, values/revisions/causal window and excluded-file absence; invalid/no-op first calls, competing source-byte edits, rollback/retry, selection mutation during a held wait, cancellation before lock release and explicit-origin/known-authority refusal. The runtime-transactions family passes 26 tests (15 new top-level properties); full `npm run validate` passes **1174/1174**, build/typecheck/import/package125. Five compiled cases pass; the fifth proves lower-runtime first shared authoring without an intermediate lifecycle or private stream. This is lower-owner completeness, not native seven-selection activation. Independent review supported dispatch/atomicity but reproduced an inherited unused-publisher lifetime escape: after authoring rejected for no synchronous publication, a retained transaction could write under a later foreign lock. A negative-first regression now covers all seven selections × normal/exceptional callback exit. The storage-owned inner publisher checks its callback lifetime before planning and is revoked in `finally`; late stage/commit cannot write files, install cache or mark a stage committed. The compiled probe also refuses escaped shared/private publishers under a held lock. This is callback-scoped capability enforcement, not another engine or asynchronous acceptance API. The narrow follow-up independently passed 123 related owner tests and all five compiled cases, plus six direct lifetime/finality checks. It approved HIGH-1 closure, including exact ended-before-consumed ordering, ignored async continuations receiving no renewed authority and accepted publication surviving a later callback throw. The slice is accepted within those boundaries, not as whole-M2 delivery. Remaining native/public integration lives only in [BACKLOG.md](../BACKLOG.md); counts overlap and are not summed.
238
240
 
239
241
  ## Explicit first Session acquisition
240
242
 
@@ -260,7 +262,7 @@ The accepted child-owned discriminator survives cold selected loading; it is **n
260
262
 
261
263
  ## Selected parent-current private copy
262
264
 
263
- `TemporalRuntime.withSelectedForkCopyTransaction` now handles eager `fork-new` children and `fork-deferred` lifecycle-only children through the common selected-origin engine. The request must include Session and a distinct captured parent identity/key. The native adapter supplies an independent synchronous parent/policy check: **prepare** validates persisted direct-parent identity outside exclusion, while **recheck** only checks current in-memory native child/parent/policy ownership after waiting and immediately before publication. Recheck must not acquire external sources. A missing check, self identity/key, Off, changed native ownership or remembered acquired private state refuses. This port is not yet wired into `extension.ts`; a passed source value or a deferred discriminator is never itself native authority.
265
+ `TemporalRuntime.withSelectedForkCopyTransaction` now handles eager `fork-new` children and `fork-deferred` lifecycle-only children through the common selected-origin engine. The request must include Session and a distinct captured parent identity/key. The native adapter supplies an independent synchronous parent/policy check: **prepare** validates persisted direct-parent identity outside exclusion, while **recheck** only checks current in-memory native child/parent/policy ownership after waiting and immediately before publication. Recheck must not acquire external sources. A missing check, self identity/key, Off, changed native ownership or remembered acquired private state refuses. At that internal checkpoint this port was not yet wired into `extension.ts`; later retained native integration superseded that activation limit. A passed source value or deferred discriminator is still never native authority.
264
266
 
265
267
  `StorageTransaction.copySelectedFork` binds parent-current canonical private authority under the same store mutex. It captures only the parent's config/runtime and Session checkpoint/tail/metadata plus regular-file presence. The parent must have acquired private memory under its physical CWD/session identity. Both supported legacy lifecycle v1 and explicit v2 work; missing/unacquired/deferred parent private state fails instead of supplying empty memory. Parent Session replay is checked against its own runtime lineage, independently of unrelated shared bodies. There is no ancestor recursion, directory discovery or older-boundary/Git lookup.
266
268
 
@@ -288,7 +290,7 @@ Replay publication and current-origin acceptance share one selected successor pl
288
290
 
289
291
  A strict witness exposed a gap beyond the original matrix: `Session → absent CWD current origin → Session` retained exact private bytes and acquired provenance but lost the private stream's runtime causal binding. The negative failed at `validateScopeLineage`; a second independently executable partition covers shared drift. Both now pass, including cold re-enable and another accepted private mutation/exclusion cycle. No validation or foreign-private fence is relaxed.
290
292
 
291
- The unreleased lifecycle-v2 runtime reserves optional `privateCausalBasis: {lineage, causalWitnesses}`. It carries only the last admitted private causal claims, never values, source locators, file hashes or acquisition permission. Snapshot owns closed syntax: every retained non-anchor step requires an actual witness skeleton; present malformed/extra-key/non-acquired claims reject, and any occurrence in v1 is a target-format collision. Absent is not empty/default proof. Unrelated opaque metadata remains preserved; legacy opaque `temporal` is never repurposed. An historical exact-shape JSON value cannot be distinguished from a cooperating declared field without an authenticated epoch; no writer-authentication claim is made. Reservation is justified by the still-unreleased v2 format, not a claim that arbitrary opaque collisions can be overwritten.
293
+ At that pre-release checkpoint, lifecycle v2 reserved optional `privateCausalBasis: {lineage, causalWitnesses}`. It carries only the last admitted private causal claims, never values, source locators, file hashes or acquisition permission. Snapshot owns closed syntax: every retained non-anchor step requires an actual witness skeleton; present malformed/extra-key/non-acquired claims reject, and any occurrence in v1 is a target-format collision. Absent is not empty/default proof. Unrelated opaque metadata remains preserved; legacy opaque `temporal` is never repurposed. An historical exact-shape JSON value cannot be distinguished from a cooperating declared field without an authenticated epoch; no writer-authentication claim is made. Reservation was justified by the then-unreleased v2 format, not a claim that arbitrary opaque collisions can be overwritten.
292
294
 
293
295
  Before the first owned publication excludes acquired Session, the storage publisher retains the source lifecycle basis, not the requested view (which may already have a new shared-only origin). V2 needs its complete admitted witness skeleton; insufficient source evidence refuses before writes. An aligned legacy conversion may derive proof from its already-validated projection, but an unprovable legacy realignment refuses rather than inventing owners. Once Session is excluded, shared replay/folding/run acceptance carries the basis unchanged. Strictly mode-only Passive neither mints, repairs nor retires it. Excluding Session never opens or rewrites its bodies to construct proof; acquired presence remains mandatory.
294
296
 
@@ -296,7 +298,7 @@ When Session is re-enabled, actual private replay/witnesses must validate agains
296
298
 
297
299
  An older already-separated source without retained proof can re-enable only when its actual private stream still validates against current lineage. If that authority has already diverged, missing proof is not recoverable from presence, standalone parsing, Git or a native bookmark. This is conservative refusal, not universal repair. It creates no new API, private acquisition route, semantic format, history reconstruction or native subset activation.
298
300
 
299
- The new owner cohort passes 76 tests, including seven-by-seven policy round trips at retention 0/1/7/100 through existing current/acquisition ports, complete-proof refusal, foreign/lost/corrupt private cases, no excluded body opens/writes, proof refresh after private mutation, shared folding, mode-only byte stability, observation and parent copy. Fresh full validation passes **1159/1159**, build/typecheck/import/package125; compiled probes pass four cases, of which the last is a lower-runtime cold private round trip, not native seven-selection delivery. Independent format review approved the leaf after 44 tests and 18 direct syntax/provenance probes. The authority review passed 75 owner and 36 adjacent checks but reproduced a current-witness admission bypass in parent copy. Its correction moves current witness syntax and every Session-owner claim into the shared private admission helper; current acceptance and eager/deferred parent copy now reject the same null/false-owner evidence under active or retained source policies. An eight-partition negative-first witness and the compiled lower probe preserve parent/child bytes and caches on refusal. The narrow follow-up independently passed 76 owner, 36 adjacent, four compiled and four missing/sparse-current-witness compatibility partitions and approved HIGH-1 closure. Complete detached proof is still required; sparse current evidence can remain valid when selected patches themselves prove steps. Original dissent is retained as evidence, not waived by green counts. Counts overlap and are not summed. The private-reselection slice is accepted within these boundaries; remaining native/public work lives only in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
301
+ The new owner cohort passes 76 tests, including seven-by-seven policy round trips at retention 0/1/7/100 through existing current/acquisition ports, complete-proof refusal, foreign/lost/corrupt private cases, no excluded body opens/writes, proof refresh after private mutation, shared folding, mode-only byte stability, observation and parent copy. Fresh full validation passes **1159/1159**, build/typecheck/import/package125; compiled probes pass four cases, of which the last is a lower-runtime cold private round trip, not native seven-selection delivery. Independent format review approved the leaf after 44 tests and 18 direct syntax/provenance probes. The authority review passed 75 owner and 36 adjacent checks but reproduced a current-witness admission bypass in parent copy. Its correction moves current witness syntax and every Session-owner claim into the shared private admission helper; current acceptance and eager/deferred parent copy now reject the same null/false-owner evidence under active or retained source policies. An eight-partition negative-first witness and the compiled lower probe preserve parent/child bytes and caches on refusal. The narrow follow-up independently passed 76 owner, 36 adjacent, four compiled and four missing/sparse-current-witness compatibility partitions and approved HIGH-1 closure. Complete detached proof is still required; sparse current evidence can remain valid when selected patches themselves prove steps. Original dissent is retained as evidence, not waived by green counts. Counts overlap and are not summed. The private-reselection slice is accepted within these boundaries; remaining native/public work lives only in [BACKLOG.md](../BACKLOG.md).
300
302
 
301
303
  ## Accepted selected runtime cache and reads
302
304
 
@@ -372,7 +374,7 @@ While selected attachment is pending, local memory authoring rejects before stor
372
374
 
373
375
  Legacy Stop compatibility retains the prior reader's treatment of an invalid optional `from` anchor as absent while preserving a valid `at` cutoff. This narrow translation does not relax lifecycle-v2/native-v2 anchors, malformed selections or epoch admission. The pure policy family covers owned/unowned markers over all seven selections, alongside the native reload/cutoff witness.
374
376
 
375
- The native-composition group in `tests/extension.test.ts` and the direct first-authoring contract in `tests/runtime.test.ts` cover atomic first authoring, exact CAS/rollback, unavailable-private refusal, current-memory attachment, policy/fork boundaries, explicit-Start run reset and a later Passive/Off origin-publication boundary. Negative witnesses reproduced the missing Active fence, empty boundary-less fork, stale prompt and legacy cutoff failure before correction. The original N1c composition family had 12 tests; the combined native/query/policy/fixture cohort passed 338/338, and the secondary five-file fixture family passed 72/72. The N1c full `npm run validate` passed build/typecheck, **1112/1112 tests with zero failures/cancellations**, compiled import and the 125-file dry-run package check. The SDK migration preserved response/private-proof assertions; the false bootstrap/compiled-history cases and known registration-removal SDK witnesses now pass. The earlier owner review approved its lifecycle slice after 93 checks. A later independent SDK/provenance review passed 122 checks but reproduced two raw-evidence losses. Their corrections, including an explicit-empty follow-up, are independently verified. The last ten aggregate failures were adjudicated without production changes: seven SDK cases asserted obsolete policy/checkpoint shapes, one SDK case incorrectly expected stale shared model-cache exposure through required-private failure, and two runtime cases used a pre-native reload API or obsolete Off marker. Exact owner-bound policy records remain distinct from accepted semantic boundaries; failed private proof blocks all model reads/provider fallback, refusal preserves bytes, and explicit repair changes only permitted bootstrap lifecycle. Sparse selected reload remains read-only, not accepted publication authority. Independent final review reran all eight SDK and two runtime cases and approved this bounded test-integrity closure. Counts overlap the aggregate and are not summed. Remaining work and ownership live only in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog). The separately completed compiled SDK/faux probe installs only the compiled factory (the source factory is disabled), with isolated roots and explicit in-memory fake credentials/provider. It proves default-all-three Off inertness, Passive observation without acquisition, first authoring, accepted answers, bootstrap expiry/provider-history suppression, current-memory resume and stale owned-patch refusal after in-flight mode ABA. Both probe cases pass and were independently rerun; this is not public-subset or live-model evidence. No working-store rollout or live-model result follows from this bridge.
377
+ The native-composition group in `tests/extension.test.ts` and the direct first-authoring contract in `tests/runtime.test.ts` cover atomic first authoring, exact CAS/rollback, unavailable-private refusal, current-memory attachment, policy/fork boundaries, explicit-Start run reset and a later Passive/Off origin-publication boundary. Negative witnesses reproduced the missing Active fence, empty boundary-less fork, stale prompt and legacy cutoff failure before correction. The original N1c composition family had 12 tests; the combined native/query/policy/fixture cohort passed 338/338, and the secondary five-file fixture family passed 72/72. The N1c full `npm run validate` passed build/typecheck, **1112/1112 tests with zero failures/cancellations**, compiled import and the 125-file dry-run package check. The SDK migration preserved response/private-proof assertions; the false bootstrap/compiled-history cases and known registration-removal SDK witnesses now pass. The earlier owner review approved its lifecycle slice after 93 checks. A later independent SDK/provenance review passed 122 checks but reproduced two raw-evidence losses. Their corrections, including an explicit-empty follow-up, are independently verified. The last ten aggregate failures were adjudicated without production changes: seven SDK cases asserted obsolete policy/checkpoint shapes, one SDK case incorrectly expected stale shared model-cache exposure through required-private failure, and two runtime cases used a pre-native reload API or obsolete Off marker. Exact owner-bound policy records remain distinct from accepted semantic boundaries; failed private proof blocks all model reads/provider fallback, refusal preserves bytes, and explicit repair changes only permitted bootstrap lifecycle. Sparse selected reload remains read-only, not accepted publication authority. Independent final review reran all eight SDK and two runtime cases and approved this bounded test-integrity closure. Counts overlap the aggregate and are not summed. Remaining work and ownership live only in [BACKLOG.md](../BACKLOG.md). The separately completed compiled SDK/faux probe installs only the compiled factory (the source factory is disabled), with isolated roots and explicit in-memory fake credentials/provider. It proves default-all-three Off inertness, Passive observation without acquisition, first authoring, accepted answers, bootstrap expiry/provider-history suppression, current-memory resume and stale owned-patch refusal after in-flight mode ABA. Both probe cases pass and were independently rerun; this is not public-subset or live-model evidence. No working-store rollout or live-model result follows from this bridge.
376
378
 
377
379
  ## Configured scope defaults and native capture
378
380
 
@@ -382,7 +384,7 @@ The native resolver and policy-lifetime fallback now use these loaded scopes, no
382
384
 
383
385
  An existing registration retains its loaded defaults until reload. Recorded branches retain their scopes over reload/resume, later global edits and mode-only Off/Start; a fresh independent owner after reload samples the new default. Off forks inherit their source's concrete scopes into a detached child-owned pending record, not the child's later global default, and cold Off resume preserves that pending choice without parent-header reads. No native subset memory activation or public scope-selection controls are installed: the existing enabled non-default guard remains before canonical acceptance. Active denial stays inference-blocked; unavailable Passive does not acquire a memory view merely because its tools are declared.
384
386
 
385
- During integration, after config data admission but before native binding, negative witnesses reproduced configured CWD being replaced with all three (including unintended all-three auto-start). Binding the loaded default and capturing before the separate activation guard closes that integration gap. Independent review approves this bounded DATA/capture slice and separately reran the 84 owner checks and all three compiled cases. The owner cohort passes 84 checks: config permutations/malformed fields, 33 new native policy-capture/legacy/gated/Off-fork witnesses, existing composition and selected-policy/Off families. Fresh full `npm run validate` passes **1148/1148**, build/typecheck/import and package125. The separate compiled SDK/faux probe passes three cases, including a persisted same-physical-owner Off policy/resume versus later all-three defaults and refusal of a widening mode-only Start. The probe persists an ordinary native answer before reopening Pi's lazily written session file; it does not fabricate a semantic boundary. These counts overlap and are not summed. This is data/capture preparation, not public seven-selection acceptance, live-model quality or working-store rollout. Remaining work and review ownership live only in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
387
+ During integration, after config data admission but before native binding, negative witnesses reproduced configured CWD being replaced with all three (including unintended all-three auto-start). Binding the loaded default and capturing before the separate activation guard closes that integration gap. Independent review approves this bounded DATA/capture slice and separately reran the 84 owner checks and all three compiled cases. The owner cohort passes 84 checks: config permutations/malformed fields, 33 new native policy-capture/legacy/gated/Off-fork witnesses, existing composition and selected-policy/Off families. Fresh full `npm run validate` passes **1148/1148**, build/typecheck/import and package125. The separate compiled SDK/faux probe passes three cases, including a persisted same-physical-owner Off policy/resume versus later all-three defaults and refusal of a widening mode-only Start. The probe persists an ordinary native answer before reopening Pi's lazily written session file; it does not fabricate a semantic boundary. These counts overlap and are not summed. This is data/capture preparation, not public seven-selection acceptance, live-model quality or working-store rollout. Remaining work and review ownership live only in [BACKLOG.md](../BACKLOG.md).
386
388
 
387
389
  ## Guarded nonfork native selection binding
388
390
 
@@ -392,7 +394,7 @@ Pre-runtime Passive and its read-only loader derive only the selected shared sub
392
394
 
393
395
  **Preparation boundary:** The enabled non-default guard and scope-command refusal are unchanged. Fork attachment now has the separately reviewed canonical-deferred disposition below, but fresh shared-only native creation is prepared below but remains unexecuted behind the subset guard; selected facility/response/handoff completion and the whole native matrix remain required before enabling subsets. The Session-only Passive branch is prepared code behind that guard, not a claim of native Session-only execution. Explicit Off operator inspection remains a separately requested disposable reader, not model participation or origin authority.
394
396
 
395
- A negative native test showed explicit Start previously skipped the common first-authoring port; it now observes exactly one call with captured scopes, no pre-existing lifecycle/cache, one genuine origin and one accepted native checkpoint. The old Telegram failure-injection target changed from private acquisition to this actual port; its same completed-failure/menu-revocation assertions still pass. Fresh full validation passes **1175/1175**, typecheck/build/import/package125; six compiled cases pass, including real SDK explicit Start through the compiled common port exactly once. The focused five-family owner run passes 112 tests. Counts overlap and are not summed; this does not expand the supported enabled selection beyond all three. Independent review reran 189 native/config/context/Telegram checks and all six compiled cases and approved this bounded preparation only. Scope A→B→A must invalidate owning restoration/activation/observation work before public selection is enabled; value equality is not that proof, and a full mode-bound receipt must not cancel the separately permitted latest Passive choice. Remaining work ownership lives only in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
397
+ A negative native test showed explicit Start previously skipped the common first-authoring port; it now observes exactly one call with captured scopes, no pre-existing lifecycle/cache, one genuine origin and one accepted native checkpoint. The old Telegram failure-injection target changed from private acquisition to this actual port; its same completed-failure/menu-revocation assertions still pass. Fresh full validation passes **1175/1175**, typecheck/build/import/package125; six compiled cases pass, including real SDK explicit Start through the compiled common port exactly once. The focused five-family owner run passes 112 tests. Counts overlap and are not summed; this does not expand the supported enabled selection beyond all three. Independent review reran 189 native/config/context/Telegram checks and all six compiled cases and approved this bounded preparation only. Scope A→B→A must invalidate owning restoration/activation/observation work before public selection is enabled; value equality is not that proof, and a full mode-bound receipt must not cancel the separately permitted latest Passive choice. Remaining work ownership lives only in [BACKLOG.md](../BACKLOG.md).
396
398
 
397
399
  ## Canonical fork disposition before native copy
398
400
 
@@ -409,7 +411,7 @@ Copy publication uses the already existing single-use origin author callback to
409
411
 
410
412
  The reproduced native all-three/canonical-deferred case previously failed with `Session requires explicit private acquisition` after boolean presence chose ordinary current acceptance. It now copies parent-current data while retaining child step 3/shared run fields. A counterfactual fixed-snapshot author failed newer-Passive retention (`active != passive`); sampling mode at the existing author boundary closes that race without a new engine/API. Added fixtures cover header-only 7×7 stored/requested selections, detachment/no cache/no migration, missing/deferred/malformed source, sticky private loss, cancelable/stale waits before header IO, native deferred acquisition/Passive/Off/reset failure/cold no-recopy, and unacquired refusal.
411
413
 
412
- Fresh aggregate **1182/1182**, affected seven-family owner **121/121**, and compiled **7/7** pass; counts overlap. The compiled suite has five native SDK cases (one with an explicitly lower-runtime seeded canonical deferred child) and two lower-runtime cases. The seeded case observes preserved fields at genuine copy publication, then verifies intentional explicit-Start specification clearing. It does **not** demonstrate native Session-excluded fork creation or public seven-selection delivery. Independent review approved this bounded all-three/deferred closure after 164 affected checks and the same seven compiled cases; no source change was requested. Scope-ABA ownership, fresh shared-only deferral, automatic/first-mutation unacquired composition, facility/response composition and full native matrix remain gated work in [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
414
+ Fresh aggregate **1182/1182**, affected seven-family owner **121/121**, and compiled **7/7** pass; counts overlap. The compiled suite has five native SDK cases (one with an explicitly lower-runtime seeded canonical deferred child) and two lower-runtime cases. The seeded case observes preserved fields at genuine copy publication, then verifies intentional explicit-Start specification clearing. It does **not** demonstrate native Session-excluded fork creation or public seven-selection delivery. Independent review approved this bounded all-three/deferred closure after 164 affected checks and the same seven compiled cases; no source change was requested. Scope-ABA ownership, fresh shared-only deferral, automatic/first-mutation unacquired composition, facility/response composition and full native matrix remain gated work in [BACKLOG.md](../BACKLOG.md).
413
415
 
414
416
  ## Explicit native first-Session activation
415
417
 
@@ -423,7 +425,7 @@ Deferred/fork-pending state is never independent empty-Session permission; canon
423
425
 
424
426
  New regressions cover three prior shared selections, policy/port identity and single genuine checkpoint, passive run-field reset versus preserved source step, no dummy private history, Active resume refusal followed by explicit acceptance, newer Passive/Off, shared/run/header-loss CAS, deferred/pending/acquired-loss/future refusal, accepted-publication finality and same-owner private denial with both present and cleared caches. The original Start/source regression failed because ordinary current acceptance left Session unacquired. A counterfactual initial new-route implementation without remembered-private guards incorrectly accepted a rewritten unacquired source after live private acceptance; the new denial witnesses close that regression. Existing held-Stop/failing-Start/coalesced-Start tests remain unchanged and pass.
425
427
 
426
- Fresh full **1189/1189**, affected six-family **215/215**, and compiled **8/8** pass (overlapping counts). The compiled suite has six SDK cases, including two explicitly lower-seeded canonical fixtures, and two lower-runtime cases. The new actual SDK Start performs exactly one `unacquired` call, preserves source step 4, clears old run fields, creates Session at revision zero, and subsequently accepts a genuine original request/new answer without exposing the old repair/specification. Independent review approved this bounded slice after 103 source/lower cases, all 116 unchanged extension cases and the eight compiled cases, plus an uncounted cleared-cache/removed-header refusal challenge. No source change was requested. This does not establish native subset authoring/activation or fresh Session-excluded native fork creation. Automatic attachment permission, first-mutation/facility composition, scope-ABA and the coherent full matrix remain separately owned by [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
428
+ Fresh full **1189/1189**, affected six-family **215/215**, and compiled **8/8** pass (overlapping counts). The compiled suite has six SDK cases, including two explicitly lower-seeded canonical fixtures, and two lower-runtime cases. The new actual SDK Start performs exactly one `unacquired` call, preserves source step 4, clears old run fields, creates Session at revision zero, and subsequently accepts a genuine original request/new answer without exposing the old repair/specification. Independent review approved this bounded slice after 103 source/lower cases, all 116 unchanged extension cases and the eight compiled cases, plus an uncounted cleared-cache/removed-header refusal challenge. No source change was requested. This does not establish native subset authoring/activation or fresh Session-excluded native fork creation. Automatic attachment permission, first-mutation/facility composition, scope-ABA and the coherent full matrix remain separately owned by [BACKLOG.md](../BACKLOG.md).
427
429
 
428
430
  ## Native first mutation over an unacquired source
429
431
 
@@ -435,7 +437,7 @@ An accepted cache stays on the ordinary current-patch route. Deferred/pending fo
435
437
 
436
438
  Regressions check an actual single private-metadata replacement (no empty intermediate publication), source run fields, three prior shared selections/no-ops, foreign physical context, malformed/deferred/pending denial, cancellation/equal-policy/ABA, semantic/run/header CAS, private knowledge with both accepted/cleared cache, and post-publication failure. The original `new` dispatch failed on existing lifecycle. A counterfactual stale native snapshot reset step to 1 instead of 5; a raw foreign context also originally borrowed policy until the physical-owner guard was added. Those guards are substantive source fixes, not fixture adjustments.
437
439
 
438
- Fresh full **1197/1197**, focused owner **119/119**, compiled **10/10** pass (overlap, not summed). Eight SDK cases include four explicitly lower-seeded canonical fixtures; two cases are lower-runtime only. New SDK coverage admits a genuine original Passive first patch, preserves an equal-policy request, does not persist the Passive ordinary answer as Session response, and reports the old tool as an error after mode ABA while preserving canonical bytes. Existing provider-input assertions remain; the new first-mutation probe checks native user input/absence of old specification-repair and verifies retained shared data after publication. That sequence introduced a source after Passive observation; it does **not** establish per-turn external-source refresh. The separately validated [pre-runtime Passive input boundary](#native-pre-runtime-passive-input-observation) below proves source visibility at mode entry/reload before mutation; the enabled-subset facility/input matrix remains separate. Independent review approved this bounded mutation slice after 258 affected native/lower cases, 39 lifetime/facility cases and the ten compiled cases. It explicitly confirmed that the pre-mutation Passive input limit is not a fixture waiver or full facility acceptance. No source change was requested. No new runtime API/format/backend or partial-scope activation was added. Remaining work is owned only by [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
440
+ Fresh full **1197/1197**, focused owner **119/119**, compiled **10/10** pass (overlap, not summed). Eight SDK cases include four explicitly lower-seeded canonical fixtures; two cases are lower-runtime only. New SDK coverage admits a genuine original Passive first patch, preserves an equal-policy request, does not persist the Passive ordinary answer as Session response, and reports the old tool as an error after mode ABA while preserving canonical bytes. Existing provider-input assertions remain; the new first-mutation probe checks native user input/absence of old specification-repair and verifies retained shared data after publication. That sequence introduced a source after Passive observation; it does **not** establish per-turn external-source refresh. The separately validated [pre-runtime Passive input boundary](#native-pre-runtime-passive-input-observation) below proves source visibility at mode entry/reload before mutation; the enabled-subset facility/input matrix remains separate. Independent review approved this bounded mutation slice after 258 affected native/lower cases, 39 lifetime/facility cases and the ten compiled cases. It explicitly confirmed that the pre-mutation Passive input limit is not a fixture waiver or full facility acceptance. No source change was requested. No new runtime API/format/backend or partial-scope activation was added. Remaining work is owned only by [BACKLOG.md](../BACKLOG.md).
439
441
 
440
442
  ## Native pre-runtime Passive input observation
441
443
 
@@ -465,7 +467,7 @@ The native binding supplies the existing restoration-owner check and latest inde
465
467
 
466
468
  The original wrapper's pre-wait capture reproduced `active != passive` after a held lock. A new callback's reentrant Abort initially also escaped the publisher guard; the explicit post-sample signal check closes that reproduced edge. Tests cover all three shared selections × four windows × two modes, selected-only open paths, fresh lifecycle capture, initial/late refusal, canceled waits without sampling, single use/expired publishers and accepted-publication finality. A separately labeled DATA composition case uses an actual lower accepted checkpoint and child-owned native records to retain pending through current acceptance/Off/cold inspection; it is not native shared-subset execution.
467
469
 
468
- Fresh full **1203/1203**, focused five-family **112/112**, compiled **11/11** pass (overlapping counts). Eight SDK cases (four lower-seeded canonical fixtures) retain prior all-three/request proofs; three cases are lower-runtime only, including the new late-mode deferral/reentrant-abort case. That lower probe imports the existing compiled internal storage module for its peer lock, not a new package-root export. Independent review approved this preparation only after 122 affected checks and all eleven compiled cases; no source correction was requested. It explicitly excludes execution of the guarded native shared branch and zero-filesystem-activity promises for late rejection. Remaining lifetime/facility/native matrix work and activation gate are owned only by [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
470
+ Fresh full **1203/1203**, focused five-family **112/112**, compiled **11/11** pass (overlapping counts). Eight SDK cases (four lower-seeded canonical fixtures) retain prior all-three/request proofs; three cases are lower-runtime only, including the new late-mode deferral/reentrant-abort case. That lower probe imports the existing compiled internal storage module for its peer lock, not a new package-root export. Independent review approved this preparation only after 122 affected checks and all eleven compiled cases; no source correction was requested. It explicitly excludes execution of the guarded native shared branch and zero-filesystem-activity promises for late rejection. Remaining lifetime/facility/native matrix work and activation gate are owned only by [BACKLOG.md](../BACKLOG.md).
469
471
 
470
472
  ## Native scope-only lifetime evidence and future control duty
471
473
 
@@ -479,7 +481,7 @@ A new compiled **public SDK** case persists native physical identity, stages exp
479
481
 
480
482
  Fresh full **1207/1207**, focused six-family **106/106**, and compiled **12/12** pass (overlapping counts). The compiled suite has nine SDK cases (four lower-seeded canonical fixtures) and three lower-runtime cases. This cohort changes tests/evidence only, no production source or publication format. Independent review approved the current-entrypoint/no-extra-primitive conclusion after 120 affected checks, all twelve compiled cases and typecheck, explicitly preserving the idle-host-versus-original-model and lock/known-file monitoring limits. No remediation was requested.
481
483
 
482
- **Future selector contract:** Equal canonical choice must remain a no-op. A different concrete choice must use the same owned native reselection/cancellation path (or prove equivalent withdrawal), never merely mutate a scopes array or rely on equality becoming true again. Explicit choice/acquisition permissions remain distinct from inspection and ordinary attachment. Direct public chooser behavior, enabled native seven-selection lifecycle/facility/response/input acceptance and final scope-change matrix remain gated; these proofs do not waive them. Remaining work is owned only by [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog).
484
+ **Future selector contract:** Equal canonical choice must remain a no-op. A different concrete choice must use the same owned native reselection/cancellation path (or prove equivalent withdrawal), never merely mutate a scopes array or rely on equality becoming true again. Explicit choice/acquisition permissions remain distinct from inspection and ordinary attachment. Direct public chooser behavior, enabled native seven-selection lifecycle/facility/response/input acceptance and final scope-change matrix remain gated; these proofs do not waive them. Remaining work is owned only by [BACKLOG.md](../BACKLOG.md).
483
485
 
484
486
  ## Canonical continuation provenance inspection
485
487
 
@@ -495,7 +497,7 @@ Fork source capture now carries the exact admitted raw artifact-registry JSON pa
495
497
 
496
498
  An explicit empty inherited registry remains distinct from an absent one. The merger checks raw member presence before strict finite-JSON equality; it authors inherited `{}` rather than dropping it or comparing undefined as JSON. Eager/deferred × absent/explicit-empty cases reproduce and guard that boundary without changing global equality.
497
499
 
498
- The correction's final owner family passes 86 tests, including invalid recognized values over successor/first authoring, eager/deferred raw copy, subsequent child deletion, raw-only CAS, special keys, empty/absent presence, ordinary seven-selection × retention properties, no-op/Passive publication and rollback. The first correction review verified 89 cases and found the empty-registry boundary; the narrow follow-up independently passed 94 cases and approved its correction. Counts describe distinct, overlapping families and are not summed into an aggregate claim. Remaining review/integration work belongs only to [BACKLOG.md](../BACKLOG.md#12-ordered-implementation-backlog), not to a weakened preservation contract.
500
+ The correction's final owner family passes 86 tests, including invalid recognized values over successor/first authoring, eager/deferred raw copy, subsequent child deletion, raw-only CAS, special keys, empty/absent presence, ordinary seven-selection × retention properties, no-op/Passive publication and rollback. The first correction review verified 89 cases and found the empty-registry boundary; the narrow follow-up independently passed 94 cases and approved its correction. Counts describe distinct, overlapping families and are not summed into an aggregate claim. Remaining review/integration work belongs only to [BACKLOG.md](../BACKLOG.md), not to a weakened preservation contract.
499
501
 
500
502
  ## Selected source-facility admission
501
503
 
@@ -693,11 +695,11 @@ Selection change revokes stale acquisition evidence. Later re-selection reacquir
693
695
 
694
696
  ## Fork policy and acquisition provenance
695
697
 
696
- **Open D6; recommended deferred policy:** If Session is excluded at child attachment, create only child lifecycle policy/authority and selected shared access. Keep a child-owned deferred-private-copy marker; do not read/copy parent semantic memory merely to provide excluded state. Off also defers parent-header/store acquisition under its existing contract.
698
+ **Implemented D6 policy:** If Session is excluded at child attachment, create only child lifecycle policy/authority and selected shared access. Keep a child-owned deferred-private-copy marker; do not read/copy parent semantic memory merely to provide excluded state. Off also defers parent-header/store acquisition under its existing contract.
697
699
 
698
700
  On the first explicit Session acquisition, validate the direct parent source and copy its then-current private stream/provenance once into the child's absent semantic target. An already legitimate child config/runtime is not proof that semantic copying already happened. Require child-owned pending-copy evidence and exact source/target CAS; refusal for malformed/missing parent or occupied private semantics never becomes empty child memory.
699
701
 
700
- Current `prepareForkCandidate` refuses any occupied checkpoint, tail, metadata, config, or runtime file. Supporting an existing lifecycle-only child therefore requires a reviewed narrow admission path; simply removing that occupancy guard is unsafe. Bind the deferred source to native direct-parent evidence, validate physical identities at acquisition, and never guess another parent from a path shape. Retain the marker through reload until accepted copy; release/reset it only at the accepted child-owned boundary.
702
+ At the original D6 proposal, `prepareForkCandidate` refused any occupied checkpoint, tail, metadata, config, or runtime file. The subsequent selected acquisition path admits the proven lifecycle-only child without removing the general occupancy guard; simply dropping that guard remains unsafe. Bind the deferred source to native direct-parent evidence, validate physical identities at acquisition, and never guess another parent from a path shape. Retain the marker through reload until accepted copy; release/reset it only at the accepted child-owned boundary.
701
703
 
702
704
  An acquired child always uses its own current private state afterward. New selection, tree navigation, or parent drift never triggers recopy. Do not infer unacquired status from temporary file disappearance. If the parent itself legitimately never acquired Session semantics, define the source failure explicitly rather than pretending the child inherited private memory.
703
705
 
@@ -734,7 +736,7 @@ The native seven-selection bridge, public scope controls and mode-only optional
734
736
  - **Lifecycle v1:** It has no accepted excluded-owner witness skeleton. Safe admission requires the complete three-owner semantic/provenance cohort plus config/runtime (the full 11-file proof) before projection. An excluded body's corruption can therefore reject v1 admission. Only owned acceptance with verified exact-byte backup can upgrade; excluded owners remain byte-identical. No selective parser pretends this legacy dependency disappeared.
735
737
  - **Lifecycle v2:** Only selected semantic bodies/provenance plus config/runtime are opened for ordinary selected admission. Acquired excluded Session still requires regular-file/path-chain presence of its private triple, not body reads; unacquired/deferred targets require absence. Retained private causal proof stays lifecycle metadata and cannot be invented by mode changes, observation or missing files.
736
738
  - **Explicit operator inspection:** Current Telegram buttons/help follow wanted participation, not sparse availability. Effective is offered only for2+ owners and reads only that selected overlay; selected shared-only inspection does not require excluded Session bodies. Session/current proof still fails closed, and lifecycle-v1 admission retains its complete-cohort dependency. Disposable Off reads publish/install nothing, clear no fence and grant no private acquisition. This is not automatic Off memory access or a confidentiality promise.
737
- - **Unsupported/foreign evidence:** Unknown epochs, malformed identity/selection/causal proof, old low-level writers without the supported fence and working-store migration are not repaired by this checkpoint. The [settled support policy](semantic-compatibility-decision.md#implementation-direction-and-reserved-names) retains legacy conversion/root reservations throughout State Flow0.x and ends that temporary window beginning1.0.0, with unsupported-version refusal retained. The prepared0.27.0 candidate removes/reuses no reserved root or converter; no transition plan, release or working-store operation is implied.
739
+ - **Unsupported/foreign evidence:** Unknown epochs, malformed identity/selection/causal proof, old low-level writers without the supported fence and working-store migration are not repaired by this checkpoint. The [settled support policy](semantic-compatibility-decision.md#implementation-direction-and-reserved-names) retains legacy conversion/root reservations throughout State Flow0.x and ends that temporary window beginning1.0.0, with unsupported-version refusal retained. Released 0.27.0/0.27.1 and this consolidation retain the converter and retired-root reservations; no transition plan, release or working-store operation is implied.
738
740
 
739
741
  ### Current scope-aware presentation
740
742
 
@@ -788,7 +790,7 @@ The earlier candidate's exact-path/prototype/factory attribution limits still ap
788
790
 
789
791
  ## Native-seven SDK validation candidate
790
792
 
791
- Iteration52 exercises the coherent existing selected bridge on an **unreleased validation candidate**, replacing only the all-three-only native assertion with existing `captureScopeSelection` validation. There is no test-only subset switch, copied factory, lower-seeded canonical memory or second engine. This is not yet retained activation: the accepted all-three guard is restored before the candidate checkpoint ends. Public scope arguments/settings remain disabled. The exact candidate and scripts are retained separately for promotion and regression integration.
793
+ **Historical iteration52 preparation, superseded by the retained native integration above.** The following candidate status, promotion gates and results belong to that checkpoint, not current release prerequisites. Iteration52 exercised the existing selected bridge on an **unreleased validation candidate**, replacing only the all-three-only native assertion with existing `captureScopeSelection` validation. There is no test-only subset switch, copied factory, lower-seeded canonical memory or second engine. This is not yet retained activation: the accepted all-three guard is restored before the candidate checkpoint ends. Public scope arguments/settings remain disabled. The exact candidate and scripts are retained separately for promotion and regression integration.
792
794
 
793
795
  Source and freshly built JS each pass **14 core**, **21 fork/private-copy** and **7 facility** actual-SDK scenarios (zero failure/cancellation/skip). Core covers all seven selections × Active/Passive, original-ID writes/queries/history/batch/keys/patches, rejection/no-op bytes, Session-only new responses, reload, scoped Stop/Passive heads, Off and captured-default/tree-current behavior. Fork covers all seven × Active/Passive plus six late Session-copy cases and one missing-parent-proof denial: shared-only children defer without State Flow parent-header/private-body reads, preserve pending facts through Off/reload, and later copy genuine parent-current private state; acquired child-current never recopies. Default-three header/private-read controls distinguish the zero-I/O cases. No recursive discovery or universal filesystem nonaccess claim follows.
794
796
 
@@ -798,7 +800,7 @@ Build/typecheck pass for the candidate, but a candidate-wide legacy suite attemp
798
800
 
799
801
  ## Evidence and review gates
800
802
 
801
- A synthetic in-memory baseline probe confirmed:
803
+ **Historical M0.3 baseline evidence, not current codec behavior.** The later retained M2 integration and public command sections above discharge the implementation prerequisites recorded here. A synthetic in-memory baseline probe confirmed:
802
804
 
803
805
  - Session config with a scopes field and pre-runtime/retained checkpoints with a scopes field are rejected by today's strict codecs.
804
806
  - `readCheckpointMode({mode: "active", scopes: []})` nevertheless returns Active because it is mode-only extraction. A future complete policy reader must reject/quarantine malformed explicit selection instead of silently falling through to an all-scope default.
@@ -811,4 +813,4 @@ node --experimental-strip-types --test tests/config.test.ts tests/session.test.t
811
813
 
812
814
  Result: **54 passed, 0 failed** on the baseline above. This includes native scripted response-isolation witnesses, current mode/default/branch policy, operation ownership, acquisition, and rehydration. It does not certify seven selections, shared-only authority, deferred private copying, flat tools, or selection-owned cancellation; those remain future implementation acceptance.
813
815
 
814
- The remaining M0.3 work is the exact metadata/host-admission and selected-owner proof, not another general approval gate. D3's value/capture direction is selected, while wire-codec and native persistence proof remains open. D4–D6 require the named authority/response/fork witnesses; neither these recommendations nor the internal selection parser certify installed behavior. The canonical backlog alone owns those remaining cohorts.
816
+ The original M0.3 handoff required exact metadata/host-admission and selected-owner proof, including D3 persistence and D4–D6 authority/response/fork witnesses. The later [M2 functional boundary](#m2-functional-acceptance-boundary) records their completion and explicit legacy dependencies. Neither this historical probe nor the internal selection parser alone certified installed behavior; deterministic SDK evidence still does not certify live-client compatibility. The canonical backlog owns remaining external validation, not completed M2 cohorts.