Tagged “engineering”
8 posts
Ask for the permission, not the key: connect services safely
Copying the environment variable to the other server costs one line less. Asking the owning service for a signed link, which opens one screen and expires, removes a place where the key that opens every screen can leak. The criterion and the three rules behind it.
Retries without duplicates: derive the idempotency key from the content, not the clock
A retry is normal in any fetch; a duplicate post on a brand's feed is not. How to build an Idempotency-Key that makes the second click return what already exists, and why validation must be all-or-nothing when you publish to several channels.
A WhatsApp preview card for a static page, without a browser on the server
Our proposals are published as static folders, and pasting one into WhatsApp showed a bare link. WhatsApp does not render SVG, and we did not want a headless browser in the container just to draw a thumbnail. A native rasterizer with its fonts packed inside now writes a 1200×630 PNG on every publish. The pipeline, the two Next.js settings it needs, and what happens when it fails.
Give your site an endpoint that says which commit it came from
Thirty lines in a Next.js route, and "which version is live?" is answered with a curl and a git rev-parse. How we built it for vendear, where the commit comes from, and why the answer also says how the deploy was made.
Keep shared links on the right domain: canonical, og:url and the trailing slash
One variable with an extra slash or a leftover Vercel host, and every shared link goes out on the wrong domain. The six-line function that normalizes it in vendear, where it is used, and why it points to www and not the bare domain.
How we decide what to try next in retrieval: a queue of written predictions
Our retrieval roadmap is a queue of hypotheses, each with its prediction and the result that would falsify it written down before measuring. How one number ordered the queue, and how the queue reordered itself when the first bet lost.
How we evaluate retrieval: a golden set, a row with no leakage, and a benchmark that refuses to run
Three design decisions in our retrieval benchmark that are not obvious, and that anyone who inherits it needs to understand. Where the test set comes from, which configuration is allowed to decide, and when the benchmark says no.
A page can be down without returning a single error
Our contact form answered, looked right and sent nothing. Two indexed routes returned 200 and were empty. No uptime monitor catches that, because nothing fails — what is missing is the last mile.