Commit 89543df
Revert "fix(network): advance send checkpoint forward-only and keep first send failure"
This reverts commit 88ddeb1.
The forward-only guard was wrong. The cloudsync server computes
lastOptimisticVersion as the last *continuous* version over applied ranges plus
active (pending/running) apply jobs (internal/syncstatus/status.go,
ranges.go:LastContinuousVersion). When an apply job fails it leaves the active
set and is not in the applied ranges, so its range becomes a gap and
lastOptimisticVersion regresses to just before the failed range. That regression
is the server's re-send signal: the client must follow lastOptimisticVersion
backward and re-stream from there. The forward-only guard suppressed it, turning
a recoverable apply failure into a permanently skipped change.
Restoring the original behavior (follow lastOptimisticVersion wherever it points)
also makes review finding #5 ("checkpoint can regress") a non-issue -- the
regression is intended -- and the keep-first failure change moot, since the
server returns a single current failure per response rather than distinct
per-chunk failures.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent dfbb879 commit 89543df
1 file changed
Lines changed: 11 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1616 | 1616 | | |
1617 | 1617 | | |
1618 | 1618 | | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | 1619 | | |
1624 | 1620 | | |
1625 | | - | |
1626 | | - | |
| 1621 | + | |
| 1622 | + | |
1627 | 1623 | | |
1628 | 1624 | | |
1629 | 1625 | | |
1630 | 1626 | | |
1631 | | - | |
1632 | | - | |
| 1627 | + | |
| 1628 | + | |
1633 | 1629 | | |
1634 | 1630 | | |
1635 | 1631 | | |
| |||
1790 | 1786 | | |
1791 | 1787 | | |
1792 | 1788 | | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
| 1789 | + | |
1801 | 1790 | | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1806 | 1797 | | |
1807 | 1798 | | |
1808 | 1799 | | |
| |||
0 commit comments