fleettickets/docs
david kiania bb38d354e5 fix(geocode): precise location geoms survive delta re-upserts (FT-BUG-01)
The tg_ticket_geom trigger resolved feed coords -> cluster centroid -> none,
never consulting tickets.geo_locations, so every 20-min delta ingest re-upserted
changed rows and downgraded previously-resolved 'location' geoms back to the
cluster centroid. Live effect: only 51 of 114k INC (and 0 of 42k CRQ) rows kept
the precise geocode the LocationIQ budget paid for.

- migration 18: trigger now resolves feed -> geo_locations (precise) -> cluster
  -> none, mirroring resolve_ticket_geoms() precedence; ends with one resolve
  pass to repair the backlog. Dry-run against the live DB (rolled back) repaired
  7,481 rows: INC location 51 -> 5,339, CRQ 0 -> 2,193.
- pipeline.ingest(): re-resolve after every applied run that ingested files, so
  geoms self-heal even before migration 18 lands.
- run_ingest.sh: chain an incremental --geocode-clusters pass (0 API calls when
  no new clusters) so new clusters map without a manual command (FT-BUG-02).
- Dockerfile/.dockerignore: pinned installs from uv.lock, non-root user (FT-SEC-02).
- 20260618_bug.txt removed (stale review of a since-rewritten file).

Numbered 18 to coexist with 17_drop_unused_geo_indexes.sql (parallel 260702
change). Audit + plan + work log in docs/260702_*. Local only; not applied to prod.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 09:47:15 +03:00
..
260702_audit_report.md fix(geocode): precise location geoms survive delta re-upserts (FT-BUG-01) 2026-07-02 09:47:15 +03:00
260702_fix_plan.md fix(geocode): precise location geoms survive delta re-upserts (FT-BUG-01) 2026-07-02 09:47:15 +03:00
260702_work_done.md fix(geocode): precise location geoms survive delta re-upserts (FT-BUG-01) 2026-07-02 09:47:15 +03:00
dashboard-api-contract.md docs: dashboard_api endpoint contract for fn_inc_dashboard (handoff) 2026-06-16 01:13:09 +03:00
deployment-and-operations.md fix(crq): migration 15 creates tickets.crq (live DB never materialized it) 2026-06-25 23:55:17 +03:00
implementation.md fix(crq): migration 15 creates tickets.crq (live DB never materialized it) 2026-06-25 23:55:17 +03:00
phase-1-ingestion.md feat(crq): add CRQ ingestion via shared engine + thin inc/crq entrypoints 2026-06-25 23:16:38 +03:00
phase-2-dashboard.md docs: add docs/ — phase-1/phase-2 PRDs + implementation record 2026-06-16 01:05:18 +03:00