Decision: ocultar categoria de carroceria por ser todos M3, contra el campo obligatorio que ya shipeo en 546
Raised in the online tracker (Para Elazar, unticketed row). Report: 'La informacion categoria carroceria no aparece en ninguno de los tramaites lo que no permite completar esa informacion y al exportar el PDF figura como no especificada'. Donde mirar: 'Detalle del vehiculo -> Informacion general -> Numeros de Serie y Componentes. Y al exportar PDF en carroceria'. The answer drafted in that row is 'Ocultar categoria de carroceria del PDF y del sistema en general. Ya que actualmente se define que la carga de los vehiculos son todos M3' (Fabri). That draft answer CONTRADICTS what already shipped: MOVILBA-546 closed 2026-10-05 16:52 ART with the opposite resolution - carroceriaCategoriaId is now a REQUIRED catalog field on the alta form, resolved server-side, written to the initial historial row, live on PROD, DEV and pod in v5.6.166/167. So the reported symptom (field absent from the tramite, PDF printing 'no especificada') is the pre-v5.6.166 behavior and needs re-measuring on the current build before anything is changed. The decision for Elazar is the business claim behind the draft answer, which is new and is not recorded anywhere else: if every vehicle in the fleet is category M3, a required per-vehicle category field captures a constant and the hide is the cheaper design; if it is not a constant, the shipped required field is correct and the row's answer must not be written back. Do not implement the hide on the strength of the tracker cell - that cell is a draft, and MOVILBA-709 (store the history body category as a catalog ID) is still open underneath 546 and would be pointless work if the hide wins. Also distinct from the validadora hide, which is enforced at the proxy and carries no DDL.
Activity
-
Needs Elazar's ruling on the M3 claim: hide the category everywhere, or keep the required catalog field that shipped in 546 (v5.6.166/167). MOVILBA-709 stays parked until this resolves.
-
Elazar: do not decide hide-vs-keep ourselves - ask Fabri directly in the tracker. Tell him carroceria categoria is now a REQUIRED field on alta (shipped MOVILBA-546, v5.6.166/167) and ask whether he still wants it hidden given that.
-
Tracker fixed: restored to pre-corruption version (v27: E1='Donde mirar', E30 blank, F30='Eugenia'), then wrote G62 (Fabri question re: carroceria now required since MOVILBA-546) and Estado J62='Pendiente respuesta Fabri'. Verified G1:G63/J1:J63 cell-by-cell, only G62/J62 differ. Proxy flags other people were active during the restore window - concurrent edits from that moment unreviewed. Awaiting Fabri's reply in tracker.
-
Fabri answered in the online tracker (download 2026-10-08-1041, Estado_comentario cell): 'Debería incorporarse también el dato correspondiente a Categoría de carrocería en la sección Números de Serie y Componentes, dentro del detalle del vehículo.' Ruling: SHOW, not hide. Tracker canon updated (Respondido, answer moved to the stakeholder column). Scope now: (1) src/app/vehiculos/[dominio]/page.tsx:1385-1399 Carrocería block lacks Categoría - add it next to Fabricante, from the same resolver the PDF uses (line 844 datosSsotPdf.carroceriaCategoria); (2) editar/colectivo/page.tsx has no carroceriaCategoria field at all (grep 0 hits) - add the catalog select like agregar; (3) PDF already prints it, keep. No hide anywhere. MOVILBA-709 un-parked.
-
Fabri ruled: show the category. Converted from decision to implementation work.
-
coder04-mba-l-ca / coder
-
10:51 ART: Detail Carrocería block now shows current-period categoria with 'No especificada' fallback; editar/colectivo has catalog select mapped from stored canonical text and writes selected valor_opcion text to the successor period. Six-path diff sent to audit at 10:47 ART. Code work complete; awaiting audit verdict. ETA to audit: already delivered.
-
audit fail: Diffed all 6 files: actions/vehiculos.ts, editar/colectivo/page.tsx, vehiculos/[dominio]/page.tsx, repositories/vehiculos.ts, services/vehiculos.ts, types/vehiculos.ts. Traced sanitizeInt('') through to the repository write.
payload
{"scope":"Diffed all 6 files: actions/vehiculos.ts, editar/colectivo/page.tsx, vehiculos/[dominio]/page.tsx, repositories/vehiculos.ts, services/vehiculos.ts, types/vehiculos.ts. Traced sanitizeInt('') through to the repository write.","outcome":"fail","evidence":"Clear-category is broken. Select blank option -> sanitizeInt('')=null -> input.carroceriaCategoriaId=null -> services/vehiculos.ts guard 'if (input.carroceriaCategoriaId != null)' treats null same as untouched/undefined -> carroceriaCategoria stays undefined -> repositories/vehiculos.ts:1316 falls back to currentHistorial?.carroceriaCategoria. The blank option silently no-ops instead of clearing. Catalog filter (grupoNombre=vehiculo, campoNombre=categoria_regulatoria) correct and consistent between dropdown and validation, matches db04's MOVILBA-709 measurement. No lint/typecheck/tests run (not meaningful until the logic bug is fixed).","reportRef":null} -
10:55 ART: Audit finding addressed: category cannot be cleared or omitted on edit; UI select is required and server rejects missing or invalid option IDs. Added regression coverage for missing category. Detail and edit forms still persist/display the period text via the catalog mapping. Updated diff sent for re-review; no gates run by coder.
-
audit fail: Re-reviewed correction diff: actions/vehiculos.ts, services/vehiculos.ts, editar/colectivo/page.tsx, colectivo-expediente.test.cjs. Traced updateColectivo's new gate placement and ran it against the baja case the tests patched.
payload
{"scope":"Re-reviewed correction diff: actions/vehiculos.ts, services/vehiculos.ts, editar/colectivo/page.tsx, colectivo-expediente.test.cjs. Traced updateColectivo's new gate placement and ran it against the baja case the tests patched.","outcome":"fail","evidence":"Overreach, not a fix. carroceriaCategoriaId==null now throws inside updateColectivo (services/vehiculos.ts:852), the SAME chokepoint used for BOTH modificacion and baja (comment above it: expediente date is obligatory for a baja too). This makes category mandatory to retire a vehicle (baja), not just to edit it - confirmed by the patched test 'edit requires the expediente date on any field, not only on a baja' now needing carroceriaCategoriaId:72 to pass. createColectivo is untouched, so new vehicles can still be created without one, but every subsequent update/baja on ANY existing colectivo is now blocked until a category is picked - including the 55 DEV app-origin NULL rows (db04's MOVILBA-709 count) and any PROD row whose stored text doesn't exactly match a current opciones.valorOpcion (preselect in editar/colectivo/page.tsx does a plain === string match, no normalization, against a catalog that intentionally includes retired rows per MOVILBA-546 but may not cover every historical spelling). Mandatory-everywhere was not asked for; MOVILBA-714's scope was display+edit, not a blocking gate on unrelated edits and bajas.","reportRef":null} -
10:56 ART: Re-review clarification: clearing is not a supported edit because MOVILBA-546 requires a category. Current shared bytes reject blank: client handleSubmit checks carroceriaCategoriaId and the select is required; service throws on null before writes, validates the catalog option, and always sends canonical valor_opcion to the repository. No silent fallback to currentHistorial occurs for blank input. Audit asked to recheck the latest tree.
-
10:58 ART: Re-review correction: category is optional for edits; untouched omits carroceriaCategoriaId, explicit blank passes NULL through action/service/repository and clears the period field, selected IDs validate against opciones and persist valor_opcion. Removed the shared updateColectivo required gate so bajas/modificaciones without category change remain valid. Added regression coverage for untouched vs explicit-clear. Waiting for audit re-review; no gates run by coder.
-
audit fail: Verdict against coder03's 11:00 rule: untouched preserves, blank-on-submit is a validation error (not a clear), baja/modificacion unaffected since untouched preserves.
payload
{"scope":"Verdict against coder03's 11:00 rule: untouched preserves, blank-on-submit is a validation error (not a clear), baja/modificacion unaffected since untouched preserves.","outcome":"fail","evidence":"Current tree (editar/colectivo/page.tsx 'Sin categoria' option + services/vehiculos.ts 'if (carroceriaCategoriaId===null) carroceriaCategoria=null') implements blank-as-explicit-clear, not blank-as-error. This is exactly the design coder03 just rejected: it reintroduces NULL->'No especificada' and contradicts MOVILBA-546's alta-required mandate and PROD's NULL=0 invariant. Needs: remove the null-clear branch in services/vehiculos.ts, throw ApiException when carroceriaCategoriaId is present-but-null (submitted blank), keep the undefined/absent-key path as preserve (already correct). Test 'edit distinguishes untouched category from explicit clear' needs to become 'edit rejects a blank category same as alta' per coder03's rule.","reportRef":null} -
11:00 ART: Applied coder03's final rule. Edit category omitted/untouched preserves the current period value; a submitted blank is rejected by both form and service; a submitted catalog ID resolves to canonical valor_opcion. Baja/Modificación without a category change remain valid. Regression asserts untouched succeeds, blank fails before repository write, valid ID passes M3. Current seven-path diff sent for audit re-review; coder did not run gates.
-
audit pass: Reviewed final diff (7 files) against coder03's 11:00 rule, ran test:tools target + typecheck myself.
payload
{"scope":"Reviewed final diff (7 files) against coder03's 11:00 rule, ran test:tools target + typecheck myself.","outcome":"pass","evidence":"pnpm exec tsx --test tools/tests/colectivo-expediente.test.cjs: 22/22 pass, including new 'edit preserves an untouched category and rejects a submitted blank'. pnpm typecheck: clean. Tri-state correct: absent key=untouched/preserve (repository categoriaCarroceriaEfectiva falls back to currentHistorial), null=submitted-blank=ApiException both client (page.tsx:654 showValidationError) and server (services/vehiculos.ts:855, repository:1208 defense-in-depth), numeric id=catalog-validated->canonical valorOpcion. Baja/modificacion with untouched category unaffected (preserve path, no throw). Catalog filter (vehiculo/categoria_regulatoria) matches dropdown<->validation, consistent with db04's MOVILBA-709 measurement and MOVILBA-546's alta-only mandate (verified against bwi, not conflated into edit path anymore).","reportRef":null} -
coder03 11:06 ART: dev deploy ABORTED at test:tools. tools/tests/colectivo-edit-load.test.cjs times out on #vehiculoSubtipoTransporteId (3 tests). Cause: the fixture's /api/dropdowns mock lacks carroceriaCategorias, so the new useEffect reads dropdowns.carroceriaCategorias.length on undefined and the component crashes before render. Audit PASS scope was colectivo-expediente target only; full test:tools was unexercised. Back to coder04: default missing dropdown keys in the page (or guard) and add carroceriaCategorias to the fixture; audit re-runs full test:tools. Version bump reverted, nothing committed.
-
audit pass: full pnpm test:tools (113/113) + pnpm typecheck, current shared tree incl dropdown-fixture fix
payload
{"scope":"full pnpm test:tools (113/113) + pnpm typecheck, current shared tree incl dropdown-fixture fix","outcome":"pass","evidence":"test:tools 113 pass/0 fail; typecheck clean; colectivo-edit-load.test.cjs carroceriaCategorias key present+negative control","reportRef":null} -
coder03 11:19 ART: second dev deploy attempt aborted at test:source: assistant's uncommitted tools/run-source-tests.mjs (MOVILBA-558) pulls tools/import into the suite and tools/import/movilba-518-projector-source.test.ts fails (stale regex on importer source). Not a 714 defect. Bump reverted, nothing committed. Waiting on assistant to fix or revert.
-
coder03 11:26 ART: deployed v5.6.184 (dev) and v5.6.185 (prod, main=dev). Pod at 183, leg requested from proxy-mba-w-cc.
-
coder03 11:35 ART: fleet parity v5.6.185 on PROD, DEV and pod (pod /api/health patch 185 via proxy-mba-w-cc).
-
Fabri's final rule is SHOW Categoría de la Carrocería. Shipped in v5.6.185 and current patch 200: ficha Detalle > Números de Serie y Componentes and PDF display the period category; edit form uses catalog select, preserves untouched value, rejects submitted blank, and accepts a valid catalog ID. Audit PASS full test:tools 113/113 + typecheck (2026-10-08T14:16:08Z). PROD browser/PDF evidence for AA013AA at patch 186: ficha and PDF both show M3, /data-lezama/movilba/evidencia/MOVILBA-572/2026-10-08-1148-movilba-AA013AA-reporte01-post714.pdf. MOVILBA-709's ID/FK migration was handled separately.