Commits

The InDesign export is finalized and reaches production

The code review for ticket 02 uncovered two critical issues—pypdf missing from requirements.txt and unscaled images—which were fixed, and the feature was deployed to magazine.escandell.cat that same afternoon.

A short but decisive day: the final ticket for the InDesign export was closed with a code review that uncovered two critical issues, and the feature was deployed to production that same afternoon.

The final ticket, with two critical issues identified in the review

Ticket 03 closes out the functionality (01-03). The e2e (the tests that simulate the entire user workflow) for the interface validated everything: the docx extracted without AI, the closed ad and the missing piece, and the client's PDF cover. Once the layout was completed with "Cover replaced", the export generates a ZIP file containing the IDML file, the JSX script, and the adjacent Links folder. The cover and the ad are handled as scaled full-page images (0.47) with no frames underneath, while the article photo is fitted to its frame at a scale of 0.45, preserving its original proportions. The final ZIP (revista-n90-final.zip) waits in .scratch for the handoff to the user's InDesign.

The code review for ticket 02 surfaced additional observations and two critical issues, which I fixed before closing anything. The first was that the pypdf library was not listed in requirements.txt. I checked this using a clean venv—the production container would have failed with any closed material—and found an inherited multi-edition error that the development venv had masked. The second was that the images in the IDML remained at their natural size and were cropped at the corner of the frame. ItemTransform now applies uniform, centered scaling; the fix uncovered another error: the bounds were being unpacked in reverse order. I also polished the rest: the cover background as a frame beneath the text, an atomic ZIP that remains clean in case of an error, a timeout for dead tasks, exports blocked while layout is in progress (both trigger a re-render), reuse of the WeasyPrint layout (the export was paying for it twice), replacement positions with a single source of truth, and the shared ruta_zip. The suite ended green with 136 tests.

An e2e lesson we must not forget

When I validated the first scale, the server still had the old code loaded in memory: an artifact verified against an obsolete process is a lie; the service must always be restarted before validation. I also noted one point of friction: Orca's built-in browser does not retain the input file for uploading the cover—I placed it from disk because uploading through the interface had already been tested in multi-edition mode.

Production, with pypdf inside the container

A fast-forward merge of feature/export-indesign into main (6 commits), a push, and docker compose up --build on fxserver, where magazine.escandell.cat is hosted. Clean startup, a public health check returning 200, and pypdf 6.21.4 verified INSIDE the container: the critical fix confirmed where it matters. Without it, the first issue with closed material would have broken the export task in production. The only thing left is the user's test with the real ZIP, in their own InDesign.