Repository navigation
offline sync: resend queued writes under an idempotency key #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5cd2255
offline sync: resend queued writes under an idempotency key
vu1n f66cb97
operator: a keyed correct reports the claim's current status too
vu1n 033569f
offline sync: resend automatically only to a Worker that says it hono…
vu1n 390137e
offline sync: an unconnected resend keeps the row's earlier send on r…
vu1n c83ad28
offline sync: a row keeps its key only while every send of it was keyed
vu1n d943894
offline cache: add the key column inside one write transaction
vu1n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2 Confirm Worker idempotency support before enabling automatic retries
When an updated CLI syncs against a Worker deployed before this change, that Worker silently ignores
key. If it commits a write but its reply is lost, the next sync automatically sends the row again and creates a duplicate; a claim purged between attempts can also be recreated. Persisting a client-generated key does not establish that the server honored it. Check server capabilities before the first send and retain the manual ambiguous-send guard for servers without receipt support. Add coverage for a lost reply from an older Worker; the current Python fake always honors keys.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 033569f. The Worker has a new
capabilitiesop (idempotent_writes: true), andpushasks it once before sending. A Worker from before this change answersunknown op. In that case the write goes without a key, and a send that got no 200 waits for the operator's--dropor--resendas before, even after the Worker is upgraded. A keyed row is also never resent to a Worker that stops honouring keys. New tests cover a lost reply from an older Worker (it is applied once and never resent on its own) and that downgrade case.Generated by Claude Code