50 lines
2.4 KiB
Markdown
50 lines
2.4 KiB
Markdown
# M12-02D Status
|
|
|
|
status: done
|
|
task: commit a catalog preview reference only after verified OPFS persistence
|
|
updated: 2026-08-17 America/New_York
|
|
enablingTask: true
|
|
parityStateChange: false
|
|
|
|
## Scope
|
|
|
|
The production coordinator first runs the M12-02C pre-decode gate, writes the content-addressed
|
|
preview to OPFS, reads it back, and repeats identity verification. Only then may one IndexedDB
|
|
transaction advance the catalog revision and write both the v2 preview reference and an M12-02D
|
|
head receipt. The receipt binds project, asset, base/current revision, base/current manifest hash,
|
|
preview identity, payload identity, and OPFS path.
|
|
|
|
The transaction rereads and compares the complete source catalog row before publication. A stale
|
|
revision or changed row returns `REVISION_CONFLICT`; OPFS and transaction faults return
|
|
`STORAGE_TRANSACTION`. An OPFS payload left by a failure is unreferenced, never presented as a
|
|
committed catalog preview.
|
|
|
|
## Evidence
|
|
|
|
- `WEB_TEST_PORT=5596 npm --prefix web run test:asset-preview-opfs-commit` passed the artifact unit
|
|
test 1/1 and the real Chromium OPFS/IndexedDB test 1/1.
|
|
- `BEFORE_OPFS_WRITE`, `AFTER_OPFS_WRITE`, and `AFTER_CATALOG_PUT` faults all preserved the complete
|
|
revision 7 catalog and left no commit receipt. Only the latter two left an unreferenced payload.
|
|
- Success persisted and reread the 513-byte payload before advancing the catalog to revision 8;
|
|
closing and reopening IndexedDB reproduced the same preview and receipt and rehashed OPFS bytes.
|
|
- `npm --prefix web run typecheck`, `npm --prefix web run lint`, and `git diff --check` passed.
|
|
|
|
## Artifact Hashes
|
|
|
|
- commit coordinator: `36418e480b108eb885b5d8da6633174ed1face1fa62742a64372a45280e727a2`
|
|
- Chromium suite: `043b9b06d4c0275938cc1d4f9837df95f58f281130f3c0f2b90c10540244592e`
|
|
- unit suite: `f489a1d9a4c5fb24a99bce6d31841534c7cf3981b53076a0d9e19d106e9d0d74`
|
|
- manifest: `34fe6c6ab097e58f7b648dd84cb919ecb407a5742e387c513bb3ed53db50eed6`
|
|
- package commands: `7363a8a03cb5f6b1d6bf40d8eabc90b9d48e91aeb4787b175deb4f242c676243`
|
|
|
|
## Next Task
|
|
|
|
`M12-02E`: deduplicate identical preview content without allowing different asset metadata to
|
|
overwrite the shared payload.
|
|
|
|
## Rollback
|
|
|
|
Remove the OPFS/catalog commit coordinator, Chromium and unit suites, M12-02D manifest, package
|
|
command, and this status entry. Restore M12-02D to pending and `nextTask` to M12-02D. No parity
|
|
ledger rollback is required.
|