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
🩺 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.
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 history | content-kind-howto → direct lookup |
| Recognizing the pathogen without re-interrogating | same antibiotic → registry |
| Closing the relapse on record too | static-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× shorter
mode: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
Sin coincidencias.