fleet-platform/db/migrations
kianiadee 0f91668256
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions
Contract checker (#13, PRD F1.10) + contract_drift_days SLO
Migration 18: ops.contract_check_log table — append-only log of probes
against the Tracksolid Pro endpoints we depend on.

New worker app/workers/contract_check.py — per run:
  - jimi.oauth.token.get   (token refresh succeeds)
  - jimi.user.device.location.list per configured target (parse first item
    with JimiPollFix)
  - jimi.device.location.get with a sample IMEI from the list (parse first
    item with JimiPollFix)
Each probe logs success or {error_class, error_detail, sample}; failures
are recorded, not raised.

slo_metrics now also computes contract_drift_days = days since the most-
recent successful probe of the laggard endpoint. With threshold 1d (from
mig 5), a single failed daily run flips the badge red within 24h.

cron entrypoint registers the check daily at 02:00 UTC plus once on
startup, gated on TRACKSOLID_APP_KEY + a configured target.
2026-05-27 11:58:29 +03:00
..
20260601000001_init_schemas.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000002_events.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000003_domain.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000004_state_live.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000005_slo.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000006_auth.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000007_serve_fn_live_view.sql Phase 1 — foundation, push gateway, parser, projector, live view, frontend 2026-05-23 00:53:42 +03:00
20260601000008_live_positions_richer.sql UI: arrow + plate-short label + cost-centre marker palette + hover popup; richer state.live_positions + serve.fn_live_view v2; multi-target poll plumbing 2026-05-23 09:29:04 +03:00
20260601000009_serve_fn_live_view_v2.sql UI: arrow + plate-short label + cost-centre marker palette + hover popup; richer state.live_positions + serve.fn_live_view v2; multi-target poll plumbing 2026-05-23 09:29:04 +03:00
20260601000010_geocoded_positions.sql Geocoder: cron job + state.geocoded_positions; label uses device_name last 4 (fallback plate); popup address row 2026-05-23 23:06:25 +03:00
20260601000011_serve_fn_live_view_v3.sql Geocoder: cron job + state.geocoded_positions; label uses device_name last 4 (fallback plate); popup address row 2026-05-23 23:06:25 +03:00
20260601000012_label_short_from_plate.sql Migration: serve._label_short() extracts plate-tail (handles 'Driver - KDW 573B_cam' patterns) 2026-05-23 23:11:20 +03:00
20260601000013_driver_from_device_name.sql _driver_name: also exclude garage/workshop/service placeholders 2026-05-23 23:16:17 +03:00
20260601000014_real_plates_consolidate.sql Plate consolidation migration + projector links new devices to existing plates; SLO measurement worker (task #12) 2026-05-23 23:42:45 +03:00
20260601000017_rollback_csv_import.sql Rollback CSV roster import (mig 17): re-split vehicles, drop CSV columns 2026-05-25 00:41:32 +03:00
20260601000018_ops_contract_check_log.sql Contract checker (#13, PRD F1.10) + contract_drift_days SLO 2026-05-27 11:58:29 +03:00