Repository navigation
Use a shared abstract int64 cursor for authoritative sync progress - #59
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50a33ebfad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Normally ordered authoritative pull transactions such as 9 → 10 were rejected because the versioned cursor token used string ordering. Authoritative progress also crossed protocol, reducer and storage boundaries as unrelated machine integers and strings.
Introduce one abstract, non-negative int64 cursor in db_types and expose the same type through overlay. Migrate authoritative progress through protocol, reducer, worker, snapshot/checkpoint, outbox and receipt consumers. JSON codecs enforce the server's safe-integer range; SQLite preserves the complete int64 value; legacy persisted cursor token bytes remain compatible. Checked submission arithmetic defensively rejects abnormal overflowing intervals before persistence, including rejection suffix resubmission. The max-int64 fixture exercises the complete type domain and defensive validation; it is outside the real server's wire range and is not counted as a normal business bug.
Validation:
dune build @all app/native_embed.exe.oand the full forced regression suite passed locally: 681 Alcotest cases plus native/source checks. The external build cache includes a compatibility layout for the existing compiler-boundary test's root locator.Core.stepregression verified RED before the fix and GREEN afterward. HTTP request and decoder now share the existing 64 MiB budget; WebSocket limits remain unchanged.7a8db24d2f1978220174a261a939db5c91f9017e; Journal CI run 37948625893 succeeded on this exact head, including the all-target/native-embed build and full regression suite.Live account/UI acceptance and the separate reconnect finding are outside this change. See
docs/agent-guide/implemented/architecture/2026-10-09-server-cursor-int64.md.