chore(memory): R3 final checks recorded (BDR-056, BLK-012)

This commit is contained in:
bchanot committed 2026-10-17 13:00:22 +02:00
1 parent 9bd9acaf58
commit 9bd612c062
8 files changed
+253

No files matched your search

+9
View File
@@ -445,3 +445,12 @@ Apply: R4 PDF reader/writer (byte scanners, inflate), Step 13 uploads (reader in
- Rescue must exist in every non-ready state, not only terminal one: a restart loop offline never reaches "stopped".
- Status listeners from a state machine: notify via microtask, try/catch per listener, never inside load/recover try blocks; stable module-scope subscribe for useSyncExternalStore.
Apply: R4 PDF worker failure states, Step 8 avatar upload errors, any capped retry or offline mode.
## LRN-058 | 2026-10-17 | Rescue paths need proven restore; remember trapping inputs; sniff and cap before read
- "Download a copy" is no rescue until an in-app restore exists and a round-trip test proves equality; reuse the reader that already parses that format (here core `draft.restore`) instead of a new parser.
- Input that trapped a recoverable engine must be remembered (key = every input of the trapping call, e.g. draft + archive) and re-read only on explicit Retry: each re-read spends a capped recovery and pins dead-instance memory.
- Untrusted file pick: route by content from first KiB, apply that path's cap on `file.size` before any full read, decode UTF-8 with `fatal: true` (refuse, never alter).
- User text into i18n templates: `.replace(re, () => value)`; string replacement expands `$&`/`$'`.
- Picker opened from a confirm dialog: call `input.click()` synchronously in the confirm handler (user activation, WebKit).
Apply: any export/backup feature, R4 PDF reader worker failures, Step 13 uploads.