metalfrom.eu/apps/api/migrations
Nicolas Fryder 2b871584e9 feat(admin): observabilité & provenance du géocodage + fix parser
Objectif: pouvoir debugger la fiabilité des données depuis l'admin.

Parser
- fix split "and": _CITY_SPLIT ne coupe plus sur " and "/"&" (cassait
  "Tyne and Wear", "Bosnia and Herzegovina", "Newcastle upon Tyne"). Garde
  uniquement "/" et "\" (séparateurs canoniques Metal Archives).

Traçabilité LLM
- migration 011: llm_cache reçoit ma_id + location_raw + country (+ index) pour
  relier chaque appel Groq au groupe déclencheur
- groq_worker: renseigne ces colonnes à l'insertion

Admin — lecture par groupe
- GET /admin/api/bands/:ma_id renvoie désormais aussi les band_locations (steps,
  statut, provider, confiance, coords, essais, erreur, query) et les appels LLM
  (modèle, extraction, tokens, coût, prompt/réponse)
- modal band: section "Provenance & géocodage" (crawl MA / géocodage / LLM +
  champs verrouillés manuels)

Admin — stats & debug LLM
- GET /admin/api/geocoding: breakdown par provider (avg confiance) + par modèle
  LLM (dont city=null); nouvelle carte "LLM null"
- nouveau GET /admin/api/llm + onglet "LLM": liste filtrable des appels Groq,
  prompt/réponse dépliables, lien vers le groupe

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:10:18 +02:00
..
001_initial_schema.sql feat(db): système de migrations SQL + refonte schéma 2026-06-27 15:09:35 +02:00
002_add_missing_columns.sql feat(db): système de migrations SQL + refonte schéma 2026-06-27 15:09:35 +02:00
003_geocode_tables.sql feat(db): système de migrations SQL + refonte schéma 2026-06-27 15:09:35 +02:00
004_crawl_tracking.sql feat(db): système de migrations SQL + refonte schéma 2026-06-27 15:09:35 +02:00
005_fix_checkpoints_and_data.sql fix(crawler): FlareSolverr persistent sessions + DB data field + scraper schema 2026-06-30 20:29:33 +02:00
006_admin_dashboard.sql feat(admin): dashboard admin complet (auth forte, API, monitoring) 2026-06-30 22:15:13 +02:00
007_locked_fields_and_jobs.sql feat: locked_fields, genres splittés, conflits, géocodage, jobs dashboard 2026-06-30 23:06:20 +02:00
008_band_locations.sql fix(geocoder): band_locations.ma_id en BIGINT — débloque 62k bands 2026-07-02 19:47:30 +02:00
009_band_locations_bigint.sql fix(geocoder): band_locations.ma_id en BIGINT — débloque 62k bands 2026-07-02 19:47:30 +02:00
010_band_locations_geom.sql feat(map): carte multi-localisations — un point par step géocodé 2026-07-02 19:52:40 +02:00
011_llm_cache_linkage.sql feat(admin): observabilité & provenance du géocodage + fix parser 2026-07-02 20:10:18 +02:00