1 +#
Leaks Detector Reliability Design 5 +Make `leaks` precision-first, stable across reloads and resumes, and incapable of passing an unhydrated placeholder into a local tool.
7 +False positives and session corruption are more harmful than provider disclosure.
8 +When detection is ambiguous or persistence fails, leave the value visible to the provider and notify the user.
12 +The current implementation has produced real session corruption.
13 +A QML identifier such as `agendaFlick.visibleArea.yPosition` matched the JWT regex because it contained three sufficiently long alphanumeric segments separated by dots.
14 +The resulting placeholder later reached an `edit` call and was written into source.
16 +A scan of 607 tracked repository files, excluding the `leaks` fixture corpus and lockfile, found 30 detector matches outside `leaks`.
17 +Most were false positives involving code constants, object properties, type syntax, substring-sensitive query or cookie names, XML-like prose, environment metadata, and dotted identifiers.
19 +The current tests missed these failures because they emphasize positive examples and aggregate match counts.
20 +Several assertions become easier to satisfy when a detector overmatches.
21 +The Pi hook tests also call handlers directly instead of proving hydration through actual agent-loop tool execution.
25 +This design supersedes conflicting requirements in `extensions/leaks/SPEC.md`, including the statement that JWT header and payload decoding are out of scope and the rule that mapping-cap overflow emits non-restorable placeholders.
26 +Implementation must update that specification before changing production behavior.
30 +- Precision and session stability outrank disclosure prevention.
31 +- Regex is acceptable only for distinctive provider-owned formats with strong prefixes or boundaries.
32 +- Structured formats require structural validation.
33 +- Ambiguous values remain visible.
34 +- Every emitted placeholder has a durable reversible mapping before it reaches a provider.
35 +- Only durable mappings may hydrate local text.
36 +- Unknown placeholders never reach local tools.
37 +- Runtime uncertainty is visible to the user without exposing candidate values.
38 +- Tests assert exact semantics and spans, not merely increasing redaction counts.
44 +- built-in provider-token detectors;
46 +- URL, query, header, cookie, assignment, and private-key detection;
47 +- dotenv and process-environment learning;
48 +- placeholder persistence and hydration;
50 +- unit, property, corpus, and Pi integration testing;
51 +- Mise task wiring and CI.
55 +- Preventing a malicious agent from reading local session files with tools.
56 +- Encryption at rest for Pi sessions.
57 +- Cryptographic JWT signature verification.
58 +- Parsing every configuration language completely.
59 +- Restoring old non-durable placeholders for which no value mapping exists.
60 +- Maximizing recall at the cost of false positives.
61 +- Adding detector configuration beyond the existing custom regex surface.
65 +This initiative requires three separately planned phases.
66 +Do not combine them into one implementation plan.
68 +###
Phase 1: Detector precision 70 +Add deterministic incident regressions, fast-check detector generators, the dedicated fuzz task, and precision-first detector implementations.
71 +Update the normative extension specification.
72 +The phase ends with all detector properties and ordinary repository tests green, while persistence behavior remains unchanged.
74 +###
Phase 2: Durable lifecycle and hydration 76 +Add versioned mapping persistence, branch-aware reconstruction, reload/resume behavior, strict hydration, and cross-mode diagnostics.
77 +Use deterministic and property-based lifecycle tests before production changes.
78 +The phase ends with existing detector behavior preserved and every newly emitted placeholder durable.
80 +###
Phase 3: Integration hardening and CI gate 82 +Add complete real-agent-loop execution, restart, tree-navigation, fork, corruption, repository-corpus, and model-based lifecycle coverage.
83 +Tune the dedicated fuzz suite to the two-minute budget and add it to `mise run ci`.
84 +The phase ends with the full release gate green.
86 +Write a roadmap after this design is approved, then write one detailed implementation plan per phase.
87 +Each phase must leave the repository coherent and testable.
89 +##
Property-Testing Stack 91 +Use `fast-check` and its Vitest connector.
93 +The selected versions at design time are:
95 +- `fast-check` 4.9.0;
96 +- `@fast-check/vitest` 0.4.1.
98 +The official connector extends Vitest with property tests and handles runner lifecycle and timeouts.
99 +Fast-check supplies generated inputs, shrinking, seeds, replay paths, run limits, and time limits.
103 +- [Property Based Testing with Vitest](https://fast-check.dev/docs/tutorials/setting-up-your-test-environment/property-based-testing-with-vitest/)
104 +- [fast-check configuration](https://fast-check.dev/docs/configuration/)
105 +- [fast-check runners](https://fast-check.dev/docs/core-blocks/runners/)
106 +- [fast-check npm metadata](https://registry.npmjs.org/fast-check/latest)
107 +- [@fast-check/vitest npm metadata](https://registry.npmjs.org/@fast-check/vitest/latest)
109 +##
Test Architecture 111 +###
Unit regressions 113 +Keep small deterministic regression tests in `mise run test`.
115 +Every discovered property counterexample that represents a distinct production failure becomes a named unit regression before its production fix.
116 +Historical incidents must include:
118 +- long dotted code identifiers that resemble JWTs;
119 +- MIME types and package-like dotted names;
120 +- sensitive-looking constants containing ordinary UI or command identifiers;
121 +- lower-camel-case object references under keys such as `session`, `token`, and `pass`;
122 +- TypeScript type syntax containing `key`;
123 +- query names that merely contain `key`, `auth`, or `token` as a substring;
124 +- cookie names with the same substring problem;
125 +- ordinary XML-like prose under a sensitive-looking element name;
126 +- public key IDs and session metadata in environment variables;
127 +- PuTTY private-key content followed by unrelated text;
128 +- exact known placeholders traversing the real Pi tool path;
129 +- unknown placeholders being blocked before tool execution.
131 +Unit tests assert exact selected ranges, labels, transformed text, restored text, and tool inputs.
132 +Count-only assertions are insufficient where exact behavior is knowable.
134 +###
Dedicated property suite 136 +Create a dedicated property suite outside the ordinary Vitest unit-test include.
144 +`mise run fuzz` runs in one Vitest process with a hard task timeout of two minutes.
145 +It is excluded from `mise run test` and included in `mise run ci`.
147 +Fast-check failures must print their seed and replay path.
148 +A failed seed must be replayable locally without editing production code.
149 +The suite must shrink failures before reporting them.
151 +###
Detector properties 153 +Every detector family gets independent positive and negative generators.
154 +Generators construct semantic cases from components instead of generating arbitrary strings and filtering until a regex happens to match.
156 +Positive properties assert:
158 +- exactly the intended value span is selected;
159 +- safe prefix and suffix text remain unchanged;
160 +- redaction removes the generated secret bytes;
161 +- restoration is byte-for-byte identical to the original;
162 +- harmless whitespace or case variations preserve behavior where the format permits them;
163 +- embedding the case in surrounding text changes only the span offset.
165 +Negative properties assert:
167 +- structurally invalid near-misses produce no span;
168 +- one-field mutations that invalidate a format stop matching;
169 +- ordinary code, prose, IDs, references, names, paths, hosts, and URLs remain unchanged;
170 +- sensitive substrings inside larger key names do not create sensitivity;
171 +- malformed parser input never throws;
172 +- parser uncertainty returns no match.
174 +Each family must deliberately generate boundary lengths, empty components, Unicode surroundings, punctuation, quoting variants, line boundaries, and oversized inputs.
176 +###
Engine properties 178 +The full engine gets cross-detector properties:
180 +- redaction followed by restoration is identity for every durable mapping;
181 +- redaction is idempotent for existing placeholders;
182 +- source objects are not mutated by provider redaction;
183 +- cyclic and deeply nested values terminate within bounds;
184 +- selected spans never overlap;
185 +- replacements preserve every byte outside selected spans;
186 +- detector order cannot change the final result for non-overlapping matches;
187 +- persistence failure emits no new placeholder;
188 +- unknown placeholders cannot cross the tool boundary.
190 +###
Persistence model properties 192 +Use fast-check model-based commands for the placeholder lifecycle:
201 +- rotate generation;
202 +- corrupt one persistence record;
204 +- attempt an unknown placeholder tool call.
206 +The model and implementation must agree after every command.
207 +The principal invariant is that every emitted placeholder is durable and hydratable for its active generation.
209 +###
Repository corpus 211 +Add a negative corpus built from tracked production source outside secret fixtures.
212 +The corpus must include TypeScript, JavaScript, QML, Markdown, JSON, KDL, TOML, YAML, and shell-like text already present in the repository.
214 +Unexpected matches fail with path, line, safe detector label, and a snippet where the matched bytes are replaced by a marker.
215 +The failure output never includes the matched candidate.
217 +Positive demo fixtures remain useful, but each fixture class needs expected detector labels and exact span counts.
218 +Aggregate lower bounds are retained only as secondary coverage signals.
219 +More false positives must never make the primary corpus tests pass more easily.
221 +###
Real Pi integration 223 +Use the real Pi agent loop supplied by the existing test harness.
224 +Do not prove hydration only by calling `emitToolCall` directly.
228 +- provider payload receives a placeholder;
229 +- the scripted model copies that exact placeholder into every built-in tool input shape;
230 +- the tool implementation receives original bytes, never placeholder bytes;
231 +- nested custom-tool input hydrates;
232 +- assistant messages and tool results restore locally;
233 +- `/reload` preserves hydration;
234 +- process restart and session resume preserve hydration;
235 +- a detector implementation change between persistence and resume does not lose the old mapping;
236 +- unknown, corrupted, cleared, or foreign-generation placeholders block before execution;
237 +- blocked calls produce user-visible diagnostics without exposing values.
241 +###
Provider-owned token formats 243 +Keep regex for formats with distinctive provider prefixes and strict lengths or alphabets.
245 +For each format, compare the implementation against current provider documentation where public format documentation exists.
246 +Property tests generate valid format-shaped values and single-component near-misses.
248 +Provider regexes must not expand into generic entropy detection.
252 +Treat a candidate as a JWT only when all conditions hold:
254 +1. It has exactly three Base64URL segments.
255 +2. Header and payload segments decode successfully.
256 +3. Header and payload decode as UTF-8 JSON objects.
257 +4. The header has a nonempty string `alg` member.
258 +5. The signature segment is nonempty valid Base64URL.
260 +Do not verify the signature.
261 +Do not require `typ`.
262 +Dotted identifiers, MIME types, versions, hostnames, and package names therefore remain visible.
264 +Use Node `Buffer` Base64URL decoding and `JSON.parse`.
265 +Regex may identify bounded candidates, but parsing decides validity.
267 +###
URLs and query parameters 269 +Use `URL` and `URLSearchParams` for complete URL candidates.
270 +Redact only parsed passwords and exact sensitive query parameter values.
271 +Usernames, schemes, hosts, paths, parameter names, and fragments remain visible.
273 +Sensitive parameter names use separator-aware normalized tokens.
274 +Names such as `monkey`, `keyboard`, and `author` are not sensitive merely because they contain `key` or `auth`.
276 +For URL-shaped fragments embedded in shell text, use a bounded candidate scanner followed by `URL` parsing.
277 +A scanner match alone never authorizes redaction.
281 +Recognize complete header-name boundaries case-insensitively.
282 +Parse `Authorization`, `X-API-Key`, and `Api-Key` values from bounded line candidates.
284 +`Basic` credentials must decode as Base64 and contain a username/password separator.
285 +`Bearer` remains opaque because valid OAuth bearer formats are not uniformly structured, but the complete header context is required.
287 +Malformed or partial headers remain visible and increment an ambiguity diagnostic.
291 +Parse a bounded `Cookie` header into semicolon-separated name/value pairs.
292 +Normalize and classify the complete cookie name.
293 +Do not classify by arbitrary substring containment.
295 +Only the value span of an exact sensitive cookie name is redacted.
296 +Quoted source-code strings that merely contain the word `Cookie` are not automatically treated as live cookie headers.
300 +Delete the broad assignment matcher as an authority for arbitrary secret values.
302 +Use small anchored recognizers for supported line grammars:
304 +- dotenv and shell-style `KEY=value` lines;
305 +- JSON string properties;
306 +- conservative YAML, TOML, INI, and properties lines;
307 +- complete XML element lines.
309 +A recognizer must identify a complete key token, delimiter, value token, and line boundary.
310 +Programming-language declarations, object references, function signatures, type expressions, and template expressions are rejected.
312 +Because several configuration grammars overlap ordinary source syntax, ambiguous assignment values redact only when the value has a high-confidence provider-specific shape or was learned exactly from dotenv or environment input.
313 +Ordinary opaque values under sensitive-looking keys remain visible.
317 +Keep exact PEM and OpenSSH begin/end block parsing.
318 +Keep PGP and encrypted cosign begin/end parsing.
320 +Parse PuTTY private sections using the declared private-line count and stop before `Private-MAC` or unrelated trailing text.
321 +Never consume the remainder of a file merely because a PuTTY marker appeared.
323 +Keep age and minisign detection restricted to their distinctive prefixes and documented encodings.
325 +Certificates and public keys remain visible.
327 +###
Environment and dotenv learning 329 +Continue exact-value learning only for values from explicit high-precision sensitive keys.
331 +Use this normative name policy:
333 +| Class | Examples | Key name alone authorizes exact learning |
335 +| Secret-bearing | `API_KEY`, `ACCESS_TOKEN`, `CLIENT_SECRET`, `PASSWORD`, `PASSPHRASE`, `PRIVATE_KEY`, `SECRET_KEY_BASE`, `UNSEAL_KEY`, `MNEMONIC` | yes, when the value is non-weak |
336 +| Context-required | `KEY`, `AUTH`, `SESSION`, `COOKIE`, `JWT`, `SEED`, `DATABASE_URL`, `MONGO_URL`, `REDIS_URL` | no; require parsed secret components or a provider-specific value shape |
337 +| Metadata | names ending in `_ID`, `_NAME`, `_PATH`, `_FILE`, `_TYPE`, `_HOST`, `_PORT`, `_MANAGER`, `_SOCKET`, `_ENDPOINT`, or uncredentialed `_URL` | no |
338 +| Public | names prefixed by `PUBLIC_`, `NEXT_PUBLIC_`, or `VITE_` | no |
340 +Separator-aware tokenization treats hyphens and underscores equivalently and never uses arbitrary substring containment.
341 +`MONKEY`, `AUTHOR`, `KEYBOARD`, `SESSION_MANAGER`, `GPG_KEY_ID`, and `PUBLIC_API_KEY` are negative controls.
342 +`PROD_ACCESS_TOKEN`, `CLIENT-SECRET`, and `DATABASE_PASSWORD` are positive controls.
344 +Provider-specific secret shapes override metadata and public naming.
346 +URLs are parsed before learning.
347 +Only password and sensitive query components are learned when parsing succeeds.
349 +Weak/common classification remains a rejection layer, not evidence that a remaining value is secret.
353 +Custom regex remains an explicit user override.
354 +Property tests cover compiler safety, captures, span boundaries, empty matches, and adversarial runtime.
356 +Custom rules do not inherit precision guarantees from built-in detectors because the user explicitly supplied them.
357 +They must still obey traversal, runtime, and persistence invariants.
359 +##
Durable Mapping Design 363 +Use `pi.appendEntry()` because Pi custom entries do not participate in LLM context.
364 +Pi documents custom entries as the persistence mechanism for extension state across reloads.
366 +Persist two versioned custom entry types:
368 +- `leaks-generation-v1`, containing a random session root key and generation ID;
369 +- `leaks-mapping-v1`, containing one encrypted placeholder-to-value record.
371 +Reconstruct state exclusively from `ctx.sessionManager.getBranch()`, not `getEntries()`.
372 +The active root-to-leaf path defines the active generation and mappings.
373 +Mappings on abandoned sibling branches never hydrate.
375 +A child branch inherits generation and mapping entries that are ancestors of its branch point.
376 +Navigating with `/tree` rebuilds state in the `session_tree` hook from the new active branch before another provider request or tool call can run.
377 +Navigating to a point before every generation entry creates and appends a fresh generation at that leaf before redaction resumes.
378 +A forked session reuses copied generation and mapping entries on its copied path, then appends new mappings only to the fork.
379 +Additional authenticated data therefore uses generation identity, not the current session header ID.
381 +Unsupported entry versions are ignored with a user-visible warning and disable new redaction.
383 +For `SessionManager.inMemory()` or `--no-session`, custom entries remain the reload boundary for the current process.
384 +They cannot survive process exit because no resumable session exists.
385 +The extension notifies once that restart durability is unavailable, but otherwise keeps the same persist-before-redact invariant in memory.
387 +###
Placeholder format, key derivation, and encryption 389 +Generate one random 256-bit root key per generation.
390 +Derive separate placeholder-HMAC and mapping-encryption keys with Node `hkdfSync` and distinct context labels.
392 +The only new placeholder format is:
395 +__LEAK_V1_<TAG>[_<TAG>...]_<HMAC32>__
398 +Use one to six sanitized tags of one to 64 uppercase ASCII letters, digits, or underscores.
399 +Use `SECRET` when no detector tag survives sanitization.
400 +`HMAC32` is the first 16 bytes of HMAC-SHA-256 encoded as exactly 32 lowercase hexadecimal characters.
401 +Do not encode secret length, alphabet, or shape.
402 +Do not add collision suffixes.
403 +If a different value collides with an existing placeholder, leave the new value unredacted and notify the user.
405 +Legacy HMAC12 placeholders remain recognizable as unknown placeholders but have no implied mapping.
407 +Encrypt each original value with AES-256-GCM under the derived encryption key.
408 +Use a fresh 96-bit nonce per record.
409 +Authenticate the placeholder, generation ID, and entry version as additional authenticated data.
411 +The root key and ciphertext live in the same session file.
412 +This is deliberate obfuscation and context isolation, not encryption at rest.
413 +Pi sessions already retain local unredacted conversation data.
414 +No security claim is made against a process or agent that explicitly reads and decrypts session files.
416 +###
Persistence ordering 418 +A placeholder becomes active only after its encrypted mapping entry has been appended successfully.
422 +1. detect an exact value span;
423 +2. create the candidate placeholder and encrypted record;
424 +3. append the custom mapping entry;
425 +4. add the mapping to the in-memory restore map;
426 +5. emit the placeholder into provider-bound text.
428 +If append or encryption fails, leave the original value unchanged and notify the user.
429 +Never emit a non-restorable placeholder.
431 +###
Resume, reload, navigation, and fork 433 +On `session_start`, rebuild from the active branch returned by `getBranch()`.
434 +Select the last generation entry on that path and only mapping entries for that generation that follow it on the same path.
435 +Authenticate and decrypt every selected record before enabling redaction.
436 +Populate the restore map only with successfully authenticated records.
438 +Repeat the same reconstruction after every `session_tree` event.
439 +Session replacement flows such as resume and fork create a fresh extension instance and use `session_start`.
440 +A clear operation or fresh generation shadows every older generation on the active path.
442 +A corrupt, missing, duplicate-conflicting, or undecryptable record disables new redaction for the session and notifies the user.
443 +Already authenticated mappings may continue hydrating exact placeholders.
445 +Persisting complete encrypted mappings, rather than only the HMAC key, preserves hydration when detector logic changes between redaction and resume.
447 +###
Clear and capacity 449 +`/leaks clear` appends a new generation entry with a new root key.
450 +Old generation mappings remain historical session data but are inactive.
452 +When the active mapping cap is reached, leave new values unredacted and notify once.
453 +Do not create overflow placeholders.
455 +##
Hydration Boundary 457 +Hydrate only placeholders present in the authenticated durable mapping set for the active generation.
459 +Placeholder replacement is substring-based within strings.
460 +Replace every exact known placeholder token even when embedded in surrounding text.
461 +Never replace partial, case-changed, truncated, or otherwise modified tokens.
463 +After replacement, treat any complete current or legacy `__LEAK_…__` token as unresolved when it is absent from the active restore map.
465 +Before every tool executes:
467 +1. recursively hydrate exact known placeholder tokens in the complete input;
468 +2. recursively scan the resulting input for unresolved complete placeholder tokens;
469 +3. block the tool if any remain;
470 +4. notify the user with tool name, safe argument path, and placeholder label only.
472 +Tool-input traversal accepts JSON primitives, arrays, and plain objects, tracks cycles, and has a depth limit of 64.
473 +Encountering a cycle, unsupported object, or depth overflow means inspection is incomplete and blocks the tool.
474 +Provider-bound redaction uses the same traversal bound but fails open by leaving the unvisited value unchanged and notifying the user.
476 +The unresolved placeholder value and mapped secret are never included in the notification.
477 +The rule applies to built-in and custom tools.
479 +Keep local assistant-message and tool-result restoration symmetric with tool-input hydration.
480 +Unknown placeholders remain visible locally and produce a warning rather than being guessed or removed.
484 +Use one sanitized diagnostic sink for runtime errors, known misses, and precision fallbacks.
485 +When `ctx.hasUI` is true, call `ctx.ui.notify`.
486 +In print and JSON modes, where UI methods are no-ops, write the same single-line diagnostic to stderr with a `[leaks]` prefix.
487 +Never write diagnostics to stdout because JSON mode owns stdout.
488 +Keep diagnostic counters in `/leaks status` in every mode.
490 +Aggregate per provider turn:
492 +- rejected JWT-like candidates;
493 +- malformed structured candidates;
494 +- ambiguous assignment candidates;
495 +- values left visible because persistence or capacity failed.
497 +The aggregate notification includes only safe detector families, counts, and provider-payload paths.
498 +It never includes candidate values, environment names, ciphertext, keys, or decrypted values.
500 +Notify once per session for repeated infrastructure failures:
502 +- generation restore failure;
503 +- mapping authentication or decryption failure;
504 +- unsupported persistence version;
505 +- persistence append failure;
506 +- detector exception;
507 +- mapping-cap exhaustion.
509 +Notify every blocked unresolved-placeholder tool call because user action may be required.
511 +A truly undetected secret cannot produce a runtime notification because the extension has no signal that it was missed.
512 +Property tests, repository corpus tests, and explicit custom regex remain the controls for those misses.
516 +Expected production changes stay within existing `leaks` modules:
518 +- `extensions/leaks/src/detectors.ts`: provider-owned format detectors;
519 +- `extensions/leaks/src/structures.ts`: structured candidate parsing;
520 +- `extensions/leaks/src/dotenv.ts`: conservative source learning;
521 +- `extensions/leaks/src/placeholders.ts`: durable encrypted mappings and generations;
522 +- `extensions/leaks/src/engine.ts`: precision fallback and diagnostics;
523 +- `extensions/leaks/src/pi.ts`: session persistence, notifications, and tool boundary;
524 +- `extensions/leaks/src/types.ts`: persistence and diagnostic records;
525 +- `extensions/leaks/SPEC.md`: normative contract update.
527 +Test changes may add focused generator modules under `extensions/leaks/__fuzz__/` and deterministic regressions under `extensions/leaks/__tests__/`.
528 +Do not add production parser dependencies.
529 +Use Node standard-library parsers and crypto.
531 +Add only `fast-check` and `@fast-check/vitest` as development dependencies.
535 +Detector parsing exceptions leave the candidate unchanged and create a bounded warning.
537 +Persistence or encryption failure leaves the candidate unchanged and disables new redaction until a successful reload or resume establishes durable state.
539 +Decryption or authentication failure never guesses a value.
540 +It disables new redaction, preserves authenticated mappings, and warns the user.
542 +An unresolved tool placeholder blocks before execution.
543 +The tool receives neither placeholder nor guessed plaintext.
545 +No diagnostic path may throw after provider redaction has already replaced a value.
546 +Persistence must complete before replacement, making that state impossible by construction.
548 +##
Acceptance Criteria 550 +- Long dotted code identifiers never match JWT detection.
551 +- JWT positives require decoded JSON header and payload objects plus a nonempty `alg`.
552 +- Query and cookie sensitivity uses complete normalized key tokens, not substrings.
553 +- Ordinary source constants, references, type syntax, and XML-like prose remain visible.
554 +- Environment metadata does not become an exact learned secret merely because its name contains `KEY`, `SESSION`, or `AUTH`.
555 +- Private-key detectors never consume unrelated trailing text.
556 +- Every detector family has generated positive and negative properties with shrinking.
557 +- Property failures report replayable seed and path data.
558 +- `mise run fuzz` finishes within two minutes, is excluded from `mise run test`, and is included in `mise run ci`.
559 +- Tracked production source acts as a negative corpus with safe failure output.
560 +- Every emitted placeholder matches `__LEAK_V1_<TAGS>_<32 lowercase hex>__` and has a successfully persisted authenticated encrypted mapping.
561 +- Placeholder collisions leave the later value unredacted and notify the user.
562 +- Reload and process-resume tests preserve hydration even after detector code changes.
563 +- `/tree`, child-branch, clear-generation, resume, and fork tests reconstruct only mappings on the active root-to-leaf path.
564 +- In-memory sessions preserve mappings across reload but explicitly do not promise process-restart durability.
565 +- Only authenticated active-generation mappings hydrate, including exact tokens embedded within larger strings.
566 +- Unknown placeholders and incomplete tool-input traversal are blocked before every built-in or custom tool.
567 +- TUI and RPC diagnostics use `ctx.ui.notify`; print and JSON diagnostics use stderr without corrupting stdout.
568 +- Persistence, parser, ambiguity, capacity, and unresolved-placeholder events notify the user without exposing values.
569 +- Mapping-cap or persistence failure leaves values provider-visible instead of emitting unstable placeholders.
570 +- `mise run ci` passes.
574 +Property testing cannot prove the absence of all false positives or false negatives.
575 +It substantially improves coverage only when generators and independent oracles model realistic positive and negative classes.
577 +The assignment formats intentionally sacrifice recall because configuration syntax overlaps programming-language syntax without path or language metadata at the provider boundary.
579 +Session custom entries are hidden from normal LLM context but remain readable local session data.
580 +The encrypted mapping format prevents accidental plaintext exposure and enables exact resume; it is not a defense against deliberate local file access.