Skip to content

[EPAC-2153]: add MP lobbying exposure endpoint#716

Merged
github-actions[bot] merged 1 commit into
mainfrom
symphony/epac-2153-loadmplobbyingexposure-backend-aggregate-query-m
Jun 3, 2026
Merged

[EPAC-2153]: add MP lobbying exposure endpoint#716
github-actions[bot] merged 1 commit into
mainfrom
symphony/epac-2153-loadmplobbyingexposure-backend-aggregate-query-m

Conversation

@riddim-developer-bot

Copy link
Copy Markdown
Contributor

Summary

  • Adds the LoadMPLobbyingExposure use case, domain models, Postgres repository, precompute read models, and Lambda route for GET /api/v1/members/{id}/lobbying-exposure.
  • Adds MP lobbying timeline, summary, and subject-breakdown migration tables with OpenAPI, deployment manifest, and architecture catalog updates.
  • Adds coverage for populated/empty MPs, 50-row pagination, window filters, handler parsing, and repository refresh/load behavior.

Verification

  • go test ./... (backend/lobbying)
  • go test ./... (backend/openapi)
  • scripts/ci/check_go_dependency_rule.sh
  • scripts/ci/check_catalog_drift.sh
  • jq empty backend/manifest/deployment-services.json
  • jq empty backend/openapi/openapi.json
  • go test -tags=integration ./... (backend/lobbying)
  • go test -tags=integration -run TestPostgresMPLobbyingRepositoryRefreshesAndLoadsExposure -v ./repository (skipped locally: DATABASE_URL not set; CI should exercise it when a database is configured)

Acceptance Criteria

  • MPLobbyingSummary aggregate precomputed per MP per quarter/window with total communications, unique organizations, most frequent subject, top 3 organizations, and previous-Parliament trend.
  • GET /members/{member_id}/lobbying-exposure and /api/v1/members/{id}/lobbying-exposure return summary plus 50-row paged timeline.
  • Timeline rows include date, organization + sector, subject matter, communication type, high-confidence bill cross-reference only, OCL citation, and source URL.
  • Subject breakdown returns all subject counts for charting.
  • Party and national averages are computed from the current-Parliament cohort during quarterly summary refresh.
  • Empty MPs return HTTP 200-compatible empty arrays and zero-count summary.
  • Human Handoff issue includes: Spot-check 5 MPs' Lobbying exposure endpoint against OCL for accuracy.

Release-Note: Adds the MP lobbying exposure API endpoint backed by precomputed OCL summaries.

@riddim-developer-bot riddim-developer-bot Bot added the autonomous Enrolled in prconverged daemon for automated review and merge label Jun 3, 2026
@github-actions github-actions Bot enabled auto-merge (squash) June 3, 2026 07:26
@github-actions github-actions Bot merged commit 9aaa3ed into main Jun 3, 2026
53 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autonomous Enrolled in prconverged daemon for automated review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants