refactor(query): make agent cursor filter hash nanosecond-precise#577
Open
cyriltovena wants to merge 1 commit intomainfrom
Open
refactor(query): make agent cursor filter hash nanosecond-precise#577cyriltovena wants to merge 1 commit intomainfrom
cyriltovena wants to merge 1 commit intomainfrom
Conversation
Use RFC3339Nano in agent list filter hashing so cursor validation detects sub-second filter changes. Add regression tests for sub-second distinction and timezone-normalized equivalent instants.
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.
Summary\n- switch agent list cursor filter hashing from RFC3339 to RFC3339Nano\n- keep UTC normalization so equivalent instants in different time zones hash identically\n- add regression tests for sub-second distinction and timezone-normalized equivalence\n\n## Why\nSecond-level truncation could allow stale cursors to remain valid when filter timestamps change within the same second.\n\n## Testing\n- cd sigil && go test ./internal/query -count=1
Note
Medium Risk
Behavioral change in cursor validation: existing agent list cursors may be rejected more often because filter timestamps are now hashed with nanosecond precision, which can affect pagination flows for clients.
Overview
Makes
ListAgentsForTenantcursor filter hashing nanosecond-precise by formattingSeenAfter/SeenBeforewithtime.RFC3339Nanoinstead of second-leveltime.RFC3339, preventing cursors from remaining valid when filter timestamps change within the same second.Adds regression tests to ensure
buildAgentListFilterHashdiffers for sub-second time changes while still producing identical hashes for equivalent instants across time zones (UTC-normalized).Written by Cursor Bugbot for commit 6cc8fe0. This will update automatically on new commits. Configure here.