Importer preflight and audited correction for reversed Tipo_Servicio/Linea values
Before projection, require every Base Linea to be numeric/resolvable and Tipo_Servicio to resolve as a service label; reject all malformed values with row, dominio, and raw values. For the immutable canonical snapshot /data-lezama/movilba/libro/2026-09-19-0648-parque-rutap.xlsx at SHA256 210f31669b969970151f10a2b92a81863d500948034462ccc29e6db3cbddcde0 only, apply an explicit audited exception for rows 5529 AF206GP and 5530 AE335EU: Tipo_Servicio=SP, Linea=64, based on predecessor rows 2381/2384. The exception must be path+checksum+domain+row bound, logged, covered by focused regression tests, and verify 1,599 active. Never generically or silently swap fields; any corrected derivative must retain provenance to this canonical source and prove the exact two-cell-pair change.
Activity
-
parent=#3506
-
Implementing importer preflight and focused regression for swapped Tipo_Servicio/Linea values; no database writes.
-
Implemented uncommitted importer preflight before snapshot DML: validates every Base Linea as numeric and catalog-resolvable (active for open periods; deleted allowed for closed periods) and Tipo_Servicio against active service modalities. Errors include Excel row, domain, raw Linea and raw Tipo_Servicio; never swaps values. Focused synthetic regression covers AF206GP/AE335EU rows 5529-5530 plus unknown/deleted-line and unknown-service cases; test, py_compile and diff-check pass. Audit and read-only DB catalog review requested.
-
coder03-mba-l-ca confirmed implementation start; preflight/regression will reject reversed Tipo_Servicio/Linea values with row, dominio, and raw values and will not silently normalize.
-
Shipped to DEV in commit 5ff0032f, version 5.5.253. Importer now fails before DML when Linea or Tipo_Servicio is unresolved or catalog-ambiguous, reports every offending Excel row/domain/raw pair, and never swaps values. Semantics mirror projector normalization (including leading-zero lines, closed deleted lines, exact service codes). Focused regression, py_compile, diff-check, audit re-review PASS; DEV/PROD read-only census found zero current snapshot mismatches. Deploy script synchronized dev and origin and freshness gate served patch 253 on attempt 1.
-
Importer preflight and audited correction for reversed Tipo_Servicio/Linea values
-
was: Add importer preflight before projection: every Base Linea must be numeric/resolvable as a line and Tipo_Servicio must resolve as a service label. The 2026-09-19 06:48 SSOT exposes the missing gate at rows 5529-5530: AF206GP and AE335EU contain Tipo_Servicio=64 and Linea=SP. Reject with row/domain/raw values; never silently swap or normalize. Add focused regression coverage.
-
was: Before projection, require every Base Linea to be numeric/resolvable and Tipo_Servicio to resolve as a service label; reject all malformed values with row, dominio, and raw values. For the immutable 2026-09-19 snapshot only (SHA256 210f31669b969970151f10a2b92a81863d500948034462ccc29e6db3cbddcde0), apply an explicit audited exception for rows 5529 AF206GP and 5530 AE335EU: Tipo_Servicio=SP, Linea=64, based on predecessor rows 2381/2384. The exception must be checksum/domain/row bound, logged, covered by focused regression tests, and verify 1,599 active. Never generically or silently swap fields.
-
Independent derivative verification PASS: corrected file SHA256 6fd1b9dfa5207508bbd5726e1765c9dc5bb37a6930f54170468b05706c5bc42d; only sheet3.xml differs from canonical; exactly C5529,C5530,D5529,D5530 changed, swapping 64/SP into accepted columns. sharedStrings[42]=SP. Await audit acceptance; preflight must still hard-stop any path/checksum/diff mismatch.
-
Audit accepted the exact corrected derivative as the execution artifact: /data-lezama/movilba/libro/2026-09-19-0648-parque-rutap-corrected.xlsx SHA256 6fd1b9dfa5207508bbd5726e1765c9dc5bb37a6930f54170468b05706c5bc42d, scoped to the verified four-cell diff from the canonical workbook. Preflight must hard-stop any mismatch and still verify/log 1,599 active.
-
Regression found during PROD readiness audit: requested importer SHA 50188d33bf04a338354275bbc72bb184ed32bba68209963a528e253ac0a915b2 has no Linea/Tipo_Servicio preflight. Commit 5ff0032f added validar_linea_tipo_servicio (file SHA 93fff07205169f559dfee4fc63652affb831807cee95893af8a57c3322d401a5), but current dev importer SHA 4e01b92d585522cf38b8199d3cbecb93d32415cef2d343565ae8b51dfadb9053 no longer contains that function/call after later importer changes. Reapply the audited preflight onto current dev without losing later fixes, rerun focused tests, freeze exact importer SHA for PROD.
-
Independent workbook census on accepted corrected artifact: Base headers are Excel row 2; among 5,528 rows with normalized nonblank Nro_dominio, exact blank/None Fecha_Baja yields 1,599 rows and 1,599 distinct normalized domains, with zero duplicate-open domains. This is the exact predicate behind the required 1,599 gate. A reported 3,028/1,600 count is not this predicate and must not replace it without a reproducible calculation.
-
Commit d5339e8130b2b68bd92676a653c611e46e020b5b implements the exact corrected-workbook gate in the persistent coder03 worktree. Original/corrected artifacts are bound to their absolute paths and SHA256 values; parsed diff must be exactly rows 5529/5530 Tipo_Servicio 64->SP and Linea SP->64 for AF206GP/AE335EU; no in-memory repair; 1599 open rows and 1599 distinct active domains are asserted and logged. Original is rejected before DB connection. Focused py_compile, existing Linea/Tipo preflight test, new real-artifact test, CLI rejection, and git diff --check pass. Independent audit requested under hub tag coder03-mba-l-ca-mu9endh8u3zj.
-
Audit PASS for exact d5339e8130b2b68bd92676a653c611e46e020b5b MOVILBA-524 delta: workbook hashes verified, pre-DB original rejection, exact four-cell C/D diff at rows 5529/5530 bound to AF206GP/AE335EU, Linea=64/Tipo_Servicio=SP, and 1599 open rows/domains; tests and diff-check pass. Integrate only after corrected/re-reviewed MOVILBA-518 lineage.
-
Audit released integration commit 188b914abb644395f0000c2c4d3db82379c609dd on corrected/hardened MOVILBA-518 parent e8d2b7203fc186425f4945b071f8f9f806a65467. Both 524 blobs exactly match previously reviewed d5339e81 delta; focused artifact and Linea/Tipo tests, inherited 518 test, py_compile, diff-check PASS. Old d5339e81 remains revoked for integration. MOVILBA-523 DB execution remains sequenced behind 518 rehearsal/apply/fresh verification.
-
Medido el 2026-09-22 por coder03-mba-l-cc, todo read-only. El libro publicado como /data-lezama/movilba/libro/2026-09-22-0535-parque-rutap.xlsx es EL MISMO libro que el canonico del 19/09 repaquetado: las 7 hojas (Detalle2, Hoja1, Base, 'A corregir', 'ID MDVR', Hoja5, Hoja2) son identicas celda por celda, Base 6959/6959 filas con 0 diferencias. Solo cambia el SHA256 del archivo: 7262231e4216815c9b86da707594c87695f3c308729990a02ca975a0223db323 contra 210f31669b969970151f10a2b92a81863d500948034462ccc29e6db3cbddcde0 del canonico. CONSECUENCIA: no hay snapshot nuevo que importar y NO se re-pinea nada de este gate. El artefacto corregido y los SHA pineados siguen siendo los del 19/09. Estado de los dos dominios en DEV contra el snapshot vivo (id 18, 2026-09-19-0648-parque-rutap-corrected.xlsx, importado 2026-09-20 03:46): AF206GP linea 64 tipo de servicio SP Alta, AE335EU linea 64 tipo de servicio SP Alta. O sea, la excepcion auditada esta aplicada y vigente. NO EJERCITADO: produccion. Barrido de clase sobre el libro del 22/09, no solo sobre la semilla: de 5528 filas con dominio, exactamente 2 tienen Linea no numerica o Tipo_Servicio numerico, y son las 5529/5530 ya cubiertas por este item. Ninguna otra. Elazar confirmo el 22/09 por CLI que el cruce sigue estando en la version viva de RUTAP y que se importa como linea 64 / tipo de servicio SP - es la misma decision que ya tomo el 19/09 al crear este item, no una nueva. Queda anotado para Eugenia en el tracker: item 8 de 'Para Eugenia' paso de 'FRENA LA IMPORTACION' (afirmacion mia vencida: no frenaba nada, ya estaba importado corregido) a 'IMPORTADO COMO LINEA 64 / TIPO DE SERVICIO SP - A CONFIRMAR', y se agrego la fila correspondiente en la hoja Convenciones con el alcance exacto (solo esos dos dominios, solo la fila que abre el 17/09/2026).
-
Aplicada la MISMA correccion auditada sobre el libro que esta al tope de /data-lezama/movilba/libro/, para que no vuelva a frenar a nadie (Elazar, CLI 2026-09-22: 'edit it in the local xlsx file so it wont cause problems for other agents in the future'). Archivo: /data-lezama/movilba/libro/2026-09-22-0535-parque-rutap.xlsx. SHA256 como lo sirvio RUTAP: 7262231e4216815c9b86da707594c87695f3c308729990a02ca975a0223db323 SHA256 corregido: 175f614f986e79b1797e2a1dce2b1e402fa88da95ff14fc5b7626d7596f926a8 Los bytes originales quedan en /data-lezama/movilba/libro/archived/2026-09-22-0535-parque-rutap-as-downloaded.xlsx, verificados contra el SHA de origen antes de tocar nada. POSTCONDICION MEDIDA, no 'corrio sin error': las 7 hojas comparadas celda por celda antes y despues dan EXACTAMENTE 4 celdas distintas, todas en Base: fila 5529 col 3 64->'SP' y col 4 'SP'->64 (AF206GP), fila 5530 col 3 64->'SP' y col 4 'SP'->64 (AE335EU). El dominio de cada fila se afirmo antes de escribir. Es el mismo delta de cuatro celdas que audit verifico el 20/09 sobre el derivado del 19/09. NO SE TOCARON los dos artefactos pineados por SHA en tools/rutap-snapshot-import.py (2026-09-19-0648-parque-rutap.xlsx y su -corrected.xlsx); el gate MOVILBA_524 queda como estaba y no se re-pineo nada. AUDITORIA DEL SNAPSHOT EN POSTGRES (DEV, solo SELECT): rutap.rutap_rows del snapshot vivo 18 ya trae los dos dominios corregidos - filas 2379 y 5527 AF206GP, 2382 y 5528 AE335EU, todas linea 64 y tipo_servicio SP. Barrido de clase sobre las 5528 filas del snapshot: 0 con linea no numerica y 0 con tipo_servicio numerico. No hay nada que corregir en la base. NO EJERCITADO: produccion. EFECTO SECUNDARIO QUE HAY QUE SABER: con el libro del 22/09 ya corregido en disco, el preflight generico validar_linea_tipo_servicio deja de rechazarlo, asi que ese archivo se vuelve importable sin pasar por el gate pineado de MOVILBA-524. Es inocuo en este caso porque su contenido es identico al derivado corregido y auditado del 19/09 (verificado hoja por hoja, 0 diferencias), pero es la razon por la que los bytes de origen quedan archivados y por la que este evento existe.
-
coder04-mba-l-ca | 2026-09-24 04:01 ART. Measured dev tools/rutap-snapshot-import.py:483-542: importer preflight exists. Latest BWI event says pinned workbook corrected, but this pass did not execute import on PROD or verify latest snapshot digest; leaving inProgress on parked coder03-mba-l-ca, importer/DB owner needed.
-
db03-mba-l-cc
-
db03-mba-l-cc 2026-10-01 - closes coder04's 2026-09-24 open thread (PROD verification against latest snapshot digest, not done then). Measured PROD rutap.rutap_rows for the current live snapshot (id=8, 2026-09-30-1305-parque-rutap.xlsx, imported 2026-09-30T13:39:42): both AF206GP and AE335EU carry linea=64, tipo_servicio=SP (2 rows each, open+closed period rows, all correct). tools/rutap-snapshot-import.py:132 still pins MOVILBA_524_SOURCE_SHA256=210f3166... - gate intact, not re-pinned, not bypassed. Nothing left to do: implementation shipped 2026-09-19 (5.5.253), book-side correction applied 2026-09-22 (same 4-cell delta, verified identical), DEV verified 2026-09-22/24, PROD now verified 2026-10-01. Recommend CLOSE.
-
audit pass: db03's 2026-10-01 close note only: PROD-verified-at-latest-snapshot claim, closing coder04's 09-24 open thread
payload
{"scope":"db03's 2026-10-01 close note only: PROD-verified-at-latest-snapshot claim, closing coder04's 09-24 open thread","outcome":"pass","evidence":"Claim matches item's own acceptance criteria (both dominios linea=64/SP, gate SHA still pinned not bypassed) and is consistent with prior shipped/DEV-verified events. DB EXECUTION NOT PERFORMED BY AUDIT - no DB creds, static/claim-coherence review only.","reportRef":null} -
coder03-mba-l-cc 2026-10-05: closed at db03's report; audit PASS already recorded in bwi (2026-10-02).