fix(writer-pipeline): decode literal \u2013 in revista PDF URLs (BIT-31118) #53

Merged
spark merged 2 commits from fix/BIT-31118-revista-imprensa-u2013-404 into main 2026-10-13 06:25:22 +01:00
Owner

Summary

  • FPA portal.fpa.pt/media/ embeds some Revista PDF URLs with a literal \u2013 (en-dash) escape in the filename JSON.
  • new URL() treats \ as a path separator → /u2013 → HTTP 404 (ERRSIG 97ac27c4c5df).
  • Decode JSON-style \uXXXX before URL construction; broaden pdfDateFromRevistaUrl for en-dash and WP hash suffixes.

Test plan

  • cd writer-pipeline && npm test (79 pass)
  • Live probe: percent-encoded en-dash URL returns HTTP 200; mangled /u2013 returns 404
  • After merge/deploy: next revista_imprensa ingest should not log HTTP 404 for \u2013 filenames
## Summary - FPA `portal.fpa.pt/media/` embeds some Revista PDF URLs with a **literal** `\u2013` (en-dash) escape in the filename JSON. - `new URL()` treats `\` as a path separator → `/u2013` → HTTP 404 (ERRSIG `97ac27c4c5df`). - Decode JSON-style `\uXXXX` before URL construction; broaden `pdfDateFromRevistaUrl` for en-dash and WP hash suffixes. ## Test plan - [x] `cd writer-pipeline && npm test` (79 pass) - [x] Live probe: percent-encoded en-dash URL returns HTTP 200; mangled `/u2013` returns 404 - [ ] After merge/deploy: next `revista_imprensa` ingest should not log HTTP 404 for `\u2013` filenames
spark added 1 commit 2026-10-13 06:19:19 +01:00
fix(writer-pipeline): decode literal \u2013 in revista PDF URLs (BIT-31118)
Tests / writer-pipeline tests (pull_request) Successful in 38s
Tests / bridge tests (pull_request) Successful in 38s
Tests / frontend lib tests (pull_request) Successful in 43s
ded3c71ed6
FPA media embeds Revista-de-Imprensa filenames with a literal JSON \u2013
escape; new URL turned the backslash into /u2013 and the fetch 404'd.
Decode \uXXXX before parsing and accept en-dash / hashed date filenames.

Paperclip-Issue: BIT-31118
Paperclip-ERRSIG: 97ac27c4c5df
Paperclip-ERRCLUSTER: ddda2b9e3d39
Paperclip-Run: 3f65156a-de49-43a1-876d-75f6285b4bc4
spark added 1 commit 2026-10-13 06:23:10 +01:00
ci: retrigger push status checks for BIT-31118
Tests / writer-pipeline tests (push) Successful in 46s
Tests / bridge tests (push) Successful in 48s
Tests / frontend lib tests (push) Successful in 55s
Tests / writer-pipeline tests (pull_request) Successful in 54s
Tests / bridge tests (pull_request) Successful in 54s
Tests / frontend lib tests (pull_request) Successful in 56s
dc1b6dd4f0
Paperclip-Issue: BIT-31118
Paperclip-ERRSIG: 97ac27c4c5df
Paperclip-ERRCLUSTER: ddda2b9e3d39
Paperclip-Run: 567916ae-2a3f-4379-8780-9eeaaa781a04
spark merged commit b23ca87102 into main 2026-10-13 06:25:22 +01:00
Sign in to join this conversation.