Wire Idriç Ballotpedia client through ICU - #3
Open
isomorphisms wants to merge 7 commits into
Open
Conversation
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.
Boundary
Completes the page-one Ballotpedia API4 elections client in Idriç. Idriç owns argument validation, request meaning, environment lookup, typed JSON projection, and TSV rendering; ICU remains the only HTTP/TLS implementation.
Re-evaluation of the original holes
environment_value : String → IO (Maybe String), including unset/empty distinction and invalid-name rejection. A later source-layout rewrite dropped it from the buildable_tree, so Idriç #67 restores that exact narrow surface. CI pins the corresponding compiler integration commit.-Hvalues and writes the response body to stdout. The CLI invokes ICU withSystem.run, checks its exit status, and decodes the captured stdout. No second HTTP implementation is present.Language.JSONparses the body, following the working pattern already exercised by idric-cli Add CourtListener search through ICU #2. Ballotpedia then projects the JSON into typedCandidatevalues before rendering.Request/response correction
The opened checkpoint used
date=and a flatdata.candidatesfixture. Available Ballotpedia client implementations instead support:election_date=YYYY-MM-DD&page=1data.districts → races → candidates → person / party_affiliationThe fixture, decoder, and TSV columns now follow that nested shape.
Receipts
x-api-key, andAcceptheader, then proves ICU body capture, typed decoding, and exact TSV outputGenuinely remaining boundaries
Normal execution uses
https://api4.ballotpedia.org/data/elections_by_state.BALLOTPEDIA_API_BASEexists only to make the deterministic receipt possible.