Changes: Accept ADR 0004 and record independent S00-005 review, experiment status and handoff; preserve explicit native browser and durability limitations. Validation: Fresh-cache npm ci and npm run check passed on Node 24.21.0/npm 11.19.0; exact lock pins, HTTPS/SHA512, installed license texts and runtime refusal checks passed. make check passed 72 tooling tests. Scoped diff and whitespace reviewed; native browser quota and process restart were not tested. Task: S00-005 Agent: auto-qa-4078580caf39 Role: qa Action: review Status: done Task title: Выбрать IndexedDB wrapper и migration policy
42 lines
2.4 KiB
Markdown
42 lines
2.4 KiB
Markdown
# Storage design experiment (S00-005)
|
|
|
|
Synthetic fixtures only. No app adapter, shared contract, secrets or real messages.
|
|
ADR: `docs/decisions/0004-storage-design.md` (accepted bounded design; see independent QA evidence).
|
|
`RECOVERY.md` preserves the earlier interruption inventory; its missing-output
|
|
notes are historical, superseded by this task's code and evidence.
|
|
|
|
From this directory, using Node 24.21.0 and bundled npm 11.19.0:
|
|
|
|
```sh
|
|
npm ci --ignore-scripts --no-audit --no-fund --cache /tmp/luma-storage-review-cache --fetch-retries=0 --fetch-timeout=15000
|
|
npm run check
|
|
```
|
|
|
|
`check` refuses other Node/npm versions. Lockfile pins idb 8.0.4 (ISC) and
|
|
fake-indexeddb 6.2.5 (Apache-2.0), with HTTPS URLs/SHA512 integrity and no transitives.
|
|
`.npmrc` retains verified TLS. Runtime dependencies are isolated to this experiment.
|
|
Full license texts are in `licenses/`; production distributions must preserve
|
|
idb's notice. fake-indexeddb is a test fixture and must not enter production paths.
|
|
|
|
- `src/rollback.mjs`: actual unique-index ConstraintError, failed upgrade rollback,
|
|
complete schema/data assertions, corrected retry and same-process connection reopen.
|
|
- `src/quota-blocked.mjs`: explicitly injected quota error after successful requests,
|
|
multi-store abort/checkpoint invariance, account B preservation, retry/reopen;
|
|
held old connection, versionchange/blocked and release; stale-version refusal.
|
|
- `src/_probe.mjs`: preserved exploratory native-API fixture, outside check suite.
|
|
|
|
Each fixture uses its own synthetic database name and deletes it before/after.
|
|
The blocked scenario has a 3-second failure deadline. CI should impose an overall
|
|
process timeout as well. Exceptions/assertion failures cause nonzero exit;
|
|
PASS text is printed only after the corresponding assertions.
|
|
|
|
fake-indexeddb is in memory. Quota fault injection checks the policy response and
|
|
real fixture transaction abort, not a native request/commit QuotaExceededError.
|
|
Reopen is not process restart. No real browser was available (empty inventory).
|
|
Browser multi-tab, physical quota/disk failure, crash/restart, eviction and
|
|
StorageManager permission/persistence grants remain external integration checks.
|
|
Future browser testing should use a disposable isolated origin/profile, repeat
|
|
the schema and blocked scenarios on native IDB, then validate request/commit
|
|
quota failures and restart persistence without filling a user's normal origin.
|
|
No TLS, CORS or encryption workaround is required or authorized.
|