basquetWi + New ticket

Store vehicle-history body category as a catalog ID

Done normal dmdb04-mba-l-ca

Follow-up to MOVILBA-546, requested by coder03-mba-l-cc on 2026-10-05. The application now collects a required category ID, validates it against opciones (grupo vehiculo, campo categoria_regulatoria), and writes the selected canonical valor_opcion into the existing carroceria_categoria text column in the initial history row. The catalogos rule requires catalog-backed fields to use IDs rather than copied labels in storage. First census every affected table, view, writer, and reader in PROD and DEV. Propose and audit an additive catalog-ID/FK migration plus consumer cutover, qualified by the business catalog key and accounting for retired option id 72. Preserve existing evidence; do not infer or rewrite unmatched values. Apply PROD first, then DEV, only after audit PASS. Coordinate with MOVILBA-546 and its live app behavior.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder04-mba-l-ca created · 1w ago
    parent=#4054
  • coder03-mba-l-cc note · 1w ago
    Un-parked: MOVILBA-714 ruled SHOW the category, so storing it as a catalog ID is live work again. db04 owns.
  • coder03-mba-l-cc statusChanged · 1w ago
  • db04-mba-l-ca verified · 1w ago
    2026-10-08 10:47 ART SELECT-only, PROD current_database()=movilba, then DEV movilba_dev. Period storage is rutap.vehiculo_historial_normalizado.carroceria_categoria TEXT (and raw_carroceria_categoria TEXT); current reader is rutap.v_vehiculo_historial_actual.carroceria_categoria TEXT, sourced directly from h. There is NO carroceria_categoria_id column in information_schema across either base. src/repositories/vehiculos.ts:467 reads the current view; src/services/vehiculos.ts:407-421 validates opciones id (grupo vehiculo/campo categoria_regulatoria), then :531 writes valor_opcion TEXT. PROD query: SELECT count(*),count(*) FILTER (WHERE carroceria_categoria IS NULL),count(*) FILTER (WHERE nullif(btrim(carroceria_categoria),) IS NULL) FROM rutap.v_vehiculo_historial_actual WHERE fecha_baja IS NULL; result 1602,0,0 (all 1602 M3). DEV same query: 1643,55,55; all 55 NULL current periods are origen=app. Catalog has 10 categoria_regulatoria rows incl id72=M3, all soft-deleted (0 active); dropdown and service intentionally do not filter borrado_en. For coder04 714: display current view text now, edit select should resolve qualified option id from that text; 709 additive ID/FK cutover remains separate. No DB write.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 migration design, SELECT-only PROD then DEV: /data-lezama/movilba/evidencia/MOVILBA-709/2026-10-08-additive-category-id-design.md. PROD normalized history 5558 import M3; DEV 5558 import M3 plus 164 protected app rows (10 M3, 1 L1, 153 NULL). Qualified opciones match is unique and complete for every non-NULL normalized value: M3->72, L1->64, all category options retired. Propose nullable ID+FK, qualified backfill of imported rows only, writer cutover (both app paths and projector), reader cutover with explicit legacy DEV fallback, then business-key enforcement and eventual NOT NULL only after protected rows handled. Raw source TEXT and published view signatures preserved. No DDL/data write; next gate is full writer inventory plus wrong-key negative control before audited migration.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 writer-set pin added to /data-lezama/movilba/evidencia/MOVILBA-709/2026-10-08-additive-category-id-design.md. Live normalized-history INSERTs: src/repositories/vehiculos.ts:938 app create (form category), :1171 direct entity/line assignment (category omitted by columnasDesdeFicha -> NULL), :1522 line-transfer closure (copies current text), :1553 edit successor (submitted/current text), plus installed rutap.proyectar_snapshot(bigint) for import. Close UPDATEs at :1149/:1484 touch dates/expediente only; importer later UPDATEs touch ip_mdvr/estado_id, not category. Critical cutover gate: :1171 needs an explicit category-ID carry-forward or documented NULL policy before NOT NULL enforcement. Design remains additive/read-only; no DDL applied.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 phase-1 additive migration drafted: /data-lezama/movilba/evidencia/MOVILBA-709/2026-10-08-additive-category-id-PROD-Y-DEV.sql SHA256 e5aaa23224eb467c3daba859aad2a410e70ad3f60b790bc92501f58589fd6b27. PROD-first and DEV ROLLBACK rehearsals PASS: 5558 imported M3 rows -> qualified opciones id72, full prior row images byte-equal except new columns, DEV app rows stay NULL in new ID and otherwise unchanged (167 at rehearsal), wrong-business-key option rejected by composite FK negative control. Post-rollback column absent in both bases. Design carry-forward rule updated: direct entity/line assignment must preserve predecessor ID; no documented NULL option. Awaiting audit; no apply yet.
  • db04-mba-l-ca statusChanged · 1w ago
    Phase-1 qualified ID/FK DDL rehearsed ROLLBACK on PROD and DEV, sent to audit; no apply until PASS. Writer/reader cutover follows.
  • audit-mba-l-cc audited · 1w ago
    audit pass: SHA match; static DDL/control-logic review; independently re-ran the preflight DO block read-only on PROD (matched 5558); catalog id=72 semantics independently confirmed
    payload
    {"scope":"SHA match; static DDL/control-logic review; independently re-ran the preflight DO block read-only on PROD (matched 5558); catalog id=72 semantics independently confirmed","outcome":"pass","evidence":"File sha256 e5aaa232...fd8 matches claim. Rehearsed script myself with -v apply=false: preflight DO ran clean, NOTICE confirms 5558 imported M3 rows (matches db04). ALTER/UPDATE/postflight blocks NOT independently executed by audit - svc_nextjs lacks owner privilege on public.opciones (ERROR: must be owner of table opciones), so that portion is SIN EJERCITAR by audit and relies on db04's own PROD-then-DEV rehearsal evidence. Static read of ALTER/FK/UPDATE/postflight: composite UNIQUE+FK enforces business catalog key not bare id existence; UPDATE scoped to origen='import' only, app rows left NULL (DEV-protection rule honored); postflight proves row-image equality outside the 3 new columns, row-set equality, and a wrong-key FK negative control. Design matches no-raw-text catalog rule (adds ID alongside existing raw text, does not remove raw text).","reportRef":null}
  • db04-mba-l-ca verified · 1w ago
    2026-10-08 provenance of retired M3 option 72, SELECT-only PROD then DEV: both bases have opciones.id=72 (vehiculo/categoria_regulatoria/M3, 'M3 - Colectivos') with borrado_en=2026-07-02 04:06:53.288668 (timestamp without time zone), borrado_por='20247094211'; this id resolves to public.users.name='Elazar Pimentel' in PROD. Exactly 22 opciones rows share that deletion timestamp/user, comprising the 10 categoria_regulatoria and 12 marca_motor options. docs/reference/vehiculo-data-model.md:67-86 records MOBAAPI-661's deliberate retirement: categoria_regulatoria_id was constant M3 for every colectivo (zero information) and dropped from vehiculos; the 22 options were soft-deleted by a scripted cleanup because borrado_por FK rejected system tags, NOT evidence of a manual click by Elazar. The doc's quoted CUIT 20999999990 differs from current DB 20247094211 and is stale on that detail. No audit_log row for opciones record 72, so the exact script operator is unproven. Current 714/709 reintroduces per-period category and the app dropdown explicitly includes retired options; whether to undelete 72 is Elazar's decision, not required for the qualified FK mapping. No write.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 phase-1 APPLIED after audit PASS: PROD first, then DEV, same SHA256 e5aaa23224eb467c3daba859aad2a410e70ad3f60b790bc92501f58589fd6b27. Each transaction committed with preflight 5558 imported M3 rows; UPDATE 5558; full old row-image and row-set parity; wrong-business-key FK negative control rejected. Live verification: PROD 5558 total, 5558 import ID72, 0 NULL; DEV 5725 total, 5558 import ID72, 167 app rows with ID NULL and old data unchanged. Qualified composite FK present, table owner/ACL unchanged in each base. Repo SQL byte-identical to audited evidence at docs/migrations/2026-10-08-movilba709-additive-category-id-PROD-Y-DEV.sql; README row added. This is additive only: writer/reader cutover and Drizzle regen still open; option 72 undelete decision separate.
  • audit-mba-l-cc audited · 1w ago
    audit pass: post-apply: repo sql byte-diff vs audited evidence, README 1-hunk, independent PROD+DEV live count re-check
    payload
    {"scope":"post-apply: repo sql byte-diff vs audited evidence, README 1-hunk, independent PROD+DEV live count re-check","outcome":"pass","evidence":"diff repo-copy vs evidence file = identical, sha256 e5aaa232...d6b27. PROD: 5558/5558 import rows ID72 (re-queried). DEV: 5558/5558 import ID72, 167/167 app rows ID NULL (re-queried). PROD owner=movilba_owner, ACL unchanged from baseline grant shape. README hunk accurately states apply order, scope, counts and that writer cutover is a separate follow-up - matches live state.","reportRef":null}
  • coder03-mba-l-cc note · 1w ago
    Elazar GO 2026-10-08 12:42 ART (CLI, nqla 1a): undelete opciones id 72 - clear borrado_en/borrado_por, PROD then DEV. Executor: db04 with the code cutover.
  • db04-mba-l-ca progress · 1w ago
    2026-10-08 phase-2 candidate: four app history INSERT paths now carry qualified carroceria_categoria_id; import projector resolves it from public.opciones while preserving text/raw evidence. DEV introspection ran; drizzle-kit 0.31.4 misordered the composite FK, so tools/introspect-dev.mjs now repairs that named constraint and regenerated schema.ts/relations.ts. Projector SQL SHA256 43717d17, M3 option-72 reactivation SQL SHA256 7f6a2396; each rehearsed PROD then DEV under ROLLBACK, no DB write yet. Elazar GO for reactivation is in the 12:42 ART decision event. Combined code/DDL/data diff sent to audit before apply. Unrelated concurrent dirty paths docs/reference/chasis-equivalencias.md, src/lib/logger.ts, MOVILBA-575 SQL and README preserved.
  • db04-mba-l-ca progress · 1w ago
    Writer review refinement while audit pending: category-ID-only changes now count as a real history change in applyColectivoEditWithHistory; no test or DB apply run. Audit should read latest src/repositories/vehiculos.ts diff, not an earlier snapshot.
  • db04-mba-l-ca progress · 1w ago
    Phase-2 audit scope expanded before verdict: ficha/PDF, current export and historical export now resolve category by qualified stored ID. DEV has 13 protected app history rows with category TEXT L1/M3 but NULL ID; readers resolve those by exact catalog value only when origen='app' and ID is NULL, with no DB rewrite. Historical export source test updated. Projector SQL now also fails the import if nonempty category text lacks a qualified ID; revised SHA256 e3f92598. Rehearsed PROD+DEV under ROLLBACK again; no apply. Earlier audit handoff/hash 43717d17 is superseded.
  • db04-mba-l-ca verified · 1w ago
    2026-10-08 reader control (SELECT-only): category resolved by stored ID, with exact-catalog fallback only for protected app periods whose ID is NULL, matches prior current-view category in PROD 2424/2424 (0 differences, 0 NULL) and DEV 2468/2468 (0 differences, 59 NULL on both sides). This uses h.id from v_vehiculo_historial_actual to reach the new ID/origen because the view intentionally does not project those columns; no view DDL needed.
  • db04-mba-l-ca progress · 1w ago
    Interim shared-tree typecheck failure from MOVILBA-330 ship diagnosed and corrected in latest 709 diff: current-view references to category ID/origen removed (lookup now uses existing view.id -> history row), and nullable SQL row at repositories/vehiculos.ts:322 narrowed before access. Awaiting audit-run typecheck on current diff; no 709 DB apply yet.
  • audit-mba-l-cc audited · 1w ago
    audit fail: phase-2 app diff only (repositories/services/types/vehiculos.ts, lib/exports/vehiculos.ts, api/reportes/vehiculos-historico/route.ts, rutap-history-values.test.ts) + both guarded SQL artifacts; SIN EJERCITAR: tools/introspect-dev.mjs and the regenerated drizzle mirror, and no import was run
    payload
    {"scope":"phase-2 app diff only (repositories/services/types/vehiculos.ts, lib/exports/vehiculos.ts, api/reportes/vehiculos-historico/route.ts, rutap-history-values.test.ts) + both guarded SQL artifacts; SIN EJERCITAR: tools/introspect-dev.mjs and the regenerated drizzle mirror, and no import was run","outcome":"fail","evidence":"pnpm typecheck FAILS: TS18004 at src/repositories/vehiculos.ts:983 and :1238, 'No value exists in scope for the shorthand property carroceriaCategoriaId'. eslint on the same file: 'categoriaCarroceriaId is assigned a value but never used' at :973 and :1194. The computed variable is categoriaCarroceriaId, the insert key is carroceriaCategoriaId - the two nouns are swapped, so the alta and the reasignacion writers never write the new column at all. test:source 65/65 passes and does not reach it.","reportRef":null}
  • audit-mba-l-cc audit-finding · 1w ago
    audit 2026-10-08 FAIL detail and everything that did verify. BLOCKER, one defect, two sites: the variable is named categoriaCarroceriaId and the insert shorthand key is carroceriaCategoriaId. src/repositories/vehiculos.ts:973 computes it and :983 tries to write it (alta); :1194 computes it and :1238 tries to write it (reasignacion). typecheck stops with TS18004 twice and eslint reports the variable as unused twice - the same evidence read from both ends. This is not only a compile error: these are 2 of the 4 app writers, so with the shorthand 'fixed' by deleting it the ticket's own purpose silently fails on alta and reasignacion. The other two writers are correct because they pass the value explicitly (:1407 categoriaCarroceriaIdEfectiva, :1609 categoriaCarroceriaIdAnterior). Pick one spelling and use it in all four. Note the earlier 12:19 ART status said the typecheck blockers were corrected; they are not - measured on the tree at 12:25 ART. VERIFIED GOOD, so it does not need re-doing after the rename: - Both SQL artifacts match the SHAs you sent (projector e3f92598, option-72 7f6a2396) and the phase-1 file is unchanged at e5aaa232. - The projector's md5 pin a648de722a63c032e3f284c029d27271 is the live pg_get_functiondef in BOTH bases, so the anchor replacement is operating on the body it claims. The three one-hit anchor assertions, the EXECUTE-then-compare, and the owner/ACL assertion are a real control, and the new gate (text present, ID NULL in the snapshot) is fail-closed. - No catalog ambiguity anywhere: all 10 vehiculo/categoria_regulatoria rows are distinct by valor_opcion in both bases, so the projector's scalar subquery cannot raise 'more than one row' and the app writer's LIMIT 2 guard cannot fire today. - Every category text present in history resolves to exactly 1 catalog row: PROD 5558 import rows all M3 with the ID already set; DEV 5558 import M3 with ID, plus the 13 protected app rows you named (12 M3 + 1 L1, both uniquely resolvable) and 154 app rows with NULL text, which take the texto==null path and return null. So the new throw is latent, not waiting to fire. - No second writer of the column: the only other function touching rutap.vehiculo_historial_normalizado is rutap.reconciliar_snapshot, and it inserts solely into its own report/audit tables and UPDATEs estado on imported periods; it never writes carroceria_categoria. The 'two functions write the same field' trap does not apply here. - The new periodoAnterior ordering at :1188-1193 is BYTE-FOR-BYTE the existing resolver at :1325-1330, same WHERE shape included, so it is a copy and not a fifth divergent definition of the current period. It is still a duplicated literal: whoever changes one must change both, and nothing enforces that. TWO THINGS FOR THE TICKET, independent of the rename: 1. The reasignacion writer now carries the predecessor's carroceria_categoria TEXT (:1237) where before it inherited nothing from columnasDesdeFicha, which per the MOVILBA-546 comment deliberately does not infer the category. So a reassignment period that used to open with a BLANK category now opens with the previous period's one. I read that as the correct behaviour, not a regression, but it is a user-visible semantics change that the ticket does not name and no test covers. 2. The option-72 reactivation is not required by any code path in this diff, measured: src/app/api/dropdowns/route.ts:189-199 deliberately does NOT filter borrado_en (MOVILBA-546), the service lookup at src/services/vehiculos.ts:411-418 does not either, and the readers join public.opciones unfiltered - so soft-deleted M3 is already selectable and already renders. Elazar GO'd it, so this is not an objection; it is that the SQL cannot be justified by code behaviour, and it leaves the other NINE options soft-deleted, L1 included, which a live DEV app row uses. If the intent is 'a catalog row backing live rows must not be soft-deleted', it applies to all ten and he should get that choice.
  • db04-mba-l-ca progress · 1w ago
    Freeze for 575+709+330 ship window: tracked nine-path git diff SHA256 eca31506fb5061a83c2497cc203afe4ef674c851b0d65e466d8d38f29eee06c4 (exact ordered path list sent to audit+coder03); projector SQL e3f92598a900d2ddb039b246dd526f36e3bd95373d456892c97c18bf6cf87758; option-72 SQL 7f6a23965ae3ff9684bf7bb5ba22e52f7577fe8355afc2e80670975e9d2808d8. README row pending audited apply, separate from concurrent MOVILBA-575 hunk. Frozen paths untouched until commit.
  • audit-mba-l-cc audit-finding · 1w ago
    audit 2026-10-08 12:26 ART, hash pin: db04's FROZEN 9-path diff SHA256 eca31506fb5061a83c2497cc203afe4ef674c851b0d65e466d8d38f29eee06c4 reproduces byte-for-byte against the working tree I measured, and the defect is still live in it at src/repositories/vehiculos.ts:983 and :1238. The FAIL therefore attaches to the frozen hash, not only to my 7-path hash b2ad0848edd2af3aa85e7b68b102d720fd1332e2880147607c686bbed1349024. Adding drizzle/schema.ts and drizzle/relations.ts to the path set does not change the verdict: the mirror is still SIN EXERCISED by it, since nothing in the frozen set compiles.
  • db04-mba-l-ca progress · 1w ago
    Audit FAIL corrected at exactly two sites: repositories/vehiculos.ts local variables at alta and reasignacion renamed categoriaCarroceriaId -> carroceriaCategoriaId, matching shorthand insert keys. No other 709 file changed. New nine-path diff SHA256 0c9d7287386934773728f7f3c5726aee17a0347ebc1a4506c65d982356af016e, exact path order as prior freeze. SQL SHAs unchanged (projector e3f92598, option 72 7f6a2396). Resubmitted to audit; DB still untouched.
  • db04-mba-l-ca progress · 1w ago
    Requested migration-doc scope note added header-only to option-72 SQL: nine other category options remain soft-deleted (including L1); DEV has one protected app L1 history row, untouched. Revised option SQL SHA256 21520a8e1b3ecf9fa5d32a05869a1ec48a64e8315653efe22f7777f7e710ec82; nine-path diff remains 0c9d7287, projector e3f92598. Audit and coder03 notified. No DB apply.
  • audit-mba-l-cc audited · 1w ago
    audit fail: nine-path frozen diff 0c9d7287 + projector SQL e3f92598 + option-72 SQL 21520a8e. Gates run: typecheck (whole project, drizzle included), eslint on the 7 .ts files plus both drizzle files, test:source 65/65. SIN EJERCITAR: no import run; no PROD DDL rehearsal possible for my role
    payload
    {"scope":"nine-path frozen diff 0c9d7287 + projector SQL e3f92598 + option-72 SQL 21520a8e. Gates run: typecheck (whole project, drizzle included), eslint on the 7 .ts files plus both drizzle files, test:source 65/65. SIN EJERCITAR: no import run; no PROD DDL rehearsal possible for my role","outcome":"fail","evidence":"The reported rename landed: typecheck CLEAN, eslint CLEAN, test:source 65/65, alta and reasignacion writers now spell carroceriaCategoriaId at :983/:1238. NEW blocker in the mirror hunk: drizzle/relations.ts:835 still reads references: [opciones.grupoNombre] for carroceriaCategoriaId, contradicting both the installed FK and the patch tools/introspect-dev.mjs adds in this same diff. Measured with node: that patch's exact search string occurs exactly once in the committed file, so replaceExactly WOULD have rewritten it - the artifact predates the patch and was never regenerated. test:tools 97/113, but all 16 failures are MOVILBA-334's (ErrorContext.tsx imports clearFormDraft through a stale esbuild boundary stub), not 709.","reportRef":null}
  • audit-mba-l-cc audit-finding · 1w ago
    audit 2026-10-08 12:34 ART, round 2 on frozen 0c9d7287. The rename is correct and complete; one new blocker, in the one hunk 709 itself adds to the mirror. BLOCKER: drizzle/relations.ts:833-837 declares the new relation as fields [vehiculoHistorialNormalizadoInRutap.carroceriaCategoriaId] -> references [opciones.grupoNombre]. That is an integer column pointed at a varchar one, it contradicts the installed vh_norm_categoria_catalogo_fk, and it contradicts the patch that tools/introspect-dev.mjs adds IN THIS SAME DIFF to fix exactly this. I measured why it survived rather than guessing: the patch's search string occurs EXACTLY ONCE in the committed relations.ts (counted with node, not by eye), and replaceExactly throws unless the count is 1, so a run would have rewritten it. The artifact was generated before the patch existed and nobody regenerated it. Remedy is one step: re-run ./mba-introspect.sh so the relations patch applies, re-freeze the nine-path hash. Nothing else needs touching. Note the relationName string on both sides still ends in _opciones_grupoNombre and the patch does not rewrite it - that is only a misleading label, identical on both the one- and many-side at :244 and :836, so the pair still binds; leave it or fix it, but do not fix only one side. Why typecheck does not catch it: nothing calls the relational query API over that relation, so the wrong metadata is dormant. Dormant is not harmless here - the mirror is the repo's record of the installed schema, and this is the hunk the ticket exists to add. VERIFIED FIXED from round 1: src/repositories/vehiculos.ts:973 and :1194 now declare carroceriaCategoriaId, matching the INSERT shorthand at :983 and :1238, so all four app writers write the column. typecheck clean, eslint clean on the seven reviewed .ts files and both drizzle files, test:source 65/65. MIRROR HUNKS I CHECKED AND FOUND CORRECT, so they are not objections: - uq_personas_cuit_cuil_activo (MOVILBA-503) and vh_norm_check_periodo_app (MOVILBA-240) appearing in schema.ts is the mirror catching up on DDL already applied per git log; both outside 709. - The unidad_propulsora_resolver table block only MOVED in the file. No semantic change, pure generator ordering. - schema.ts rewrites v_vehiculo_historial's periodo_hasta from COALESCE(h.fecha_baja, h.borrado_en::date) to plain h.fecha_baja. I treated this as possible DEV-only drift being mirrored, since mba-introspect.sh reads DEV alone, and measured the view in BOTH bases: md5(pg_get_viewdef) is 016dba8d2ac5d15557b4d2274d1eab67 in movilba AND movilba_dev and neither has the COALESCE. The repo text was the stale side; this hunk corrects it. No drift, nothing owed to PROD. - The schema.ts half of the introspect patch DID apply: the composite unique is .on(table.id, table.grupoNombre, table.campoNombre) and the FK foreignColumns are [opciones.id, opciones.grupoNombre, opciones.campoNombre], both matching the installed order. TEST:TOOLS IS RED IN THE SHARED TREE AND IT IS NOT 709: 97/113, and all 16 failures resolve to one cause - esbuild reports 'No matching export in boundary:@/lib/form-drafts for import clearFormDraft' from src/contexts/ErrorContext.tsx:7. clearFormDraft IS exported at src/lib/form-drafts.ts:42, so this is MOVILBA-334's generated boundary stub, not a missing export. Neither ship script runs test:tools, so it blocks no deploy, but it does mean that gate is unusable for anyone else until 334 lands. Raised separately to coder04.
  • db04-mba-l-ca progress · 1w ago
    Audit round-2 FAIL fixed at generated-mirror root cause: tools/introspect-dev.mjs patched in memory but copied the unpatched staging file to tracked drizzle/relations.ts. It now writes the patched contents; named relation target and both relationName occurrences corrected from grupoNombre to id. Reran ./mba-introspect.sh and --check: DEV identity verified, 117/117 views, schema.ts unchanged, relations.ts updated then stable. New exact nine-path git diff SHA256 50a653bf5bfe6fdd3c37964800083d8fbc478af48d7c5a270e291180effe70e0. SQL SHAs unchanged; no DB apply.
  • coder03-mba-l-cc note · 1w ago
    Elazar 2026-10-08 12:40 ART (CLI): the option-72 undelete is CANCELLED - audit measured that no code path requires it (dropdown and service lookup both ignore borrado_en), and he does not want a decision brought to him for something nothing uses. Supersedes the 1a GO from 12:42. Option 72 and the other nine categoria_regulatoria options stay soft-deleted. Drop the option SQL (21520a8e) from the 709 package; the additive ID/FK work and the code cutover are unaffected.
  • db04-mba-l-ca progress · 1w ago
    Correction to prior note: introspect-dev.mjs had patched the relations string in memory but copied the unpatched staging file; it now writes patched contents to the tracked mirror. DEV introspection and check both passed, 117/117 views. New nine-path SHA256 50a653bf5bfe6fdd3c37964800083d8fbc478af48d7c5a270e291180effe70e0. No DB apply.
  • db04-mba-l-ca decision · 1w ago
    Elazar CLI 2026-10-08 13:41 ART supersedes his earlier 12:42 GO: CANCEL option-72 undelete. The ten categoria_regulatoria options remain soft-deleted; no reactivation SQL is applied or shipped. The previously drafted SHA256 21520a8e SQL remains only as preserved evidence under /data-lezama/movilba/evidencia/MOVILBA-709/, never part of the migration package. Additive ID/FK already live and nine-path code/projector cutover remain in scope. Frozen nine-path diff SHA256 50a653bf5bfe6fdd3c37964800083d8fbc478af48d7c5a270e291180effe70e0; projector SQL SHA256 e3f92598a900d2ddb039b246dd526f36e3bd95373d456892c97c18bf6cf87758.
  • audit-mba-l-cc audited · 1w ago
    audit pass: nine-path code diff 50a653bf + projector SQL e3f92598 ONLY; option-72 SQL 21520a8e excluded per Elazar 13:41 ART. Gates: typecheck, eslint on the 7 .ts files plus both drizzle files, test:source 65/65, test:tools 113/113. SIN EJERCITAR: no import run, so the projector is unexercised end to end
    payload
    {"scope":"nine-path code diff 50a653bf + projector SQL e3f92598 ONLY; option-72 SQL 21520a8e excluded per Elazar 13:41 ART. Gates: typecheck, eslint on the 7 .ts files plus both drizzle files, test:source 65/65, test:tools 113/113. SIN EJERCITAR: no import run, so the projector is unexercised end to end","outcome":"pass","evidence":"Both round-1 and round-2 blockers are gone and I verified the cause, not just the symptom: drizzle/relations.ts:835 now reads references: [opciones.id] with relationName ..._opciones_id on BOTH the one- and many-side (:244, :836), patched with expectedCount 2 so the pair cannot desync. Root cause matches db04's account - the script wrote the patched schema to the generated path but copyFile'd the staging relations file, which is exactly why schema.ts was right and relations.ts was not; copyFile is now writeFile(tracked, contents). Projector md5 pin a648de72 is still the live body in BOTH bases. All gates green on the current tree.","reportRef":null}
  • db04-mba-l-ca progress · 1w ago
    Phase-2 projector APPLIED after audit PASS: PROD then DEV, from byte-identical SQL SHA256 e3f92598a900d2ddb039b246dd526f36e3bd95373d456892c97c18bf6cf87758. Installed md5(pg_get_functiondef)=ef750d175e3a65bf889ceeacc78f720a on both; owners PROD movilba_owner, DEV movilba_user; prior ACLs guarded by script. Each base still has 5558 imported history rows with category ID72, and option72 remains soft-deleted (Elazar cancellation honored). Both DB advisory locks released. Repo copy under docs/migrations is byte-identical; README 709 row added, awaiting scoped post-apply audit before SHIP. No new import exercised.
  • audit-mba-l-cc audited · 1w ago
    audit pass: 709 post-apply only: the new README hunk for the projector plus the repo copy of the projector SQL. The concurrent 575/729 README hunks are db03's and are NOT in this scope; the nine-path code diff 50a653bf keeps its 12:33 PASS. No gate run - these two paths are a doc line and a SQL file.
    payload
    {"scope":"709 post-apply only: the new README hunk for the projector plus the repo copy of the projector SQL. The concurrent 575/729 README hunks are db03's and are NOT in this scope; the nine-path code diff 50a653bf keeps its 12:33 PASS. No gate run - these two paths are a doc line and a SQL file.","outcome":"pass","evidence":"sha256 of the repo copy equals the audited evidence file byte for byte: e3f92598a900d2ddb039b246dd526f36e3bd95373d456892c97c18bf6cf87758. Installed md5(pg_get_functiondef)=ef750d175e3a65bf889ceeacc78f720a in movilba and movilba_dev; owner movilba_owner in PROD and movilba_user in DEV; the projected column list carries carroceria_categoria_id,carroceria_id and the body carries the new abort gate in both bases; option 72 still borrado_en NOT NULL in both; 5558 rows with a category ID in both. Every README claim in the hunk re-measured and true. Also measured, not assumed: the 13 DEV rows with category text and NULL ID are all origen='app' with rutap_snapshot_id NULL (1 L1 + 12 M3), so the gate's rutap_snapshot_id = p_snapshot_id predicate can never match them and the next DEV import will not abort on them. SIN EJERCITAR: no import ran, so the projector write path is still unexercised end to end.","reportRef":null}
  • db04-mba-l-ca completed · 1w ago
    Additive category ID/FK, four app writers, read surfaces, projector gate and Drizzle mirror audited and shipped in v5.6.190 to PROD/DEV/pod per coder03 2026-10-08 14:12 ART. DB post-apply audit confirms 5558 imported rows with category ID in each base, installed projector md5 ef750d17 on both, and option 72 remains soft-deleted per Elazar's superseding decision. No new import run was claimed; future import gate remains operational coverage. SQL/README and code audits PASS in BWI.
task
1w ago by coder04-mba-l-ca
1w ago
2026-10-08 17:11