basquetWi + New ticket
movilba MOVILBA-716

Script nuevo + sqlite nuevo: tabla ancha consultable del TODO tracker, sin re-parsear xlsx cada vez

Done normal cmcoder04-mba-l-ca

Elazar, 2026-10-06: checking the live tracker today meant re-parsing the xlsx by hand each time (openpyxl ad hoc, twice in one session) instead of querying it directly - too expensive to repeat every time someone needs to check TODO. Fix: a NEW script, separate from tools/todo-rutap-tracker.py, that reads the current live workbook (import-reports/todo-rutap-importacion-prestaciones.xlsx, the undated top-level file - never an archived/timestamped copy) and loads it into a NEW sqlite file with ONE WIDE ROW PER TRACKER ROW, one column per header, no EAV/pivot needed to read it back. Do not touch or extend tools/todo-rutap-tracker.py or its existing todo-rutap-tracker.sqlite (snapshots/cells EAV schema) - that stays exactly as is for historical value-diffing across snapshots. The new script is a separate file, separate sqlite file, and is allowed to be simple and destructive on each run: DROP and recreate its table(s) from the current workbook every time it runs (it is a CURRENT snapshot, not a history), so no migration/append logic and no effort spent on schema compatibility with the old EAV tables - prioritize fast, direct SQL querying over any kind of backwards compatibility. Two tables, one per sheet: Pendientes into a table literally named todo-rutap-importacion-prestaciones-current (hyphens require quoted identifiers in sqlite - use double-quotes), Resueltos into todo-rutap-importacion-prestaciones-resueltos-current. Columns = the workbook headers (bwi, # anterior, Para (Eugenia/Elazar), Pregunta, Donde mirar, Respuesta de Eugenia/Elazar, Nuestra respuesta, fecha de inicio, Fecha estimada de resolucion, Estado, Verificado), all TEXT, plus a row-number column so a future write-back can cite the exact row. New sqlite file alongside the old one: /data-lezama/movilba/import-reports/todo-rutap-tracker-current.sqlite. Run it once now against today's workbook and confirm row counts (Pendientes ~74, matches the online copy after today's four new rows) against a spot-check in the xlsx itself.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03-mba-l-cc created · 1w ago
  • coder04-mba-l-ca statusChanged · 1w ago
    Current undated source is stale (mtime Oct 5; SHA256 5925d4b9…): rebuild yields 64 Pendientes / 92 Resueltos, below expected ~74. Asked coder03 to refresh canonical undated workbook; timestamped archive excluded by spec. Script/SQLite/README created; rerun and verify after refresh.
  • audit-mba-l-cc audited · 1w ago
    audit pass: tools/todo-rutap-tracker-current.py full read, ast parse + py_compile, cross-check vs spec in MOVILBA-716 desc
    payload
    {"scope":"tools/todo-rutap-tracker-current.py full read, ast parse + py_compile, cross-check vs spec in MOVILBA-716 desc","outcome":"pass","evidence":"separate from todo-rutap-tracker.py/its EAV sqlite (confirmed no shared tables/names); SOURCE check refuses non-undated filename; identifier quoting safe; header validation (blank/dup/reserved-column) present; blank-trailing-row skip correct. NOT exercised: no test file covers this script (existing todo_rutap_tracker_test.py/.cjs target the old EAV script only) - gap, not a defect. Row-count discrepancy (64/92 vs ~74) is a SOURCE DATA staleness claim, not a script defect; unverifiable by audit until coder03 refreshes the workbook.","reportRef":null}
  • coder04-mba-l-ca statusChanged · 1w ago
    Reran after canonical undated workbook refresh (SHA256 a33f1477fda88d29f45e2bbf1390be9bd26a336bc2e8d5cd749e2f7884fabaee): 63 Pendientes, 97 Resueltos. Independently counted nonblank XLSX rows and matched SQLite counts; spot-checked source row 2 in each sheet against SQLite (Pendientes bwi MOVILBA-578; Resueltos first-field blank matches). This differs from the spec's ~74 pending estimate; counts now reflect refreshed canonical source.
  • audit-mba-l-cc audited · 1w ago
    audit pass: re-audit after source refresh: independently reran todo-rutap-tracker-current.py against refreshed undated xlsx
    payload
    {"scope":"re-audit after source refresh: independently reran todo-rutap-tracker-current.py against refreshed undated xlsx","outcome":"pass","evidence":"SHA256 a33f1477fda88d29f45e2bbf1390be9bd26a336bc2e8d5cd749e2f7884fabaee matches coder04's cited source and the live file on disk; independent extract() run gave 63 Pendientes / 97 Resueltos, identical to coder04's rerun. No row-drop/filter defect found; ~74 estimate superseded by refreshed source, not a script bug. Script PASS stands.","reportRef":null}
  • coder04-mba-l-ca completed · 1w ago
    Current undated workbook SHA256 a33f1477fda88d29f45e2bbf1390be9bd26a336bc2e8d5cd749e2f7884fabaee imported to the new SQLite: 63 Pendientes / 97 Resueltos. Independently counted nonblank XLSX rows and matched table counts; spot-checked row 2 in both sheets. Coder03 confirmed 63 is correct after tracker consolidation; ~74 was a stale estimate. Audit PASS recorded.
task
1w ago by coder03-mba-l-cc
1w ago
2026-10-06 16:38