feat(voteballots): FEC adapter Phase 1 (Vote PoC Slice 1/6)#707
Merged
Conversation
Implements VOTE_POC_FEC_ADAPTER_PHASE1 slice with: - MockFECAdapter: Offline, no API key required for tests - CandidateRecord, CommitteeRecord, ContributionRecord data types - FECError/FECErrorType for structured error handling - WSP 97 confidence levels on all FEC-sourced records - Source provenance tracking via FECSource - Disambiguation support for ambiguous candidate names - Error simulation for testing rate limits, unavailable states Safety boundaries enforced: - NO_LIVE_API_REQUIRED_FOR_TESTS - NO_API_KEY_REQUIRED_FOR_TESTS - NO_HALLUCINATED_CANDIDATE_OR_FUNDING_CLAIMS Test coverage: 46 new tests (78 total voteballots tests passing) Audit: docs/audits/architecture/VOTE_POC_FEC_ADAPTER_PHASE1.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Foundup
added a commit
that referenced
this pull request
May 24, 2026
…PoC Phase 1 Slice 2 (#709) Implement entity resolution layer on top of FEC adapter from PR #707: - EntityResolutionStatus enum: EXACT_ONE_MATCH, MULTIPLE_MATCHES, NO_MATCH, ADAPTER_ERROR, INVALID_QUERY - EntityResolutionRequest: query with optional state/office/party/cycle hints - EntityResolutionResult: resolution outcome with confidence and disambiguation - resolve_candidate_entity(): core resolution with deterministic scoring - resolve_by_name(), resolve_by_id(): convenience functions Key behaviors: - AMBIGUITY_PRESERVED_NOT_GUESSED: returns all matches when ambiguous - NO_HALLUCINATED_CANDIDATE_IDS: only returns candidates from adapter - Deterministic ordering and confidence scoring (0.0-1.0) - Error propagation from adapter with clear status codes Test coverage: 70 new tests (116 total for voteballots module) Safety boundaries: NO_FUNDING_SUMMARY, NO_PERSUASION_LANGUAGE, NO_CANDIDATE_RECOMMENDATION Slice: VOTE_POC_ENTITY_RESOLUTION_PHASE1 Worker-Lane: W6 Depends-On: PR #707 (VOTE_POC_FEC_ADAPTER_PHASE1) Co-authored-by: Foundups Agent <dev@foundups.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
7 tasks
Foundup
added a commit
that referenced
this pull request
May 24, 2026
Implement deterministic funding summary generation from resolved candidate entities using FEC adapter data. Key features: - Top funding sources sorted by amount with deterministic ordering - Trail termination markers (DIRECT_FEC_RECORDS_ONLY, NO_SUPER_PAC_TRACE, NO_DARK_MONEY_TRACE, UNKNOWN_WHERE_SOURCE_ABSENT) - Source references preserved for provenance - WSP 97 confidence labels on all sources - Contributions breakdown by type Safety boundaries enforced: - NO_QUICK_ANSWER_GENERATION (structured data only) - NO_DARK_MONEY_AS_VERIFIED_FACT - NO_CANDIDATE_RECOMMENDATION - NO_TARGETED_PERSUASION Slice: VOTE_POC_FUNDING_SUMMARY_PHASE1 Depends-On: PR #707 (FEC Adapter), PR #709 (Entity Resolution) Tests: 42 new tests, 158 total (all passing) Co-authored-by: Foundups Agent <dev@foundups.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
11 tasks
Foundup
added a commit
that referenced
this pull request
May 24, 2026
…/6) (#712) Implement confidence scoring for VoteBallots funding summaries with explicit WSP 97 confidence labels: VERIFIED_FACT, HIGH_CONFIDENCE_INFERENCE, LOW_CONFIDENCE_INFERENCE, and UNKNOWN. Key features: - Direct FEC source with reference -> VERIFIED_FACT - Missing source -> UNKNOWN or capped confidence - Trail termination markers preserved and scored as UNKNOWN - Human review triggers for high-risk claims: - Foreign funding allegation - Criminal accusation - Low confidence + high impact - Source contradiction - Fail-closed error propagation from funding summary - No quick answer or prose generation - Source references preserved for provenance Safety boundaries enforced: - NO_FOREIGN_FUNDING_CLAIM_GENERATED (only flags for review) - NO_DARK_MONEY_AS_VERIFIED_FACT - NO_CANDIDATE_RECOMMENDATION - NO_TARGETED_PERSUASION - NO_QUICK_ANSWER_GENERATION - HUMAN_REVIEW_FOR_HIGH_RISK_CLAIMS Test coverage: 37 new tests (195 total), all passing. Builds on: PR #707 (FEC), #709 (Entity), #710 (Funding Summary) Worker-Lane: W6 Slice: VOTE_POC_CONFIDENCE_SCORING_INTEGRATION_PHASE1 Co-authored-by: Foundups Agent <dev@foundups.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Foundup
pushed a commit
that referenced
this pull request
May 24, 2026
Repair for W10 gate block: - src/__init__.py: Export Slice 5 carry-forward contract (6 items) - ModLog.md: Append WSP 22-compliant entry for Slice 5 - Audit doc: VOTE_POC_QUICK_ANSWER_GENERATION_PHASE1.md with * Dependencies: #707, #709, #710, #712 (all merged) * Internal Review Verdict: READY * Truth Boundary Checklist: 30/30 YES * Disallowed language scan: PASS * Carry-forward contract for Slice 6 All Slice 1-4 exports preserved. 241/241 tests pass. Worker-Lane: W6 Slice: VOTE_POC_QUICK_ANSWER_GENERATION_PHASE1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Foundup
added a commit
that referenced
this pull request
May 24, 2026
… data (#713) * feat(voteballots): add quick answer generation from confidence-scored data WSP 97 constraints enforced: - NO_LLM_CALL: Pure template-based generation - NO_NEW_FACTS: Only surfaces existing labeled data - MAX_3_LINES_ENFORCED: Truncates with human review note Adds quick_answer.py module with: - QuickAnswer dataclass with provenance tracking - generate_quick_answer() for template-based answer generation - format_funding_line() for confidence-annotated source lines - truncate_with_review_note() for MAX 3 line enforcement - Shell, markdown, and plain text output formats Test coverage: 46 new tests (241 total voteballots tests) - Verified fact clean answers - Low confidence uncertainty markers - Truncation enforcement - Human review flag preservation - Trail termination handling - No LLM call contract verification - Safety boundary tests (no recommendations, no persuasion) Slice 5 of Vote PoC Chain Lane. Worker-Lane: W6 Slice: VOTE_POC_QUICK_ANSWER_GENERATION_PHASE1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(voteballots): add missing Slice 5 artifacts for PR #713 Repair for W10 gate block: - src/__init__.py: Export Slice 5 carry-forward contract (6 items) - ModLog.md: Append WSP 22-compliant entry for Slice 5 - Audit doc: VOTE_POC_QUICK_ANSWER_GENERATION_PHASE1.md with * Dependencies: #707, #709, #710, #712 (all merged) * Internal Review Verdict: READY * Truth Boundary Checklist: 30/30 YES * Disallowed language scan: PASS * Carry-forward contract for Slice 6 All Slice 1-4 exports preserved. 241/241 tests pass. Worker-Lane: W6 Slice: VOTE_POC_QUICK_ANSWER_GENERATION_PHASE1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Foundups Agent <dev@foundups.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced May 24, 2026
Foundup
added a commit
that referenced
this pull request
May 24, 2026
Locks the Vote PoC chain in implementation-complete, not-public-launched state. Records 6/6 merged slices with merge commits: - #707 FEC Adapter: 15de3d3 - #709 Entity Resolution: b5b3eea - #710 Funding Summary: 1a3d06b - #712 Confidence Scoring: 4559a8e - #713 Quick Answer: 7895459 - #714 Shell Integration: 7e4e571 Defines re-open criteria V1-V8 for future Vote work. Tests: 303 passed, entry_url remains empty. DOCS-ONLY: No code, test, manifest, or registry changes. Worker-Lane: W9 Slice: VOTE_POC_CHAIN_OBSERVATION_SNAPSHOT_PHASE1 Co-authored-by: Foundups Agent <dev@foundups.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundation contract for the Vote/Ballots PoC chain. Adds a deterministic, mockable FEC adapter boundary. Offline-by-default. Politically neutral. Non-persuasive. All downstream Vote PoC slices (entity resolution, funding summary, etc.) inherit this boundary.
Scope: 5 files
modules/foundups/voteballots/src/fec_adapter.pymodules/foundups/voteballots/src/__init__.pymodules/foundups/voteballots/tests/test_fec_adapter.pymodules/foundups/voteballots/ModLog.mddocs/audits/architecture/VOTE_POC_FEC_ADAPTER_PHASE1.mdNo registry/catalog/manifest/projection mutation. No public route activation. No CI/dependency/WSP framework mutation.
Offline-by-Default Posture
requests/urllib/httpx/aiohttpimports)get_mock_adapter()provides deterministic fixture-backed adapterCarry-Forward Contract (Stable for Slice 2)
get_mock_adapter()CandidateSearchResultCandidateRecordFECErrorTypeError Model
FECErrorwithFECErrorTypeenum covers: not_found, ambiguous, unavailable/API failure, rate limit, invalid query/input.Political Safety Verified
Two explicit tests guard this:
test_no_persuasion_fields,test_no_targeting_fields.Tests
W10 Hygiene Patch
Original audit doc table header used
Item. W10 amended toTruth Boundary Checklist Itemper WSP_97 terminology lock established earlier in this chain. Two-character edit, no semantic change.WSP 97 Truth Boundary Checklist
PASS — Truth Boundary Checklist Item table 8/8 YES; political safety boundary 6/6 verified; carry-forward contract recorded; Slice 2 named (
VOTE_POC_ENTITY_RESOLUTION_PHASE1) but blocked pending authorization.Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com