Case 404-PAP-bis: the relapse

Clinical history of a twin: the same pathogen, another organ — and why this time the collapse lasted minutes, not an afternoon

Jesús Pérez
We thought we were discharged. Instantly, /nosotros threw a 404: the same hardcoded match, now in the static pages. From triumph to misery in a heartbeat. But this time the diagnosis took minutes — because the first case was already clinical history. That's the difference ontoref buys.
Case 404-PAP-bis: the relapse

🩺 Show the full clinical history → 📋 Session protocol →

Clinical history · Code Pathology Service

We thought we were discharged. The /expedientes hub green, the case closed, glory. And then /nosotros threw a 404. Instantly. From triumph to misery with no transition — a mirage, a rollercoaster that only ever goes down.

History No. 404-PAP-bisDiagnosis: ANTI-PAP · relapseStatus: DISCHARGED
Chief complaint. Patient who, believing himself cured, suffers a sudden relapse of the same syndrome. Reports going from startled surprise to panic and uncertainty in an instant; mood drops from triumph to depression with no intermediate step. Verbalizes: "after this I'm going to need a visit to the clinic". And here we are.
Show clinical picture
PAP
Project's Architecture Principles — the rules and patterns holding the project's architecture up: the single source of truth all code must respect.
anti-PAP
Code written against those rules: a stub that re-lists by hand what routes.ncl already declares, duplicating and contradicting the source of truth.

The protocol to declare, version and verify this → ontoref.dev

The double ledger — what it cost, and what it left

The telling part isn’t that it relapsed. It’s how long it lasted. The first case, with no prior history, cost an afternoon. The twin, identical, cost minutes — because the first was already declared as clinical history (content-kind-howto): I went straight to the organ, recognized the pathogen, applied the same antibiotic.

Case 404-PAP · no history

  • Diagnosis ~88 min
  • Builds 8
  • False leads 8

Case bis · with clinical history

  • Diagnosis ~15 min
  • Builds 1
  • False leads 0
  • Speed-up factor vs. the first case ~30×
  • Size of the final fix 1 <i>line</i>

Same bug. ~30× faster. Not because the second was easier — it was identical — but because the first was declared. That’s ontoref working in real time: the dao holds you through the relapse, the mode gives you the step, and the prior howto turns “another afternoon lost” into “fifteen minutes and a known antibiotic”.

Differential diagnosis — what was ruled out

The binary / the cache“Me again? Markers alone won't do it.”known repeat
The declared /nosotros route“I'm on record in routes.ncl. Normal vital.”normal vital
The FTL & the baked component“Present and correct. Negative panel.”negative panel
pages_htmx::dispatch“Yes… the match that picks the static page was the focus.”the pathogen

Etiology — the cause — Twin etiology · a hardcoded match in the static pages

match path {
    "/services" | "/servicios" => Some(static_page::render(env, "services", lang)),
    // … every page by hand … except /nosotros …
    _ => None,   // ← /nosotros fell through here → 404
}

Case 404-PAP killed a hardcoded match in render_content_or_grid (content pages). The twin lived intact in the organ next door — the static pages, pages_htmx::dispatch:

Route declared, FTL present, component baked — and still a 404. The same anti‑PAP: a match that duplicates what routes.ncl already knows.

Treatment — PAP-compliant · one line, no new branches

_ => resolve_static_page(env, path, lang),
// reads from the registry: any route whose component
// ends in "Page" → static_page(page_id kebab). Zero new arms.

Prognosis

The pathogen has family: any hardcoded match that shadows the registry. The vaccine is the same for all — read from the single source. The case is closed on record (static-page-howto) so that the third twin, if it shows up, lasts seconds.

The first case, already declared as historycontent-kind-howto → direct lookup
Recognizing the pathogen without re-interrogatingsame antibiotic → registry
Closing the relapse on record toostatic-page-howto → the 3rd will take seconds

Prophylaxis — what enforces the lesson today

  • The incident becomes declared history — which is what made the relapse ~30× shortermode:generate-expediente/register_proof

Declared debt: The relapse had a cause, and it was not memory: the first fix had never gone back to the template, so it was not a relapse but reinfection from the source. It has gone back now — the backport is in both templates and the hand-written list is forbidden by a typed constraint. What remains is the usual: nothing runs it. Rustelo's justfile calls no validator, so the gate that would prevent the next reinfection exists and is silent. A just recipe in its chain would settle it. Case 8/0 tells why the fix took months to come home.

Glosario

Was this useful? Rate it
Got something to add? Tell me what you think, what you'd suggest, or whether we should keep exploring this topic.
· reads

We use cookies to help this site function, understand service usage, and support marketing efforts. Cookie Policy for more info.