Commit Graph
1 Commits
Author SHA1 Message Date
ba42162b66 fix: --json no longer suppresses the residual-signal exit code (#30)
clean_file.py and clean_image.py computed the failure exit code inside
the human-output branch, so `--json` always exited 0 even when the clean
left C2PA/AI signals behind. A script gating on `clean_file --json` would
treat a still-marked file as clean.

Move the residual (and degraded-PDF) decision out of the output branch in
both entry points so the exit code is the same regardless of --json.
Human output is unchanged; degraded best-effort PDF copies stay
non-failures.

Adds tests asserting json and human modes return the same exit code for
residual, clean, and degraded cases.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-13 18:44:42 -07:00