`save` replaced the module's `items` before awaiting `atomicWriteFile`, so
a refused write left memory ahead of the file: a failed add then refused
its own retry as a duplicate, the list showed the item, and a relaunch
lost it. Mutations also ran side by side on one cached array, so two adds
at once took the same id and the second write dropped the first.
`save` now publishes the new array only after the write succeeds, and
each mutation runs after the one before it, on what that one saved.
`game/patterns.test.mjs` imports the starter's data module with a storage
whose writes can fail and checks a failed add, its retry, a failed remove
and two concurrent adds; the pattern's own app tests pass on the web.
Closes issues/closed/20261112-review-list-detail-pattern-keeps-failed-writes.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>