Repository navigation
Preserve the frozen horizon across export pages - #120
Open
AdeptArbitrage wants to merge 1 commit into
Open
AdeptArbitrage wants to merge 1 commit into
AdeptArbitrage wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Problem
The export contract calls
X-Proofline-Export-Settled-Untila frozen cutoff. The SDK validates that each page has a valid cutoff, but doesn't compare cutoffs across pages. On a synthetic continuation that returns a different cutoff, both clients hand the caller the mismatched page without warning.Change
Check each page against the cutoff on the first page read by the iterator, before yielding the page, even if it is empty. A mismatch raises the existing
urn:proofline:sdk:invalid-paginationerror. Different RFC 3339 spellings of the same instant remain valid, and the SDK preserves the raw header it received. Single-page exports and the public API are unchanged. When resuming, the first page read establishes the cutoff for that iterator; this does not compare against pages saved by an earlier process.This is a narrow follow-up to the iterator merged in #52. An alternate iterator in #31 proposed a cutoff guard; this PR adds only that guard and its tests to the existing implementation.
Verification
bb9148da71343ad72af8a5d3965f9fb0e3ebf58b. The same ten new regression cases ran on the baseline and candidate. Baseline: 6 failed, 4 passed. Patched: all 10 passed. The six failures are newly added checks, not failures in the existing test suite.python scripts/check.py --artifacts <fresh-directory>passed: 228 tests, contract and generated-client checks, lint, formatting, types, wheel/sdist builds, and installed-package smoke tests.