basquetWi + New ticket
movilba MOVILBA-555

El alta de un vehiculo nuevo permite elegir Estado Baja

Done high cmcoder03assistant-mba-l-ca

Reported by Lean and Fabri, Para Elazar item 19, dominio LB500EG. The create form offers Estado Alta or Baja, and a newly created object can only be an Alta. Related to item 20 in the same tracker, which is about what the historial then records.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 3w ago
  • coder03-mba-l-cc assigned · 3w ago
    coder03assistant-mba-l-ca / coder
  • coder03assistant-mba-l-ca statusChanged · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 05:17 ART. DEV movilba_dev LB500EG vehiculos 6780 / historial 286439: estado_id 117=BAJA, tramite_id 317=ALTA, fecha_alta 2026-09-22 (creation date); src/app/vehiculos/agregar/colectivo/page.tsx offers Baja, service createColectivo allows it, repository writes selected state beside canonical ALTA trámite. MOVILBA-544 names the date source on the same row; distinct invariant. Red control and fix pending.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 05:14 ART. Timestamp correction: preceding status body said 05:17 ART, ahead of write clock; measured DEV row and source before 05:14 ART. Evidence and status unchanged.
  • audit-mba-l-ca audited · 3w ago
    audit pass: Uncommitted create-colectivo form/service change: cannot select BAJA and direct action cannot submit it; repository default checked by source. No live DB/browser write.
    payload
    {"scope":"Uncommitted create-colectivo form/service change: cannot select BAJA and direct action cannot submit it; repository default checked by source. No live DB/browser write.","outcome":"pass","evidence":"audit-mba-l-ca | 2026-09-24 05:16 ART. Diff in agregar/colectivo/page.tsx removes estadoId state/dropdown and renders fixed Alta. Service createColectivo accepts a supplied estadoId only when canonical valorEstado is ALTA; repository createColectivo resolves omitted estadoId from active v_opciones ALTA and writes same id to ficha and initial ALTA history row (src/repositories/vehiculos.ts:889-918,995,1024). node --test tools/tests/colectivo-expediente.test.cjs exit 0, 9/9; coder reports pre-fix BAJA test red 1/9, not independently replayed. git diff --check on three files exit 0. pnpm run typecheck exit 1 only at unrelated dirty src/app/vehiculos/[dominio]/page.tsx:1050, so whole-tree type gate not green. Existing DEV LB500EG row not changed; 555 concerns future creation, historical mismatch is separate. MOVILBA-547 date rule remains FAIL from prior audit.","reportRef":null}
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 05:19 ART. Tree ready, not committed/deployed. DEV movilba_dev LB500EG historial 286439: canonical estado BAJA beside tramite ALTA; supplied fecha_expediente=fecha_alta=2026-09-22, so this row does not prove a CURRENT_DATE fallback. MOVILBA-544 date meaning stays open under MOVILBA-566; MOVILBA-349 fallback untouched. Changed src/app/vehiculos/agregar/colectivo/page.tsx to show fixed Alta and omit estadoId; src/services/vehiculos.ts accepts supplied initial estadoId only when valorEstado resolves ALTA. Repository defaults omitted state from active v_opciones ALTA inside transaction. Control: crafted crearColectivo action with BAJA succeeded before fix (red 1/9, actual success=true), now rejects before repository write; Alta still succeeds. Current focused 19/19, source 35/35, targeted ESLint and diff check clean. audit-mba-l-ca BWI audit PASS at 05:16 ART, scoped to source/action; no browser or live DB write. Status remains inProgress until coder03 commits/deploys.
  • coder03-mba-l-cc commit · 3w ago
    coder03-mba-l-cc 2026-09-24 - Shipped to DEV as 03155317, v5.6.47, health gate OK serving patch 47. Paths: src/services/vehiculos.ts, src/app/vehiculos/agregar/colectivo/page.tsx, tools/tests/colectivo-edit-load.test.cjs. test:source 37/37 and test:tools 101/101, both exit 0. Implemented by coder03assistant-mba-l-ca, audit-mba-l-ca PASS on both with its own rerun. Item stays inProgress: what is proven is that the service REJECTS, not that a real colectivo was created or that DEV holds no bad rows - deployed verification is still owed. Unrelated fix carried in the same commit and stated so it is not mistaken for part of either item: colectivo-edit-load.test.cjs:242 was already red on dev before these patches, because MOVILBA-362 made the expediente mandatory and the client guard began firing before the server rejection the case exists to check; it survived because no ship path runs test:tools.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:39 ART DEV SELECT-only measurement: connected to movilba_dev as movilba_user in BEGIN READ ONLY. Defect criterion is app-created initial-history rows in rutap.vehiculo_historial_normalizado with origen='app', normalizado_por='app-create-colectivo', catalog estado BAJA (v_opciones vehiculo/estado) and trámite ALTA (v_opciones vehiculo_historial/tramite). Full class: 1 history row / 1 vehicle; 1 active history row / 1 live vehicle. The row is id=286439, vehiculo_id=6780, LB500EG; it remains unchanged. This establishes the count, not the new create behavior. Session has no browser surface; requested DEV01 browser access from proxy-general-cc. Real app create and initial-ALTA verification remain pending; no SQL writes.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:42 ART Follow-up: chose unique test candidate QA624XZ (read-only check found 0 matching dominio rows); proposed interno 9999999 has 0 active collisions. No create attempted because this session has no browser surface (iab and Chrome unavailable). Requested a DEV01 browser from proxy-general-cc. No SQL writes; MOVILBA-555 remains open until an actual app-created record is verified ALTA and the 1-row existing class is handed to db lane for repair.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:43 ART Prepared an app-only DEV test case. Read-only collision checks on movilba_dev found zero rows for dominio QA624XZ, interno 9999999 (active), chasis QA555-20260924-0638, motor MQA5552409240638, and expediente EX-2026-99999999-GCABA-DGGSM. Proposed URL http://localhost:3042/vehiculos/agregar/colectivo; use a currently offered active subtype and an entity with an enabled line; initial state is fixed Alta. Proxy-general-cc reports its Chrome is blank and has no DEV01 session; I sent exact data and requested Elazar's login. No app create submitted yet, no database writes, no DB repair. Item remains open.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:47 ART Correction: earlier one-row count was narrowed by normalizado_por and does not establish the defect class. Recounted in movilba_dev/movilba_user under BEGIN READ ONLY, joining v_opciones by canonical values vehiculo/estado=BAJA and vehiculo_historial/tramite=ALTA, with no normalizado_por filter for slices 1-2. (1) origen=app, any normalizado_por: 1 row / 1 vehicle (active 1 / live vehicle 1). (2) any origen: 2 / 2 (active 2 / live 2). (3) original app-create-colectivo tag: 1 / 1. App row: id 286439, LB500EG. Other row: id 274367, AG202SZ, origen=import, snapshot 18, 2026-09-19-0648-parque-rutap-corrected.xlsx, Base row 4145. Source row has Tramite=Alta, Fecha_Alta=2026-09-17, Fecha_Baja blank; workbook has no Estado header, so its BAJA estado_id is not a source-book state value. Exclude import-origin row from app-create repair; keep it reported as an import-derived shape. DB repair handoff was paused and is being reissued with criterion origen='app' plus the canonical BAJA/ALTA shape, any normalizado_por. No DB writes; actual app create still awaits authenticated browser.
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:48 ART Browser route correction: proxy-general-cc reported localhost:3042 is whey and has no listener. Correct DEV01 URL is https://dev01.movilba.com/vehiculos/agregar/colectivo. From Lezama, DNS resolves dev01.movilba.com to 10.78.42.168; HTTPS responds and HTTP redirects to HTTPS. Proxy has been sent the corrected host and told not to bypass any browser certificate warning. Login remains pending; no app create or DB write has occurred.
  • db04-mba-l-ca progress · 3w ago
    db04-mba-l-ca | 2026-09-24 06:50 ART — Added repair instrument docs/migrations/2026-09-24-movilba-555-lb500eg-initial-alta-repair-DEV-Y-PROD.sql. SELECT-only precheck in DEV found exactly one matching current app-create row: LB500EG, vehicle 6780, VDC 6750, history 286439; both status IDs resolved through v_opciones as BAJA=117, while trámite ALTA=317. DEV rehearsal ran the instrument with default rollback and showed the exact two status changes to catalog ALTA=116, with trámite unchanged. Applied the same instrument to DEV; committed postcheck: VDC and app-history state both resolve ALTA, trámite remains ALTA, the row remains app-origin with no RUTAP snapshot, and the class count of BAJA-state/ALTA-trámite app-create rows is 0. The VDC update archive trigger retained one pre-update archive row. PROD measurement (database movilba, superuser) found no LB500EG app-create match; the same instrument's rollback rehearsal is a no-op, so no PROD write/replay was done. SQL instrument handoff to audit pending; no app create/browser test was performed in this DB lane, so item stays inProgress.
  • audit-mba-l-cc audited · 3w ago
    audit pass: docs/migrations/2026-09-24-movilba-555-lb500eg-initial-alta-repair-DEV-Y-PROD.sql static read: fail-closed predicates, ROLLBACK default, status-only 2 UPDATEs, no-op reruns. NOT run by me: no DB access; DEV/PROD results unreproduced; PROD class (any dominio) unmeasured; no app create.
    payload
    {"scope":"docs/migrations/2026-09-24-movilba-555-lb500eg-initial-alta-repair-DEV-Y-PROD.sql static read: fail-closed predicates, ROLLBACK default, status-only 2 UPDATEs, no-op reruns. NOT run by me: no DB access; DEV/PROD results unreproduced; PROD class (any dominio) unmeasured; no app create.","outcome":"pass","evidence":"audit-mba-l-cc 2026-09-24. Read all 138 lines vs bwi progress 09:49Z and coder03assistant 09:47Z class recount (DEV class = the one LB500EG row). Gates: catalog ids resolve once else RAISE; status pair must be BAJA/BAJA else RAISE; ROW_COUNT=1 each; postcondition RAISE.","reportRef":null}
  • coder03assistant-mba-l-ca progress · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:53 ART AG202SZ row 274367 classification: A is disproved at the source-cell level. The matched Base row 4145 has Tramite=Alta and Fecha_Baja blank, and the workbook has no Estado column; it does not state BAJA. The persisted BAJA is an additional normalized state, not a literal imported cell. Transform references: docs/migrations/2026-09-08-movilba-269-proyectar-snapshot-DEV.sql checks open periods against live VDC ALTA and fills null history state from VDC; docs/migrations/2026-09-19-movilba-516-reconciliar-snapshot-origen-agnostico-DEV-Y-PROD.sql derives VDC estado_objetivo from Fecha_Baja. I have not isolated when/how history 274367 acquired BAJA, so do not call this either faithful case A or proven importer defect B yet; source says open Alta, DEV row shape contradicts it. Keep imported row out of app repair and 555 fix scope; separate import/projection investigation required before classification. No DB writes. Actual app-create UI verification remains blocked on authenticated DEV01 browser session.
  • coder03assistant-mba-l-ca blocked · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 06:55 ART DEV01 app-create verification is blocked by the absence of an authenticated whey Chrome session. proxy-general-cc confirmed https://dev01.movilba.com is reachable without a certificate warning but redirects to /user/login; proxy cannot authenticate and is waiting for Elazar to log in. This is not a failed credential attempt: no credential was supplied to the proxy and no login attempt or record creation occurred. Required control is a real vehicle created through DEV01 and read back as ALTA. DB lane separately applied the LB500EG DEV repair; app-origin BAJA/ALTA class count is now 0; PROD had no matching app-create row. No app test row or direct DB write by this lane.
  • db04-mba-l-ca progress · 3w ago
    db04-mba-l-ca | 2026-09-24 06:57 ART — Revised-scope verification and instrument update. The authoritative pre-repair BWI census was 2 rows total (1 app, LB500EG history 286439; 1 import, AG202SZ history 274367/snapshot 18). The earlier repair had already changed only the app row before the scope correction arrived. I revised docs/migrations/2026-09-24-movilba-555-lb500eg-initial-alta-repair-DEV-Y-PROD.sql to select origen='app' without any normalizado_por or snapshot-id filter; it remains confined to LB500EG, requires the same BAJA/BAJA + ALTA-trámite pair to change, and treats already-ALTA as a no-op. The revised same instrument was rehearsed with rollback in both bases: DEV reports LB500EG already ALTA/ALTA, no change; PROD reports no matching LB500EG app-origin row, no change. Fresh postcheck in DEV: LB500EG/286439 origen=app, BAJA-state/ALTA-trámite -> ALTA-state/ALTA-trámite; AG202SZ/274367 remains origen=import, snapshot 18, BAJA-state/ALTA-trámite. Thus current DEV broad BAJA+ALTA population is 1 row and it is the untouched import row; app-origin population is 0. PROD current all-origin population is 0. No additional database write was made after revising the artifact, and no PROD write/replay occurred. Previous audit PASS predates the predicate edit; final SQL sent for re-review. UI create test remains unexercised.
  • audit-mba-l-cc audited · 3w ago
    audit pass: Re-review of revised 133-line SQL (origen='app', no normalizado_por/snapshot filter), static read. Fail-closed gates, 1-row asserts, rollback default unchanged. NOT exercised: revised UPDATE path never ran (DEV row already ALTA, PROD 0 rows); no DB/UI create.
    payload
    {"scope":"Re-review of revised 133-line SQL (origen='app', no normalizado_por/snapshot filter), static read. Fail-closed gates, 1-row asserts, rollback default unchanged. NOT exercised: revised UPDATE path never ran (DEV row already ALTA, PROD 0 rows); no DB/UI create.","outcome":"pass","evidence":"audit-mba-l-cc 2026-09-24. grep of all predicates/RAISEs vs db04 bwi progress 09:57Z. Still confined to LB500EG + BAJA/BAJA pair + ALTA trámite; import row AG202SZ excluded by dominio. Supersedes prior PASS.","reportRef":null}
  • db04-mba-l-ca progress · 3w ago
    db04-mba-l-ca 2026-09-24 06:52 ART — PROD read-only class count: first verified SELECT current_database(), current_user returned movilba|postgres. Then BEGIN READ ONLY; SELECT h.origen, count(*) FROM rutap.vehiculo_historial_normalizado h JOIN public.vehiculos v ON v.id=h.vehiculo_id JOIN rutap.v_opciones estado ON estado.id=h.estado_id JOIN rutap.v_opciones tramite ON tramite.id=h.tramite_id WHERE estado.valor_opcion='BAJA' AND tramite.valor_opcion='ALTA' GROUP BY h.origen ORDER BY h.origen; returned 0 rows. Aggregate of the same unfiltered class returned broad_total=0, broad_app=0, active_history_rows=0, rows_with_live_vehicle=0; ROLLBACK. No dominio or normalizado_por restriction. Current instrument is 133 lines and targets LB500EG app-origin rows without a normalizado_por or snapshot filter; this measurement is broader than its target. Audit's 138-line static review predates the final edit and requires re-review.
  • coder03assistant-mba-l-ca unblocked · 3w ago
  • coder03assistant-mba-l-ca completed · 3w ago
    coder03assistant-mba-l-ca | 2026-09-24 07:36 ART — DEV01 UI verification after deployment 03155317/v5.6.47: created QA624XZ through /vehiculos/agregar/colectivo using prepared test inputs; form showed fixed, non-editable Estado inicial = Alta before submit; redirected to /vehiculos/QA624XZ, fresh detail showed Estado actual: Alta (Fecha de Alta 24/09/2026). No DB writes; proxy-general-cc performed the browser operation. Post-repair DB criterion: canonical estado BAJA + trámite ALTA; DEV app-origin count 0, DEV all-origin count 1 (import AG202SZ/history 274367, snapshot 18, source row 4145 does not state BAJA; tracked separately as MOVILBA-579), PROD all-origin count 0. LB500EG/history 286439 app row is now ALTA/ALTA; unchanged by UI test. Revised DEV/PROD repair instrument audit PASS is recorded; PROD had no matching app-origin row and no write. Test vehicle remains in DEV01.
bug
3w ago by wi-cli-venus
3w ago
2026-09-24 10:36