mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-08-31 01:02:04 +08:00
32b7ceee07
Replace offset-based and security.encode_id() pagination with generalized keyset abstraction supporting both single-ID and composite keysets. New abstraction (lib/galaxy/model/keyset_token_pagination.py): - KeysetToken Protocol: polymorphic via to_values()/from_values() - SingleKeysetToken: single ID keyset for runs pagination - KeysetPagination: base64+JSON encoder/decoder - TaskKeysetToken (wes.py): composite (step_order, job_index) keyset Changes to WES pagination: - list_runs: SingleKeysetToken with WHERE id < last_id (unchanged query) - get_run_tasks: TaskKeysetToken with tuple comparison WHERE (step_order, job_index) > (last_step, last_idx) - Removed offset-based _encode_page_token/_decode_page_token - Removed _encode_keyset_token/_decode_keyset_token Benefits: - Cursor-stable pagination under concurrent changes - Efficient composite keyset filtering on UNION queries - Consistent token encoding across all WES endpoints - Protocol-based design - no type checking needed Tests: 9 unit tests for keyset pagination abstraction (all passing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>