Recover valid Today edits from a corrupted offline queue #1042

Closed
opened 2026-08-17 21:16:49 +00:00 by timmy · 0 comments
Owner

Problem

A single malformed stackchain.today-sync.v1.*.operation.* browser-storage record makes pending() return an empty queue. Valid offline Today edits are then stranded while the UI can falsely report the account as saved. Reproduced on current origin/main (66968d9): two valid records plus one malformed record resulted in GET-only sync, zero pending operations, and three stranded records.

Scope

  • Isolate and remove only unreadable or structurally invalid Today operation records.
  • Preserve and PATCH every valid operation exactly once in enqueue order.
  • Surface a truthful recovery status rather than plain saved status.
  • Add behavioral and packaged mobile coverage.

Acceptance criteria

  • N valid records plus one malformed record delivers all N valid records exactly once and in order.
  • Only invalid records are discarded; valid records remain until acknowledged.
  • Recovery count is surfaced to the user and a GET-only false-success path cannot occur while valid records exist.
  • Focused and full test suites pass.

Duplicate check

No match among 523 historical issue titles, 8 open issues, 0 open PRs, recent commits, or releases. Closest #1040/#1041 only fixes same-millisecond enqueue ordering and does not isolate parse failures.

## Problem A single malformed `stackchain.today-sync.v1.*.operation.*` browser-storage record makes `pending()` return an empty queue. Valid offline Today edits are then stranded while the UI can falsely report the account as saved. Reproduced on current `origin/main` (`66968d9`): two valid records plus one malformed record resulted in GET-only sync, zero pending operations, and three stranded records. ## Scope - Isolate and remove only unreadable or structurally invalid Today operation records. - Preserve and PATCH every valid operation exactly once in enqueue order. - Surface a truthful recovery status rather than plain saved status. - Add behavioral and packaged mobile coverage. ## Acceptance criteria - N valid records plus one malformed record delivers all N valid records exactly once and in order. - Only invalid records are discarded; valid records remain until acknowledged. - Recovery count is surfaced to the user and a GET-only false-success path cannot occur while valid records exist. - Focused and full test suites pass. ## Duplicate check No match among 523 historical issue titles, 8 open issues, 0 open PRs, recent commits, or releases. Closest #1040/#1041 only fixes same-millisecond enqueue ordering and does not isolate parse failures.
timmy closed this issue 2026-08-17 22:00:19 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: stackchain/stackchain-dashboard#1042
No description provided.