← Building
Building11 updates

RegWatch

Google Alerts for the Diário Oficial da União (DOU)

A monitoring service that watches Brazil's federal gazette (the DOU) and alerts professional-services firms when their clients or topics are mentioned.

  • Django
  • PostgreSQL
  • Postgres FTS
  • LLM summarization

The job that fired and never ran: why both of my alerts were structurally blind to it

Update 1111 min

Update 11 of the RegWatch build log: a weekly cleanup job was denied permission in complete silence, and neither alert policy could ever have caught it, because both watch jobs that ran and failed. Notes on one hardcoded line in a provisioning script, a storage forecast that said the free tier broke on September 4th, and what actually happened instead.

Wrong twice about one word: legal polysemy and the excludes I found by reading 31 acts

Update 1012 min

Update 10 of the RegWatch build log: one Portuguese word drove about 12% of a client's feed, and my first fix would have thrown away every real match along with the noise. Notes on a legal homonym that defeats full-text search, a tool that finds exclude phrases from the text around a term, and the second retraction that ran the other way.

The watches that matched nothing: Portuguese stemming and the index I built but never hit

Update 0911 min

Update 9 of the RegWatch build log: 3,338 acts ingested, zero matches, and the cause was one word in a Postgres search configuration. Notes on why a watch for contrato never saw contratos, on the accent-stripping normaliser I had to reverse, and on the trigram index that sat unused because Django compiles __icontains to UPPER().

One stack trace, two root causes: the week RegWatch failed at 8am

Update 0811 min

Update 8 of the RegWatch build log: the same login error had two completely different causes a day apart, and I could only tell them apart because I had shipped logging that fixed nothing. Notes on observability as the actual fix, on an alarm scheduled in the wrong gap, and on the retry window I widened that still wasn't wide enough.

Turning on the lights: a demo-driven redesign of the RegWatch dashboard

Update 079 min

Update 7 of the RegWatch build log: the dashboard from #6 worked, and it was deliberately plain. Plain is right for building and wrong for a demo, so I redesigned it from a modern-minimal theme into an atmospheric one, dark canvas, a molten-brass signal dial, a serif display face. The honest question underneath: when is 'make it look good' worth the time, and when is it procrastination with a color picker?

From curl to click: a same-origin Svelte dashboard for RegWatch

Update 069 min

Update 6 of the RegWatch build log: the secured API from #5 was curl-only, so I gave it a browser. A Svelte 5 dashboard that logs in over the same session, served same-origin from the same Django service via WhiteNoise so the cookie-and-CSRF security model just holds, no CORS. The decision behind that, the browser side of the CSRF handshake, and a frontend built test-first.

A wall between tenants: RegWatch grows a secured DRF API

Update 0511 min

Update 5 of the RegWatch build log: the daily pipeline had a database full of matches nobody could reach, so I gave it an HTTP surface. Session auth, invite-only access, and a single workspace-scoping chokepoint that makes one firm's data 404 for another. Plus the secure-by-default reflex that crashed the batch jobs, and why one image now has to boot two ways.

Unattended at last: RegWatch on Cloud Run, and the round-trip that nearly killed the job

Update 047 min

Update 4 of the RegWatch build log: taking the daily pipeline off my laptop and onto GCP Cloud Run Jobs against Supabase. The plan was clean; the first live deploy was not. Three quick config failures, and then the one that taught me something: a cross-region round-trip that timed the job out at a full hour, until co-locating Cloud Run with the Supabase region dropped a whole gazette day to ten minutes.

From mocking to knocking: a real AI that builds the digest and knocks on the inbox

Update 0310 min

Update 3 of the RegWatch build log: turning a pipeline that was tested against fakes into a real daily run that can run unattended. A single command, real Anthropic and Resend integrations behind the existing interfaces, per-section resilience so one bad article can't sink the day, a run logbook, and an honest account of a feature I promised in #2 and chose to drop.

Fetching the gazette: a clean-room INlabs ingestor

Update 029 min

Update 2 of the RegWatch build log: turning the validated INlabs path into a tested fetch_editions(date), with an lxml parser, an httpx client tested via MockTransport, and an honest note on the resilience I deferred.