Pipeline & provenance
SA Policy Space claims to be a research tool. Research tools earn that word by showing their work. This page is that work — every step from raw PMG committee record to what you see on an idea page, plus the scripts that run the pipeline and the tests that catch drift.
Snapshot generated 2026-05-11 · latest PMG meeting indexed 2026-05-08 · earliest 1998-03-15.
scripts/update_meetings.py pulls new committee meetings and associated documents from the Parliamentary Monitoring Group API for every tracked committee (scripts/committee_catalog.py). Weekly cron at 06:00 UTC Monday.
Each meeting is scored against the current idea set by token overlap + binding-constraint match + committee match. Meetings that don't match any existing idea are checked for new-idea signal (keyword density + committee fit).
Meetings above the auto-link threshold are linked to ideas directly in Supabase. Medium-confidence matches are written to a migration SQL and opened as a PR for a human (Laurence) to review. Residual ambiguous items go into a GitHub issue queue. See docs/PMG_AUTO_PIPELINE.md.
Supabase is dumped to data/pmg_snapshot.json (committed), covering all policy ideas, plans, comparisons, and the subset of meetings + documents linked to ideas. The snapshot seeds dev.sqlite3 for local dev and CI, so local/prod parity is enforced.
Every CI run asserts that public-facing counts (README, layout metadata, OG image, OpenAPI) match the committed snapshot. If Supabase grows past what the site claims, the build fails and forces reconciliation.
Same pipeline feeds the weekly editorial briefing (draft auto-generated from the snapshot diff, human-edited, published as MDX at /briefings/<week>).
/api/v1/. Inputs are zod-validated; every response uses the { version, data, meta } envelope.Every claim on the site is traceable to a source. Here's how to verify the most-common categories:
__tests__/data/readme-claims.test.ts suite asserts README / metadata / OpenAPI counts match the committed snapshot. If any of them drift past a threshold, the build fails — check recent Actions runs.__tests__/parity/backend-parity.test.ts run against both backends in CI and assert the results match. Catches the "query-behaviour divergence" class of bug before it ships.python scripts/dump_supabase_snapshot.py rebuilds the snapshot from scratch. The diff against the committed copy should be empty (mod timestamps).APA
Wilse-Samson, L. (2026). SA Policy Space: A Database of South African Reform Ideas. NYU Wagner School of Public Policy. https://sa-policy-space.vercel.app
When citing a specific idea or briefing, include the URL and the snapshot date shown on the page footer. Each issue of Briefings carries Article JSON-LD and a stable permalink for citation.