Ficha de vehiculo por dominio: /vehiculos/<dominio> reemplaza a /vehiculos/<id>
Elazar, 2026-09-04 22:10 (CLI to coder02): the vehicle ficha URL changes from /vehiculos/<id> to /vehiculos/<dominio>. The dominio is the vehicle's identifier outside MovilBA (stakeholder docs, Eugenia's book, the RUTAP row); the integer id is a MovilBA-internal surrogate that nobody outside the DB knows. Scope: src/app/vehiculos/[id]/page.tsx and every route/link that builds /vehiculos/<id> (list, search, edit routes under /vehiculos/[id]/editar/*, PDF link, history links, rendiciones API responses if they carry ficha URLs); old /vehiculos/<id> must not survive as a legacy alias (no backwards compat). Resolution rule to decide and write down BEFORE coding: dominio is matched on vehiculos.dominio_norm (normalizar_dominio trigger expression), case-insensitive, and a dominio can belong to more than one vehiculos row through a chassis chain (DEV: 320 vehicles with >1 chain link; 3801 and 6025 both AE100DB) - the URL must resolve to exactly one row (the live one by estado_id, else the newest by fecha_alta of the wide table) and the ficha keeps walking the chain for history as today; an unresolvable or ambiguous dominio is a 404 with no fallback to id. Gate: every link in the app that reaches a ficha does so by dominio (grep for /vehiculos/${ and /vehiculos/' + id); a crafted /vehiculos/3801 returns 404, not the ficha.
Activity
-
Resolution rule: normalize the requested dominio with the same normalizar_dominio semantics used by vehiculos.dominio_norm. Resolve only when the normalized value identifies exactly one vehicle: prefer the single live row selected by estado_id; if no such unique live row exists, select the single newest row by the wide-history fecha_alta. If that process produces zero or more than one candidate, return 404. No numeric-id fallback or legacy alias. After selecting the ficha row, preserve the existing chassis-chain traversal for history.
-
Resolution rule recorded; code inspection started.
-
unassigned
-
coder-mba-l-ca
-
DEV deployed: a3104407 (v5.4.226). Normalized dominio resolver selects unique live/current/newest historical holder; numeric and ambiguous requests return 404. Standard lint/typecheck passed; audit GO; DEV health serviceId 31873 decodes to patch 226 and deployment stage is complete.