Our free PDF and our paid PDF are one render, and a test fails the build if they drift

by•

Most free tiers are a separate code path from the paid one. That is where the free artifact quietly gets worse: a watermark, fewer fields, a layout nobody maintains. It is rarely a decision. It is what happens when two paths exist and only one of them has anybody looking at it.

Ours meet. The free generator takes a posted payload and builds the same document object the signed-in editor builds out of database rows, and both go through one renderer. A test renders the same figures down both paths and fails if the HTML differs, once per document type. It compares HTML rather than PDF bytes deliberately: two Dompdf outputs differ on embedded timestamps, so a byte compare would fail on the one thing that does not matter.

The thing that could still make the free copy worse is status. A document with no status set reads as a draft, and a draft prints a full-page DRAFT watermark, drops the payment link, and drops the line that tells the client how to pay. So the anonymous document is built issued, and a test fails on each of those three separately.

The generator also stores nothing. The download validates the payload, builds the document, renders it and streams it back. No row is written anywhere, which is what makes having no retention policy true rather than merely intended.

If you run a free tier: is it the same code path as your paid one, or a copy? I am curious how many are honestly one path, because the copy is cheaper to ship and it is the version that rots.

4 views

Add a comment

Replies

Be the first to comment