gwoe-antragspruefer/tests
Dotty Dotter 5559f42c92 feat(#138): SHA-Lock-File schuetzt vor stillem PDF-Tausch
Hintergrund: abgeordnetenwatch hatte das CDU-BE-2023-PDF unter dem alten
Slug-Namen gegen das CDU-BE-2026-Wahlprogramm ersetzt — ohne den
Datei-Namen zu aendern. Die Embedding-Indexierung haette das anachronistische
Programm uebernommen, ohne dass es jemand bemerkt.

Loesung: app/wahlprogramm-shas.lock.json pinnt nach erstem erfolgreichen
Download den SHA-256 jedes Programmes. Spaetere Aufrufe von
fetch_and_verify() vergleichen den Server-Inhalt gegen den Lock; bei
Abweichung wird abgebrochen mit klarer Fehlermeldung. Nur mit explizitem
Maintainer-Override (--accept-new-sha) wird der Lock aktualisiert.

CLI:
  python -m app.wahlprogramm_fetch --pin-existing
    seedet den Lock einmalig aus den vorhandenen PDFs (52 Eintraege).
  python -m app.wahlprogramm_fetch --fetch BL PARTEI [--accept-new-sha]
    laedt mit Lock-Pruefung; --accept-new-sha bei bewusstem Update.

6 neue Tests in test_wahlprogramm_fetch.py decken den Pferdetausch-
Block, das initiale Pinnen, das Migration-Szenario (PDF da, Lock leer)
und den --accept-new-sha-Override ab.

Closes #138
2026-04-28 01:58:42 +02:00
..
e2e test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
integration Sub-B: NRW Sample 10/5376 — F.D.P.+CDU CO2-Minderungsprogramm 1990 2026-04-09 13:43:17 +02:00
__init__.py Add pytest suite + fix two regex bugs uncovered by it (#46) 2026-04-08 23:26:06 +02:00
conftest.py Add pytest suite + fix two regex bugs uncovered by it (#46) 2026-04-08 23:26:06 +02:00
test_abgeordnetenwatch.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_abonnement_repository.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_analyzer.py Add pytest suite + fix two regex bugs uncovered by it (#46) 2026-04-08 23:26:06 +02:00
test_antrag_repository.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_auswertungen.py Phase G: BundestagAdapter via DIP-API (#56) 2026-04-09 14:04:11 +02:00
test_auth.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_bewertung_repository.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_bug_regressions.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_bundeslaender.py Phase J: SN EDAS-XML-Adapter (#26/#38) — Sachsen aktiv via XML-Export 2026-04-09 14:39:03 +02:00
test_clustering.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_database.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_domain_behavior.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_drucksache_typen.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_embeddings_v3_v4.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_embeddings.py Hybrid-Zitate: verified/unverified statt drop + UI-Labels 2026-04-10 21:45:36 +02:00
test_endpoints_smoke.py Tests: 8 Endpoint-Smoke-Tests (queue, auth, programme, health) 2026-04-10 20:09:34 +02:00
test_feedback_endpoint.py feat(v2): Feedback-Widget mit Audit-Trail + Screenshot + direkter Gitea-Anbindung 2026-04-28 01:00:44 +02:00
test_llm_bewerter.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_mail.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_main_validators.py Phase A: Audit-Restbefunde #57.3/4/7 (Roadmap #59) 2026-04-09 11:15:16 +02:00
test_monitoring.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_parlamente.py fix(#142): SL HTTP 5xx als Fehler raisen statt return [] 2026-04-28 01:46:35 +02:00
test_parteien.py Phase B: Parteinamen-Mapper #55 (Roadmap #59) 2026-04-09 11:22:13 +02:00
test_queue.py Tests: 5 queue-Tests (enqueue, position, overflow, status) 2026-04-10 19:08:59 +02:00
test_redline_parser.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_report.py Security hotfixes #1, #2, #6 from audit (#57) 2026-04-09 10:45:43 +02:00
test_wahlprogramm_check.py test: 467 -> 574 Tests (+107) — DDD, abgeordnetenwatch, monitoring, v2, Bug-Regressions 2026-04-25 20:55:57 +02:00
test_wahlprogramm_fetch.py feat(#138): SHA-Lock-File schuetzt vor stillem PDF-Tausch 2026-04-28 01:58:42 +02:00
test_wahlprogramme.py Add pytest suite + fix two regex bugs uncovered by it (#46) 2026-04-08 23:26:06 +02:00