Files
tackcrypto1031-tk_comfyui_c…/tk_comfyui_batch_image
tack 8811fb955e polish(m2): review follow-ups — tighten CLI suppress, generalise R5 preset check, document layer=0
Addresses the LOW/MEDIUM items flagged in the Task 8-10 and Task 3-6
code reviews:

- validator.py: R5 no longer hardcodes the preset enum; any non-custom
  template value is treated as a preset. Future enum additions in
  schema.py flow through automatically.
- validate.py: narrow contextlib.suppress(Exception) to specific
  exception types (AttributeError / io.UnsupportedOperation / OSError),
  and move the contextlib/io imports to the module-top stdlib block.
- validator.py: document the layer=0 convention (CLI I/O / pre-validation)
  on the CheckError dataclass field so future readers understand why
  validate.py emits layer=0 for missing-file / JSON-parse errors.
- test_cli_validate.py: add regression test for the "missing file in
  --json mode becomes layer=0 + exit 1" behaviour previously uncovered.
2026-04-23 16:14:54 +08:00
..