mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Persistence: share entity write-through helper; normalize quota at db.put
This commit is contained in:
@@ -129,7 +129,12 @@ Review all changes in scope. If changes span multiple patterns below, apply all
|
||||
|
||||
12. **Persistence safety**: records that may need migration carry a `version` field; reads
|
||||
apply migrations; destructive actions (delete, revert, reset) confirm; storage failures
|
||||
warn rather than silently lose data.
|
||||
warn rather than silently lose data. All IndexedDB writes go through `db.put` — a
|
||||
hand-rolled `tx(…, 'readwrite')` or raw `objectStore.put`/`delete` outside `db.ts` bypasses
|
||||
the quota normalization that mints `StorageQuotaError`, silently losing the fail-loud signal
|
||||
(arch 02). A new per-record entity tier's write-through subscriber calls the shared
|
||||
`wireEntityWriteThrough` helper (`orchestration/entity-persistence.ts`) instead of
|
||||
re-implementing the prev/next diff loop.
|
||||
|
||||
13. **Documentation hygiene** (the docs are maintained artifacts; keep them at altitude): - **Self-containment**: documentation and comments must not add pointers that require an
|
||||
external repository to follow. Knowledge gets captured locally (`docs/spec/`,
|
||||
|
||||
Reference in New Issue
Block a user