# Mark recovered work by what the canvas queued, not by when the queue opened · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/65f978afef8d5f6d6ee4dbc622944f772e222e9c)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 65f978afef8d5f6d6ee4dbc622944f772e222e9c

Requested commit: 65f978afef8d5f6d6ee4dbc622944f772e222e9c

Commit: 65f978afef8d5f6d6ee4dbc622944f772e222e9c

Tree: d3538e986ecb7360bd9d78a7f0c31fba8c3440dc

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Mark recovered work by what the canvas queued, not by when the queue opened

Marking ops present when the queue activated a strategy missed two
paths. A trip to a local strategy and back redraws the canvas from the
server, but the queue never switches, so work sent before the trip
landed as the canvas's own. And a successor promoted in the background
while the user opened its strategy was stored after activation looked,
so its new op ID went unmarked.

The queue now remembers the reverse: op IDs it made from the canvas's
desired ops, plus the ops it resends in their place. Live sync tells it
to forget them whenever it drops its bases and overlays (a strategy
opened or left, local ones included, or a reset), and ops asked for
before that are not counted. Every other ack is marked restored, so a
background promotion needs no bookkeeping at all. Remembered IDs are
pruned once their records are gone, inside the queue's serialized
writes.

The new regressions drive the real queue: a cloud, local, cloud round
trip through the page session with a drop over the landed edit, and a
gated store that opens the strategy mid-promotion.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

```

## Parents

- [8eaacc121068db01c04c6d45d1feb506a48e3dc5](https://git.cafe/dara/icarus/commit/8eaacc121068db01c04c6d45d1feb506a48e3dc5?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/65f978afef8d5f6d6ee4dbc622944f772e222e9c?format=markdown)
