basquetWi + New ticket
movilba MOVILBA-739

21 generateUUID sites in 9 route files still mint a request id outside getRequestId, so one request logs under several ids

Blocked low cmcoder04-mba-l-ca ⛔ The current-tree census is already recorded: executable UUID calls are concentrated in src/actions (147), with 3 client/API fallbacks; service/repository server-chain mints are 0. The original 21-sites/9-route framing is stale. The remaining acceptance requires a live authenticated multi-layer request grouped by transportRequestId/request_id; no agent can supply the required AD browser session, and no such grouped runtime witness exists. No code changed; wait for Elazar's authorized authenticated session or new runtime evidence before expanding the action-layer scope.

Residue of MOVILBA-732, filed separately because a paragraph inside a closed cutover item is not something anyone pulls off the backlog. MOVILBA-732 moved 75 sites in 52 route files onto getRequestId() and converted 257 log() calls to the three-argument shape; _requestId is gone from src/ entirely. What it did NOT reach, by audit's measurement at the time of the PASS: 21 generateUUID call sites across 9 route files that mint an id locally, plus three function-entry mints. Those were explicitly declared out of scope in the 732 ship note (commit 2b48acbc) rather than fixed. Consequence: one HTTP request passing through any of those 9 route files emits app_logs rows under more than one request_id - the exact defect 732 was opened to remove. The chain is complete in 52 of 61 route files and silently broken in the other 9, and a partial chain is harder to read than none, because nothing marks which ids belong together. Deliverable: a census of the 20 sites and the 3 function-entry mints keyed by file and line, MEASURED and not quoted from this description, then the cutover to getRequestId() with the same explicit-or-context-or-mint resolution both logger branches already implement (src/lib/logger.ts:126-132 and :139-147). Acceptance needs a control seen to fail: a request through one of the 9 files shown emitting several distinct request_ids BEFORE the change, one shared id after. A test that only checks the post-change shape is a green line, not a control. Independent of MOVILBA-735, which fixes user_id/ip_address on the same table.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03-mba-l-cc created · 1w ago
  • coder03-mba-l-cc assigned · 1w ago
    coder04-mba-l-ca / solo
  • coder04-mba-l-ca progress · 1w ago
    Source census on current tree: 21 (not estimated 20) generateUUID() requestId assignments across 9 API route files, plus 3 function-entry randomUUID() assignments at services/chasis.ts:19, services/lineas.ts:23, repositories/chasis.ts:33. The separate /api/log-error randomUUID fallback is intentional and outside this count. Asked audit for a pre-change persisted multi-ID witness before code cutover (hub tag coder04-mba-l-ca-muzvu0p063k6).
  • coder04-mba-l-ca progress · 1w ago
    Cutover diff ready: 21 route requestId assignments in 9 API files and 3 function-entry assignments (services/chasis, services/lineas, repositories/chasis) now await getRequestId(). Scope is exactly 12 files, 39 insertions/39 deletions; /api/log-error fallback untouched. Source census corrected ticket's 20 estimate to 21. Awaiting audit's before-change multi-ID witness and diff verdict; no coder-side gates run.
  • coder04-mba-l-ca progress · 1w ago
    Correcting published v5.6.196 commit message's bounded estimate of 20 sites. Re-derived from the SHIPPED pre-739 main tree (git grep -n 'generateUUID()' 13cad80c -- src/app/api): 21 requestId assignments in 9 route files: admin/chasis/[id] 3, admin/chasis 2, admin/opciones/[id] 3, admin/opciones/grupos-campos 1, admin/opciones 2, admin/users/last-login 1, paradas/[id] 3, ramales/[id] 3, recorridos/[id] 3. Sum=21. Every match is 'const requestId = generateUUID()', so none is a non-request use. The 20 in commit 2b48acbc was an undercount; the current 739 diff converts all 21. Three separate function-entry randomUUID mints are counted apart.
  • audit-mba-l-cc audited · 1w ago
    audit pass: Los 12 archivos del diff de 739 (sha pinneados, identicos pre y post gates). Gates CORRIDOS: typecheck exit 0, test:source 66/66, test:tools 114/114, eslint --max-warnings 0 sobre los 12 limpio, gate de postman exit 0. SIN EJERCITAR: ninguna request HTTP viva, 739 no esta deployado.
    payload
    {"scope":"Los 12 archivos del diff de 739 (sha pinneados, identicos pre y post gates). Gates CORRIDOS: typecheck exit 0, test:source 66/66, test:tools 114/114, eslint --max-warnings 0 sobre los 12 limpio, gate de postman exit 0. SIN EJERCITAR: ninguna request HTTP viva, 739 no esta deployado.","outcome":"pass","evidence":"Las 21 conversiones de ruta en 9 archivos mas las 3 de servicio/repositorio pasan todas de generateUUID()/randomUUID() a await getRequestId(), y los imports acompanan (utils/uuid -> lib/request-context) en los 12. Re-derive el censo yo contra HEAD dfbf98c5 con un patron de asignacion: 21 sitios en 9 archivos, chasis/[id] 3, chasis 2, opciones/[id] 3, opciones/grupos-campos 1, opciones 2, users/last-login 1, paradas/[id] 3, ramales/[id] 3, recorridos/[id] 3. El 21 de coder04 es el CORRECTO; el \"20 sitios de generateUUID en 9 route files\" del mensaje de commit de main 13cad80c, que sale de una medicion mia, esta corto por uno. Los 9 archivos coinciden en las dos cuentas. En el arbol post-diff queda 1 solo mint de ese patron en src: services/userProfile.ts:29 (mas un generateUUID() inline en :98), misma clase que las 3 que 739 si convierte y DENTRO de como 739 enuncia su alcance - gap, no defecto del diff. TESTIGO FAILING-BEFORE REGISTRADO, medido en filas vivas: en DEV, GET /api/admin/chasis del 2026-09-17 13:37:01, UNA request HTTP, 8 filas de app_logs, TRES request_id primarios distintos - ce27f712 la ruta, 85049702 el repositorio, 91851d24 el servicio - los tres bajo UN solo transportRequestId b55b0282-ed9a-4130-af3a-91d4fa508c30. En PROD el testigo existe pero mas chico: GET /api/admin/users/last-login, 6 filas, 3 requests, cada una con su id minteado != su id de transporte (2026-09-17, 09-18, 09-25). NO hay testigo de chasis en PROD y no puede haberlo: la ultima fila de chasis en PROD es del 2026-06-04, anterior al contexto del proxy, asi que esas filas tienen transportRequestId en 0 de 0 y no hay con que empalmarlas. El predicado que pedias (varios request_id primarios bajo un transportRequestId) SI es satisfacible y es el grupo de DEV de arriba; agrupado por source se esconde, porque cada capa es 1:1 con su propio mint.","reportRef":null}
  • audit-mba-l-cc audit-finding · 1w ago
    audit-mba-l-cc 2026-10-08 15:55 ART (18:55Z) - residuos junto al PASS del mismo timestamp, ninguno bloqueante. 1. NINGUN GATE CUBRE EL CUTOVER. Los cinco gates salieron verdes y ninguno ejercita lo que 739 cambia. Medido: ningun test del arbol asercion sobre getRequestId - los dos unicos archivos de test que mencionan generateUUID son mocks ajenos (colectivo-edit-load.test.cjs:24 stubea generateUUID a la cadena "client-generated-request", colectivo-expediente.test.cjs:64 a "local-test-request"), ninguno habla de rutas ni de contexto. El verde dice "no rompi nada mas", no dice "739 funciona". El unico control posible del cutover es de runtime y queda SIN EJERCITAR hasta que alguien mire filas de app_logs despues del deploy. Control de la medicion: si revirtiera un solo sitio a generateUUID(), typecheck, lint, test:source, test:tools y el gate de postman seguirian los cinco en verde. 2. EL FALLBACK DEL CUTOVER ES INDISTINGUIBLE DEL EXITO. request-context.ts:34-37, getRequestId() devuelve requestId del contexto O randomUUID(), y getLogContext() en :27-30 tiene un catch que devuelve {} sin dejar rastro. Despues del cutover una fila de app_logs no dice si su id vino del contexto o de un mint de fallback: no queda breadcrumb, porque transportRequestId solo se adjunta cuando los dos difieren (logger.ts:145-146). Si el proxy deja de instalar x-request-id, la regresion se ve EXACTAMENTE igual que el exito fila por fila; lo unico observable es que las capas de una misma request vuelvan a tener ids distintos. El chequeo post-deploy tiene que ser por GRUPO, no por fila: las tres capas de una request bajo un solo request_id, y ese id igual al que minteo el proxy. 3. getRequestId() NO VALIDA EL HEADER CONTRA UUID_RE. Toma x-request-id tal cual. Hoy no es explotable porque proxy.ts borra el x-request-id entrante antes de instalar el propio (el strip de MOVILBA-735, ya shipeado y con el control visto fallar por audit a las 17:38:12Z de ayer en esa linea de trabajo), asi que un valor forjado no llega. Vale dejarlo escrito: la garantia de que ese id es un uuid vive en proxy.ts, NO en getRequestId, y si alguien saca el strip, logger.ts:212 vuelve a escribir request_id NULL por la via silenciosa. No pido cambio. 4. GAP DENTRO DEL ALCANCE ENUNCIADO: services/userProfile.ts:29 sigue con const requestId = generateUUID() y :98 con un generateUUID() inline dentro del log(). Es la misma clase que services/chasis.ts, services/lineas.ts y repositories/chasis.ts, que 739 si convierte. Queda como el unico sitio de ese patron en src despues del diff. 5. RESIDUO ACOTADO Y GRANDE FUERA DE 739: quedan 69 mints de generateUUID()/crypto.randomUUID() en src (sin contar utils/uuid.ts). Los legitimos son proxy.ts:142 (el mint del transporte), proxy.ts:220 (nonce de CSP), los dos fallback de logger.ts:129 y :144, client-logger.ts, ErrorBoundary.tsx y las tres paginas de cliente. Los que son la MISMA clase que 739 y no estan en su alcance: src/actions/* con asociaciones.ts 9, choferes.ts 8, validadoras.ts 8, vehiculos.ts 7, instalaciones.ts 3, lineas.ts 3, entidades.ts, personas.ts y reportes.ts 1 cada uno, mas src/lib/api-client.ts con 5 y services/validadoras.ts con 3 mints como valor por defecto de parametro. Los server actions son el camino de ESCRITURA de la app, asi que ese residuo es mas grande que el que 739 cierra. No es un defecto de este diff; es que el ticket no lo nombra y una cuenta que nadie re-deriva se hereda. 6. EL ID DEVUELTO AL CLIENTE CAMBIA DE SIGNIFICADO, sin romper el contrato. Varias rutas devuelven requestId en el cuerpo (p.ej. admin/chasis/route.ts:115 en el 201, y los 500 de chasis/[id] y recorridos/[id]). Despues del cutover ese valor es el id del transporte en lugar de un mint de la ruta; sigue siendo un uuid presente en app_logs, asi que el modal de error sigue resolviendo - de hecho mejor, porque ahora empalma con las filas de las otras capas. Lo digo porque es exactamente el contrato que el comentario de logger.ts:124-127 protege y conviene que quede medido y no supuesto. 7. ATRIBUCION DEL VERDE. typecheck y test:source corrieron sobre el ARBOL ENTERO, que ademas de estos 12 tiene docs/reference/movilba-481-opciones-view-join-census.md modificado, tools/verification/movilba-542-period-parity.test.ts en 0b0450c8 y cinco untracked. El verde es del arbol, no de los 12 solos. Los 12 sha identicos pre y post en las cinco corridas.
  • coder04-mba-l-ca titleChanged · 1w ago
    21 generateUUID sites in 9 route files still mint a request id outside getRequestId, so one request logs under several ids
  • coder04-mba-l-ca descriptionChanged · 1w ago
    was: Residue of MOVILBA-732, filed separately because a paragraph inside a closed cutover item is not something anyone pulls off the backlog. MOVILBA-732 moved 75 sites in 52 route files onto getRequestId() and converted 257 log() calls to the three-argument shape; _requestId is gone from src/ entirely. What it did NOT reach, by audit's measurement at the time of the PASS: 20 generateUUID call sites across 9 route files that mint an id locally, plus three function-entry mints. Those were explicitly declared out of scope in the 732 ship note (commit 2b48acbc) rather than fixed. Consequence: one HTTP request passing through any of those 9 route files emits app_logs rows under more than one request_id - the exact defect 732 was opened to remove. The chain is complete in 52 of 61 route files and silently broken in the other 9, and a partial chain is harder to read than none, because nothing marks which ids belong together. Deliverable: a census of the 20 sites and the 3 function-entry mints keyed by file and line, MEASURED and not quoted from this description, then the cutover to getRequestId() with the same explicit-or-context-or-mint resolution both logger branches already implement (src/lib/logger.ts:126-132 and :139-147). Acceptance needs a control seen to fail: a request through one of the 9 files shown emitting several distinct request_ids BEFORE the change, one shared id after. A test that only checks the post-change shape is a green line, not a control. Independent of MOVILBA-735, which fixes user_id/ip_address on the same table.
  • audit-mba-l-cc audit-finding · 1w ago
    audit-mba-l-cc 2026-10-08 16:02 ART (19:02Z) - LOS 12 SHA256 QUE EL PASS DE 18:51:09Z NOMBRA Y NO LLEVABA. Correccion de forma, no del veredicto: el scope decia "sha pinneados" y el payload no cargaba ninguno, asi que el PASS no era re-medible contra bytes. Van aca, tomados antes de los gates y RE-VERIFICADOS sin cambios a las 19:02Z, despues de las cinco corridas: ae088bbb10f710b869c9ece68dd8d6aa80b884181285be71acfaf658138a72a3 src/app/api/admin/chasis/[id]/route.ts 0a4b7a67917ee21417a802ffd5ddc10843301583e36c2049f74fa2679424a23a src/app/api/admin/chasis/route.ts 5ef0c6fca5a18277ec0bfbb6281192191a7416f88f7f4bd39e437b88044df3c6 src/app/api/admin/opciones/[id]/route.ts 3f0a77399fc02be840bdc146a938b814699df1837521a874ff91a016a0201659 src/app/api/admin/opciones/grupos-campos/route.ts 399fbb409091e17c48cb70303ee29ae5a20068c83bec421d23cc62b25357dc18 src/app/api/admin/opciones/route.ts 4554e660c03c95c6bb1957ca01ca4bc2e714afe3552b8143ecd598f26f462431 src/app/api/admin/users/last-login/route.ts 3e89936e2385975ab29dd8b107899037ca104c515fc54e6e7c864032c66f8de3 src/app/api/paradas/[id]/route.ts dfa4b9a2872c4fd5b4f058e03354942321c7112921bf53ec12b12bb2cec23106 src/app/api/ramales/[id]/route.ts 968321da1da97b67cb394939aa6749d01031b4d1dc1cc2e79ccc75f9c522756e src/app/api/recorridos/[id]/route.ts 3f589d9aa0a2a4eb98caa5203dc9f8cfe8e80f98733eba5f3fe0ada38ab295ba src/repositories/chasis.ts dd91607fd5a6c5364cc19d1968397fcd0c811646aeca9a3214865d186e683415 src/services/chasis.ts 5d6a63a3fc8ba8050b9520205c7da6288cf5f68d5b7891387ff7a59090d2654c src/services/lineas.ts El PASS de 18:51:09Z vale sobre EXACTAMENTE estos 12 sha y sobre ningun otro. Si alguno difiere al momento de pushear, el veredicto no alcanza a ese archivo. GAP YA NOMBRADO, repetido aca para que no haya que leer el otro evento: 739 no esta completo con este diff. services/userProfile.ts:29 sigue con const requestId = generateUUID() y :98 con un generateUUID() inline dentro del log(), misma clase que las 3 conversiones de servicio/repositorio que el diff si hace. Son el unico resto de ese patron en src despues del diff. El cutover no se reporta completo mientras esos dos sigan ahi.
  • coder04-mba-l-ca progress · 1w ago
    Audit's 12-file PASS explicitly left same-class userProfile service mints at :29 and inline :98. Added a separate src/services/userProfile.ts tail: both now await getRequestId(), preserving old-signature log messages/payloads. SHA256 47974a3e8a3846b2fc00971d912abdb11d9f59a45a342692f35a0195a9d7d49a. This tail is NOT covered by the existing 12-file audit PASS and is sent separately for verdict; 739 remains open until runtime one-ID control.
  • audit-mba-l-cc audit-finding · 1w ago
    audit-mba-l-cc 2026-10-08 16:08 ART (19:08Z) - la cola NO tiene veredicto y no puedo darselo todavia. Motivo medido, no procedimental. src/services/userProfile.ts en el arbol compartido hashea sha256 23cb5f07be12b560a7291a1fe81aa8795fcee573bffe29ca72ceb71854e90d78, que es identico a git show HEAD:src/services/userProfile.ts. O sea: lo que esta en el path AHORA es la version sin convertir, la de HEAD. Los bytes 47974a3e que coder04 me pidio verdictar estan en stash@{0} ('coder03 park for 739+542 ship - userProfile tail (no verdict) + other lanes'), confirmado: git show stash@{0}:src/services/userProfile.ts -> 47974a3e8a3846b2... Consecuencia que importa: cualquier gate que yo haya corrido sobre ese path en esta ventana corrio contra 23cb5f07, no contra 47974a3e. No puedo afirmar sobre que bytes cayo mi eslint del primer comando porque el park ocurrio en la misma ventana y no re-hashee antes de ese comando - asi que lo trato como NO corrido. typecheck, test:source, test:tools y el gate de postman que si corrieron verdes cubren el arbol CON la cola parkeada, es decir no la cubren. No voy a verdictar un hunk que no esta en el path. eslint y tsc resuelven imports desde la ubicacion real del archivo, asi que extraer el blob al scratchpad no permite correrlos - y no creo worktrees. Lo que falta para cerrar 739: que los bytes 47974a3e esten en src/services/userProfile.ts cuando yo corra los gates. Es una ventana del checkout, no una decision. Lo que ya lei y sigue en pie del diff (git stash show -p): el swap de import de @/utils/uuid a @/lib/request-context, :29 'const requestId = await getRequestId();', :98 'log(error, await getRequestId(), user-profile-service, {' y el arreglo del newline final. Es exactamente la clase que nombre en los findings de 18:51:45Z y 18:57:32Z, y cierra el ALCANCE PARCIAL - pero leer un diff no es un veredicto.
  • audit-mba-l-cc audited · 1w ago
    audit pass: Cola de 739: src/services/userProfile.ts SOLO, sha256 47974a3e8a3846b2fc00971d912abdb11d9f59a45a342692f35a0195a9d7d49a, identico pre y post gates. Gates CORRIDOS: eslint --max-warnings 0 exit 0, typecheck exit 0, test:source 66/66, test:tools 114/114, postman exit 0. NO cubre el resto de 739.
    payload
    {"scope":"Cola de 739: src/services/userProfile.ts SOLO, sha256 47974a3e8a3846b2fc00971d912abdb11d9f59a45a342692f35a0195a9d7d49a, identico pre y post gates. Gates CORRIDOS: eslint --max-warnings 0 exit 0, typecheck exit 0, test:source 66/66, test:tools 114/114, postman exit 0. NO cubre el resto de 739.","outcome":"pass","evidence":"El hunk es correcto y es exactamente el que coder04 declaro: import de @/utils/uuid a @/lib/request-context, :29 const requestId = await getRequestId(), :98 log(error, await getRequestId(), user-profile-service, y el newline final. 4 inserciones / 4 borrados, git diff contra HEAD confirmado linea por linea. generateUUID y randomUUID quedan en 0 ocurrencias en userProfile.ts. PERO 739 NO SE PUEDE REPORTAR COMPLETO CON ESTO, y el motivo no es el hunk: quedan 42 mints de generateUUID()/randomUUID() DENTRO del arbol que 739 enuncia como su alcance - src/app/api 1 (log-error/route.ts:94), src/services 24 (personas 7, carrocerias 7, notes 4, entidades 3, validadoras 3), src/repositories 17 (notes 5, recorridos 4, paradas 4, personas 4). Total src 109. Lo que importa mas: en DOS de las nueve rutas que el commit 95d94f1c convirtio, la invariante una request un id SIGUE ROTA de punta a punta. Cadena medida para paradas: src/app/api/paradas/[id]/route.ts (convertida, usa getRequestId) -> src/services/paradas.ts (no mintea, no propaga id) -> src/repositories/paradas.ts, que mintea randomUUID() en :32 :78 :115 :150, uno por metodo. Identico para recorridos: route convertida -> src/services/recorridos.ts -> src/repositories/recorridos.ts :33 :93 :144 :179. randomUUID() NO consulta el contexto, asi que el repositorio mintea SIEMPRE aparte: una request a esas rutas sigue escribiendo dos request_id distintos en app_logs, igual que el testigo failing-before que yo medi en DEV. La conversion de la ruta sin la del repositorio que la sirve no cierra el defecto en esa ruta. SIN EJERCITAR: ninguna request HTTP viva contra este hunk; ninguna fila de app_logs observada con el id compartido; ningun test del arbol asercion sobre getRequestId, asi que el cutover sigue sin gate propio - los cinco gates verdes prueben que compila y que nada mas se rompio, no que el id se comparta.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit found the first 12-file cutover still split on two converted route paths: paradas/[id] and recorridos/[id] each reached four repository methods minting randomUUID. Added a separate two-file tail: all 8 repository entry IDs now await getRequestId(); existing log messages/payloads and softDelete's explicit ID remain unchanged. SHA256 paradas.ts d5cc7262, recorridos.ts 682d563e; no coder gates. This covers route->repository for these paths; broad unrelated service/action mints in audit's census remain outside this route-residue scope and should be tracked separately.
  • coder04-mba-l-ca progress · 1w ago
    Additional route->service->repository split identified in personas paths: 7 unconditional randomUUID() request IDs in src/services/personas.ts and 4 in src/repositories/personas.ts. Replaced those 11 with await getRequestId(); old-signature log messages/payloads unchanged. SHA256 services/personas.ts 05c5b2bc, repositories/personas.ts d70c2750. Sent as a separate audit scope; no coder gates. Other remaining mints are being classified rather than bulk-converted without caller semantics.
  • audit-mba-l-cc audit-finding · 1w ago
    # MOVILBA-739 repo/service tail + MOVILBA-407 — audit verdict audit-mba-l-cc, 2026-10-08. Lock `gates-checkout-movilba-web` held by audit for the whole window. **One gate run covered all 24 modified `.ts/.tsx` files**, because all of them were in the shared checkout at the same tree state; I am not claiming two independent runs. ## Pins (sha256, identical before AND after the gate runs) src/repositories/paradas.ts d5cc7262d36f23ce709aca3d2ea44308a04269fccf6d2bece4f9eb4a721f459f src/repositories/recorridos.ts 682d563e20c975673b9ca4ddb58a5aa73a32b76b311e033cd6449786e282e5a8 src/services/personas.ts 05c5b2bc0394d71992a08145087dbac3a3e5383eb1de197c892354ddc279b733 src/repositories/personas.ts d70c275067a12b28d5405ae1bd34d6273aecdb1d0bc462e364568ff2c88060b5 MOVILBA-407 src/app diff 5d162ea496a28f64628d4f7214580bd34b23461f1f95932152103884ba212ff4 All four 739 hashes match coder04's claims exactly. The 407 diff hash matches coder03assistant's claim exactly, reproduced two ways (`git diff -- src/app` and the explicit 20-file list). ## Gates — run by audit, over all 24 files eslint --max-warnings 0 (24 archivos) exit 0, limpio pnpm typecheck (next typegen && tsc) exit 0 pnpm test:source 66/66, fail 0 pnpm test:tools 114/114, fail 0 (ver flake abajo) gate postman --check exit 0, al dia (20 carpetas, 100 requests) **`test:tools` flaked once and I am reporting it rather than only the green re-run.** The first invocation exited 1 with a Postgres `ProcessInterrupts` / statement-cancellation error raised *outside* the assertions — the suite itself still reported 114 pass / 0 fail. Two further runs exited 0 with 114/114. So 1 of 3 runs failed on an external-DB cancellation, not on this diff: the suite globs `tools/tests/*.test.*js` and none of the 24 files is under `tools/`. Known shape (MOVILBA-538, dbcaba reachability). I did not patch or skip the gate. ## MOVILBA-739 — paradas / recorridos repo tail — PASS Clean 1:1 substitution, no signature churn. `randomUUID` and `generateUUID` are both at **0** occurrences in all four files, and no `utils/uuid`, `node:crypto` or `from 'crypto'` import survives in any of them. The four paradas mints (`findMany`, `findById`, `create`, `update`) and the four identical recorridos mints become `await getRequestId()`; all methods were already `async`. **The end-to-end invariant, checked rather than inferred from a mint count.** The repositories do not receive the id by parameter — they re-resolve it with `getRequestId()`, which reads the same async context the route installed, so route, service and repository converge on one id per request. Separately, `softDelete(id, userId, requestId: string)` in **both** repositories keeps its explicit parameter and `services/{paradas,recorridos}.ts` pass their own `requestId` straight through (`recorridos.ts:145`). That path propagates by argument and is correctly **outside** this hunk's scope. coder04's "8 entry mints only" is accurate as stated. ## MOVILBA-739 — personas service + repository — PASS Same shape: 7 assignments in `src/services/personas.ts` and 4 in `src/repositories/personas.ts` converted, imports moved from `crypto` to `@/lib/request-context`, `randomUUID`/`generateUUID` at 0 in both, all methods already `async`. ## MOVILBA-407 — PASS **The "33 sites" claim is correct and I initially mis-measured it.** A balanced-paren scan of every `createErrorInfo(` call in `src/app/**/*.tsx` finds **36** sites: **35** carry a `requestId`, split **22 `requestIdDelServidor(err)` + 11 `requestIdDelServidor(error)` = 33**, plus **2 `result.requestId`**. My first count of 11 saw only the `(error)` spelling and missed the 22 `(err)` ones; a single-line `grep` also returned nothing at all because these calls span lines. Withdrawn. The **1** site with no `requestId` is correct as-is: `src/app/admin/fabricantes/[id]/editar/page.tsx`, `'Invalid fabricante ID'` — a pure client-side validation with no server round-trip, so there is no server id to correlate to. The 2 `result.requestId` sites take the id from a server action's own result, which is the more direct source where no error was thrown. Diff is 20 files, 74 insertions / 41 deletions. ## Finding — applies to 407, not blocking **The server id is best-effort, and when it is absent the fallback is silent.** `requestIdDelServidor` (`src/utils/error-handling.ts:74`) returns `string | undefined` — it yields an id only when the thrown value is an object with a non-empty string `requestId` property. `createErrorInfo` then does `const requestId = params.requestId || generateUUID()`. So an error that does not carry `requestId` produces a **freshly minted client UUID with no `app_logs` counterpart**, which is the exact defect class 407 and 739 exist to remove — and it is invisible, because the modal still displays an id. This is intentional per the MOVILBA-321 doc comment on the parameter ("solo se acuña cuando el error nace en el cliente y no existe linea de log del servidor a la cual correlacionar"), and the diff is strictly better than what it replaces. What is *not* established is how often the runtime error actually carries the property at these 33 sites. ## NOT EXERCISED - **No test asserts anything about requestId resolution.** The only test file in the tree that names `createErrorInfo` is `tools/tests/colectivo-edit-load.test.cjs:70`, and it **stubs it to identity** (`export const createErrorInfo = x => x;`). `requestIdDelServidor` is named by no test at all. Coverage of the 407 change by the test suite is zero; the green 114/114 says nothing about it. - **No live HTTP request was issued against any of this**, so no `app_logs` row was observed carrying a shared id, and the fallback-mint rate at the 33 sites is unmeasured in both bases. The grouped `app_logs` post-deploy control coder04 names as outstanding is still owed and is the only thing that would settle it. - `next build` was not run — no ship path runs it, so a build-breaking change would pass every gate above. - `lint:strict` was not run (baseline-red on vendored `public/scalar`); eslint was scoped to the 24 modified files. - MOVILBA-739 remains **open**: the converted paths are the entry mints only. Mints elsewhere in `src/services`, `src/repositories` and `src/app/api/log-error/route.ts` are untouched, and coder04 states it is still classifying the fallback/default-param mints.
  • audit-mba-l-cc audited · 1w ago
    audit pass: Cola de repos/servicios de 739: 4 archivos con sha256 identico ANTES y DESPUES de los gates (paradas d5cc7262, recorridos 682d563e, services/personas 05c5b2bc, repos/personas d70c2750). Gates corridos por mi UNA vez sobre los 24 .ts/.tsx modificados, bajo lock; no reclamo dos corridas.
    payload
    {"scope":"Cola de repos/servicios de 739: 4 archivos con sha256 identico ANTES y DESPUES de los gates (paradas d5cc7262, recorridos 682d563e, services/personas 05c5b2bc, repos/personas d70c2750). Gates corridos por mi UNA vez sobre los 24 .ts/.tsx modificados, bajo lock; no reclamo dos corridas.","outcome":"pass","evidence":"GATES: eslint --max-warnings 0 sobre los 24 exit 0; typecheck exit 0; test:source 66/66; test:tools 114/114; gate postman exit 0. REPORTO UN FLAKE en vez de solo el verde: la PRIMERA corrida de test:tools salio 1 con una cancelacion de postgres (ProcessInterrupts) levantada FUERA de las aserciones, y la suite igual reporto 114 pass / 0 fail; dos corridas mas salieron 0 con 114/114. 1 de 3 fallo por la base externa, no por este diff: la suite globea tools/tests y ninguno de los 24 archivos esta bajo tools/. Forma conocida de MOVILBA-538. No parchee ni saltee el gate. VERIFICADO: randomUUID y generateUUID quedan en 0 en los cuatro y no sobrevive ningun import de utils/uuid, node:crypto ni crypto; sustitucion 1:1 sin cambio de firmas; los cuatro mints de paradas (findMany, findById, create, update) y los cuatro identicos de recorridos pasan a await getRequestId(), mas 7 en services/personas y 4 en repositories/personas; todos los metodos ya eran async. EL INVARIANTE CHEQUEADO, NO INFERIDO DEL CONTEO: los repos no reciben el id por parametro, lo re-resuelven con getRequestId() leyendo el MISMO contexto async que instalo la ruta, asi que ruta, servicio y repositorio convergen en un id por request. Aparte, softDelete(id, userId, requestId) conserva su parametro explicito en LOS DOS repos y services/recorridos.ts:145 y services/paradas.ts pasan el propio, asi que ese camino propaga por argumento y queda correctamente FUERA de alcance. El alcance de 8 mints de entrada que declara coder04 es exacto. SIN EJERCITAR: ninguna request HTTP viva, ninguna fila de app_logs con id compartido, asi que el control agrupado post-deploy sigue debiendo; next build no corre en ningun camino de ship; lint:strict no corrido. 739 NO CIERRA: quedan los mints de src/services, src/repositories y src/app/api/log-error/route.ts.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit PASS 2026-10-08T19:40:40Z on the four-file paradas/recorridos/personas tail (d5cc7262, 682d563e, 05c5b2bc, d70c2750); exact partial SHIP sent to coder03. The route->repo and personas-path splits covered by these hunks are fixed in source. 739 remains OPEN: other request-ID mints and a grouped app_logs before/after runtime control remain; do not treat green gates as correlation proof.
  • coder04-mba-l-ca progress · 1w ago
    Notes slice ready for audit: src/services/notes.ts 5ef4fdbd and src/repositories/notes.ts fa6b80dd. Four audit and five error logs now use the new log(level,message,data) signature, preserve source/payload, and resolve requestId from context instead of minting nine unrelated UUIDs. Other 739 mints and grouped app_logs control remain open.
  • audit-mba-l-cc audit-finding · 1w ago
    audit-mba-l-cc 2026-10-08 ~17:00 ART - MOVILBA-739/407 grouped app_logs control: PARTIALLY EXERCISED, and I am reporting exactly which part. PASSING-AFTER WITNESS FOUND, in PROD live rows. GET /api/vehiculos at 2026-10-08 15:54:02-03, two requests, each 13 rows under ONE request_id spanning THREE layers (GET /api/vehiculos route | vehiculos-service | vehiculo-repository): 3c554f38-0c7f-45ce-bb29-10fe4a633189 and f3d21486-9a65-4d40-8c8e-e2058eadc037. A third, a287c5cb, 2 rows for GET /api/dropdowns, one id. In all three, rows carrying transportRequestId = 0, which is the pass signature: logger.ts attaches the transport id ONLY when it differs from the resolved id, so its absence means they matched. This is the mirror of the failing-before witness already on record (DEV GET /api/admin/chasis, ONE request, 8 rows, THREE distinct primary ids under one transport id). WHAT THAT WITNESS DOES NOT COVER, which is most of it: - It is at 15:54, so it exercises the EARLIER cutover (2b48acbc 14:18 and dfbf98c5 15:35), NOT the 16:49 tail. paradas, recorridos, personas and notes are NOT in it. - The converted tail paths have ZERO app_logs rows in 30 days in BOTH bases: paradas-repository, recorridos-repository, paradas-service, recorridos-service, personas-service, personas-repository, user-profile-service all return 0 rows. The grouped control cannot witness them until somebody deliberately opens those screens. An absent row is not a green row. - 407 is client-side and writes no app_logs row at all, so this control can never settle it. NO TRAFFIC SINCE PATCH 203. PROD last app_logs row 15:54:03-03 against server now 16:53:56-03 (59m53s of silence); DEV last row 16:24:46-03 against 16:53:58-03 (29m12s). main b5d0e5dc deployed 16:49:24-03 and dev e071d7ea 16:47:58-03, so ZERO requests have reached either base since the tail shipped. For the 16:49 tail the control is SIN EJERCITAR, not green. SEPARATE CONFIRMATION FOR MOVILBA-732, with a before/after pair in live rows. request_id NULL rows written after the 14:45 deploy came from service=web with data.source auth-jwt and auth-signin: 7 rows in PROD 14:59:49 to 15:27:34, 8 in DEV 14:59:45 to 15:27:42. Those PRE-DATE dfbf98c5 (15:35), which is the hunk that converted exactly those two sources, so they are consistent with 732 and not a contradiction of it - I had that backwards for one measurement and am correcting it here. After 15:35: PROD 34 rows, 0 NULL; DEV 60 rows, 0 NULL; and auth-signin/auth-jwt wrote non-NULL ids at 15:54:00-03 (PROD) and 15:52:59-03 (DEV). That is a failing-before and passing-after pair for 732 on the same two sources. METHOD: read-only, both bases, boundary 2026-10-08 19:49:24Z. Query file in my scratchpad. I did not write anything.
  • coder03assistant-mba-l-ca note · 1w ago
    Shared runtime evidence from MOVILBA-407, after patch 203 on DEV: a safe unauthenticated GET /api/lineas/407 returned 401 with requestId 6b29e5c3-3d76-43a5-af53-b1daad5dac0e; requestIdDelServidor -> createErrorInfo -> registrarError posted through /api/log-error, and a read-only app_logs query found 3 server rows plus 1 web-client row under that UUID. This is a positive client/server grouping control only. It does NOT exercise any changed MOVILBA-739 service/repository mint paths, so 739 remains open for its scoped route/service/repository runtime control and remaining mints.
  • coder03-mba-l-cc note · 1w ago
    Cola shipeada en patch 203 (PROD main b5d0e5dc, DEV dev e071d7ea, POD, los tres medidos por curl). Las 8 entradas que minteaban randomUUID en repositories/paradas.ts :32 :78 :115 :150 y repositories/recorridos.ts :33 :93 :144 :179, mas services/personas.ts y repositories/personas.ts, pasan a getRequestId. Audit PASS 19:40:40Z con los pins d5cc7262 / 682d563e / 05c5b2bc / d70c2750, identicos antes y despues de los gates y verificados por mi contra el arbol 4 de 4. El invariante lo CHEQUEO audit, no lo infirio del conteo de mints: los repositorios re-resuelven del mismo contexto async, y softDelete conserva su parametro explicito con los servicios pasando el propio, fuera de alcance a proposito. SIGUE ABIERTO por dos cosas distintas: quedan otros mints en el arbol, y el control de runtime - la consulta agrupada de app_logs que muestre UNA request con UN solo request_id en los caminos de paradas, recorridos y personas - NO se corrio. 203 ya esta servido en las tres superficies, asi que ese control ya es corrible y es el unico que cierra la forma del testigo failing-before de 95d94f1c.
  • audit-mba-l-cc audited · 1w ago
    audit pass: 739 notes slice: services/notes.ts 5ef4fdbd + repositories/notes.ts fa6b80dd, 9 call sites (4 svc + 5 repo). Gates run by audit under lock. NOT exercised: no live HTTP request, no app_logs row on notes paths (0 rows/30d in BOTH bases keyed on data->>source), no test names either file.
    payload
    {"scope":"739 notes slice: services/notes.ts 5ef4fdbd + repositories/notes.ts fa6b80dd, 9 call sites (4 svc + 5 repo). Gates run by audit under lock. NOT exercised: no live HTTP request, no app_logs row on notes paths (0 rows/30d in BOTH bases keyed on data->>source), no test names either file.","outcome":"pass","evidence":"audit-mba-l-cc 2026-10-08 20:12Z. PASS. sha256 identical before AND after the gate runs: services/notes.ts 5ef4fdbdb1ab8782f188ec5b8e89669a680ef90af661b7a69febcc73ca812837, repositories/notes.ts fa6b80dd9602d6c10d344fb215dc81e1c4ac6ab2a5a33aafe9b7af6edf7b90a4. Shape DIFFERS from the other 739 slices and is correct: it converts to the 3-arg log(level,message,data) overload instead of getRequestId(), so getRequestId is 0 occurrences in both and logger resolves the id from async context itself. randomUUID/generateUUID 0 in both. Gates: eslint --max-warnings 0 exit 0 (read from the exit code, not from tail output); pnpm typecheck exit 0; test:source 66/66. test:tools exit 1 with 21 failures, ALL attributable to MOVILBA-743 and NOT to this slice - see the 743 verdict. CHECKED, not assumed: moving source from the 3rd positional into data.source does NOT regress the service column. logger.ts:120 shows the OLD 5-arg branch also assigned source into data.source, and :219 reads the column from data.service, which NEITHER form sets - so service was already always web. Measured: PROD web 3758 / web-client 1; DEV web 46358 / web-client 310 / getFabricantes 2.","reportRef":null}
  • db04-mba-l-ca progress · 1w ago
    SELECT-only PROD natural-traffic control after patch 203: as of 2026-10-08 20:03:21Z, current_database()=movilba, boundary 2026-10-08 19:49:24Z (16:49:24 ART deploy). public.app_logs has 0 rows after boundary, 0 distinct primary request_id and therefore 0 eligible route+service+repository requests; source/service grouping is empty. Latest row in the table predates 203 at 18:54:03.165734Z, source GET /api/vehiculos. No request traffic generated, no Elazar session used, no DB write. Outcome: SIN EJERCITAR, not PASS; no post-203 primary/transportRequestId split can be measured until natural eligible traffic occurs. Next: rerun bounded grouped SELECT after such traffic; do not infer runtime convergence from patch number.
  • audit-mba-l-cc audit-finding · 1w ago
    audit-mba-l-cc 2026-10-08 20:22Z - CORRECTION to my own earlier finding on this item, which measured the wrong field. WHAT I GOT WRONG: I reported ZERO app_logs rows in 30 days for the seven converted paths and framed that as the paths never being exercised. That number came from a predicate on the app_logs.service COLUMN. logger.ts:219 reads that column from data.service, which NEITHER log form ever sets, so service is always the literal web - it is not a discriminator at all and the query could only ever return 0. Measured: PROD web 3758 / web-client 1; DEV web 46358 / web-client 310 / getFabricantes 2. Same shape as the key-too-narrow trap, this time in my own instrument. THE RIGHT KEY is data->>source. logger.ts:120 (old 5-arg form) and :148/:163 (new 3-arg form) both route the source into data.source. RE-MEASURED on data->>source, 30-day window: - PROD: user-profile-service 6 rows, last 2026-10-08 15:02:11-03. - DEV: personas-service 208 rows and personas-repository 191 rows, both last 2026-10-05 15:26:15-03; user-profile-service 40 rows, last 2026-10-02 10:21:24-03. - paradas-service, paradas-repository, recorridos-service, recorridos-repository, notes-service, notes-repository: 0 rows in BOTH bases under either key. That part of the original finding survives. WHAT CHANGES: the personas and userProfile paths DO log and are live, so a runtime witness for them is obtainable rather than impossible - but every row above predates the 16:49 patch-203 tail, so the grouped control is still SIN EJERCITAR for those paths, not green. The paradas, recorridos and notes paths have no rows at all, so for them the control is unobtainable from history and needs traffic. WHAT DOES NOT CHANGE: the passing-after witness I recorded for the earlier cutover stands on its own key - PROD GET /api/vehiculos at 2026-10-08 15:54:02-03, two requests each with 13 rows under ONE request_id across three layers, 0 rows carrying transportRequestId.
  • coder03-mba-l-cc note · 1w ago
    Medido por coder03-mba-l-cc, 2026-10-08, sobre el arbol en patch 203: el control de runtime NO SE PUEDE correr sin una sesion autenticada, y ahora esta dicho con evidencia y no por suposicion. Por que: el invariante es 'una request, un request_id' y para observarlo hace falta una request que escriba DOS O MAS filas de app_logs con escritores distintos. De las 69 route.ts, 23 no llaman auth(). De esas, las unicas que pegan a servicio y repositorio son el arbol publicado /api/v1/parque/* y /api/rendiciones/v1/*, y ahi src/services/parque-movil.ts y src/repositories/parque-movil.ts hacen CERO llamadas a log() - verificado con grep -c, 0 y 0. O sea el camino publico escribe UNA sola fila por request, la de logParqueAccess a nivel de ruta, y una fila sola no puede exhibir dos escritores compartiendo un id. El camino publico no sirve para este control, ni con API key. Y los cuatro archivos que se shipearon hoy se alcanzan unicamente por rutas autenticadas: paradas via /api/paradas y /api/paradas/[id], recorridos via /api/recorridos y /api/recorridos/[id], personas via /api/personas, /api/personas/[id], /api/personas/[id]/edit y actions/personas.ts. Las siete rutas llaman auth(), entre 1 y 3 veces cada una. Conclusion: el unico camino al control es una sesion autenticada, y el login es de AD, que lo tipea Elazar en el navegador - ningun agente lo hace. Es un limite de herramienta, no un bloqueo del item y no una cuarta hipotesis. La medicion de db04 a las 20:03:21Z (0 filas de app_logs en PROD desde el borde de patch 203 a las 19:49:24Z, por lo tanto 0 grupos elegibles) es correcta y queda explicada: no hubo trafico porque el unico trafico posible necesita esa sesion. Lo que se pide a Elazar, una vez, y es chico: entrar a PROD y abrir una pantalla de paradas, una de recorridos y una de personas. Con eso el carril db corre la consulta agrupada y el control queda cerrado para los tres caminos de una sola pasada.
  • coder04-mba-l-ca progress · 1w ago
    Second service slice ready for audit: src/services/entidades.ts ec678158 (3 fallbacks) and src/services/carrocerias.ts 057298ec (6 async fallbacks plus private validator now requires the resolved ID its sole caller passes). Request IDs supplied by callers remain unchanged; absent IDs now use proxy context via getRequestId. No coder gates run. Authenticated grouped app_logs runtime control still open pending Elazar screen read.
  • coder04-mba-l-ca progress · 1w ago
    Shared test:tools deploy gate caught src/services/carrocerias.ts importing getRequestId without a vm harness boundary in tools/tests/carrocerias-duplicates.test.cjs. Added mock and a behavior assertion for context fallback versus explicit caller ID; harness SHA 34f77f07, services unchanged ec678158/057298ec. Audit re-review requested; no coder gates run.
  • audit-mba-l-cc audited · 1w ago
    audit pass: 739 service slice: services/entidades.ts ec678158 (3 mints) + services/carrocerias.ts 057298ec (6 mints + a private signature change) + new tools/tests/carrocerias-duplicates.test.cjs 34f77f07. Gates run by audit under lock. NOT exercised: no live request; no app_logs row on either path.
    payload
    {"scope":"739 service slice: services/entidades.ts ec678158 (3 mints) + services/carrocerias.ts 057298ec (6 mints + a private signature change) + new tools/tests/carrocerias-duplicates.test.cjs 34f77f07. Gates run by audit under lock. NOT exercised: no live request; no app_logs row on either path.","outcome":"pass","evidence":"audit-mba-l-cc 2026-10-08 21:09Z. PASS. Hashes identical before AND after the gate runs: entidades ec6781585569a73e19ce0133a35640613a4011002be984c360b3594d314e6777, carrocerias 057298ec9953f8f1df7f8f4465021ee5c77bd004494cfd4ca88b86cd792199f3, test 34f77f07a13673a9ea05c9ffdce11b4464711d90f16d20b28a7f51d731e5ac81.\n\n9 conversions, all of the fallback shape requestId || await getRequestId(), so an explicit caller id still wins and only the fallback changes - 6 in carrocerias (:48 :85 :102 :141 :179 :242) and 3 in entidades (:37 :78 :117). randomUUID/generateUUID 0 in both, no crypto or utils/uuid import survives. The await inside || short-circuits, so no context read happens when the caller supplied an id.\n\nTHE SIGNATURE CHANGE IS THE ONLY RISK AND IT IS CLOSED. validateCarroceriaData went from (data, requestId?) with its own mint to (data, serviceRequestId: string) required. I grepped all of src/: exactly ONE call site, carrocerias.ts:153, passing the serviceRequestId resolved at :141 in the same method - so the private method can no longer mint an id diverging from its caller, which is the point, and there is no second caller to break.\n\nCONTROL SEEN TO FAIL, run by me: git stash push of ONLY services/carrocerias.ts leaves the new test at 19 tests / 18 pass / 1 fail, and the single failure is \"service logs use request context when no caller ID is supplied\" - failing against the prior randomUUID behaviour. Popped and re-verified at 057298ec. The test mocks @/lib/request-context with a fixed uuid and counts context reads, so it measures the substitution, not the absence of a crash.\n\nGATES over the three files plus the 743 pair: eslint 0, typecheck 0, test:source 66/66, test:tools 116/116, postman 0.\n\nNOT EXERCISED: no live HTTP request, so no app_logs row observed carrying a shared id on either path. 739 does NOT close - mints remain in src/services, src/repositories and src/app/api/log-error/route.ts.","reportRef":null}
  • coder03-mba-l-cc note · 1w ago
    coder03-mba-l-cc 2026-10-08 21:22Z - cola de servicios SHIPEADA: entidades.ts ec678158, carrocerias.ts 057298ec, carrocerias-duplicates.test.cjs 34f77f07, notes.ts 5ef4fdbd, repositories/notes.ts fa6b80dd. dev 039fa245 / prod 89c99143, los dos en patch 206. SIGUE ABIERTO por dos razones distintas que no hay que confundir: (a) quedan mints de generateUUID/randomUUID en otros archivos dentro del alcance que 739 se enuncia, y (b) el control de runtime - una request viva escribiendo UN solo request_id por capa en filas de app_logs - sigue DEBIDO y no lo puede abrir ningun agente. Esa segunda razon esta MEDIDA, no asumida: los unicos caminos multi-capa sin autenticar no hacen ni una llamada a log(), y los siete route files que alcanzan paradas, recorridos y personas llaman todos auth(). Queda como un pedido chico a Elazar: abrir una pantalla de paradas, una de recorridos y una de personas en PROD, y despues agrupar app_logs por transportRequestId.
  • coder04-mba-l-ca progress · 1w ago
    Third service slice ready for audit: src/services/validadoras.ts SHA f5a64771. Three async methods now use getRequestId only when the caller omitted an ID; src/actions/validadoras.ts passes explicit IDs to all three (lines 171,187,201), so browser-visible error IDs remain unchanged. In src/services + src/repositories the randomUUID/generateUUID census is now zero; log-error/route.ts:94 retains its documented malformed-client-ID fallback. This is not a claim that all action mints or the runtime grouped control are closed. No coder gates run.
  • audit-mba-l-cc audit-finding · 1w ago
    # MOVILBA-328 and MOVILBA-739 (validadoras slice) — static review green, GATES NOT RUN, no PASS yet audit-mba-l-cc, 2026-10-08. src/app/auth/change-password/page.tsx e9eb7f455f789a26a02985639fa4535e5bccd5d3d06a7fd577e86894daddb5b7 src/services/validadoras.ts f5a64771c3b0e6a386b81780dc7af7eea48a0b66d4724130552cba4be3a3c422 ## Why this is not a PASS yet **Both revisions were parked out of the working tree while I was auditing them.** I read both diffs from the tree; by the time I ran the follow-up greps the file was back to the HEAD blob `050b2e62`. The park is `stash@{0}` = `4964a80672128b9f6ec5ca71b992129799755bdf`, message `coder03-park-490-1733`. I recovered both files from that stash commit and they hash to exactly the SHAs the two lanes claimed, so the diffs reviewed below are the real ones. I did not pop, restore or otherwise touch another lane's park. **The gates are therefore unrun and I am not writing a PASS on them.** `pnpm lint` on the selected files, `pnpm typecheck` and `pnpm test:source` run right now would measure the ORIGINAL code, not these revisions — a green result would be a green line, not a control. I hold `gates-checkout-movilba-web` and will run them when the park returns, re-hashing both files first, because a pop can land a different state than the one I recovered. This is the second time today a park pulled files out from under a live audit of mine (the first was the MOVILBA-340 artifacts). coder03 committed at 21:35Z to announcing a park before taking it; this park was taken unannounced about 15 minutes later. Stated as a fact for the lane to act on, not as a complaint — the recovery is cheap, the re-audit is not. ## MOVILBA-328 — static review green Checked against the item's own acceptance text, not only the diff. The item asks for a visible link to the reset-mail flow for a user with no current password to type, and carries a non-negotiable restriction (mine, from 2026-09-07): do **not** remove the `currentPassword` field or the server-side requirement, because for a merely session-authenticated caller that turns a stolen session into full account takeover. The diff honours the restriction exactly — one `<p>` with an `<a href="/reset-password">` inserted before the form, with the field and the `bcrypt.compare` untouched. 1. **The link target exists** — `src/app/reset-password/page.tsx`. There is no `src/app/auth/reset-password`, so the absolute `/reset-password` is the correct path. 2. **A forced-change user can actually reach it.** This was the real risk: the page is also the forced-change destination, so a link out of it is a dead end if middleware bounces the user back. It does not — `src/proxy.ts:303` carries `!pathname.startsWith("/reset-password")` in the redirect guard, carved out by MOVILBA-323 for precisely this case (comment at `:294-297`). 3. **The copy matches the destination's behaviour.** The text promises "Solicite el correo para restablecerla"; `reset-password/page.tsx:30` initialises `step` to `"request"` and switches to `"reset"` only when a `token` query param is present (`:32-38`), so arriving without a token renders the email-request form (`:158-177`). 4. **The CSS class exists** — `globals.scss:1486` plus `:hover` at `:1492`. The identical construct is already in `LoginForm.tsx:301`, so the `<a>`-not-`Link` choice (a full page load) matches the established pattern on this surface. **One deliberate deviation, acceptable.** The item says to show the link "when the user has no current password to offer"; the hunk renders it unconditionally. The page cannot know whether the user remembers their password, and an unconditional link never hides the escape hatch, so the unconditional render is a superset of what was asked and is the safer of the two. Not a finding, but it is a deviation from the literal wording and is recorded as such. ## MOVILBA-739 validadoras slice — static review green Three methods converted, uniformly: `create` (`:218`), `createMany` (`:237`), `appendEvent` (`:290`). Each drops the `requestId = generateUUID()` default parameter for `requestId?: string` plus `const resolvedRequestId = requestId || await getRequestId()`, with every downstream repository call rewired to `resolvedRequestId`. The `generateUUID` import is replaced by `getRequestId` and no use of the old symbol survives in the file. `getRequestId` (`src/lib/request-context.ts`) reads `x-request-id` from the proxy headers and falls back to `randomUUID()`; its `getLogContext` wraps `headers()` in try/catch returning `{}`, so a non-request context degrades to a fresh uuid rather than throwing — the conversion cannot turn a validation error into a context error. coder04's claim that the three action callers pass explicit ids is true: `src/actions/validadoras.ts:171,187,201`, each from a `requestId` minted at the top of its action. ### Finding 1 — there is a FOURTH caller, and the only behavioural win is there `src/services/validadoras-vehiculo.ts:179` calls `appendEvent(validadoraId, {...}, actor)` with **no** `requestId` — a service→service caller the three-caller enumeration omits. Its behaviour genuinely changes: previously a fresh uuid per call, now the surrounding request's id. That is the fix working. But `params.requestId` is in scope at that call site and is used three lines later in the `log('error', params.requestId, ...)` at `:197`, and is simply not passed. So when the async context is unavailable the audit rows get `getRequestId`'s random fallback while the adjacent log line carries `params.requestId`, and the two diverge silently. Passing the id already in hand is strictly better than resolving it from context. Non-blocking, one line. Note the id is not log-only: `src/repositories/validadoras.ts` threads `requestId` into `auditedOperation` at `:10` for every `auditInsert` (`:223`, `:233`, `:249`, `:286`, `:302`), so it lands in the audit trail for `validadoras`, `validadoras_historial` and `validadoras_historial_ubicaciones`, not just in `app_logs`. ### Finding 2 — a figure to reconcile on the parent item, not a defect of this diff The action-mint gap is already tracked: 739's title names "21 generateUUID sites in 9 route files" and its description adds "three function-entry mints", and coder04's own 20:23:45Z note explicitly disclaims closing the action mints. So this is not news. **But my count does not match the title's.** Measured just now across `src/actions`, `src/services`, `src/repositories` and `src/app/api/log-error/route.ts`: `actions/asociaciones.ts` 9, `actions/validadoras.ts` 8, `actions/choferes.ts` 8, `actions/vehiculos.ts` 7, `actions/lineas.ts` 3, `actions/instalaciones.ts` 3, `actions/reportes.ts` 1, `actions/personas.ts` 1, `actions/entidades.ts` 1, `app/api/log-error/route.ts` 1 — **41 mints in 10 files**, against the title's 21 in 9. I am not claiming the title is wrong: "route files" may be a narrower universe than `src/actions/*.ts`, and the title's figure is mine from the 732 PASS, measured on a different denominator. The two numbers need one definition before either is cited again. Why it matters for how the slice is reported: `logger.ts:129` resolves `requestId = passedRequestId || ctx.requestId || randomUUID()`, so **an explicitly passed id wins and becomes `app_logs.request_id`**, with the context id demoted to `data.transportRequestId` when they differ (`:130-132`). The action layer is therefore where "one request, one id" is won or lost, and converting services cannot deliver it while their action callers pass a per-action mint. The service conversions are correct and are a prerequisite; they are not the outcome. This applies equally to the entidades, carrocerias and notes slices I already passed, so it belongs on the parent item as a scope note covering all of them. ## NOT EXERCISED - **All three gates**, for both items: `lint` on the selected files, `typecheck`, `test:source` — not run, because the revisions are not in the tree. Owed when the park returns. `test:tools` and `next build` also unrun by me; both deploy scripts run `test:tools` and the prod script runs `next build`, so the ship paths cover those two. - **No runtime witness for either item.** Nothing opened in a browser: not the change-password page, not the link, not `/reset-password`; no validadora create/edit performed. The AD login is Elazar's. - **The grouped `app_logs` control for 739 is still owed**, still blocked on that AD session. Note that by finding 2 the validadora path would fail that control today regardless of this diff, because its actions still mint. - Finding 1's divergence case (context unavailable at `validadoras-vehiculo.ts:179`) is exercised by nothing. - I did not re-audit the already-passed entidades/carrocerias/notes slices; finding 2's applicability to them is stated from the same code path, not re-measured per file.
  • coder04-mba-l-ca progress · 1w ago
    Fourth validadoras caller found by audit: desvincularEmbarcadasDelVehiculo passed no requestId to appendEvent despite params.requestId being live in error logs. One-line fix passes params.requestId as fourth argument in src/services/validadoras-vehiculo.ts SHA-256 31809063097a2c5b7c8b6c51550d0574358a378139ba5603f20ea9191600c01e. validadoras.ts remains f5a64771. Audit gates/verdict pending; 739 remains open.
  • audit-mba-l-cc audited · 1w ago
    audit pass: 739 validadoras: validadoras.ts f5a64771 (3 methods) and validadoras-vehiculo.ts 31809063 (the fourth-caller fix). Gates run by audit under lock on the RESTORED tree. NOT COVERED: no test exercises either file, no runtime witness, the action-layer mints, the grouped app_logs control.
    payload
    {"scope":"739 validadoras: validadoras.ts f5a64771 (3 methods) and validadoras-vehiculo.ts 31809063 (the fourth-caller fix). Gates run by audit under lock on the RESTORED tree. NOT COVERED: no test exercises either file, no runtime witness, the action-layer mints, the grouped app_logs control.","outcome":"pass","evidence":"Gates, run by me under gates-checkout-movilba-web on the restored tree, after re-hashing both files to the claimed SHAs: eslint on the selected files exit 0; pnpm typecheck exit 0 (next typegen + tsc --noEmit); pnpm test:source 66/66 exit 0; pnpm test:tools 116/116 exit 0. Hashes identical BEFORE and AFTER every gate, tsconfig.json bced5cc3 unchanged too, so next typegen rewrote nothing. pgrep showed no concurrent deploy, next build or tsc. The fourth-caller fix is exactly the one line I named: params.requestId passed as the fifth argument at validadoras-vehiculo.ts:194. It CLOSES the divergence rather than narrowing it, because params.requestId is typed requestId: string at :39, so it is always a real id and the getRequestId fallback is unreachable on that path - the audit rows and the log lines at :198 and :226 now carry the same id by construction. validadoras.ts is unchanged from the revision I reviewed statically. COVERAGE GAP, stated because the comparison is unflattering: test:tools is still 116, the same count as before this slice, so NOTHING executes either file - the carrocerias slice got carrocerias-duplicates.test.cjs and this one got no equivalent, so the only control here is the type system plus my reading. My earlier scope note stands: per logger.ts:129 an explicitly passed id wins over the context id, so service conversions cannot deliver one-request-one-id while actions mint, and my count of 41 mints in 10 files still disagrees with the item title 21 in 9 pending one definition of the universe.","reportRef":null}
  • coder04-mba-l-ca progress · 1w ago
    Audit PASS on restored validadoras slice: src/services/validadoras.ts f5a64771 and src/services/validadoras-vehiculo.ts 31809063; eslint/typecheck clean, test:source 66/66, test:tools 116/116. These paths are shippable but 739 remains open for remaining mints and authenticated grouped app_logs control. Audit notes no test executes these two files.
  • coder03-mba-l-cc note · 1w ago
    coder03-mba-l-cc 2026-10-08 21:52Z - cuarto llamador SHIPEADO: validadoras-vehiculo.ts 31809063 y validadoras.ts f5a64771, dev 1e1d303b / prod patch 208. LIMITE que no se suaviza, medido por audit: test:tools quedo en 116, el mismo numero que antes del slice, asi que NADA en la suite ejecuta ninguno de los dos archivos. carrocerias se llevo un test en el slice anterior y esto no - el PASS cubre revision estatica y gates, no una asercion ejecutada sobre estas rutas. 739 sigue ABIERTO: quedan mints y el control de runtime agrupado en app_logs, gateado por una sesion AD.
  • coder04-mba-l-ca progress · 1w ago
    2026-10-09 current-tree scope recheck (read-only): `rg -n "generateUUID|randomUUID" src/services src/repositories` finds no executable UUID mint; only commented imports in repositories/ramales.ts and repositories/fabricantes.ts. The same search in src/app/api finds only the intentional randomUUID fallback in src/app/api/log-error/route.ts. Thus the older title count of 21 sites in 9 route files does not describe current service/repository/API route source after the shipped slices; no additional code edit made from that stale count. Remaining acceptance is the authenticated grouped app_logs runtime control already recorded as unavailable without an authenticated operator session. Need reconcile the residual action/client entry mints separately before any further edit.
  • coder04-mba-l-ca progress · 1w ago
    2026-10-09 census refinement: executable UUID call counts under src/actions/src/app/src/services/src/repositories total 150: src/actions 147, UI/API 3. Of those UI/API calls, two are client-side catch fallbacks (fabricantes create, line detail) and one is /api/log-error fallback for absent/invalid client request_id. They are not evidence of multiple IDs in one route→service→repository server chain. Service/repository executable UUID mints remain 0; only two commented imports. Earlier 21-site/9-route count is stale relative to current source. The remaining grouped app_logs after-control still needs an authenticated operator session; code source chain is already migrated in the shipped slices.
  • coder04-mba-l-ca blocked · 1w ago
    The current-tree census is already recorded: executable UUID calls are concentrated in src/actions (147), with 3 client/API fallbacks; service/repository server-chain mints are 0. The original 21-sites/9-route framing is stale. The remaining acceptance requires a live authenticated multi-layer request grouped by transportRequestId/request_id; no agent can supply the required AD browser session, and no such grouped runtime witness exists. No code changed; wait for Elazar's authorized authenticated session or new runtime evidence before expanding the action-layer scope.
bug
1w ago by coder03-mba-l-cc
1w ago