@aeondave/pi-persona-mind 0.8.7 → 0.9.1

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/docs/DESIGN.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # pi-persona-mind — current design
2
2
 
3
3
  This is the binding implementation contract. Release history belongs in [CHANGELOG](../CHANGELOG.md);
4
- the user workflow is in [README](../README.md). Evidence behind consolidation decisions is in
4
+ the user workflow is in [README](../README.md). Local design rationale and evaluation boundaries are in
5
5
  [MEMORY-RESEARCH](MEMORY-RESEARCH.md).
6
6
 
7
7
  ## Host and module boundaries
8
8
 
9
- This design contract describes release 0.8.7.
9
+ This design contract describes the current development tree; released changes are recorded separately
10
+ in CHANGELOG.md.
10
11
 
11
- Target the latest stable Pi only, currently 1.4.0, and Node >=22.19. All four development Pi packages
12
+ Target the latest stable Pi only, currently 1.5.2, and Node >=22.19. All four development Pi packages
12
13
  are pinned together; runtime host/typebox packages remain optional wildcard peers. No second host
13
14
  runtime or historical hook-shape adapter is bundled. A development-only security override does not
14
15
  patch an installed host.
@@ -16,7 +17,7 @@ patch an installed host.
16
17
  Mind requires a loaded compatible pi-persona through its versioned local companion handshake.
17
18
  Missing/incompatible presence leaves tools inactive and suppresses capture, storage/import,
18
19
  injection and reminders. A settings file or installed npm package is not proof of an active
19
- companion. Mind 0.8.7 requires Persona 1.17.5 or later for these paired contracts. Its optional npm
20
+ companion. Mind 0.9.1 requires Persona 1.18.1 or later for these paired contracts. Its optional npm
20
21
  peer declares that requirement without auto-installing or activating another extension.
21
22
 
22
23
  The node-only core has no Pi imports. The factory wires native Pi hooks, tools, scope, scheduling
@@ -27,7 +28,7 @@ Command parsing/presentation lives outside the factory. Important seams:
27
28
  |---|---|
28
29
  | core/service.ts | Scope-bound memory/backlog operations, mutation ordering |
29
30
  | core/store.ts | Atomic writes, exclusive ownership, recovery, strict snapshots and CAS |
30
- | core/memory.ts, backlog.ts | Validated facts and deferred-work state |
31
+ | core/memory.ts, backlog.ts | Validated facts, shared persisted-content guard and deferred-work state |
31
32
  | core/scope.ts, mind-settings.ts | Project identity, safe paths and canonical Mind preferences |
32
33
  | extension/persona-dependency.ts | Loaded capability and actual memory-owner contracts |
33
34
  | core/migrate.ts | Bounded, non-destructive import of previous memory layouts |
@@ -52,13 +53,19 @@ Command parsing/presentation lives outside the factory. Important seams:
52
53
 
53
54
  LTM/STM facts have content identity based on kind, text and sorted tags; provenance is excluded.
54
55
  Exact re-recording updates identical normalized content (not semantic equivalence). lastSeenAt tracks recording/promotion, not
55
- recall frequency. Read operations do not boost ranking or reset expiry. An objective is durable
56
- in the ordinary store; an explicitly session-scoped objective remains in that session.
56
+ recall frequency. Read operations do not boost ranking or reset expiry. `term` alone selects lifetime:
57
+ `kind: objective` is not automatically promoted, so a short objective remains expiring project context
58
+ and a session objective remains on that active native session branch.
57
59
 
58
60
  Supersession retires an active row. derivedFrom stores bounded IDs. Optimizer before images provide
59
61
  bounded recoverability; ordinary supersession/forget are not a temporal database or unlimited undo.
60
- Promotion defaults to project LTM and requires an owned live STM source; persona/shared destinations
61
- must be explicit. Existing persona facts are never reassigned to guessed projects. Promotion removes
62
+ Every long-term `remember` requires an explicit destination: project LTM, persona LTM, or shared LTM;
63
+ there is no implicit persona destination. Short-term memory remains project-scoped by default. Promotion
64
+ defaults to project LTM and requires an owned live STM source; persona/shared promotion destinations
65
+ must be explicit. A scope value selects API routing intent; it is not authenticated user consent. Use
66
+ session for task-specific or uncertain choices (models, strategies, task constraints), project for
67
+ stable repository facts, persona for facts intended across all projects of the same persona, and shared
68
+ only for facts truly intended across personas. Existing persona facts are never reassigned to guessed projects. Promotion removes
62
69
  only its exact source row; equal-text observations from another owner retain their provenance.
63
70
 
64
71
  ## Scope and companion integration
@@ -136,9 +143,12 @@ keep the earliest source expiry; consolidation cannot revive or extend stale wor
136
143
  Unselected entries are preserved. No capacity-enforcing truncation is allowed.
137
144
 
138
145
  At most four plans per session/scope owner, ten-minute lifetime. Preview is immutable to callers.
146
+ Invalidation during an asynchronous preview read also refuses that preview; it cannot stage a new
147
+ plan belonging to the invalidated owner after the read returns.
139
148
  Apply rechecks raw-byte fingerprint, lifetime, source expiry and owner invalidation under the store lock
140
149
  and Mind's mutation lock. Even a same-sequence external file replacement invalidates the fingerprint.
141
- Concurrent apply cannot commit twice. Session/scope changes discard plans; applying never spawns a model.
150
+ Concurrent apply cannot commit twice. Session/scope changes and native branch navigation discard plans;
151
+ appending ordinary turn entries does not invalidate an owner. Applying never spawns a model.
142
152
 
143
153
  Before replacement, persist a scoped before/after receipt to `<store>.optimize-history.json`, under
144
154
  its transaction lock and the memory mutation lock. Maximum 32 receipts / 2 MiB per target, plus the
@@ -155,7 +165,11 @@ discarded; unresolved IO failures can require manual recovery. This is consolida
155
165
  not rollback of arbitrary user edits or a claim of semantic correctness.
156
166
 
157
167
  These are authorization mechanics, not truth verification: an explicit memory tool call has the same
158
- mutation authority as existing remember/forget. The runtime does not silently invent operator approval.
168
+ mutation authority as existing remember/forget. The LLM chooses the destination by meaning and context;
169
+ users need not provide API scope names or a literal “global” keyword, and no new per-save confirmation
170
+ loop is imposed. Truly portable preferences remain eligible for persona/shared memory. Background
171
+ review eligibility does not restrict ordinary model-facing saves, updates or staged curation. The
172
+ runtime does not silently invent operator approval.
159
173
  The full proposal is reviewable before application; no additional mandatory confirmation loop is added.
160
174
 
161
175
  ## Automatic semantic review
@@ -168,18 +182,28 @@ Doctor reports the scheduler's current status. No persistent preference is silen
168
182
 
169
183
  A successful remember/promotion marks its eligible tier dirty. The first eligible burst needs no
170
184
  token minimum. Later attempts require dirty memories and 1,000,000 main-session input tokens since
171
- the preceding actual launch; output, cache read/write and worker tokens are excluded. Usage alone
185
+ the preceding actual launch, including an explicit review; output, cache read/write and worker tokens are excluded. Usage alone
172
186
  cannot dirty a tier. Rapid additions coalesce, and dirty tiers left after a review wait for the same
173
187
  token gate rather than launching in a cleanup loop. Token counters restart at zero on activation;
174
188
  the native session's attempt records preserve whether the first attempt already happened.
175
189
  Requests coalesce for two seconds after native `agent_settled`, while idle and without queued work.
176
190
  Actual worker attempts have a five-minute cooldown and only one may be in flight per Mind instance.
191
+ Explicit commands bypass automatic admission gates but record their actual launches and settled
192
+ digests. They never receive automatic retry permission when interrupted. Failed attempt persistence
193
+ cancels and joins the admitted worker before releasing the active slot.
177
194
  Separate started/settled receipts preserve the attempt target and cooldown without treating an
178
- interrupted review as completed. A semantic digest skips unchanged settled inputs, including terminal
179
- refusals and the state already produced by a successful apply. Only a retry of the interrupted attempt
195
+ interrupted review as completed. Restore considers only the latest attempt for each target, so an
196
+ older interrupted input cannot reappear after its changed-input retry has settled. A semantic digest
197
+ skips unchanged settled inputs, including terminal refusals. Only a retry of the interrupted attempt
180
198
  bypasses the token gate; it still requires a later native settled event and cooldown. Cancellation
181
- alone never rearms it. Incoming input, `agent_start`, off,
182
- session/persona/workspace changes and shutdown cancel and invalidate pending plans. Delegated legs
199
+ alone never rearms it. Unexpected current-owner failures persist terminal suppression without advancing
200
+ the page cursor; a warning asks for inspection when an apply may have completed. If persistence itself
201
+ fails, durable retry suppression cannot be guaranteed and the failure remains visible.
202
+ Incoming input, `agent_start`, native branch navigation, off,
203
+ session/persona/workspace changes and shutdown cancel and invalidate pending plans. Native branch
204
+ navigation preserves session identity but interrupts the old consolidation generation: its worker cannot
205
+ apply or report on the new branch. Explicit work never earns an automatic retry; automatic work retains
206
+ the documented later-settled/cooldown retry policy through a fresh worker, not reuse of an old proposal. Delegated legs
183
207
  do not recursively schedule automatic workers. Shared memories are excluded.
184
208
 
185
209
  Persona hosts a real asynchronous Mind worker, visible in its standard agent view. The exact current
@@ -190,12 +214,29 @@ rotates bounded windows within a page and across older pages. Progress is sessio
190
214
  advances only for completed reviews or explicitly ineligible/already-reviewed sets; cancelled work
191
215
  does not count as reviewed. Byte-excluded records remain eligible on later passes. Coverage requires
192
216
  further admitted triggers, never an unbounded autonomous sweep. Its output is strict JSON with at most four replacement
193
- operations and at most 12 source IDs per operation, never direct storage writes. The parent rejects malformed, unsafe,
194
- unattributed, stale or foreign-owner changes and applies accepted replacements through the existing
195
- plan/CAS boundary. STM expiry cannot be extended, unrelated rows survive, and semantic deletion by age
196
- is not introduced. The before/after proposal is recorded in a durable operator card before applying;
197
- no semantic-quality guarantee or
198
- invented token savings follows from successful execution.
217
+ operations and at most 12 source IDs per operation, never direct storage writes. Automatic application
218
+ requires at least two compatible supplied source IDs in every operation. A proposal containing a
219
+ single-record rewrite is not staged or applied automatically; the completed attempt is settled without
220
+ an automatic retry loop. Single-record correction remains available through explicit workflows. A
221
+ selected automatic window with no same-kind pair starts no worker and consumes no actual-attempt
222
+ allowance. A merge count alone still does not establish semantic truth; conflicting conclusions must
223
+ not be adjudicated by the background reviewer.
224
+
225
+ The parent rejects malformed, unsafe, unattributed, stale or foreign-owner changes and applies accepted
226
+ replacements through the existing plan/CAS boundary. Kind does not change lifetime: consolidating
227
+ owned short-term objectives stays in project STM and preserves the earliest expiry. Unrelated rows
228
+ survive, and semantic deletion by age is not introduced.
229
+
230
+ Before apply, the complete automatic proposal is appended to an unrendered native audit entry; append
231
+ failure still prevents application. Durable store before images and guarded undo remain unchanged.
232
+ An actual automatic change produces one lowercase `mind` information toast using the scheduler's
233
+ existing structured target and summary, without adding a routine transcript result card.
234
+ Automatic no-ops settle silently while retaining attempt/digest/status evidence. Failures, refusals and
235
+ uncertain receipt finalization remain visible with an important warning. Explicit/manual reports keep
236
+ their detailed cards. The unrendered proposal audit preserves worker/model/effort and result reference;
237
+ `/mind optimize history <target>` exposes durable changes and undo provenance. The real worker's
238
+ normal Persona row uses lowercase `mind` and terminates through the same tracked lifecycle.
239
+ No semantic-quality guarantee or invented token savings follows from execution.
199
240
 
200
241
  ## Durable files and recovery
201
242
 
@@ -210,7 +251,15 @@ Stores carry version, sequence, updatedAt and entries. Mutations use same-direct
210
251
  fsync, atomic rename, exclusive lockfiles and ownership checks. Directory fsync is best-effort on
211
252
  Windows. A live/foreign/malformed lock holder is never stolen merely for being old. Corruption is
212
253
  recovered or quarantined with diagnostics, never silently treated as an empty valid store.
213
- The atomic-store pattern is adapted from OpenLore (MIT).
254
+ Backup recovery re-reads the live file after acquiring its exclusive lock: a writer that committed
255
+ while recovery waited takes precedence over the previously observed backup. Recovery never overwrites
256
+ that new live state or replaces a healthy backup with the damaged/missing state it is repairing.
257
+ Windows sharing conflicts during recovery-gate acquisition return to the existing bounded lock
258
+ wait; they never authorize entering the protected callback or deleting another recovery gate.
259
+ Ordinary memory stores default to 10,000 entries and 4 MiB; writes over capacity fail without truncating
260
+ existing facts. Backlog terminal retention and optimizer history have their own bounds. Retrieval and
261
+ injection remain bounded independently of archive size.
262
+ Third-party attribution and license notices are retained in [LICENSE](../LICENSE).
214
263
 
215
264
  Multi-store memory decisions serialize through one profile-wide memory transaction lock, anchored
216
265
  beside shared LTM. A project-only lock is insufficient: persona/shared facts are visible across
@@ -231,6 +280,9 @@ disk cleanup. Progress is informational, shown once per import and cleared when
231
280
  Expiry cleanup operates on the current entries under the mutation lock. Never compute a retained
232
281
  backlog snapshot before acquiring the write lock: a concurrent add would otherwise be erased.
233
282
  Promotion writes LTM before removing STM, so interruption leaves a duplicate rather than data loss.
283
+ Promotion rechecks persisted source text, tags, origin and persona through the same content guard
284
+ used by full reads, consolidation and undo. An unsafe out-of-band record stays in its original tier;
285
+ it is not copied to durable/shared memory or removed from working memory.
234
286
  Backlog cleanup retains active items and bounded terminal history.
235
287
 
236
288
  ## Capture, injection and UI
@@ -247,11 +299,21 @@ wake sources. It cannot be steered, stopped as a worker, counted as an agent or
247
299
  telemetry. Pending proposals are staged, not running. Native owner and scope changes suppress
248
300
  late events; terminal rows have bounded retention. This is cooperative UI, not task authority.
249
301
 
250
- Direct-user strong persistence cues may be captured deterministically before the model starts;
251
- casual cues only suggest a tool call. Prompt/off modes preserve their declared behavior. Quoted,
252
- fenced, peer and worker material is not a direct-user capture request. No-cue input skips migration
253
- waits. Lifecycle generations prevent late capture receipts from leaking into a replacement session;
254
- an accepted write may finish in its original store.
302
+ In AUTO mode, strong direct-user persistence cues may be captured deterministically before the model
303
+ starts, but every such capture is provisional and writes only a native active-branch session note—never
304
+ external project/persona/shared memory, migration destinations, or optimizer dirty state. This includes
305
+ “remember”, “from now on”, and explicitly durable/permanent wording. The receipt says session-only, says
306
+ no durable store was written, and invites a separate deliberate scoped memory call if broader retention
307
+ matches actual user intent; it does not forbid deliberate durable curation. A session append failure
308
+ has no durable fallback. Prompt mode remains nudge-only and off disables detection/capture. Quoted,
309
+ fenced, peer, worker, extension-follow-up and unattributed content are not direct-user capture input.
310
+ Leading negation such as “Never remember that …” is not stripped into a positive capture request.
311
+ Decision extraction also rejects negation in a premise it would discard before `:`. Negative wording
312
+ inside an affirmative fact (“Remember that I never …” or “We decided …: never …”) remains valid.
313
+ No-cue input skips migration waits. Lifecycle/current-input/owner generations prevent stale capture
314
+ notices; accepted notes stay with the original native owner and are never copied to a replacement session.
315
+ Asynchronous status reads use that same owner guard: results and failures from a previous owner
316
+ cannot replace the current owner's counts or display a stale storage warning after shutdown.
255
317
 
256
318
  Normal injection uses entry caps (8 persona/shared LTM, 4 project LTM, 5 STM, 6 backlog), plus a
257
319
  combined 2,400-token planning estimate across all memory blocks, including session notes (up to 600),
@@ -268,19 +330,146 @@ Bound and clear relay state at settlement.
268
330
 
269
331
  Wakes are display-only appendEntry plus a short toast, never sendUserMessage/triggerTurn. Acknowledged
270
332
  due reminders are not replayed. Newly due reminders are armed immediately and cancel on closure.
271
- Keep pending/delivered deadline identity across maintenance re-arms.
272
-
273
- Use shared expandable-card helpers: compact sanitized chrome, terminal-width clipping, full safe body
274
- on expansion. Saved-memory tool bodies do not repeat their call title. A session read is not a save
275
- receipt. Commands retain reports in custom-entry history; warnings/toasts stay short. Display callbacks
276
- must still belong to their accepting session and scope after asynchronous reads.
333
+ Keep pending/delivered deadline identity across maintenance re-arms. Persistence acknowledges only
334
+ the exact `(id, dueAtEpochMs)` shown to the user, compared under the backlog write lock; an old
335
+ acknowledgement cannot consume a concurrent renewal. It clears that deadline, not the backlog item.
336
+
337
+ Standalone cards use Persona's single `createCardFrame` implementation through the synchronous local
338
+ `pi-persona:card-frame:v1` presentation query. Mind mirrors the small structural contract and queries
339
+ at each renderer invocation, without hard-importing an optional package or caching a factory across
340
+ reload. Missing, incompatible, ambiguous or throwing providers use a minimal sanitized full-text
341
+ history fallback, not a second styled card engine. This port conveys no memory, scheduling or
342
+ security authority. Presentation models carry title, semantic state, full body, width-aware preview,
343
+ optional metadata and Markdown; the frame owns theme, truncation, expansion and padding. Custom-entry
344
+ renderers pass their original stable entry object as optional `CardFrameContext.expansionKey`; the
345
+ shared frame owns any click/keyboard synchronization, keyed weakly without retaining entry text. A
346
+ missing key is presentation-only (native tool renderers retain their host-owned interaction shell).
347
+
348
+ Entry cards read the current public `pi.getSettings().outputPad` (native 0/1, default 1) because entry
349
+ render options omit it, and use host-provided expand hints. Native memory/backlog tool results retain
350
+ Pi's shell and receive no duplicate padding or standalone frame. Saved-memory receipts use a compact
351
+ summary with an expand hint; expansion reveals the original receipt, including its addressable ID,
352
+ without rewriting the tool payload or repeating the call title. A session read is not a save receipt. Optimization previews must retain their
353
+ selected-window qualification and never imply every record was reviewed; expansion retains worker,
354
+ model/effort and terminal-reference provenance. Commands retain reports in custom-entry history;
355
+ warnings/toasts stay short and are not duplicate durable cards. Display callbacks must still belong
356
+ to their accepting session and scope after asynchronous reads.
357
+
358
+ ## Read-only memory inspector
359
+
360
+ F10 and `/mind browse [memories|context|timeline]` open one native TUI inspector; `/mind timeline`
361
+ selects its timeline tab. Existing bare `/mind` and `/mind session` reports remain unchanged. RPC,
362
+ print and JSON modes do not open custom TUI. Delegated legs do not receive the shortcut or browse
363
+ access. Entry points require compatible Persona and the actual current native session owner.
364
+
365
+ F10 obtains Persona's stateless frame through the synchronous local
366
+ `pi-persona:inspector-frame:v1` query when opening. Both inspectors use the same width, row
367
+ allocation, gutters and theme `border` role. Mind mirrors only the structural service contract,
368
+ not a second painter; if the service is unavailable, opening reports a compatible-Persona/reload
369
+ diagnostic while memory operations remain unchanged. Selection, tabs, sources, data admission and
370
+ lifecycle remain Mind-owned. Page movement uses the actual rendered list/detail/source/help
371
+ capacity, and narrow layouts shorten controls before hiding the selected record. The native search
372
+ Input receives focus only during search.
373
+
374
+ The inspector is a query/view layer, not a new memory engine. Its explicit `a` action launcher closes
375
+ the overlay before opening native action/approval dialogs. Consolidation calls the existing bounded
376
+ explicit optimizer for the chosen nonshared scope; the launcher does not create a second merge path.
377
+ Knowledge review is a separate proposal workflow described below. Browsing alone remains read-only. Durable browsing reuses strict optimizer
378
+ inspection (including safe/owned admission and pagination); opening it never repairs, migrates, saves,
379
+ schedules, or starts a model call. Session browsing reuses native note replay. Home suppresses project
380
+ scopes. Searches are literal browsing filters, not a replacement for the runtime retrieval ranker.
381
+
382
+ Source metadata (`source`, `derivedFrom`, `supersedes`) remains literal, never an instruction to open
383
+ paths, URLs or private worker archives. Successful explicit `memory remember` results carry a versioned
384
+ native `recording` descriptor with the accepting persona, repository identity and target. A recording
385
+ link requires an exact matching successful tool call/result, current fact content and scope identity
386
+ within the bounded active branch. Old receipts without that attribution cannot establish such a link.
387
+ Session-note links refer to validated native save events. These are recording provenance, not evidence
388
+ that the assertion is true, nor automatic citations of a preceding user message. No store schema,
389
+ retention policy, cross-session access grant or independent transcript archive is introduced.
390
+
391
+ The timeline is an on-demand view of at most 2,000 newest native active-branch entries, with 40 results
392
+ per page and explicit older-entry omissions. It includes user/assistant text and validated session-note
393
+ save/forget events, never reasoning, image bytes, arbitrary custom reports or tool-result bodies.
394
+ Message details are bounded to 32,000 characters with clipping disclosed. Search counts describe only
395
+ that bounded window, not the user's complete conversation history. Tombstones remain historical events.
396
+
397
+ Context inspection holds only the last block prepared by Mind in memory, including session notes,
398
+ capture hints and omission notices. It never reconstructs a supposedly historical selection from today's
399
+ stores, and never claims to observe the provider payload. The existing UTF-8-bytes/3 planning estimator
400
+ and injection policy remain unchanged. A new process has no prior prepared-context snapshot.
401
+
402
+ Native session/branch changes, owner revocation and persona/project changes clear that snapshot and
403
+ abort the open inspector. Every asynchronous page read checks the accepting owner before and after IO;
404
+ revoked results cannot repaint a different owner. UI content is sanitized, width-bounded and navigable
405
+ without executing links or sending model messages. The user can explicitly refresh the view.
406
+
407
+ ## Evidence-grounded knowledge review
408
+
409
+ `/mind review [project|project-long|persona]` and F10's action menu run an explicit knowledge review.
410
+ The default is durable project memory (persona at home). F10 can review a selected fact or a bounded
411
+ scope window. Session/shared are not model-review write targets. The current Persona companion protocol
412
+ admits only the exact active session model/thinking level; Mind does not infer a better model from names,
413
+ change providers, or silently choose a fallback. The real visible `mind` worker still has no tools.
414
+
415
+ The parent inspects safe, owned facts and admits at most six complete records within 12,000 JSON
416
+ characters. The user explicitly selects up to six repository-relative text files. Trusted-workspace,
417
+ containment, symlink, regular-file, size, secret and content checks gate reads; no recursive search,
418
+ source-string path resolution, network access or private worker archive is used. Native user-role text
419
+ is sampled only from a bounded active-branch window. A stored user role is not authenticated human
420
+ intent: quotations, hypotheticals and programmatic messages must be critically assessed. Evidence
421
+ snapshots carry IDs, labels, excerpts, hashes and coverage; omissions cannot establish absence.
422
+
423
+ The task requires one classified finding per supplied fact: supported, proposed correction, conflict,
424
+ insufficient evidence, or proposed retirement. The parent rejects unknown records/citations, duplicate
425
+ findings, malformed fields and unsafe replacement text. Corrective operations preserve kind and scope;
426
+ source lineage and bounded evidence references survive consolidation. These checks establish attribution
427
+ and structural validity, not factual truth. Local repository evidence must not turn a repository-specific
428
+ rule into a universal persona preference; age and latest mention alone are not obsolescence evidence.
429
+
430
+ There is NO automatic application. A complete native proposal report shows reasons, cited evidence,
431
+ coverage and before/after corrections. `/mind review show` reopens it; `/mind review apply` displays it
432
+ and asks for explicit approval. The staged plan lives in a dedicated optimizer instance, not the generic
433
+ memory-tool plan cache, so `/mind optimize apply` cannot bypass evidence validation. Approval reacquires
434
+ maintenance admission, checks evidence freshness and applies through the same CAS/history/undo boundary.
435
+ A synchronous parent evidence guard runs again inside the guarded store callback. This verifies source
436
+ state at the check, not a transaction locking arbitrary repository files against external writers.
437
+
438
+ Retirement is deliberately recommendation-only: the reviewer cannot delete a standalone memory.
439
+ A deliberate scoped `memory forget` remains available for a separately judged retirement, with its
440
+ existing semantics (not consolidation undo). No delete-shaped optimizer plan, new durable schema or
441
+ unbounded history is introduced. `/mind review discard` cancels/discards pending work; an applied change
442
+ requires the ordinary history/undo workflow.
443
+
444
+ A parent review reservation prevents automatic and explicit consolidation from overlapping collection
445
+ or worker execution. Only actual review launches reset automatic usage/cooldown accounting and persist
446
+ explicit attempt markers; interruptions never create an automatic retry entitlement. Staging releases
447
+ the worker reservation rather than holding it while waiting for a human. Apply must acquire a new one;
448
+ concurrent writes or expired plans are refused. New input, agent/model/branch changes, owner revocation
449
+ and shutdown cancel workers/dialogs and invalidate pending review plans. Shutdown joins admitted apply
450
+ work through approval, guarded persistence, receipt finalization and lease cleanup. Revocation blocks new
451
+ admission and guarded writes, but does not roll back an already committed replacement or relabel it as
452
+ cancelled; its finalization is still awaited and stale completion UI is suppressed. Completion uses display-only
453
+ native entries/toasts and never triggers a supervisor turn.
277
454
 
278
455
  ## Verification boundaries
279
456
 
280
- Tests isolate PI_PERSONA_* and a throwaway PI_AGENT_DIR, use the actual Pi 1.4 SDK/tool pipeline and
457
+ The source-checkout `eval:memory` command reports individual paired sentinel ranks and actual bounded
458
+ injection outcomes, retaining historical queries and corruption/removed-fact negative controls.
459
+ Token diagnostics compare the unchanged UTF-8-bytes/3 estimate to pinned published reference vectors,
460
+ with exact input/token-ID hashes and source provenance. All inputs use the same calculation: no
461
+ language detector, language-specific factor, local tokenizer execution or runtime network request.
462
+ The reference encoding is not the current model's billing counter, and eight curated vectors do not
463
+ establish broad language coverage or justify automatic budget tuning. The runtime budget is unchanged.
464
+
465
+ Tests isolate PI_PERSONA_* and a throwaway PI_AGENT_DIR, use the actual Pi 1.5.2 SDK/tool pipeline and
281
466
  offline providers, and join session_shutdown before SDK disposal. Native session tests cover persisted
282
467
  reopen, branch/fork, in-memory behavior and owner revocation. Store tests cover lost writes, stale plans,
283
468
  invalid inputs and concurrent apply. Installed-host/package qualification complements source tests.
284
469
 
470
+ The [post-release source audit](https://github.com/AeonDave/pi-persona-mind/blob/main/docs/reviews/2026-11-12-post-release-audit.md)
471
+ records the qualified snapshots, large-store checks, concurrent-writer stress tests and real-provider
472
+ smokes, with their evidence and platform limits.
473
+
285
474
  Passing these checks proves tested behavior, not perfect memory, semantic compression quality, external
286
475
  provider authentication or every operating system. CI provides separate Windows/Linux/macOS evidence.