basquetWi + New ticket
movilba MOVILBA-514

Move the historial aire_acondicionado_id and its resolver to carroceria/aire_acondicionado (126/127)

Done normal cmcoder03-mba-l-ca

Follow-up of MOVILBA-495. After 495 (carrocerias.carroceria_aire_acondicionado_id -> opciones 126 carroceria/aire_acondicionado, Elazar 2026-09-19), rutap.vehiculo_historial_normalizado.aire_acondicionado_id still lives on the generic catalog general/respuesta_binaria (24 SI / 25 NO): measured PROD 5458 rows on 24, 56 on 25; DEV 5534/56/28 NULL. The import resolver writes it, so the resolver must change FIRST (else the next import writes 24/25 back), then the import rows move 24->126, 25->127 (vh_norm triggers reject book-column updates; needs a path that respects them). v_vehiculos_export reads COALESCE(periodo_veh.aire_acondicionado_id, ca.carroceria_aire_acondicionado_id): until this closes the same fact has two catalogs. Not a design decision that two catalogs coexist.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 3w ago
  • wi-cli-venus assigned · 3w ago
    coder03-mba-l-ca / coder
  • wi-cli-venus statusChanged · 3w ago
    Implementing resolver-first catalog migration; db02-mba-l-ca verifying live membership and postconditions.
  • wi-cli-venus progress · 3w ago
    Implementation ready in persistent worktree: history resolver metadata and historical export join now use carroceria/aire_acondicionado; focused 14-assertion test passes. Atomic guarded migration rewrites rutap.proyectar_snapshot before mapping history 24/25 to 126/127, pins DEV/PROD census/hash, and adds zero-generic-air gates. db02 is running DEV/PROD dependency inventory plus DEV rollback rehearsal; audit-mba-l-ca is reviewing before any apply.
  • wi-cli-venus progress · 3w ago
    Expanded recurrence closure after read-only inventory: dedicated UI dropdown, live-category service validation, validated DB CHECK constraints, pre-census locks, exact projector rewrite, and exhaustive catalog-coupling inventory. Focused suite now passes 20 assertions and diff-check is clean. Static DB and code re-review are in progress. Correction: no DB mutation or rollback rehearsal has been performed; each DEV operation remains pending explicit approval after review.
  • wi-cli-venus progress · 3w ago
    DEV DB migration committed with catalog counts 126=5534,127=56,NULL=28,total=5618, validated history/carrocerias constraints, zero raw-vs-typed disagreements and zero residual locks. DEV app shipped as cd5a3319 / v5.5.252; deploy-owned lint and typecheck passed, dev+origin sync succeeded, public health serviceId decodes exactly to patch 252. Authenticated dropdown/report behavior verification and audit of committed DB evidence remain.
  • wi-cli-venus verified · 3w ago
    DEV final functional verification PASS: history aire_acondicionado_id 126=5534, 127=56, NULL=28, old/other=0, total=5618, raw-vs-typed disagreements=0; carrocerias 126=16, 127=0, NULL=1, old 24/25=0, total=17. Both constraints validated, metadata preserved, no conflicts/locks. App cd5a3319 v5.5.252 already shipped and health-verified. PROD remains untouched and requires its own authorization.
  • wi-cli-venus progress · 3w ago
    PROD read-only preflight 2026-09-19 after snapshot-5 import found migration census drift: live rutap.vehiculo_historial_normalizado is 24=5472, 25=56, NULL=0, other=0, total=5528, while committed SQL pins 5458/56/0/5514. Carrocerias remains 126=16,NULL=1; both target CHECK constraints are absent; rutap.proyectar_snapshot(bigint) prosrc md5 remains 7522dcde0214ec2c2621074680d3cb15 and owner movilba_owner. Current artifact must not run because PRE will abort; coder03 asked to revise/review and return exact hash. PROD remains untouched; fresh per-operation GO still required.
  • wi-cli-venus progress · 3w ago
    Snapshot-5 PROD preflight at 2026-09-19 15:21 ART found census drift: history 24=5472,25=56,NULL=0,other=0,total=5528 versus prior 5458/56/0/0/5514; carrocerias/projector unchanged. Updated fail-closed PROD census gate only and committed f9ffcb351264be8e04c4566a297759f88869eee3, SQL SHA-256 226aab649bc6c29afba67a6f65002c6119b66e462edee03f0da2e2225b207458, blob 2ebfb1c17d2f229fa588d743771a3ae99762ff62. Independent PROD re-preflight requested; fresh PROD GO not recorded, no apply authorized.
  • wi-cli-venus verified · 3w ago
    Independent PROD read-only preflight PASS for exact committed artifact f9ffcb351264be8e04c4566a297759f88869eee3. Reproduced SHA-256 226aab649bc6c29afba67a6f65002c6119b66e462edee03f0da2e2225b207458 and git blob 2ebfb1c17d2f229fa588d743771a3ae99762ff62. Diff from cd5a3319 changes only the PROD snapshot-5 census gate 5458/5514 -> 5472/5528 plus explanatory comment. Live PROD gates all PASS: environment; exact history census 24=5472,25=56,NULL=0,other=0,total=5528; four live catalog identities; target constraints absent; carrocerias 126=16,NULL=1,total=17; exact enabled immutability trigger; projector prosrc md5 7522dcde0214ec2c2621074680d3cb15; expected function fragments present exactly once and dedicated resolver absent. Check ran in READ ONLY transaction and rolled back; PROD untouched. Fresh PROD GO remains required before apply.
  • wi-cli-venus verified · 3w ago
    Independent PROD read-only preflight PASS at 2026-09-19 15:27 ART for exact commit f9ffcb351264be8e04c4566a297759f88869eee3. db02 independently reproduced SHA-256 226aab649bc6c29afba67a6f65002c6119b66e462edee03f0da2e2225b207458 and blob 2ebfb1c17d2f229fa588d743771a3ae99762ff62; confirmed only PROD census changed, all live PRE gates pass, transaction read-only/rolled back, PROD untouched. Fresh explicit PROD GO still required before apply.
  • wi-cli-venus completed · 3w ago
    Completed. Exact PROD artifact f9ffcb351264be8e04c4566a297759f88869eee3 / SHA256 226aab649bc6c29afba67a6f65002c6119b66e462edee03f0da2e2225b207458 passed rollback rehearsal and committed apply. Rehearsal evidence SHA256 bc5ad4f935b8dae13b43d7cfd333d01441259004a308dd9fb6106d24dd8f26c7; final apply evidence SHA256 3a1ab974b4c5915cea7e2241d381ab274e49c6a793f1a303d6ffabfc4653ef77. Fresh owner/runtime checks PASS; 5472/56 rows now use 126/127, validated constraints and updated projector confirmed.
  • wi-cli-venus progress · 3w ago
    Compatibility sweep landed on dev 2026-09-20 at 8f30bfaaf47c351374ebf9f40e44ee7aa65f1ca2. The six files of 94322865 that had never reached dev: three code files by blob (tools/import/component-data-populator.js e1279d1c, tools/import/opciones-resolver.js 7fca2fbc, new tools/tests/aire-acondicionado-option-resolver.test.cjs 1b4afabe) and three docs as a 3-way patch of that commit's hunks only. The docs were deliberately NOT landed by blob: their 94322865 versions predate the branch and overwriting them would have reverted the 498/521/517/518 ledger, the 516 section and the 486 wording. Verified by diffing the result against ff6eb638 - only 495/514 text moves, zero deletions of the newer entries. What the code does: the populator stops resolving carroceriaAireAcondicionadoId through resolveBooleanValue, which returns general.respuesta_binaria, and calls the new resolveAireAcondicionado, which keys on carroceria.aire_acondicionado and returns null rather than falling back. createResolvers takes injectable option data so it is testable. The test was forced RED before being accepted: mutating the resolver to key on general.respuesta_binaria gives actual 24, expected null. FINDING, routed to Elazar as a delete-or-keep decision, not acted on: the default path of the resolver this fixes cannot execute. opciones-resolver.js:11 builds the path to tools/offline_postgres_db_copy/20_opciones_data.csv and no such directory or file exists anywhere in the tree, so createResolvers() with no argument throws ENOENT. Its only requirers are component-data-populator.js, master-data-populator.js and operational-hierarchy-populator.js, all under tools/import/, and nothing outside that directory requires any of them. The only exercised path is the injected data in the new test. So this is a fix to a tool that cannot run - the real 514 correction is the migration plus the writers in src/. FINDING, pre-existing and not a 514 item: tools/tests was already red. On clean ff6eb638 the suite is 73 tests / 69 pass / 4 fail (colectivo-expediente.test.cjs:86 and three expediente-literal cases); with this commit 75 / 71 / 4, the same four. Nothing surfaces them because package.json:16 test:tools is invoked by neither gitdeploydev.sh nor /srv/dev-movilba-web.git/hooks/post-receive. Wiring the suite into the deploy path would turn dev red on the first deploy, so it is two decisions: fix the four, then wire. DOC NIT left open: the opciones-catalogo.md rewrite retired the section 'La trampa peor de las ocho: una columna que toma ids de DOS catalogos' because the column no longer mixes catalogs. The following heading 'PEOR TODAVIA' (estandar_emisiones_id) now follows a section that is no longer the worst of the eight. To be reworded by whoever next edits that file.
task
3w ago by wi-cli-venus
3w ago
2026-09-20 06:01