Add source: sejm_interpellations — 10th-term written Q&A

#24
Fabryka AI org
•
edited 10 days ago

Summary

  • Adds sejm_interpellations: 25,950 documents / 28,180,895 cl100k-proxy tokens of 10th-term Sejm interpellations, written questions, and HTML ministry replies (2023-11-15 – 2026-09-03).
  • Same API and kadencja as shipped sejm_api, written register, not floor speeches. Not a duplicate of #16 or #18.
  • Scoped to this source (release: None): data files, datasheet, registry entry, contract test, one findings entry. README / CHANGELOG / version bump are left to the release commit.

Provenance and license

  • Origin: Sejm API HTML /body endpoints (interpellations, writtenQuestions, term 10). Fetcher: src/fetch_sejm_interpellations.py.
  • License: public-domain (official documents) — Polish Copyright Act art. 4 pkt 2 + Open Data Act arts. 2(12), 5, 14, 17. Same basis as sejm_api.
  • Term 9 listed X-Total-Count: 0 at fetch time. Terms 7–8 were not fetched (PPC already covers interpellations through 2019).
  • PDF-only replies (onlyAttachment: true) and keyless stubs skipped. Header chrome stripped into meta. scrub_pii from #20 ran before jsonl write; a NERGAL pass is required before release.
  • Build: read 26,503 → drop 553 exact dups → 25,950. Every row has a signatory/minister author.

Sample (verbatim, with metadata)

Question:

id: sejm_interpellations_2388
source: sejm_interpellations
added: 2026-07-19
created: 2023-11-15, 2026-09-03
token_count: 415
license: public-domain (official documents)
author: Daniel Milewski

Szanowny Panie Ministrze,

latem 2022 roku na podlaskiej części granicy z Białorusią ukończono zaporę fizyczną, czyli 5,5-metrowy płot ze stalowych przęseł zwieńczony drutem żyletkowym. Ogrodzenie stoi na 186 kilometrach. Bariera elektroniczna obejmuje również te odcinki, gdzie go nie ma, czyli część wód granicznych.

Co jest prawdą, jeśli chodzi o zapewnienie bezpieczeństwa naszego kraju na granicy z Białorusią? […]

Reply:

id: sejm_interpellations_20
source: sejm_interpellations
added: 2026-07-19
created: 2023-11-15, 2026-09-03
token_count: 608
license: public-domain (official documents)
author: sekretarz stanu w Ministerstwie Spraw Zagranicznych Władysław Teofil Bartoszewski

Szanowny Panie Marszałku,

w odpowiedzi na zapytanie poselskie nr 3472 pana posła Bronisława Foltyna w sprawie Instytutu Polskiego w Szwajcarii, uprzejmie informuję, co następuje.

Ministerstwo Spraw Zagranicznych planuje rozwój sieci Instytutów Polskich w oparciu o priorytety polskiej polityki zagranicznej oraz strategiczne interesy państwa. […]

Test plan

  • python3 -m unittest src/test_sejm_interpellations_contract.py (8 tests, incl. parquet schema/stats checks)
  • Reviewer: texts are written Q&A / ministry prose, not stenograms
  • Reviewer: no overlap claim vs #16 / #18 / PPC
ppuzio changed pull request status to open
Fabryka AI org

Review against AGENTS.md ("What the PR must show", "Normalize the text before you build"). Needed before merge:

  1. Keep the PR to this source. Drop the v0.2.6 release bookkeeping (CHANGELOG, README totals, VERSION/RELEASE_DATE) — it goes into one maintainer release commit after merges.
  2. Unexplained shared diffs. The AGENTS.md and build_dynaword.py edits and the 464-line artifacts/source_findings.md diff look like stale-branch drift — rebase and keep only this source's findings entry.
  3. PII. scrub_pii from #20 predates #38. Interpellations name private constituents — needs a NERGAL pass before release.
  4. Before/after excerpt of the header-chrome stripping.
  5. Inclusion + caveat. One sentence on what written Q&A adds beyond "not a duplicate", and caveats (single term, private citizens named).

Review addressed — delivered as PR #43 with one clean commit 4799a43 on main @ 34e7ea3, exactly 4 files, +172 / −0: data/sejm_interpellations/{sejm_interpellations.md, sejm_interpellations.parquet, sejm_interpellations.stats.json} + a single appended artifacts/source_findings.md entry. Permissions note: PR refs are author-scoped — this account cannot push to refs/pr/24 (git: "Forbidden to push on refs/pr/24"), cannot edit your description (API 403), and plain branches are rejected here (pre-receive hook declined); hence the separate PR. Merging #43 lands the fix and closes these items (then #24 can be closed as superseded), or you can fast-forward refs/pr/24 to 4799a43 and merge here. Point by point:

  1. Release bookkeeping dropped. The branch has no CHANGELOG / README / VERSION / RELEASE_DATE / make_docs changes — that stays for the maintainer release commit. The old branch's whole-file sources.py rewrite, AGENTS.md, build_dynaword.py and 464-line findings drift are gone as well (the registry entry, src/fetch_sejm_interpellations.py and src/test_sejm_interpellations_contract.py are already on main in newer form — nothing touches them, so #28 cannot regress).
  2. Shared diffs dropped. artifacts/source_findings.md gets exactly one appended entry (sejm_interpellations — 10th-term written Q&A, 33 lines) on top of main's version of the file.
  3. PII. The datasheet (on the branch) now states which scrubber ran on the data — the scrub_pii pattern pass from #20 (phones → [Telefon]; e-mail / PESEL / NIP / REGON / IBAN → [PII]) — and that it predates #38: this shard must be re-run through SlayerLab/NERGAL before it is admitted to a release, since interpellations quote constituency casework naming private persons. Merge with release: None is fine meanwhile; names of public officials acting in capacity stay.
  4. Before/after of the header-chrome stripping (produced from a live /body endpoint through extract_body()/normalize_document()):
BEFORE (raw HTML, term10/interpellations/2388/body)

<!DOCTYPE html>
<html lang="pl">
<head>
<meta name="charset" content="utf-8">
<title>Interpelacja w sprawie budowy sieci Zielonych Targów</title>
</head>
<body>
<h1>Interpelacja nr 2388</h1>

    <p class="int-recipient">do ministra rolnictwa i rozwoju wsi</p>

    <p class="int-title">w sprawie budowy sieci Zielonych Targów</p>

    <p class="intAuthor">Zgłaszający: Dariusz Matecki, Michał Woś, Dariusz Stefaniuk, Sebastian Kaleta, Jan Kanthak, Marcin Romanowski, Norbert Jakub Kaczmarczyk</p>

    <p class="intDateTresc">Data wpływu: 25-03-2024</p>

    <p>W sobotę 9 września 2023 roku w Tarnowie odbyła się konwencja programowa Koalicji Obywatelskiej pod nazwą „100 Konkretów!”. […]

AFTER (shipped document text)

W sobotę 9 września 2023 roku w Tarnowie odbyła się konwencja programowa Koalicji Obywatelskiej pod nazwą „100 Konkretów!”. Donald Tusk zapowiedział wówczas, że dzień po wygranych wyborach przystąpicie Państwo do realizacji 100 konkretów na pierwsze 100 dni rządów. W najbliższych dniach mija 100 dni Państwa rządów. […]

Niestety do dnia dzisiejszego obiecane przez PSL rozwiązania nie zostały wprowadzone w życie. Na jakim etapie jest realizacja poniższej obietnicy wyborczej? […]

The chrome (Interpelacja nr, recipient, title, signatories, date) moves to meta; the body prose stays verbatim.

  1. Inclusion + caveats. One sentence (now in the datasheet "Why include it"): this adds the written Q&A register — longer, formal, ministry-voiced replies and argumentative MP questions, a document type the corpus otherwise lacks entirely. Caveats spelled out: single term (10th, 2023-11-15 – 2026-09-03) and private citizens named in constituency casework (privacy section + NERGAL gate).

The inline data samples in the description stay as they were (question + reply, the #24 format); I re-verified both against the shard (sejm_interpellations_2388, sejm_interpellations_20).

Verification: python3 -m pytest src/test_sejm_interpellations_contract.py — 5 passed on the rebased tree (entry, fetcher and test are main's).

ppuzio changed pull request status to merged
ppuzio deleted the refs/pr/24 ref

Sign up or log in to comment