[sui-kv-rpc][sui-rpc-api] Unify Range resolution - #27738
Closed
wlmyng wants to merge 7 commits into
Closed
Conversation
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 01:41 — with
GitHub Actions
Active
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
wlmyng
changed the base branch from
main
to
wlmyng/ledger-history-cursor-application
August 18, 2026 01:41
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 01:51 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 01:53 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-symbolic-unify
branch
from
August 18, 2026 18:35
2e695d5 to
4c77c6b
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 18:36 — with
GitHub Actions
Active
The scan interval still tightens eagerly (after-Item at n scans from n+1), but claims and terminal records now carry the cursor's raw coordinate and kind, mirroring the intra-tx lane: descending stop-side terminals echo the cursor position instead of its successor, and an ascending after-Item that empties the interval retains Item kind. Wire change on terminal no-item frames (cursor bytes and exhaustion kinds); flip enumeration in the PR.
wlmyng
force-pushed
the
wlmyng/ledger-history-symbolic-unify
branch
from
August 18, 2026 19:39
4c77c6b to
8d47538
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 19:39 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 19:50 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-symbolic-unify
branch
from
August 18, 2026 20:29
5ec769f to
39b2401
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 20:29 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 22:38 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 22:55 — with
GitHub Actions
Active
One record and one cursor-application body for both lanes: ResolvedScan<P> with a three-function ScanPosition seam (from_tx, cursor_position, resume_lo). resume_lo canonicalizes the dense u64 lane's Item cursor to its inclusive successor, which keeps the generic emptiness lattice exact and confines the +1/u64::MAX arithmetic to ScanBounds<u64>::to_range at the store edge. Scalar callers read the store range via .range().
All four scalar endpoint resolvers use the same one-line resolve + apply_cursor_bounds shape as events; with_range and the per-endpoint empty branches are deleted (empties ride the total path — apply is identity on them). Ride-along: scalar descending-empty records get the normalized entry = terminal instead of the end-1 formula, matching the intra-tx lane; wire-invisible since empty terminal frames never read entry.
Post-unify both lanes run the one ResolvedScan cursor-application body, so scalar tests that only re-exercise it through the u64 seam duplicate their intra-tx twins. Deleted the structural twins (before-arm tighten/fold/empty, rejected no-ops, entry folds, crossed attribution, empty passthrough); kept the lane-divergent scalar tests: resume_lo successor canonicalization, raw-echo vs scan-start terminals, u64::MAX saturation, and the after/before Item-offset asymmetry. The one twin-missing scenario (before-claim overriding an eagerly written after terminal) is ported into crossed_cursors_descending_attribution.
resolve() takes the scan window in position space and applies cursor bounds itself; callers interpret their own row windows (the event lane via IntraTxCoordinate::tx_window). The row-embedding hook (from_tx), tx_span, and the unused ResolvedScan::empty_at are deleted. The remaining lane seam is ScanCursor<P> on CursorToken — coordinate and resume_lo — since how cursors read is the one thing the lanes actually disagree about.
The symbolic-resume commit's terminal frames echo the raw after-Item coordinate instead of its Boundary successor. Witness that the two token forms admit the same interval on resubmission, so the echo change cannot skip or re-serve an item.
wlmyng
force-pushed
the
wlmyng/ledger-history-symbolic-unify
branch
from
August 18, 2026 23:18
0f03022 to
ea3e1a5
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 23:18 — with
GitHub Actions
Active
Contributor
Author
|
Superseded by a re-cut of this stack with cleaner PR boundaries (renames → behavior-preserving consolidation with characterization pins → wire-semantics alignment → unification → symbolic resume): #27751 → #27752 → #27753 → #27754 → #27755. Content is carried over commit-for-commit; the old branch stays as reference. |
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.
Description
Third PR of the ledger-history convergence stack (#27724 → #27736 → this): the scalar (transactions/checkpoints) and intra-tx (events) scan lanes finish converging onto one resolved record and one cursor-application body.
ResolvedRange/ResolvedIntraTxRangeare replaced outright byResolvedScan<P>overScanBounds<P>; the scalar endpoint resolvers dropwith_rangeand their per-endpoint empty branches and use the same one-callresolveas events; scalar cursor tests that became structural twins of the intra-tx family are pruned (the lane-divergent ones — successor canonicalization, raw-echo divergence,u64::MAXsaturation — are kept). A final commit settles the construction vocabulary:resolvetakes the scan window in position space and applies cursor bounds itself, and the one remaining per-lane seam isScanCursor<P>onCursorToken(coordinate+resume_lo) — how cursors read being the only thing the lanes actually disagree about.Wire change (first commit; terminal no-item frames only, data frames unchanged): terminal cursors now echo the raw request cursor instead of a derived coordinate —
All echoed tokens are resume-equivalent to their predecessors — resuming from either the old or new echo scans the same interval. (One wire-invisible ride-along in the consolidate commit: scalar descending-empty records normalize
entry = terminalinstead of theend - 1formula; empty terminal frames never read entry.)Follow-up (deliberately not here): raw echo enables scalar resume going fully symbolic (uniform
resume_lo,+1confined to the store edge) and anchoring the record onPosition-variant payloads for verbatim cursor echo. Tracked separately.Test plan
Per-arm cursor unit tests in both lanes (tighten / entry-fold / empty / crossed / exact-edge, both cursor kinds), canonical empty-window records, and the
u64::MAXcases inquery_options. The resume-equivalence claim is pinned directly byraw_after_item_echo_resumes_like_successor_boundary(after-Item@n and Boundary@n+1 admit the identical interval), with the descending pair asserted insidetx_after_cursor_pins_descending_terminal. Endpoint behavior is covered by the existinglist_ledger_historye2e suite.Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
ListTransactions/ListEvents/ListCheckpointsendpoints, terminal watermark frames now echo the client's raw cursor position and kind instead of a derived successor coordinate. Echoed cursors remain valid resume points; no client action needed.