Apply legacy Tombstone items when replaying state #2

Merged
kglitchy merged 3 commits from kglitchy/legacy-tombstone into main 2026-09-28 21:43:07 +00:00 AGit
Owner

Older Things Cloud histories record deletions as plain Tombstone items (82 in my history, all from 2019–2020). Replay only handled Tombstone2, so a deletion stored in the legacy kind never removed its object from local state.

Changes

  • Add ItemKindTombstonePlain ("Tombstone") and replay it the same way as Tombstone2. Both kinds share the same payload shape (dloid, dld), verified against raw history.
  • Writes still emit Tombstone2.
  • Add TestStateReplayAppliesLegacyTombstones (fails without the fix, passes with it).

Verification

  • go test ./... passes; gofmt and go vet are clean.
  • Fresh-cache replay of my real history before and after: 3,696 tasks, 478 checklist items, 5 areas, and 23 tags in both. None of the legacy-deleted objects are present in current state, so this is a correctness fix for older histories with no visible change here.

Independent of #1 (Task7); either can merge first.

Older Things Cloud histories record deletions as plain `Tombstone` items (82 in my history, all from 2019–2020). Replay only handled `Tombstone2`, so a deletion stored in the legacy kind never removed its object from local state. ## Changes - Add `ItemKindTombstonePlain` (`"Tombstone"`) and replay it the same way as `Tombstone2`. Both kinds share the same payload shape (`dloid`, `dld`), verified against raw history. - Writes still emit `Tombstone2`. - Add `TestStateReplayAppliesLegacyTombstones` (fails without the fix, passes with it). ## Verification - `go test ./...` passes; `gofmt` and `go vet` are clean. - Fresh-cache replay of my real history before and after: 3,696 tasks, 478 checklist items, 5 areas, and 23 tags in both. None of the legacy-deleted objects are present in current state, so this is a correctness fix for older histories with no visible change here. Independent of #1 (Task7); either can merge first.
Older Things Cloud histories record deletions as plain Tombstone items.
Replay only handled Tombstone2, so a deletion stored in the legacy kind
never removed its object from local state. The payload shape (dloid,
dld) is the same, so handle both kinds alike. Writes still emit
Tombstone2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kglitchy force-pushed kglitchy/legacy-tombstone from 50dd20ed4b to 3701dba082 2026-09-28 21:41:20 +00:00 Compare
kglitchy force-pushed kglitchy/legacy-tombstone from 3701dba082 to 971b399598 2026-09-28 21:43:07 +00:00 Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
kglitchy/things-cli!2
No description provided.