ComfyUI/app/assets/services
Matt Miller 7ff001d7c8 fix(assets): stagger added_at in set_reference_tags + add ordering tests
Cursor-reviews follow-up on PR #13994:

1. set_reference_tags / add_tags_to_reference now apply the same
   microsecond stagger as batch_insert_seed_assets. Per-tag get_utc_now()
   calls can collide at microsecond resolution on fast machines, dropping
   retrieval to the tag_name alphabetical tiebreaker. Using a single
   base_ts + timedelta(microseconds=i) preserves insertion order for any
   batch.

2. Docstring on get_name_and_tags_from_asset_path corrected: only the
   subpath is lowercased in code; the root category is lowercase by
   construction in get_asset_category_and_relative_path.

3. resolve_destination_from_tags docstring now states explicitly that
   hybrid shapes (mix of legacy multi-tag + new slash-joined within a
   single call) are accepted and resolve to the same destination.

4. New TestTagRetrievalOrder class in test_asset_info.py exercises the
   public write paths (set_reference_tags, add_tags_to_reference,
   remove_tags_from_reference) and asserts the public read paths
   (list_references_page, fetch_reference_asset_and_tags) return tags
   in insertion order rather than alphabetical. Tag names are chosen
   to fail loudly under alphabetical regression — "checkpoints" sorts
   before "models", "aaa-user-tag" sorts before every path tag, etc.

Full assets suite: 338 passed, 10 pre-existing skipped.
2026-05-19 21:05:54 -07:00
..
__init__.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
asset_management.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
bulk_ingest.py fix(assets): lowercase subpath, parse slash-joined upload tags, stagger added_at 2026-05-19 20:30:04 -07:00
file_utils.py refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
hashing.py Import assets seeder later, print some package versions. (#12841) 2026-03-08 16:25:30 -04:00
ingest.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
metadata_extract.py refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
path_utils.py fix(assets): stagger added_at in set_reference_tags + add ordering tests 2026-05-19 21:05:54 -07:00
schemas.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
tagging.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00