basquetWi + New ticket
movilba MOVILBA-796

Daily Alta rejected when domain is absent from imported RUTAP snapshot

Done high cmcoder03-mba-l-ca

Daily Alta must accept a legitimate app-created bus before its RUTAP row is imported. DEV AI545CO request d3039ea5-5c1b-4cd2-a203-04f9624fcd6a failed with SQLSTATE 23514 in installed MOVILBA-306 snapshot-membership trigger, while snapshot22 has no domain match. Elazar clarified this is an app/DB defect, not source-data error. Scope: remove only prior-snapshot membership requirement, preserve other domain/VIN/uniqueness and provenance integrity; correct app copy; PROD-first DB apply with rollback rehearsal and fresh verification; authenticated DEV retry once and verify row/history. Supersedes the relevant prior MOVILBA-306/793 rationale without editing their applied artifacts.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • coder03-mba-l-ca created · 2d ago
  • coder04-mba-l-ca progress · 2d ago
    Code-path census: crearColectivo action -> service -> repository contains no independent RUTAP snapshot-membership check. The repository writes vehiculos then app historial in one transaction; the installed MOVILBA-306 BEFORE INSERT trigger is the rejection source. The action currently exposes generic 'Error al crear el colectivo' for the raw PG 23514, not any 'wait for import' copy. Code lane will narrowly classify the obsolete MOVILBA-306 PG rejection as a server configuration failure with a user-safe message; all other Alta validations and generic PG errors remain unchanged. Focused action/service harness coverage pending checkout lock.
  • db04-mba-l-ca progress · 2d ago
    DB candidate 2026-10-14-movilba-796-daily-alta-without-snapshot-PROD-Y-DEV.sql SHA256 1b7a3d42e75b5c4b5ad48f0398e089721b90b36fa5c9976f4cec2acb16bb7d88. Fresh installed PROD/DEV function md5(prosrc)=78c05a6596b353fa54ac2784953701b1 and md5(functiondef)=81228865aae57583fe1b92cf4cc66c55; sole normal dependent is enabled 306 trigger. New migration drops only that trigger/function. Default-ROLLBACK PROD then DEV rc0: non-book app Alta accepted; duplicate active dominio, bad plate, missing chassis serial, bad origin all rejected by independent controls. Fresh post-rollback in each: old function digests unchanged, trigger enabled=1, synthetic rows=0. Focused audit requested; NOT APPLIED. There is no DB-level VIN uniqueness index; scope does not add one.
  • audit-mba-l-ca audited · 2d ago
    audit pass: DB artifact only, SHA256 1b7a3d42e75b5c4b5ad48f0398e089721b90b36fa5c9976f4cec2acb16bb7d88. Read-only PROD/DEV object inspection. Rollback rehearsals are db04-reported, not rerun. App validation/message, post-apply, and authenticated Alta path NOT EXERCISED; not full 796 clearance.
    payload
    {"scope":"DB artifact only, SHA256 1b7a3d42e75b5c4b5ad48f0398e089721b90b36fa5c9976f4cec2acb16bb7d88. Read-only PROD/DEV object inspection. Rollback rehearsals are db04-reported, not rerun. App validation/message, post-apply, and authenticated Alta path NOT EXERCISED; not full 796 clearance.","outcome":"pass","evidence":"audit-mba-l-ca | 2026-10-14 10:56 ART. PASS for this DB artifact: exact hash verified; it drops only trg_vehiculos_reject_dominio_no_rutap and its function with RESTRICT; no snapshot DML. Read-only PROD/DEV inspection confirmed installed function hashes (prosrc 78c05a65, functiondef 81228865), target trigger enabled, and archive/soft-delete/normalization triggers, validated plate/serial/origin/FK constraints, and active-domain unique index present; snapshot heads 12/22. db04 reports default-ROLLBACK PROD→DEV accepted non-book Alta and rejected duplicate domain, invalid format, missing serial, bad origin; not rerun. Caveat: five INSERT attempts omit IDs, so nextval advances despite rollback (including when apply=true); current last_value/max(id)=7108/7103 PROD, 6910/6903 DEV, but no pre-run sequence baseline, so delta unmeasured. PROD has no VIN unique index; migration removes no VIN-specific protection.","reportRef":null}
  • coder04-mba-l-ca progress · 2d ago
    App diff ready for audit, no DB edit: src/services/vehiculos.ts SHA256 3c64ce73ce16f27b2bc48b25602f3aa65199655d6ff1a989f512278fc12564b1; tools/tests/colectivo-expediente.test.cjs SHA256 8abf8937cb4e803b81793c2cf98fe3a235e302d468d2fc3ee871d1840810937. No app RUTAP-membership precheck found in action/service/repository. createColectivo maps only PG 23514 whose message starts MOVILBA-306: to SERVICE_UNAVAILABLE with server-configuration copy; unrelated 23514 retains generic fallback. Focused tests inject a Drizzle-wrapped legacy trigger error and an unrelated CHECK error. git diff --check clean. Lint/typecheck/tests deliberately left to audit per AGENTS.md; no authenticated Alta/browser/DB exercise from this lane.
  • db04-mba-l-ca verified · 2d ago
    DB leg APPLIED 2026-10-14 after audit's scoped PASS on SHA256 1b7a3d42e75b5c4b5ad48f0398e089721b90b36fa5c9976f4cec2acb16bb7d88. Same bytes, PROD then DEV, each psql -v apply=true rc0/COMMIT; positive non-book app Alta and four negative integrity controls fired. Fresh independent post-COMMIT: function absent=true, 306 membership trigger count=0, 4 other enabled noninternal vehicle triggers, 4 named format/serial/origin checks, active-domain unique index=1, fixture rows=0, snapshot heads unchanged 12 PROD/22 DEV. Both /api/health status ok serviceId 35161. Rollback rehearsals earlier advanced vehicle ID sequences via nontransactional nextval; no reset attempted. App diff and real AI545CO Alta not yet exercised; ticket not closed.
  • audit-mba-l-ca audited · 2d ago
    audit pass: App code only: exact frozen hashes; node test 25/25, test:source 73/73 across 47 files, pnpm typecheck PASS, targeted ESLint service PASS (.cjs ignored), diff-check PASS. No live Alta or DB behavior exercised.
    payload
    {"scope":"App code only: exact frozen hashes; node test 25/25, test:source 73/73 across 47 files, pnpm typecheck PASS, targeted ESLint service PASS (.cjs ignored), diff-check PASS. No live Alta or DB behavior exercised.","outcome":"pass","evidence":"Service maps only PG 23514 with MOVILBA-306: message prefix to SERVICE_UNAVAILABLE; separate 23514 constraint remains generic. Action-level tests assert user message/requestId/no writes and generic fallback. Hashes match coder04 request. DB leg separately applied per db04; this PASS is app-code review, not ticket closure.","reportRef":null}
  • coder04-mba-l-ca progress · 2d ago
    Corrective app repin after deploy precheck found shared checkout 4 commits behind dev/dev: old 793 branch on new base mapped exact MOVILBA-306 snapshot rejection to VALIDATION_FAILED with explicit wait-for-import copy; first PASS on 042b502e cannot ship because older branch would win. No deploy/commit occurred. Fast-forwarded checkout to c29a096c under lock after parking 34 entries; 32 dirty/untracked remain, and pre-park hashes match for every path except the two deliberately revised app files. New service SHA256 fcd1c8026cceaf0fd9e3cd0d18ecd46eb2fb008db9be1c9eb69a92408e542d8d replaces 793 mapping with SERVICE_UNAVAILABLE; test SHA256 3ff58719da6e42696fbe42e86cbedb38a8251b672afc0b8c3ef483b94900fb17 seeds exact prior regex text including snapshot 21, so it discriminates old copy. git diff --check rc0. Audit re-verdict required on these bytes/base. No live/authenticated Alta from coder lane.
  • audit-mba-l-ca audited · 2d ago
    audit fail: Pre-correction c29a096c app behavior only: current corrective harness failed the legacy MOVILBA-793 wait-for-import response assertion (24/25). No DB retest.
    payload
    {"scope":"Pre-correction c29a096c app behavior only: current corrective harness failed the legacy MOVILBA-793 wait-for-import response assertion (24/25). No DB retest.","outcome":"fail","evidence":"Control loaded src/services/vehiculos.ts from git c29a096c in-memory while running the new test file; exit 1, exactly one failure: expected server-configuration copy, received old 'esperá ... importación' copy. This demonstrates the stale-base integration mismatch; superseded by the corrective hashes, not a finding against current bytes.","reportRef":null}
  • audit-mba-l-ca audited · 2d ago
    audit pass: Corrective app bytes only: hashes verified; focused node test 25/25; test:source 73/73 across 47 files; pnpm typecheck and service ESLint pass; diff-check pass. ESLint ignores .cjs. No live Alta/DB exercise.
    payload
    {"scope":"Corrective app bytes only: hashes verified; focused node test 25/25; test:source 73/73 across 47 files; pnpm typecheck and service ESLint pass; diff-check pass. ESLint ignores .cjs. No live Alta/DB exercise.","outcome":"pass","evidence":"On base c29a096c, exact service/test hashes fcd1c802…d8d and 3ff58719…fb17. The old MOVILBA-793 wait-for-import branch is replaced, not shadowed; the in-memory preimage control failed 24/25 on that response. Current focused test passes; unrelated 23514 constraint remains generic. DB leg already separately audited/applied; this PASS is app delta only, not ticket closure.","reportRef":null}
  • coder04-mba-l-ca progress · 2d ago
    Corrected app candidate copied byte-for-byte into release clone /home/rob/Documents/work/gcaba/movilba-web-worktrees/coder03-mba-l-ca/movilba-793-release at HEAD c29a096c under two exact file locks, both released. Clone service SHA256 fcd1c8026cceaf0fd9e3cd0d18ecd46eb2fb008db9be1c9eb69a92408e542d8d, test SHA256 3ff58719da6e42696fbe42e86cbedb38a8251b672afc0b8c3ef483b94900fb17, identical to corrected shared checkout. diff-check rc0; 2 files only. The prior PASS covered old pins/preimage and is not ship authority for this candidate. Corrective audit requested; no commit/deploy. SQL artifact in clone untouched.
  • coder03-mba-l-ca note · 2d ago
    Stakeholder reproduction, reported 2026-10-14: while creating an Alta on dev01 v5.6.250, request d3039ea5-5c1b-4cd2-a203-04f9624fcd6a at 2026-10-14T13:26:31.002Z /vehiculos/agregar/colectivo displayed: 'El dominio no figura en el libro RUTAP cargado en la app. Verificá que esté escrito correctamente; si ya está en el libro aprobado, esperá a que se complete la importación antes de dar el alta.' Reporter additionally says modifying an Alta to Baja works correctly. Product ruling: daily Alta must NOT wait for the RUTAP import. DB fix applied PROD+DEV; app v5.6.251 deploy and real Alta retry are in progress. Do not close on deploy alone.
  • coder03-mba-l-ca progress · 2d ago
    DB membership trigger removed and fresh-verified PROD+DEV; app v5.6.251 committed as dev 19bed48d and PROD merge 549b98bf, both health/freshness gates passed. OpenShift pod deploy is in progress; authenticated AI545CO DEV creation result is pending. Do not close on code/DB deploy alone.
  • coder03-mba-l-ca progress · 2d ago
    App corrective integration passed focused audit (service fcd1c802, test 3ff58719) and shipped as v5.6.251: DEV commit 19bed48d and PROD merge 549b98bf passed health/freshness. Pod source mirror pushed; Tekton EventListener accepted HTTP 202, live pod build not yet verified. Elazar elected to perform the DEV AI545CO Alta test himself; proxy canceled. Waiting for immediate read-only duplicate check before telling him to submit.
  • coder03-mba-l-ca progress · 2d ago
    Elazar reports successful authenticated DEV creation of ZAA987 at https://dev01.movilba.com/vehiculos/ZAA987 after v5.6.251 deployment. db04 and audit are performing fresh independent read-only checks of saved vehicle/VDC/ALTA history and decisive absence from installed RUTAP snapshot22 before final closure. All three app surfaces now serve patch 251 (pod serviceId 35298).
  • audit-mba-l-ca audited · 2d ago
    audit pass: DEV persisted-state proof only: SELECTs in a READ ONLY transaction on movilba_dev. Snapshot22 absent; linked active app_dev vehicle/VDC and active app ALTA history verified. No DB write or direct browser trace.
    payload
    {"scope":"DEV persisted-state proof only: SELECTs in a READ ONLY transaction on movilba_dev. Snapshot22 absent; linked active app_dev vehicle/VDC and active app ALTA history verified. No DB write or direct browser trace.","outcome":"pass","evidence":"Latest rutap.snapshots row: id22, 2026-10-13-1056-parque-rutap.xlsx, md5 1d2973486774a44ca6a2e9d27b514d7c; raw nro_dominio ZAA987 matches=0. No normalized imported row; exactly one active app history row id617976, vehicle_id6916, rutap_snapshot_id NULL, estado_id116=>ALTA, tramite_id317, fecha_alta 2026-08-08 and expediente EX-2026-09912345-GCABA-DGGSM. Active vehiculos id6916 and VDC id6804 both origin app_dev; VDC canonical state ALTA, interno987, matching expediente; all three rows created 2026-10-14 11:16:57.217311. VDC legacy vigencia dates are NULL, consistent with MOVILBA-242 making history canonical. Elazar reports authenticated create; audit did not capture HTTP response/request ID. PASS: this reproduces and confirms the target persisted state; not a claim about all future app writes.","reportRef":null}
  • coder03-mba-l-ca completed · 2d ago
    Resolved: PROD+DEV DB membership guard removed and verified; app v5.6.251 serves PROD, DEV, POD (serviceId 35298). Elazar created ZAA987 via authenticated DEV form. db04 and audit independently verified exactly one active app_dev vehicle/VDC, current app-origin ALTA history with snapshot NULL, and zero ZAA987 rows in installed snapshot22. Audit recorded target-case persistence PASS at 2026-10-14T14:21:12Z. No workbook read is needed for creator identity; separate creado_por account attribution check remains in progress and will be scoped separately if defective.
  • coder03-mba-l-ca verified · 2d ago
    Post-closure creator attribution, DEV SELECT-only by db04: ZAA987 vehicle 6916, VDC 6804, and app history 617976 all have non-NULL creado_por equal to the same public.users account belonging to Elazar (3/3), with shared creado_en 2026-10-14 11:16:57.217311 ART. No workbook read and no writer fix needed.
  • audit-mba-l-ca audited · 2d ago
    audit pass: Reviewed fresh DEV SELECT-only persisted-state evidence for ZAA987; no independent DB query or direct browser trace in this pass.
    payload
    {"scope":"Reviewed fresh DEV SELECT-only persisted-state evidence for ZAA987; no independent DB query or direct browser trace in this pass.","outcome":"pass","evidence":"PASS: evidence identifies zero snapshot22 rows and exactly one active app_dev vehicle (id6916), one active VDC ALTA (6804), and one active app ALTA/current_rank1 history row (617976, snapshot NULL, no baja), all linked to ZAA987. This establishes the requested saved Alta state; browser submission is reported by Elazar, not independently observed here.","reportRef":null}
  • audit-mba-l-ca audited · 2d ago
    audit pass: Persisted-state proof, including creator attribution; reviewed reported DEV SELECT evidence, not independently queried DB or observed browser submission.
    payload
    {"scope":"Persisted-state proof, including creator attribution; reviewed reported DEV SELECT evidence, not independently queried DB or observed browser submission.","outcome":"pass","evidence":"PASS. ZAA987 is absent from snapshot22 and has one active app_dev vehicle (6916), one active VDC ALTA (6804), and one current app ALTA history row (617976). The follow-up BWI measurement reports non-NULL creado_por on all three rows linked to Elazar's same public.users account, with shared creation time 11:16:57.217311 ART. Attribution is reported evidence, not independently remeasured here.","reportRef":null}
bug
2d ago by coder03-mba-l-ca
2d ago
2026-10-14 14:21