Reject invalid and stale history cursors - #1549
Open
lihongguang-0014 wants to merge 1 commit into
Open
Conversation
lihongguang-0014
force-pushed
the
fix/history-cursor-validation
branch
from
September 7, 2026 09:17
3d1afb8 to
258700e
Compare
lihongguang-0014
force-pushed
the
fix/history-cursor-validation
branch
from
September 7, 2026 09:32
258700e to
f5c0af3
Compare
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.
Scope
Keep the existing
created_at|idhistory cursor format while making malformed and stale cursors fail explicitly.HISTORY_CURSOR_INVALIDandHISTORY_CURSOR_INVALIDATEDv4 errors.This rebuild uses the extracted application/Gateway adapters on current
main. It does not modify the former monolithic RPC handler, add a cursor format or migration, change CLI logic, or introduce a second Web pagination state machine.Compatibility and Upgrade
No database, configuration, persisted session, or desktop profile migration is required. Valid cursors keep their ordering behavior. Null/blank inputs remain compatible. Clients that sent malformed or stale non-empty cursors now receive an explicit non-retryable error instead of an unrelated latest window; existing CLI error propagation already handles these codes without code changes.
Branch
Base branch: main
Target exception: N/A
Issue
Linked issue: None
If None, reason: Standalone history consistency fix without a linked public issue.
Release Note
Release note: History pagination rejects malformed and stale cursors and Web retries safely from the latest page.
Tests
--checkpassed.git diff --checkpassed.No credentialed provider, full browser E2E, released desktop installer, or live cross-platform run was performed. CI remains authoritative for platform coverage.
Maintainer Live Check
Maintainer live check: no
Surface: gateway, browser
Safety
No secrets, local paths, private prompts/transcripts, channel identifiers, or private fixtures are included.
Third-Party Origin
Third-party origin: none
Details if non-none: N/A.
Documentation Changes