# M12-04I Status status: done task: release archive staging after quota/OOM and recover with a small archive updated: 2026-08-18 America/New_York enablingTask: false parityStateChange: false ## Scope The archive recovery wrapper maps browser/OPFS quota failures to `STORAGE_QUOTA` and declared allocation failures to `WASM_OUT_OF_MEMORY` only after the M12-04H base transaction has removed staging and re-read the committed project identity. Cleanup or identity drift remains `STORAGE_TRANSACTION`; unrelated range and IO failures are not misclassified as OOM. Real temporary-directory tests partially write the failing payload before injecting each fault. Both paths leave zero staging entries and preserve the previous revision, SHA-256, and committed bytes. The same storage instance then accepts and atomically commits a smaller archive without a Worker or process restart. ## Evidence - `node --test web/tests/unit/library-archive-recovery.test.mjs` passed 4/4. - Quota and OOM each remove a partially written 4 KiB staging payload and preserve revision 9. - Each failed storage instance immediately commits `small-project` at revision 10 with zero staging entries. - `npm --prefix web run test:library-archive-cancellation` passed 6/6 and `npm --prefix web run typecheck` passed. ## Artifact Hashes - parent manifest: `7fce600a416aec5ade1a91a13d86caf4cb1f65b710054b59d525ff8b1d3c7409` - base transaction: `c40adc1449172014cc1820db567e155828314abb404b66e4de13c26ddee06e4b` - recovery protocol: `0ae9801ea151403b244c5f58f7f99231bba7a25abb1f61e3669879510b92dccf` - unit: `a931edef8f3ca1243a80ec2b8e9ff5b8da1dfd339f3d8c162ad2ebd08d3db6a1` - package commands: `cfb232baa494ff59f6c8d65514a08c86332ee9354350b2a0392b6f932a7ee42c` - manifest: `574afa68a787b9481d0e098d38b94cb810a9827fe185b0df796d62cc160ba7c5` ## Next Task `M12-04J`: add malicious ZIP/TAR fixtures to the long-term security regression. ## Rollback Remove the recovery wrapper, real-filesystem unit suite, manifest, and this status entry. Restore M12-04H as the queue tail and move the machine queue back to `M12-04I`. No parity ledger rollback is required.