[P3] Superseded waiting offline updates accumulate in Cache Storage #37

Closed
opened 2026-10-27 02:59:42 +00:00 by pedro · 1 comment
Owner

Priority: P3
Type: bug
Source: project review requested 2026-10-26 (second pass)

Location: scripts/offline/worker.js:51, 71

Problem and evidence

Cleanup returns early while an update is waiting. With one tab left open and no update accepted, each deploy installs a full copy that replaces the previous waiting worker, whose cache is never used or deleted: complete caches grow 2, 3, 4, 5, 6 (about 0.6 MB per build).

Suggested correction

When a new copy finishes installing, delete the cache of the waiting build it supersedes (never activated, not a rollback copy, not used by controlled tabs), unless it is the active version.

Acceptance criteria

Retention unit check for superseded waiting copies; browser lifecycle stays at active + waiting copies; existing retention/rollback checks pass; pnpm verify passes.

Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.

Priority: P3 Type: bug Source: project review requested 2026-10-26 (second pass) Location: `scripts/offline/worker.js:51, 71` Problem and evidence Cleanup returns early while an update is waiting. With one tab left open and no update accepted, each deploy installs a full copy that replaces the previous waiting worker, whose cache is never used or deleted: complete caches grow 2, 3, 4, 5, 6 (about 0.6 MB per build). Suggested correction When a new copy finishes installing, delete the cache of the waiting build it supersedes (never activated, not a rollback copy, not used by controlled tabs), unless it is the active version. Acceptance criteria Retention unit check for superseded waiting copies; browser lifecycle stays at active + waiting copies; existing retention/rollback checks pass; pnpm verify passes. Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
Author
Owner

Fixed on maintenance/review-2026-10-27 in 074cc83, 78e869d — PR #40.

A new install deletes the never-activated waiting copy it replaces; five unaccepted deploys keep 2 complete caches (was 6). Follow-up from independent review: all checks run after the version round trips so an accepted update cannot lose its cache. Retention unit check extended.

Branch verification: pnpm verify 145 tests and release budgets; Chromium/Firefox/WebKit review, replay, compatibility and offline lifecycle checks; CI verify runs #111/#112 pass. Record: docs/MAINTENANCE-2026-10-27.md. Closes on merge of PR #40.

Fixed on `maintenance/review-2026-10-27` in `074cc83`, `78e869d` — [PR #40](https://git.guresky.com/pedro/DiveSim/pulls/40). A new install deletes the never-activated waiting copy it replaces; five unaccepted deploys keep 2 complete caches (was 6). Follow-up from independent review: all checks run after the version round trips so an accepted update cannot lose its cache. Retention unit check extended. Branch verification: `pnpm verify` 145 tests and release budgets; Chromium/Firefox/WebKit review, replay, compatibility and offline lifecycle checks; CI verify runs #111/#112 pass. Record: `docs/MAINTENANCE-2026-10-27.md`. Closes on merge of PR #40.
pedro closed this issue 2026-10-27 05:39:05 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: pedro/DiveSim#37
No description provided.