Drop --strict - #9
Conversation
Nothing uses it, and every warning it failed on is already in the report, where a caller can act on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Checks all pass (actionlint, npm ci, typecheck, 109 pass / 11 skipped for missing veraPDF). The removal is complete — grep -rn strict leaves only node:assert/strict imports, tsconfig.json's strict, and parseArgs({strict: true}). No unique coverage is lost: repaired is still asserted at test/document.test.ts:58, and unmatched_text, page_not_in_html, page_not_tagged and no_title each keep a warning assertion in test/tag.test.ts; the blank-page case still proves every page was tagged through its <pdfuaid:part>1 assertion. No blocking issues.
Non-blocking notes
src/cli.ts:99-116— thetagpath never prints warnings; it writes them only when--reportis given. With--strictgone, a run that leaves content untagged (page_not_tagged,page_not_in_html,unmatched_text,missing_alt) now exits 0 with no output whatsoever for a caller who omits--report. The report is still the honest surface, but the default invocation has no signal at all. Reachable today:iris-pdf tag --pdf in.pdf --pages pages.json --out out.pdfon a scan whose HTML misses a page.src/cli.ts:26vstest/cli.test.ts:37—--retagwas deliberately kept as an accepted no-op "for older callers", while--strictis dropped fromOPTIONS; withparseArgs(..., { strict: true })(src/cli.ts:54) an older caller passing--strictnow getsbad_arguments, exit 3. Failing loudly rather than silently dropping a gate is defensible — noting only that the two retired flags are treated differently.src/tag.ts:32-33— the deletion left a double blank line.
Accessibility impact: none on the output PDF — the tagging path, report contents and PDF/UA claim are unchanged; only the removed exit-code gate over existing warnings is lost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Checks all pass (actionlint, npm ci, typecheck, 109 pass / 11 skipped for missing veraPDF). The only change since b52c9e9 is the blank-line removal, which fixes my third note. The removal is still complete: grep -rn strict across src/, test/, *.md, *.json, *.yml leaves only node:assert/strict imports, tsconfig.json's strict, and parseArgs({ strict: true }); no "strict" refusal code remains in any IrisPdfError site. No blocking issues.
Non-blocking notes
src/cli.ts:98-110— unchanged sinceb52c9e9: thetagpath never prints warnings, it only writes them when--reportis given. With--strictgone,iris-pdf tag --pdf in.pdf --pages pages.json --out out.pdfon a scan whose HTML misses a page now exits 0 with no output whatsoever, including forpage_not_tagged,page_not_in_html,unmatched_textandmissing_alt. The report is still the honest surface; the default invocation has no signal at all.src/cli.ts:25— unchanged sinceb52c9e9:retag: { type: "boolean" }, // ignored, for older callersis kept as an accepted no-op while--strictis dropped fromOPTIONS, so withparseArgs(..., { strict: true })(src/cli.ts:54) an older caller passing--strictgetsbad_arguments, exit 3. Failing loudly rather than silently dropping a gate is defensible; noting only that the two retired flags are treated differently.
Accessibility impact: none on the output PDF — the tagging path, report contents and PDF/UA claim are unchanged; only the removed exit-code gate over already-reported warnings is lost.
--strictturned some report warnings into a failure. Iris does not pass it, and every warning it acted on is already in the report, where a caller can check it. Removing it also ends the question of which warnings belong on its list.This removes the option, the
STRICTlist, thestrictrefusal code and their tests and README lines. Output and report are unchanged.🤖 Generated with Claude Code