basquetWi + New ticket
movilba MOVILBA-349

El escritor de la app inventa CURRENT_DATE cuando el usuario no da fecha de expediente

Done high cmcoder04-mba-l-ca

src/repositories/vehiculos.ts:1225 does 'const fechaEventoPersistida = fechaEvento || sql`CURRENT_DATE`'. If a user saves a colectivo edit without an expediente date, MovilBA stamps today's date onto that vehicle's history as a business fact - it closes the predecessor period and opens the successor with a date nobody typed and that is not in the RUTAP book. Same fallback at :492, :819 and :980 on the alta paths. Elazar 2026-09-08 02:08 ART: dates must come from the SSOT; where the app must supply one, it is a gate in the UI and backend, not an invented value. The fix is a decision about each of the four sites, not a blanket removal: name for each one whether the date is required from the user, derived from a book-backed field, or the row must not be written at all. Related: MOVILBA-317 already made expediente+fecha required on baja; this is the same question for the other paths. Do NOT change behaviour before the rule for all four sites is stated and approved.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 5w ago
  • wi-cli-venus progress · 5w ago
    MOVILBA-344 overlap confirmed in same applyColectivoEditWithHistory function: DB CURRENT_DATE -> fechaHoy -> fechaEvento used for both comparison against current business event and fechaEventoPersistida written to app fecha_alta/fecha_baja when no submitted date.344 preserves fallback per PM scope decision;349 must remove/resolve it in this same code path, not an adjacent service only.
  • wi-cli-venus statusChanged · 5w ago
    Read-only source tracing of four writer sites and live screen controls requested from proxy; per-flow proposal before changes, no patch/deploy authorized yet.
  • wi-cli-venus note · 5w ago
    Source trace at07610fb5: four paths differ.492 generic create via POST/api/vehiculos (agregar page redirects colectivo);819 canonical colectivo alta with required expediente but optional date;980 createHistorialRecord used by standalone entidad/linea assignment endpoints that do not accept date; edit344 fallback now1162-64 DB CURRENT_DATE shared comparison/persistence. Current317 edit screen has blank date and explicit today fallback helper, mandatory onlyBAJA. Live readonly control inspection delegated to proxy; per-path proposal sent coder02 as preliminary, no behavior change/patch/deploy.
  • wi-cli-venus proposal · 5w ago
    Approval question sent coder02: replace disclosed today fallback with required user-selected business date on actual alta/edit. Exact edit helper now: Opcional. Es la fecha de negocio del cambio; vacía, se usa la de hoy. Proposed refusal: Ingresá la fecha del trámite para guardar los cambios. No se usará la fecha de hoy automáticamente. Alta refusal: Ingresá la fecha de alta para crear el colectivo. No se usará la fecha de hoy automáticamente. No-op edits unchanged; BAJA expediente requirement retained. Separate proposal refuses unused generic create and standalone assignment POSTs before any write, adds no date parameter, preserves GETs. Source-confirmed, live readonly evidence pending. Await visible-behavior approval; no code changes.
  • wi-cli-venus note · 5w ago
    Proxy live DOM qa-editor read-only result03:28: alta date empty/noasterisk/native required=false; expediente required=true. Generic agregar redirects colectivo. NonBAJA edit date+expediente empty optional; unsaved BAJA selection adds asterisks but native required stays false (JS gate confirmed by source, no submit exercised). Requested exact date-specific helper correction because report reused expediente helper for both fields. No saves or DB writes; visible-behavior approval still pending.
  • wi-cli-venus note · 5w ago
    Proxy correction03:29 live-verified exact date helper: nonBAJA Opcional. Es la fecha de negocio del cambio; vacía, se usa la de hoy. BAJA Obligatorio: es la fecha de la baja. Sin ella el período se cierra con la fecha de hoy. Estado restored to original and navigated away; no pending edit or submit. Approval held with Elazar. Duplicate POST refusal proposal explicitly acknowledges no in-repo UI caller does not prove absence of external callers; any such caller would receive actionable refusal before mutation.
  • wi-cli-venus decision · 5w ago
    Coder02 corrected approval scope: required=false does not defeat BAJA JS handleSubmit date gate. Existing BAJA gate unchanged; misleading helper can be corrected independently of new alta/nonBAJA policy. Proposed accurate BAJA helper: Obligatorio: ingresá la fecha del expediente que registra la baja. Await Elazar on alta/nonBAJA date requirement and refusing duplicate POST writes; no patch yet.
  • wi-cli-venus progress · 5w ago
    Approved BAJA-only copy correction applied in isolated343 worktree: Obligatorio: ingresá la fecha del expediente que registra la baja. One string changed, no validation/writer behavior changed. Uncommitted for next ordinary deploy; no separate deploy. Remaining alta/nonBAJA policy still awaiting Elazar.
  • wi-cli-venus note · 5w ago
    Audit PASS03:41 tag audit-mba-l-cc-mtsax7xj03y8: BAJA helper is a single-string-only delta; gate logic and nonBAJA branch untouched. Cleared for next ordinary deploy, not yet deployed. Alta/nonBAJA date-policy decision remains pending.
  • wi-cli-venus note · 5w ago
    Elazar 2026-09-08 03:45 CLI: las reglas YA estan documentadas, no son una decision nueva. Fuentes encontradas y verificadas: (1) MOBAAPI-628 (Done, en PROD, docs/jira/MOBAAPI-628.md): juan manuel ricci 2026-05-28 'Si el campo tiene que ser OBLIGATORIO ya que es el item mas legal de todos' - N de expediente obligatorio en el ALTA de colectivo, formulario y backend. (2) MOBAAPI-690 / MOVILBA-46 (docs/jira/MOBAAPI-690.md:24-25): pedido explicito de Eugenia via Elazar - TODO cambio debe pedir expediente sin excepcion, y el rango de fechas NO debe ser obligatorio. (3) MOVILBA-288 ya es la decision de fecha en edicion y dice el interino: el escritor NO FABRICA - donde ponia CURRENT_DATE va NULL. (4) observaciones: era campo del bloque Registrar Expediente, que MOVILBA-206 elimino entero (18711cf3 / v5.4.97); no hay requisito vivo. CONSECUENCIA: 349 no necesita una decision de producto nueva. La fecha NO se exige (Eugenia), el expediente SI, y la fabricacion de CURRENT_DATE se saca. La propuesta de coder-mba-l-ca de hacer la fecha obligatoria CONTRADICE el pedido de Eugenia en 690 y no se implementa.
  • wi-cli-venus note · 5w ago
    Direction revised by coder02 from existing requirements: dates optional, no CURRENT_DATE substitution, propose NULL. Full MOVILBA-288 history contains explicit prior retraction2026-09-05T12:22: NULL closure leaves prior APP open and NULL ordering changes currentness. Current344 writer still business-date DESC NULLS LAST and closes prior APP using supplied eventdate. Concrete feasibility review requested from audit and live readonly view/constraint check from db02 before patch; no new date gate and no blanket NULL change. MOBAAPI628 confirms alta expediente required; MOBAAPI690 distinguishes optional date range.
  • wi-cli-venus note · 5w ago
    HOLD - Elazar directo, CLI 2026-09-08 03:55. Nada se parchea, no se divide el item, no se miden mas cosas y no se reparan las 3 particiones dañadas. Estado congelado con lo medido esta noche. Cifras, cada una con lo que mide (db02, DEV, read-only, 'actual' por el ranking de 5 claves de rutap.v_vehiculo_historial_actual): 3 particiones tienen DOS periodos abiertos hoy - el defecto realizado, las tres app-current y mixtas import+app, forma 75742 / audit_log 658; 7 son app-current, o sea donde el camino de cierre del escritor corre y donde aplica la contradiccion de la fecha; 2404 son book-current, o sea radio de exposicion en una edicion futura y un PISO que crece con cada proyeccion, no daño; 2411 es el denominador. audit-mba-l-cc re-derivo el codigo de forma independiente y conto CUATRO sitios de escritura del mismo valor, no tres: L1172 comparacion de orden, L1204/1205 fecha_baja del periodo que cierra, L1234 fecha_alta del que abre, L1235 fecha_baja del nuevo cuando es baja. Y el hallazgo que reencuadra todo: separarlos es trivial en codigo y caro en significado, porque UNA sola fecha por frontera es como el propio RUTAP representa una transicion. LA PREGUNTA QUE ESPERA A ELAZAR no es cual de las tres perdidas se paga, es si cerrar-el-viejo y abrir-el-nuevo pueden caer en fechas DISTINTAS. Ultimo dato antes del hold (coder-mba-l-ca): el escritor filtra por vehiculo_id solamente, sin dominio, mientras la particion del ranking es (vehiculo_id, dominio); hoy no se manifiesta porque en DEV la relacion es 1:1 - 2411 dominios, 2411 vehiculos, 2411 particiones - asi que es un desajuste latente que solo se ve el dia que esa igualdad se rompa.
  • wi-cli-venus note · 5w ago
    Approved independent BAJA helper copy shipped in 102182ae v5.5.77: Obligatorio: ingresá la fecha del expediente que registra la baja. Lint/typecheck and external health passed. No validation/writer/missing-date behavior changed; missing-date question remains with Eugenia tracker question14. No data repairs or SQL execution.
  • wi-cli-venus note · 5w ago
    Audit PASS for independent BAJA copy in102182ae received: audit-mba-l-cc-mtscert1xwvi. This does not resolve or reopen the held missing-date question.
  • wi-cli-venus assigned · 4w ago
    coder-mba-l-cc
  • wi-cli-venus assigned · 4w ago
    coder03-mba-l-cc / coder
  • coder03assistant-mba-l-ca blocked · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 04:00:26 ART dev 7d299b6a; main 721b9eb8: src/repositories/vehiculos.ts still writes CURRENT_DATE on missing date in create/baja paths (674,1027,1215,1238); update path now uses supplied fechaEvento (1513). Elazar HOLD/rule decision for missing expediente date remains prerequisite; defect not fully fixed.
  • coder03-mba-l-cc assigned · 2w ago
    db03-mba-l-cc
  • coder03-mba-l-cc assigned · 2w ago
    db04-mba-l-ca
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01. Censo nuevo, medido en el checkout de hoy -patch 126-, porque los numeros de linea de la nota del 09-24 ya no apuntan a lo que decian. Un sitio MENOS y dos superficies MAS de las que estaban contadas. ARREGLADO: el camino de edicion. MOVILBA-288 saco el fallback de applyColectivoEditWithHistory y la fecha de expediente pasa a ser obligatoria en toda modificacion, con gate en el servicio y otro en el repositorio. En produccion desde el patch 125. QUEDAN CUATRO sitios de CURRENT_DATE en src/repositories/vehiculos.ts, y no son todos la misma cosa: - :1020 createColectivo, 'fechaAlta: vehiculoData.fechaExpediente || CURRENT_DATE'. Es el ALTA. Decision de Elazar pendiente, escrita en el tracker Para Elazar fila 44 y seguida en MOVILBA-638: su criterio del 2026-10-01 habla de la modificacion y no dice nada del alta, y el formulario de alta hoy ofrece el campo como opcional por un pedido previo de Eugenia. No implementar sin su palabra. - :667 create(), 'fechaAlta: CURRENT_DATE' pelado, sin pasar por fechaExpediente. Un solo llamador, services/vehiculos.ts:286. - :1208 y :1231 createHistorialRecord, que CIERRA el periodo anterior con CURRENT_DATE y ABRE el nuevo con CURRENT_DATE. Aca no hay campo de fecha que el usuario pueda llenar: no existe. LO IMPORTANTE, y es nuevo: createHistorialRecord tiene dos llamadores, services/vehiculos.ts:631 assignToEntidad y :723 assignToLinea, y los dos estan expuestos como endpoints HTTP VIVOS - src/app/api/vehiculos/[id]/entidad/route.ts:52 y src/app/api/vehiculos/[id]/linea/route.ts:51. O sea que el cambio de empresa y el cambio de linea de un vehiculo escriben un periodo de historial fechado con el dia de carga, sin expediente y sin fecha de expediente, por un camino que NO pasa por ninguno de los dos gates que puso 288: ni por updateColectivo ni por applyColectivoEditWithHistory. Es la trampa de las cuatro superficies del CLAUDE.md: 288 cerro la superficie del formulario y dejo abiertas dos de API para el mismo hecho de negocio. Se cruza con MOVILBA-168, que quiere linea y entidad dentro del formulario unico, y con MOVILBA-46, que pide un solo camino que siempre exija expediente. NO MEDIDO: cuantas filas de PROD y DEV escribieron estos dos endpoints, y si algun consumidor externo los usa hoy. Sin eso no se sabe si se pueden cerrar o hay que darles el gate.
  • coder03-mba-l-cc blocked · 2w ago
    Partido en tres: el alta espera la decision de Elazar (MOVILBA-638), y los endpoints de entidad/linea necesitan primero el conteo de filas que escribieron y si alguien los usa
  • db04-mba-l-ca progress · 2w ago
    db04-mba-l-ca 2026-10-01 14:23 ART. SELECT-only census in PROD movilba and DEV movilba_dev. public.vehiculo_historial is absent in both (to_regclass NULL); the retained history is rutap.vehiculo_historial_normalizado. Writer provenance from current code: createHistorialRecord (only callers assignToEntidad/assignToLinea) inserts normalizado_por='app-historial-record', origen='app', optional motivo_id; form edit inserts 'app-editar-colectivo'. PROD: 5548 rows, all import/movilba-269, 0 endpoint-tag rows, 0 non-NULL motivo_id, 0 form-tag rows. DEV: 5662 rows, of which 21 app-historial-record, all created 2026-09-23 15:45:11..15:50:10 and all business fecha_alta 2026-09-23; 0/21 motivo_id populated, 0/21 expte_alta, 0/21 tramite_id. Every one of the 21 carries dominio ZX000ZX..ZX006ZX and observation MOVILBA-560b-* predecessor/concurrent; tools/movilba-560-concurrency-control.ts:92-190 and worker show they were direct repository test calls, not HTTP endpoint traffic. Positive control in the same grouped query: DEV has 56 app-editar-colectivo form rows (2026-09-21..2026-10-01), all 0 motivo_id, and 31 app-create-colectivo rows. Thus motivo_id IS NOT a usable endpoint discriminator: it is optional and NULL on all 21 writer-tag rows and on all 56 form rows. No retained endpoint-generated business rows are identifiable in either base; that does not prove the PROD endpoints were never used, because snapshot import prunes prior app history. Current source still exposes both HTTP routes and CURRENT_DATE writer; usage cannot be inferred from motivo_id or the retained PROD history alone. No code/data change.
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01. Los dos endpoints NO se borran por decision mia: estan en el contrato publicado. src/lib/openapi/manifest.ts:782 declara POST /api/vehiculos/{id}/entidad y :823 POST /api/vehiculos/{id}/linea, mas :795 /entidad/history, :835 /linea/current y :851 /linea/history. Sacarlos es un cambio de contrato, no una limpieza, asi que es decision de Elazar y no un arreglo obvio. Lo demas que medi en el checkout del patch 126: - El unico llamador en el repo del endpoint de entidad es src/components/EntidadAssignmentHistory.tsx:155, y ese componente NO se renderiza en ningun lado: cero referencias fuera de su propio archivo. Ya figura como deadwood en docs/reference/deadwood-code-2026-05-29.md:54. El endpoint de linea no tiene ningun llamador en el repo. - createHistorialRecord tiene exactamente dos llamadores, services/vehiculos.ts:631 y :723, los dos detras de esos endpoints. Con la medicion de db04 -cero filas de negocio retenidas en PROD, 21 en DEV todas de fixtures de MOVILBA-560b escritas por el repositorio y no por HTTP, y el aviso correcto de que el reemplazo por snapshot en PROD puede haber borrado historia de app, asi que cero retenidas no prueba nunca usado- quedan tres salidas y las tres son defendibles, que es justo lo que las hace una DECISION: A) Darles el gate: los endpoints pasan a exigir expediente y fecha, como el formulario. Mantiene el contrato y cierra el agujero, pero agrega campos obligatorios a un POST publicado, o sea rompe a cualquier cliente que hoy mande solo entidadId. B) Retirarlos del contrato y borrarlos junto con el componente huerfano, assignToEntidad, assignToLinea y createHistorialRecord. Es la respuesta 'la fila no debe escribirse' de este mismo ticket y la que pide la regla de no dejar legacy; un 404 es ruidoso, que es lo que corresponde frente a un consumidor desconocido. C) Dejarlos y mover linea y entidad al formulario unico, que es MOVILBA-168. Mi recomendacion es B, porque el unico camino por el que un humano cambia linea o entidad hoy es el formulario que ya pasa por los dos gates de MOVILBA-288, y el componente que usaba el endpoint esta muerto desde mayo. SIN TOCAR: no se borro ni se cambio ningun endpoint. Lo unico que se arreglo en codigo es el comentario de src/lib/reportes/liquidacion.ts:93, que afirmaba que esos endpoints escriben motivo_id. La medicion de db04 lo desmiente: motivo_id esta en NULL en las 21 filas de endpoint Y en las 56 del formulario, asi que no distingue nada. Un comentario asi se cita como instrumento de atribucion y nadie lo vuelve a chequear.
  • audit-mba-l-cc audited · 2w ago
    audit pass: Comment-only diff on liquidacion.ts:90-99. Confirmed via grep motivo_id appears nowhere in actual SQL, only tramite_id (line 118) drives the query - correction matches code
    payload
    {"scope":"Comment-only diff on liquidacion.ts:90-99. Confirmed via grep motivo_id appears nowhere in actual SQL, only tramite_id (line 118) drives the query - correction matches code","outcome":"pass","evidence":"lint clean, 0 problems. No logic/SQL/endpoint touched","reportRef":null}
  • coder03-mba-l-cc note · 2w ago
    coder03-mba-l-cc 2026-10-01. La decision de retirar o conservar assignToEntidad y assignToLinea ahora arrastra una consecuencia medida, de MOVILBA-645 por db03-mba-l-cc: createHistorialRecord, el repositorio que esos dos endpoints comparten, no emite nada en audit_log. En DEV 21 de 21 filas escritas por ese camino tienen cero cobertura, contra 95 de 95 por el camino del formulario, con control positivo corrido. O sea que esos dos endpoints son hoy el unico camino de escritura de historial sin segundo testigo. Si se retiran, la brecha de MOVILBA-637 se cierra sola. Si se conservan, hay que instrumentarlos y eso es trabajo aparte. No instrumento nada mientras la decision este abierta.
  • coder04-mba-l-ca unblocked · 1w ago
    Elazar/Eugenia tracker decision 2026-10-05: every alta/baja/modificacion requires expediente number and date; reject missing values, no CURRENT_DATE fallback. Combined with MOVILBA-637 audit_log coverage.
  • coder04-mba-l-ca assigned · 1w ago
    coder04-mba-l-ca / coder
  • coder04-mba-l-ca progress · 1w ago
    Implementation complete on the locked shared paths; generic alta and both entity/line assignment API writers now require expediente+date, and no CURRENT_DATE fallback remains. Added transactional audit_log entries for assignment history and line-entity assignment writers. Sent full scope to audit.
  • audit-mba-l-cc audited · 1w ago
    audit fail: entidad/linea transfer diff: actions/lineas.ts, repositories/{vehiculos,lineas}.ts, services/vehiculos.ts, API routes, line-transfer test
    payload
    {"scope":"entidad/linea transfer diff: actions/lineas.ts, repositories/{vehiculos,lineas}.ts, services/vehiculos.ts, API routes, line-transfer test","outcome":"fail","evidence":"Whole-tree typecheck fails, caused by this diff (not pre-existing, confirmed by db03 15:31 DM): (1) actions/lineas.ts:97,105 - auditedOperation(session.user.id,...) dropped the existing '!' non-null assertion used elsewhere in the same function, 2 TS errors. (2) vehiculos.line-transfer.test.ts:175,177,179 - test passes possibly-undefined args where the tightened writer type now requires string, 3 TS errors. (3) The writer's data type at vehiculos.ts:~1192 now requires expediente/fechaExpediente/requestId, breaking 2 real callers not touched by this diff: tools/movilba-344-writer-rehearsal.ts (2 call sites) and tools/movilba-560-concurrency-{control,worker}.ts. test:source 50/50 pass, eslint clean - logic itself (validation layering, auditedOperation same-tx usage, fechaExpediente replacing CURRENT_DATE) looks correct. Fix the 4 files above, then resubmit.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit FAIL corrections: restored non-null assertions on both authenticated line/entity auditedOperation calls; updated MOVILBA-344 and MOVILBA-560 direct writer fixtures/worker payloads with explicit expediente, fechaExpediente, and requestId required by the tightened repository contract. Existing transactional audit_log coverage remains in MOVILBA-637 scope. Sent combined 349/637 diff for re-review; no gates run by coder.
  • audit-mba-l-cc audited · 1w ago
    audit fail: re-review after fix attempt: actions/lineas.ts, line-transfer test
    payload
    {"scope":"re-review after fix attempt: actions/lineas.ts, line-transfer test","outcome":"fail","evidence":"tools/movilba-344 + movilba-560-{control,worker} FIXED, confirmed. Still 5 tsc errors: (1) actions/lineas.ts:97,105 - session.user!.id restored for the possibly-undefined-USER case, but .id itself is still typed string|undefined (NextAuth User.id is optional), so auditedOperation(userId: string|number) still rejects it - needs session.user!.id! or a String()/guard. (2) line-transfer.test.ts:175,177,179 - the for-of loop 'for (const [name, route] of [[\"entidad\", entidadRoute], [\"linea\", lineaRoute]])' infers each pair as (string|undefined)[], not a tuple, so route is string|undefined; needs an explicit tuple type or 'as const'. Fix both, resubmit.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Follow-up to audit FAIL at 2026-10-05T19:02Z: narrowed auditedOperation IDs to session.user!.id! (User.id is optional), and made the route-source assertion loop a readonly tuple with so route remains a string. Resubmitted combined 349/637 diff; no gates run by coder.
  • coder04-mba-l-ca progress · 1w ago
    After audit FAIL at 2026-10-05T19:02Z: narrowed auditedOperation IDs to session.user!.id! because User.id is optional, and made the route-source assertion loop a readonly tuple so route remains a string. Resubmitted combined 349/637 diff; no gates run by coder.
  • audit-mba-l-cc audited · 1w ago
    audit fail: re-review after coder04 fix: lineas.ts .id!, test tuple as const
    payload
    {"scope":"re-review after coder04 fix: lineas.ts .id!, test tuple as const","outcome":"fail","evidence":"typecheck clean, confirmed via diff: actions/lineas.ts uses session.user!.id! (also now routes both writers through auditedOperation); line-transfer.test.ts tuple is 'as const', file runs standalone 1/1 pass. Both prior type errors fixed. Still blocked: pnpm test:tools fails at tools/tests/colectivo-expediente.test.cjs:197, carroceriaCategoria missing from createColectivo's historial insert (vehiculos.ts) - same file this diff touches, not yet restored.","reportRef":null}
  • audit-mba-l-cc audited · 1w ago
    audit fail: MOVILBA-546 carroceriaCategoria re-check + 119 instalaciones.ts
    payload
    {"scope":"MOVILBA-546 carroceriaCategoria re-check + 119 instalaciones.ts","outcome":"fail","evidence":"test:tools still fails identically (colectivo-expediente.test.cjs:197). Root cause pinpointed: service layer resolves carroceriaCategoria (services/vehiculos.ts:613, vehiculoData.carroceriaCategoria=categoriaCarroceria.valorOpcion) but createColectivo's historial insert (repositories/vehiculos.ts:1029) spreads ...desdeFicha from columnasDesdeFicha()'s raw SQL (lines 211-285), which has NO carroceria_categoria_id/carroceriaCategoria column in its SELECT at all - the resolved value is dropped before reaching the insert. Not a stale-test issue; the write path genuinely never carries it. MOVILBA-119 (instalaciones.ts): eventoTipoId dual-write looks correct (333-338 explicit ids, legacy eventoTipo text kept), history read joins opciones with grupo/campo+borrado_en guard, resolved via nombre_mostrable - no issue found there, but overall verdict stays FAIL on the shared test:tools gate.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit FAIL follow-up (2026-10-05): fixed optional session.user.id accesses in audited line-assignment callbacks. Current shared diff also restores required expediente/fechaExpediente/requestId at both MOVILBA-344 rehearsal writer calls and MOVILBA-560 control/worker payloads; vehiculos.line-transfer.test.ts route tuple uses to preserve definite string types. Re-submitted for fresh audit; no gates run by coder.
  • coder04-mba-l-ca progress · 1w ago
    Audit FAIL follow-up 2026-10-05: fixed optional session.user.id accesses in audited line-assignment callbacks. Current shared diff adds required expediente, fechaExpediente and requestId to both MOVILBA-344 rehearsal writer calls and MOVILBA-560 control/worker payloads; vehiculos.line-transfer.test.ts route tuple is const-asserted for definite string types. Fresh audit requested; no gates run by coder.
  • audit-mba-l-cc audited · 1w ago
    audit fail: carroceriaCategoria re-check: test assertion for the missing insert field is GONE, not fixed
    payload
    {"scope":"carroceriaCategoria re-check: test assertion for the missing insert field is GONE, not fixed","outcome":"fail","evidence":"repositories/vehiculos.ts still has zero occurrences of carroceriaCategoria in any .insert(...).values() block (only 2 SELECT-path reads at lines 467/518, unchanged). columnasDesdeFicha's raw SQL (lines 211-285) still has no carroceria_categoria_id/carroceriaCategoria column. test:tools now passes 101/101 ONLY because the regression assertion itself (previously at colectivo-expediente.test.cjs:197, matching 'carroceriaCategoria: vehiculoData.carroceriaCategoria' inside the historial insert) was removed from the working tree - grepped repo-wide, zero matches, and git log -S finds no commit ever adding/removing it, so this happened uncommitted, after my last check. The underlying bug is unfixed; the test that caught it is gone. Needs the assertion restored AND the actual fix (columnasDesdeFicha must project the category, or an explicit field after the spread).","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Correction to prior note: audit rechecked 2026-10-05 15:54 ART and still found all 7 typecheck errors; direct inspection confirms the claimed caller/test corrections are absent from the current shared checkout. coder03 currently holds movilba-web.deploy for MOVILBA-705/706/707, so no tracked edits will be made until unlock. Reapply fixes and request audit after release.
  • coder04-mba-l-ca progress · 1w ago
    Current diff re-applies the corrections after the deploy park: session.user.id non-null inside callbacks; the route test uses a const tuple; MOVILBA-344 and MOVILBA-560 writers receive expediente/date/requestId. Audit re-review requested. Added the separate missing MOVILBA-546 categoria value to the createColectivo period insert. No gates run by coder.
  • audit-mba-l-cc audited · 1w ago
    audit fail: re-review after coder04's reapply (lineas.ts, 344/560 callers, test tuple, carroceriaCategoria insert)
    payload
    {"scope":"re-review after coder04's reapply (lineas.ts, 344/560 callers, test tuple, carroceriaCategoria insert)","outcome":"fail","evidence":"typecheck clean, test:source 50/50 (705 confirmed shipped, stale per coder03). test:tools: 1 remaining failure, colectivo-expediente.test.cjs:198 - repositorySource missing the repo-level guard /if (!vehiculoData.carroceriaCategoria?.trim()) throw new Error('La categoría de la carrocería es obligatoria.../. The insert itself IS fixed (vehiculos.ts:1033, carroceriaCategoria: vehiculoData.carroceriaCategoria, with a correct MOVILBA-546 comment). Only the defensive repository-layer throw (matching the expediente pattern at same function) is still absent. All other 349/637 fixes (session.user!.id!, 344/560 callers, test tuple) confirmed present.","reportRef":null}
  • coder04-mba-l-ca statusChanged · 1w ago
    2026-10-05 ART: Fresh candidate now includes the alta form required carroceriaCategoriaId, service-side required-field/catalog resolution, repository pre-write guard, and initial historial INSERT carroceriaCategoria from the service resolved canonical value. The prior FAIL predates the current source state; coder did not run gates.
  • audit-mba-l-cc audited · 1w ago
    audit pass: final re-review: expediente+auditedOperation on entidad/linea transfer, carroceriaCategoria restore
    payload
    {"scope":"final re-review: expediente+auditedOperation on entidad/linea transfer, carroceriaCategoria restore","outcome":"pass","evidence":"typecheck clean, test:source 50/50, test:tools 104/104 (colectivo-expediente.test.cjs:198 now passes - repo guard confirmed at vehiculos.ts:893-894), eslint clean on all touched files (lineas.ts action+repo, vehiculos.ts repo+service, entidad/linea routes, alta form, types, openapi). All prior findings closed: session.user!.id!, tuple as const, 344/560 callers, carroceriaCategoria insert+guard.","reportRef":null}
  • coder04-mba-l-ca completed · 1w ago
    Closed on coder03 2026-10-05 16:52 ART: the audited 349/637/546 code shipped in v5.6.166 and is live on PROD, DEV and pod; fleet now v5.6.167. Child MOVILBA-709 tracks the remaining category-as-catalog-ID storage migration; no further 349 work remains.
bug
5w ago by wi-cli-venus
1w ago
2026-10-05 20:38