Skip to content

Add experimental APIs: regional tailoring, one‑page briefing, and rapid issue response#1

Closed
letskickk wants to merge 1 commit into
mainfrom
codex/generate-ideas-for-political-platform
Closed

Add experimental APIs: regional tailoring, one‑page briefing, and rapid issue response#1
letskickk wants to merge 1 commit into
mainfrom
codex/generate-ideas-for-political-platform

Conversation

@letskickk

Copy link
Copy Markdown
Owner

Motivation

  • Provide lightweight, experimental tools to help candidate campaigns and small policy teams: A) 지역 맞춤 공약 보완, B) 후보 캠프용 1페이지 브리핑, D) 신속 이슈 대응 템플릿.
  • These features are intended as advisory/templating (not central approval) and should be safe to expose under an experimental API namespace.

Description

  • Added region profiling and tailoring logic (_region_profile, _build_tailor_tip) and new Pydantic models for responses: RegionalTailorItem, RegionalTailorResponse, OnePageBriefingResponse, RapidIssueRequest, and RapidIssueResponse in backend/main.py.
  • Implemented three experimental endpoints: GET /api/experimental/candidates/{candidate_id}/regional-tailor, GET /api/experimental/candidates/{candidate_id}/briefing, and POST /api/experimental/issues/rapid-response which return structured recommendation/briefing/rapid-response templates derived from existing candidate data.
  • Added focused unit tests tests/test_experimental_features.py that mock get_candidate_detail and validate output shapes and key strings.

Testing

  • Ran PYTHONPATH=. pytest -q tests/test_experimental_features.py and it passed (3 passed).
  • Attempted PYTHONPATH=. pytest -q tests/test_candidates_api.py to run existing candidate API tests and it failed in this environment (several failures related to API parameter handling and DB constraints in the test harness), which appear unrelated to the new experimental endpoints.
  • The new endpoints are covered by the added tests and validated to return the expected structures in the test environment.

Codex Task

@letskickk letskickk force-pushed the codex/generate-ideas-for-political-platform branch from 473260e to 5578125 Compare June 1, 2026 00:13
@letskickk letskickk closed this Jun 1, 2026
@letskickk letskickk deleted the codex/generate-ideas-for-political-platform branch June 1, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant