404 telemetry: genuine-bad-route is returned for routes that exist, so the row sends triage after a missing route that is not missing
classifyNotFound() in src/lib/not-found-classify.ts returns reason "genuine-bad-route" for EVERY path that is not resource-shaped, including a path that matches a current route template. Its doc comment said "path matches no known route, or a malformed id" - false. Live on prod: /login x4 and /solicitar-acceso x1 carry that label and are both real pages in route-manifest.generated.ts; /auth x2 is correctly labelled (only /auth/callback exists, a route handler not a page). The operator alert email then closed with "llegó a una página inexistente - revisar el enlace de origen" UNCONDITIONALLY, which sends the reader after a broken link that does not exist. Also measured: ALL 21 venus action=404 rows carry this ONE reason. The four resource-state reasons (stale-bookmark, soft-deleted-resource, auth-denied, unknown) have NEVER fired on venus, because no 404 has ever hit a resource route with a uuid id - so the DB-consulting half of the classifier is live but unexercised. NOT fixable by relabeling: the 5-enum is the locked fleet §4 taxonomy with no value for "real route, not a resource, 404 anyway", and folding it into "unknown" returns early in tierForNotFound, which would make the deploy-skew guard unreachable for the only class it exists to downgrade (its leg 2 IS resolvesToCurrentRoute). Fix is a routeResolves discriminator on the classification + the appEvents detail + the email, with reason/tier/paging byte-identical. appEvents.message deliberately untouched so no digest signature transitions.
Activity
-
SHIPPED b9cc194 (v1.17.32), verified on origin/main: 189 insertions across not-found-classify.ts, not-found-log.ts, not-found-classify.test.ts. routeResolves (= resolvesToCurrentRoute, the SAME oracle the deploy-skew guard leg 2 uses) is now on every NotFoundClassification return, written to appEvents.detail, and stated in the operator email as "La ruta existe en el build actual: SI/NO". The email|s closing sentence used to tell the reader to review the originating link UNCONDITIONALLY - false when the route exists - and now branches. NOT matchesAnyRouteTemplate: that is TRUE for /practicas/zzz-not-a-uuid (it matches /practicas/[id]) and would have flagged a CORRECT label as a mislabel on a live row. The uuid leg is why resolvesToCurrentRoute is the oracle. F2 forced exactly that red, in isolation. BYTE-IDENTICAL: reason, tier, alert, the skew guard, and appEvents.message. message is untouched deliberately - the applog digest derives its signature from it, so qualifying the string would transition every affected signature and could re-alert a seen one. FOUR MUTATIONS, FOUR DISTINCT REDS (F1 oracle pinned false; F2 wrong oracle - 1 test, the over-flag control; F3 destructure dropped; F4 email line deleted), each revert green, and the doc rewrites in both source files are the F0 no-op evidence. COVERAGE LIMIT: only the non-resource branch is exercised behaviourally (it reaches no DB). The four resource-state reasons need a live pool + an effective-user session - what is asserted for them is that the field is THREADED, not what it reads. not-found-log.ts cannot be driven in-suite (DB + SMTP), so both its legs are SOURCE pins, each anchored. STILL TRUE AND NOT FIXED HERE: genuine-bad-route remains wider than its name. The fleet section 4 5-enum has no value for "real route, not a resource, 404 anyway", and folding it into unknown would make the deploy-skew guard unreachable for the only class it downgrades. A sixth enum value is a fleet decision. The row now makes the two sub-populations countable, which is what would let that decision be evidenced instead of argued.
-
completed