
Post Generation Pipeline — Review and Adjustments Today
The pipeline that actually exists
It is not a cron that writes on its own. It is a chain of scripts that runs at build and release time, each blocking one class of defect:
node scripts/validate-covers.mjs # every post needs a cover that exists
node scripts/gen-ocultos.mjs # generates api/ocultos-data.mjs from hidden posts
astro build # static build
node scripts/gen-preview-data.mjs # HTML preview for hidden posts
If any step fails, the build stops. That is why a post without a cover cannot go
live — validate-covers.mjs was created on 2026-08-23 exactly after a WCAG post
shipped with the .webp generated but no cover: line in its frontmatter.
The tools I use on this project live in the skills store — the first one is free.
What fixed the hidden-posts list
/ocultos used to read the deploy filesystem. Inside a Vercel bundle that
filesystem is not the repo, so the list came back empty. The fix was generating
the data at build time and having the function serve what was already in memory:
api/ocultos.mjs -> import OCULTOS from './ocultos-data.mjs'
Same family of problem on the preview side: the HTML for each hidden post became
generated at build time (gen-preview-data.mjs) instead of rendered on demand.
The gap nobody was covering
Until today the pipeline verifies structure: cover exists, tag is in the vocabulary, frontmatter has the required fields, PT and EN are in sync, outbound links carry UTM.
Nothing verified whether what the text claims is true. A post could cite a commit that does not exist, a script that was never written, an invented metrics table — and it shipped anyway, because no gate looked at that.
The antidote is mechanical, not opinionated: if the post cites a commit, the SHA must exist in some repo of the ecosystem; if it cites a file, the path must exist — or have existed, because a file removed later does not make the post a lie. Numbers and paths are checkable; opinion is not. What the machine cannot verify does not get to enter as if it were fact.
The difference between “valid structure” and “true claim” became concrete the first time the gate ran against a draft: the cover existed, the frontmatter was complete, PT and EN matched — and the text cited two hashes that exist in no repository on the machine. None of the earlier gates looked at that. The whole build stayed green over a post describing work that never happened, which is worse than an ugly post: it is a record that lies with the appearance of an audit.
The gate now runs inside the pnpm build chain, between the cover validation and
the hidden-posts list generation, and its stopping criterion is the same as every
other: found it, fail the build. There is no tolerant mode and no warning that
lets it through. That choice was deliberate — a gate that only warns becomes noise
within two weeks, and everyone learns to ignore the yellow.
What stands today
- Cover: gate at build time, auto-fix when the
.webpexists and thecover:line is missing /ocultos: data generated at build, list never empty again- Hidden preview: static HTML per post, no runtime dependency
- Release: atomic commit with PT+EN MDX plus ocultos-data in a single commit
- Fact verification: it was missing — it is now a build gate
Related entries
Same project, same ground — the stories connect.
Next step
If this was useful, there is more: I write about the same ground in the other projects, and the store holds the tools I use here.
Done — I will send the next article when it is out.
No spam, one-click unsubscribe. I am also here: Skills store · Portfolio