Repository navigation
refactor(tagged-pdf): drop the retag confirm step, iris-pdf always retags (#505) - #506
Conversation
…tags (#505) Reverts #502 apart from the demo's sentence for the `retagged` warning. With equalify-iris-pdf#8, `tag` replaces an already-tagged PDF's tags instead of refusing it, so the confirm, the `retag` field, the `--retag` argv and the log field are dead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Clean revert. All checks pass (install, typecheck, unit, e2e, actionlint, shellcheck). No blocking findings.
Non-blocking notes
-
docs/API.md:1009— "A PDF that was already tagged has its old tags replaced, with aretaggedwarning." This is only true once a deployment runs iris-pdf with equalify-iris-pdf#8, which is not pinned anywhere in this repo (config.example.yaml:105just takes a command name). Until thensrc/routes/sessions.ts:586-592maps the tagger's exit-1already_taggedto422with the tagger's own stderr text — "The PDF is already tagged. Pass--retagto replace its tags." — so a demo reader who uploads a tagged PDF is told to pass a flag that Iris no longer sends and the API no longer accepts. The PR body acknowledges the ordering; a half-sentence in API.md saying the replacement needs iris-pdf #8 would make the 422 readable instead of looking like a bug. -
test/fixtures/fake-iris-pdf.mjs:34,41— with theTAGGED/--retagbranch gone, the fake never emits aretaggedwarning, so the only coverage of that code is the string intest/demo-pdf-form.test.ts:98. That is the right place for it (the sentence is the only retag-specific code left), so this is just a note that nothing exercises aretaggedreport throughPOST /pdfend to end. Latent at worst — the report is passed through verbatim. -
The submit-handler harness removed from
test/demo-pdf-form.test.ts:133-169was the only test that pinned the demo'sPOST /sessions/{id}/pdfbody and the "Could not tag the PDF: …" error path. Nothing now asserts the demo sends{ values }only. This matches the pre-#502 state, so it is not a regression introduced by new behaviour — but the harness was cheap and the error path is user-visible.
Accessibility impact: none — the delivered HTML, the tagger input (page order, lang, title) and the _tagged.pdf filename are unchanged; only the demo's confirm step and the retag request field are removed.
…s-pdf#8 Review notes on #506. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Iris Maintainer Agent here.
🤖 Generated with Claude Code |
There was a problem hiding this comment.
Checks pass: install, typecheck, unit, e2e, actionlint, shellcheck. The revert itself is unchanged since 09406b3, and the new commit closes two of the three notes I left there:
- Note 1 fixed.
docs/API.md:1009-1011now states the dependency — "This needs iris-pdf with equalify-iris-pdf#8. An older one answers422 already_tagged." — so the 422 a current deployment still returns reads as a version gap rather than a bug. - Note 3 fixed.
test/demo-pdf-form.test.ts:135-148pinssentto[{ values: { name: "Ada" } }], so the demo sending noretagfield is asserted, and the"Could not tag the PDF: The PDF is encrypted."path is back under test.
No remaining retag references outside the two documented ones (public/demo.html:541, docs/API.md:1009), and src/util/taggedPdf.ts:124 no longer accepts the option, so nothing can pass --retag to a tagger that has dropped it.
Non-blocking notes
-
Unchanged since
09406b3and still latent: the only coverage of aretaggedreport is the sentence table intest/demo-pdf-form.test.ts:98.test/fixtures/fake-iris-pdf.mjs:41never emits the warning, so no test takes aretaggedreport throughPOST /pdf. The report is passed through verbatim, so there is no behaviour between the tagger andpdfNotesleft to break. -
src/routes/sessions.ts:634— dropping the validator means a body withretag: trueis now silently ignored rather than accepted. That is the right choice (a browser holding the olddemo.htmlstill works against a new iris-pdf), but it does mean the API no longer tells a stale client that the field is gone. Not worth a 400; noting it because the previous code did rejectretag: "yes".
Accessibility impact: none — the tagger input (page order, lang, title), the delivered HTML, and the _tagged.pdf filename are untouched; only the demo's confirm step and the retag request field are removed.
|
Iris Maintainer Agent here. Update from the iris-pdf maintainer: equalify-iris-pdf#8 has merged. Retagging is now the default: This PR is approved but blocked by the required 🤖 Generated with Claude Code |
Iris Maintainer Agent here.
Closes #505.
With equalify-iris-pdf#8,
iris-pdf tagreplaces an already-tagged PDF's tags and warnsretagged, instead of refusing. This reverts #502 except for the demo's plain sentence forretagged:retagrequest field,--retagintagPdf,retagin thetagged_pdfevent, and the API.md text about422 already_tagged.retaggedsentence, now pinned in test/demo-pdf-form.test.ts. API.md says in one line that an already-tagged PDF has its tags replaced.Compared with before #502, the change is 5 lines.
Order: this can merge before or after #8. Until a deployment runs an iris-pdf with #8, an already-tagged PDF gets
422 already_taggedagain, as it did before #502.npm test1772/1772, e2e passes.🤖 Generated with Claude Code