mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-01 03:47:25 +08:00
- Mint next_cursor on every cursor-supported sort, not only when 'after' was supplied. A first request (no 'after') previously returned next_cursor=None, leaving cursor mode unreachable from a clean start. - Over-fetch limit+1 so an exactly-full terminal page doesn't mint a spurious cursor pointing at a phantom next page. - Map crafted out-of-range microsecond cursors (OverflowError / OSError in datetime construction) to 400 INVALID_CURSOR instead of leaking 500. - Bump MAX_CURSOR_VALUE_LENGTH 256 -> 512 to match the AssetReference name column max; without this, a long-named asset minted a cursor the same server then refused on the next request. Cross-runtime byte identity with cloud is unaffected because no cloud cursor ever carries a value > 256 (cloud schema doesn't permit it). - Return None from _encode_next_cursor when the boundary row carries a NULL sort value (e.g. an Asset without size_bytes backfilled), instead of silently encoding 0 and mis-positioning the keyset. - Fix schemas_in.py comment so it matches actual handler behavior (last_access_time + 'after' raises 400, does not fall back). - Add AssetsApiError schema + 400 response to GET /api/assets in openapi.yaml so generated clients know the INVALID_CURSOR envelope. - Extend integration coverage: first-page mint, exact-multiple terminal page, cursor walks for created_at/updated_at/size sorts, datetime overflow surfaces as 400 not 500. - Add unit coverage for datetime overflow and 512-char round-trip. |
||
|---|---|---|
| .. | ||
| queries | ||
| services | ||
| conftest.py | ||
| helpers.py | ||
| test_assets_missing_sync.py | ||
| test_crud.py | ||
| test_downloads.py | ||
| test_file_utils.py | ||
| test_list_cursor.py | ||
| test_list_filter.py | ||
| test_metadata_filters.py | ||
| test_prune_orphaned_assets.py | ||
| test_sync_references.py | ||
| test_tags_api.py | ||
| test_uploads.py | ||