ComfyUI/tests-unit/assets_test/services
Matt Miller 9b0042d78c feat(assets): bind cursor to sort order + Go-compat JSON escaping
Address three needs-judgment items from the cursor-review judge synthesis:

1. Cursor wire format now includes an "o" key carrying the sort
   direction ("asc" / "desc") it was minted under. A request that
   replays the cursor with a flipped `order` parameter is rejected
   with 400 INVALID_CURSOR instead of silently walking the wrong
   direction. Legacy cursors without "o" still decode (the binding
   is best-effort until cloud mirrors the field — follow-up filed
   separately).

2. JSON serialization now escapes `<`, `>`, `&`, U+2028, U+2029
   to mirror Go's default `json.Marshal` behavior. Without this, an
   asset name containing those characters produced different bytes on
   Python vs cloud Go. The escaped form is what both runtimes emit.

3. Add direct query-layer tests for the keyset tiebreaker — the secondary
   ORDER BY id branch was previously unexercised. Two scenarios: all
   rows share a primary sort value, and mixed ties straddle page
   boundaries. Both assert no row is dropped or duplicated across the
   walk.

Wire-format note: Python cursors now differ from current cloud cursors
by exactly the "o" key. Cloud follow-up will bring the two back into
byte alignment.
2026-05-20 13:43:09 -07:00
..
__init__.py refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
conftest.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
test_asset_management.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
test_bulk_ingest.py refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
test_cursor.py feat(assets): bind cursor to sort order + Go-compat JSON escaping 2026-05-20 13:43:09 -07:00
test_enrich.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
test_ingest.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
test_path_utils.py fix(assets): recognize temp directory in asset category resolution (#13159) 2026-03-25 19:59:59 -07:00
test_tag_histogram.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
test_tagging.py refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00