ComfyUI/comfy_execution
Simon Pinfold 39e9db11e8 feat(execution): attach media metadata to output entries in executed/history payloads (#15417)
* feat(execution): attach media metadata to output entries

Enrich file-type output entries with a nested metadata object
({kind, width, height} for images, plus {duration, fps, frame_count}
for videos) at output-processing time, reusing the extractors from the
asset system's media_metadata service. Unlike asset-id enrichment this
is not gated on --enable-assets: the properties flow into the executed
websocket message and /history for every consumer, including ones
without the assets system enabled.

The path containment guard moves to media_enrichment.py and is shared
with asset_enrichment.py.

* fix(execution): harden output-entry media enrichment per review

- Resolve symlinks (realpath on base and candidate) before the
  containment check, so a symlink planted inside output/ can't smuggle
  an outside target past commonpath; also covers output dirs that are
  themselves symlinks. Applies to both enrichers via the shared helper.
- Validate filename/subfolder/type are strings before path resolution
  so a malformed entry skips cleanly instead of raising TypeError.
- Broaden the lazy-import guard beyond ImportError: the enrichment is
  called unguarded on the output path and must degrade to a no-op when
  a dependency fails to import for any reason.
- Tests: real-filesystem symlink escape/containment, non-string fields,
  non-ImportError import failure.
2026-08-14 20:55:10 -04:00
..
asset_enrichment.py feat(execution): attach media metadata to output entries in executed/history payloads (#15417) 2026-08-14 20:55:10 -04:00
cache_provider.py Revert "Revert "feat: Add CacheProvider API for external distributed caching"" (#12915) 2026-03-12 21:17:50 -07:00
caching.py Add configurable DETAIL logging side channel (#15064) 2026-07-28 17:31:45 -04:00
graph.py Load weights to process RAM with MRU policy using pinning infrastructure (#15027) 2026-07-28 17:05:57 -04:00
graph_utils.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
jobs.py Add previewable_outputs_count to /api/jobs (backend half of Media Assets badge fix) (#15148) 2026-08-08 18:06:03 -07:00
media_enrichment.py feat(execution): attach media metadata to output entries in executed/history payloads (#15417) 2026-08-14 20:55:10 -04:00
progress.py Remove useless annotations imports. (#14105) 2026-05-25 19:23:29 -07:00
utils.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
validation.py Remove useless annotations imports. (#14105) 2026-05-25 19:23:29 -07:00