# Restore only what can be restored whole, and wait out work in flight · dara/icarus

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

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

Visibility: public

Requested revision: 067756b7c2017df1ee14d614b6e8fd5f1f0aa570

Requested commit: 067756b7c2017df1ee14d614b6e8fd5f1f0aa570

Commit: 067756b7c2017df1ee14d614b6e8fd5f1f0aa570

Tree: 2e6ddbf387b89b4f692065772cfab074bea651ab

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Restore only what can be restored whole, and wait out work in flight

Review round 1:
- Rejected work discarded before a restore completes the queue's adoption,
  so its replacement ops are not skipped.
- The restore waits for its page add's ack behind other batches, and takes
  the page as its base only when it came back empty: a page a teammate
  restored first is never read as deletions here.
- A page whose images this device cannot upload again is not restored.
- Discard waits for ops already sent for the page, then withdraws what
  they left; while any remain, the choice stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

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

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