ComfyUI/tests-unit/assets_test/services
Matt Miller 5b7288d700 feat(assets): collapse nested asset path into a single slash-joined tag
The /api/assets response previously emitted one tag per parent directory
between the root category and the filename. For nested categories like
diffusers, this produced ["models", "diffusers", "Kolors", "text_encoder"]
where consumers that look up a category via tags[1] would only see the
top-level bucket name and miss the model-specific sub-path that uniquely
identifies the component.

This collapses the parent subpath into a single slash-joined tag so the
result is ["models", "diffusers/Kolors/text_encoder"]. Consumers can now
read tags[1] as a stable category identifier regardless of how deep the
file lives in the bucket. Case is preserved on the subpath so providers
keyed on the original-case path (e.g. "diffusers/Kolors/text_encoder")
resolve correctly.

Same shape applies uniformly:

- input/foo.png                              -> ["input"]
- output/00001.png                           -> ["output"]
- models/checkpoints/flux.safetensors        -> ["models", "checkpoints"]
- models/diffusers/Kolors/text_encoder/m.sft -> ["models", "diffusers/Kolors/text_encoder"]
- models/loras/my/custom/path/v1.safetensors -> ["models", "loras/my/custom/path"]

Integration tests that filtered by individual subdirectory tags
(`include_tags=unit-tests,scope`) updated to use the new slash-joined
shape (`include_tags=unit-tests/scope`). Unit tests cover flat input,
flat output, flat models, diffusers-style nested, and deep user-subpath
cases.
2026-05-19 14:48:49 -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_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 feat(assets): collapse nested asset path into a single slash-joined tag 2026-05-19 14:48:49 -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