Skip to content

Drop --strict - #9

Merged
bbertucc merged 2 commits into
mainfrom
drop-strict
Oct 4, 2026
Merged

bbertucc merged 2 commits into
mainfrom
drop-strict

Conversation

@bbertucc

@bbertucc bbertucc commented Oct 4, 2026

Copy link
Copy Markdown
Member

--strict turned 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 STRICT list, the strict refusal code and their tests and README lines. Output and report are unchanged.

🤖 Generated with Claude Code

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>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 — the tag path never prints warnings; it writes them only when --report is given. With --strict gone, 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.pdf on a scan whose HTML misses a page.
  • src/cli.ts:26 vs test/cli.test.ts:37 — --retag was deliberately kept as an accepted no-op "for older callers", while --strict is dropped from OPTIONS; with parseArgs(..., { strict: true }) (src/cli.ts:54) an older caller passing --strict now gets bad_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>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 since b52c9e9: the tag path never prints warnings, it only writes them when --report is given. With --strict gone, iris-pdf tag --pdf in.pdf --pages pages.json --out out.pdf on a scan whose HTML misses a page now exits 0 with no output whatsoever, including for page_not_tagged, page_not_in_html, unmatched_text and missing_alt. The report is still the honest surface; the default invocation has no signal at all.
  • src/cli.ts:25 — unchanged since b52c9e9: retag: { type: "boolean" }, // ignored, for older callers is kept as an accepted no-op while --strict is dropped from OPTIONS, so with parseArgs(..., { strict: true }) (src/cli.ts:54) an older caller passing --strict gets bad_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.

@bbertucc
bbertucc merged commit d04f8c6 into main Oct 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant