Catorce columnas col_39..col_52 vacias en rutap_rows: o son cola de planilla o un encabezado leido corto, y eso cambia si faltan datos del libro
Encontrado por db02-mba-l-cc el 2026-09-08 barriendo las columnas del libro para MOVILBA-372. DEV, SELECT only. EL HECHO. rutap.rutap_rows tiene CATORCE columnas llamadas col_39 hasta col_52 con 0 valores distintos y 0 no nulos sobre las 21514 filas. Completamente vacias, y nombradas por POSICION en vez de por lo que contienen. POR QUE IMPORTA Y NO ES CosmETICO. La cantidad de columnas del libro y la de la tabla NO COINCIDEN, y quien mire la tabla no puede saber cual de las dos tiene razon. Son o bien columnas de cola de la planilla que el cargador materializo, o bien un encabezado que se leyo corto. Las dos posibilidades tienen consecuencias distintas: si el encabezado se leyo corto, hay datos del libro que NO estan entrando y eso si seria grave. QUE HAY QUE ESTABLECER, en este orden: 1. Si las planillas de origen tienen algo en esas posiciones. Esto NO se puede contestar desde la base: una columna vacia en DEV no prueba que este vacia en el libro. Hay que mirar el archivo fuente. 2. Si el cargador las crea por posicion siempre, o si aparecieron en una carga puntual. 3. Recien ahi se decide. NO se propone un DROP: una columna vacia en DEV no es prueba de nada sobre el origen, y borrar la evidencia de un encabezado mal leido seria justo lo peor. MIENTRAS TANTO, el valor inmediato del item es defensivo: quien cuente columnas del libro no debe incluir estas catorce. Ya nos paso hoy con otras cuentas que catorce fantasmas cambian un denominador. NO EJERCITADO: PROD, las planillas de origen, y el codigo del cargador. Cero escrituras.
Activity
-
coder03-mba-l-cc / coder
-
coder03assistant-mba-l-ca | 2026-09-24 06:13 ART Drafted importer header adapter, migration, and focused header-control test. Keeps Digitos named; preserves col_39..col_52; source values remain paired to position-derived names; only absent legacy col_39/col_52 slots are NULL-padded. Adapter accepts only the measured old-header/no-Digitos shape or new Digitos-after-Tramite shape, then exact ordered gate remains fail-closed. Test covers corrected-header admission and unexpected-header rejection. No tests, importer, or DB run; requires audit verification and db04 tail/view measurement.
-
coder03assistant-mba-l-ca | 2026-09-24 06:14 ART Implementation detail: read_sheet continues deriving blank names by physical index. At DB-contract adaptation, the measured new source order (Tramite, Digitos, col_40..col_51) is accepted only if it exactly matches the canonical destination with col_39/col_52 omitted and digitos positioned immediately after Tramite; rows are keyed by those header-derived names, and only missing legacy slots receive NULL. Existing pre-Digitos header is also accepted with digitos=NULL. All other header differences pass unchanged to exigir_cabecera_base, which still requires exact ordered equality and rejects a wrong header. Migration appends text digitos, retaining col_39..col_52 for dependent views. Added focused test exercises pre-adapter rejection of the new header, post-adapter alignment, legacy NULL padding, and rejection of an unexpected header. Files: tools/rutap-snapshot-import.py; tools/tests/rutap-snapshot-import-header.test.py; docs/migrations/2026-09-24-movilba-373-rutap-digitos-DEV-Y-PROD.sql. Test intentionally not run under current handoff rule; no DB/import run. db04's occupancy/view measurement remains external.
-
db04-mba-l-ca | 2026-09-24 06:17 ART: Read-only source/DB check. New book /data-lezama/movilba/libro/2026-09-24-0434-parque-rutap.xlsx (SHA-256 94c3499d742c7a0201d94434fba5cca2e4d6e7d44534057e136f4546a215fa19): Base header row 2 has Tramite at AM (39) and named Digitos at AN (40); 5,538 vehicle rows. AO:AZ (41-52) have blank headers and 0 populated cells on those rows; Digitos itself has 0 populated cells. On the currently imported 2026-09-19 snapshot, DEV and PROD each have 5,528 rows and 0 non-NULLs in rutap.rutap_rows.col_39..col_52. Installed views in both bases selecting these fields: rutap.v_rutap_latest, v_rutap_latest_norm, v_rutap_latest_projection_eligible, v_rutap_rows_norm, v_rutap_ultima_alta_por_dominio; v_snapshot_catalog_preflight references them but does not output them. This supports treating Digitos as a named source field and AO:AZ as trailing empty used-range, while preserving legacy cols/views. No DB write/import run; production state remains unchanged.
-
audit pass: Importer header adapter, focused regression, current Base header; Python syntax and diff hygiene. Migration reviewed statically. No DB/import/view execution; db04 occupancy check remains open.
payload
{"scope":"Importer header adapter, focused regression, current Base header; Python syntax and diff hygiene. Migration reviewed statically. No DB/import/view execution; db04 occupancy check remains open.","outcome":"pass","evidence":"audit-mba-l-ca | 2026-09-24 06:~ ART. python3 tools/tests/rutap-snapshot-import-header.test.py exit 0; python3 -m py_compile both Python files exit 0; git diff --check importer exit 0. Read-only openpyxl Base!row2 in 2026-09-24-0434 book: 52 headers, Tramite at index 38, Digitos at 39, blanks 40..51; 5538 nonempty rows, indices 39..51 all empty. read_sheet+adaptar_columnas_base+exigir_cabecera_base on the actual workbook: 5538 rows aligned to 54 destination columns; col_39/col_52 NULL, digitos nonnull 0. Three altered headers (unexpected name, swapped Digitos/Tramite, appended extra) each rejected via adapter+exact gate. Static SQL review: adds text digitos, retains legacy columns, dry-run ROLLBACK. No DB migration/import applied or installed view/occupancy check; test is manual, not wired into pre-commit/deploy.","reportRef":null} -
db04-mba-l-ca | 2026-09-24 06:19 ART: Applied the audited MOVILBA-373 migration from checkout HEAD a02d3523 to PROD first (current_database=movilba, current_user=postgres), then DEV (current_database=movilba_dev, current_user=mobilba_user). Post-check in each base: rutap.rutap_rows has 58 columns; digitos is text at ordinal 58, after col_52 at ordinal 57. Existing tramite/col_39..col_52 ordinals remain 43..57 unchanged. Row count remains 5528 in each base; digitos has 0 non-NULL values. The five previously measured dependent views' output ordinals are therefore preserved by the appended column; no import run, no source rows changed, no importer reconciliation/fidelity/catalogue/history/health gates exercised. Both table locks released. Import remains pending those gates in PROD followed by same-digest DEV refresh.
-
db04-mba-l-ca | 2026-09-24 06:25 ART — MOVILBA-373 migration is applied in PROD and DEV; postchecks show digitos is the final rutap.rutap_rows column in both, legacy col_39..col_52 ordinals unchanged, and current raw row count remained 5528 before import. New SSOT import has since completed in PROD (snapshot 6, 5538 rows). DEV is still on snapshot 18 (5528 rows); refresh held because its current reconciliation would delete 17 app_dev vehicles and 54 app-origin history rows, contrary to documented preservation. Import/header adapter is functional in PROD; DEV import and its post-import gates are not yet exercised.
-
db03-mba-l-cc
-
db03-mba-l-cc 2026-09-28: VERDICT - tail, not short header. Source file measurement already done by db04 (2026-09-24 06:17, book SHA-256 94c3499d...19): Base header row 2 has AM(39)=Tramite and AN(40)=Digitos as real named fields; AO:AZ (41-52) have blank headers AND 0 populated cells in the source itself. So col_39/col_40 are legitimate named fields (Digitos now captured by the applied migration, 2026-09-24-movilba-373-rutap-digitos-DEV-Y-PROD.sql, PASSed and applied both bases), col_41..col_52 are genuine trailing blank used-range in the workbook, not data lost to a short header read. No book data is missing. Anyone counting book columns should exclude col_41..col_52 (12 cols) as tail; col_39/col_40 are real (Tramite/Digitos). Closing the open question this item tracked.
-
coder03-mba-l-cc 2026-10-05: closed at db03's report (col_41-52 genuine trailing blanks, col_39/40 real, 2026-09-28); audit PASS on the importer header adapter recorded 2026-09-24 by audit-mba-l-ca.