From 6ebd7aac7a31914d433904db89fbc591a33a08cc Mon Sep 17 00:00:00 2001 From: Dotty Dotter Date: Thu, 9 Apr 2026 11:49:17 +0200 Subject: [PATCH] Sub-B Ground-Truth: BW URL-Encoding + RP URL-Schema-Drift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Live-Run von Sub-Issue B im Container hat zwei Test-False-Positives in ground_truth.py aufgedeckt, die nichts mit Adapter-Bugs zu tun haben: - BW: PDF-URL kodiert den Underscore als %5F (`17%5F10323.pdf`), nicht als nacktes `_`. pdf_url_substring auf `17%5f10323` aktualisiert. - RP: PDFs werden von `dokumente.landtag.rlp.de` ausgeliefert (nicht von `opal.rlp.de` — das ist nur das Suchfrontend). Substring auf die Drucksachen-Nummer im Pfad (`11250-18`) umgestellt — robust gegen weiteren URL-Schema-Drift. 176 Unit-Tests bleiben grün. Refs: #52, #59 (Sub-B Live-Verifikation) Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/integration/ground_truth.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/ground_truth.py b/tests/integration/ground_truth.py index bd7940c..e2a61d4 100644 --- a/tests/integration/ground_truth.py +++ b/tests/integration/ground_truth.py @@ -87,13 +87,16 @@ GROUND_TRUTH: list[GroundTruth] = [ frontend_search_url="https://padoka.landtag.sachsen-anhalt.de/portal/", ), # ─── BW (PARLIS / portala-Variante) ───────────────────────────────── + # BW kodiert den Underscore in der PDF-URL als %5F (z.B. + # "17%5F10323.pdf"), deshalb ist das URL-Substring-Pattern hier + # %5F-getrennt — `17_10323` würde nicht matchen. GroundTruth( bundesland="BW", drucksache="17/10323", title_substring="Arbeitsbedingungen", expected_fraktionen={"GRÜNE"}, datum="2026-03-16", - pdf_url_substring="17_10323", + pdf_url_substring="17%5f10323", frontend_search_url="https://parlis.landtag-bw.de/parlis/", ), # ─── HH (ParlDok 8.x) ─────────────────────────────────────────────── @@ -137,13 +140,16 @@ GROUND_TRUTH: list[GroundTruth] = [ frontend_search_url="https://www.parlamentsdokumentation.brandenburg.de/portal/", ), # ─── RP (OPAL / portala) ──────────────────────────────────────────── + # PDFs werden vom Landtag von `dokumente.landtag.rlp.de` ausgeliefert, + # nicht von `opal.rlp.de` (das ist nur das Suchfrontend). Substring auf + # die Drucksache-Nummer im Pfad — robust gegen weitere URL-Drift. GroundTruth( bundesland="RP", drucksache="18/11250", title_substring="Bildungschancen", expected_fraktionen={"GRÜNE", "SPD", "FDP"}, datum="2025-01-23", - pdf_url_substring="opal.rlp.de", + pdf_url_substring="11250-18", frontend_search_url="https://opal.rlp.de/portal/", ), ]