Repository navigation
Keep a $0 income in the page's link and cite 18051(e)(2) - #49
Merged
Merged
Conversation
From Pavel's review of #46 (suggestions 2 and 3): - $0 of earnings gets cards, so the link keeps it: buildShareableUrl and getLinkFromUrl accept an income of 0, the results report it, and the earnings box starts at $0 for a link that asks for it. CalculatorForm.test.jsx covers the link both ways. - The comments and the API's field description cite 42 U.S.C. 18051(e)(2), the paragraph that bars Basic Health Program enrollees from the Exchange. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PavelMakarchuk
approved these changes
Nov 30, 2026
PavelMakarchuk
left a comment
Contributor
There was a problem hiding this comment.
Review at 7ae04d8
This PR closes suggestions 2 and 3 of the #46 review. A $0 income now survives the full round trip: box, page link, reopened link, box. The new citation, 42 U.S.C. 18051(e)(2), is the correct paragraph. I found no bug. One test comment still cites 18051(e), and two wording points are optional.
Verdict: APPROVE
Suggestions
tests/test_api_at_income.py:170still cites "42 U.S.C. 18051(e)". The PR changes the three other places (api.py:557,models.py:183,CalculatorResults.jsx:67). Change this comment too, so that the repository cites one paragraph. Optional.- "Enrollees" against "eligible individuals". 18051(e)(2) says that an "eligible individual" (a person eligible for the Basic Health Program under (e)(1)) is not a qualified individual for the Exchange. The bar applies on eligibility, not on enrollment. The
api.py:556-557comment and the changelog fragment say "enrollees".models.pysays "Eligible for ...", which matches the statute. The code tests eligibility (basic_health_program), so behavior is correct. Only the words differ. Optional. - The
CalculatorResults.jsxhalf has no automatic test. The new tests coverbuildShareableUrlandgetLinkFromUrl. The twoCalculatorResultschanges (initialIncome != nullat line 375,income >= 0at line 380) are covered only by the manual Chrome check in the PR description. Without them, a $0 link would still open blank. A render test is not easy with plainbun test(no DOM), so this is acceptable as it is. Optional.
What I checked
- Head and base. The head is
7ae04d8f96b489014fbd855d7c83fb4582b085f6. The merge base ismainatee0a9237(#47), which is still the tip ofmain. The PR has 1 commit, +73/-7 in 6 files. - $0 round trip, step by step.
- Box to link:
userIncome = "0"givesparseFloat0, and0 >= 0sends 0 toonViewChange.buildShareableUrlwritesincome=0(income != null && income >= 0). A blank box givesNaN, thennull, then noincomeparameter. - Link to box:
getLinkFromUrlreadsparseFloat("0") = 0and keeps it. A missing parameter (parseFloat(null)),income=(parseFloat("")),abcand-5all givenull.Calculator.jsx:333passes it with??, not||, so 0 stays 0.CalculatorResultsstarts the box at"0"(initialIncome != null).householdAtIncome.jsasks the API for 0 (income >= 0), as #46 made it do. linkViewkeeps the link's income through the first calculation (handleCalculate(..., { fromLink: true })does not reset it).App.jsxkeeps the query on navigation and onhashchange.-0writesincome=0(String(-0)is"0"). This is correct.
- Box to link:
- Other numeric fields with a falsy-zero pattern.
getFormDataFromUrlusesparseInt(...) || 40forageandspouse. Age 0 becomes 40, but the form limits both to 18-64 and the API requiresage_head >= 18, so this has no effect. Dependent ages usefilter(!isNaN), so a dependent age of 0 survives.toRequesttests=== "", so 0 survives.num_dependentscomes from the list length. I found no other field with the bug. - Earlier behavior, not changed by this PR.
parseFloatacceptsincome=Infinityandincome=2000000. The link keeps them, and the box shows the existing "up to $1,000,000" notice.parseFloat("0abc")gives 0. These behaved the same before the PR. I do not ask for a change. - Statute. I read 42 U.S.C. 18051 on govinfo (USCODE-2024). Subsection (e) is "Eligible individual". Paragraph (e)(1) defines the person (state resident, not Medicaid-eligible, 133-200% FPL, no affordable minimum essential coverage, under 65). Paragraph (e)(2), "Eligible individuals may not use Exchange", says that such a person is not a qualified individual under section 18032 for a qualified health plan through an Exchange. So (e)(2) supports the claim "can't enroll in a Marketplace plan". See suggestion 2 for the wording.
- JS tests and build (clean clone, bun 1.3.9).
bun test: 15 pass, 0 fail (2 files).- With
main'sCalculatorForm.jsxand the new test file, "keeps $0" and "opens at $0 when the link asks for $0" fail, and the other 4 pass. This matches the PR description. bun run build: the data check andnext buildpass. The repository has no lint script.
- Python API under
src. The changes are 1 comment inapi.pyand 1 field description inmodels.py. No behavior changes. With the image's packages (modal-requirements.txt) andPYTHONPATH=src:.,tests/test_modal_requirements.pyandtests/test_smoke_test_api.pygive 24 passed. The newPersonCoverage.basic_health_programdescription loads and reads "(42 U.S.C. 18051(e)(2))". CI "Test with the image's packages" ran 83 API tests, all passed, finished at 9:32am EST on 2026-11-30. "Deploy and smoke-test" was skipped, as expected on a PR. Vercel preview is ready. - Changelog.
changelog.d/bhp-followups.fixed.mdis a top-level fragment with a valid type, like the other fragments in the repository. - Other open PRs. Only #41 (Local impact page) touches the same files. The PR description already says #41's rebase needs no change. The 1-line edits here are small, so a conflict is unlikely.
This branch was successfully deployed
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.
Why
Pavel's review of #46 left two suggestions open when #46 merged:
CalculatorForm.jsxandCalculatorResults.jsxkept only an income above zero.His suggestion 4, #41's rebase, needs no change here.
What
$0 in links
buildShareableUrlwritesincome=0. A blank box still leaves the income out.getLinkFromUrlreadsincome=0as $0. A missing, non-numeric or negative income still opens with a blank box.CalculatorResultsreports $0 to the page's link. The earnings box starts at $0 for a link that asks for it. Pavel named three places; this fourth one treated a starting income of 0 as blank.CalculatorForm.test.jsx(bun test) covers both directions. On main'sCalculatorForm.jsx, its two $0 tests fail.Citation
api.pyandCalculatorResults.jsxcite 18051(e)(2), and so does thebasic_health_programfield's description inmodels.py.src/aca_api/. The API's behavior doesn't change.changelog.d/bhp-followups.fixed.md.Checks
bun test: 15 pass, Fix the explanation's opening sentence and widen New York's mid-year note #47's 9 and this PR's 6.bun run buildpasses, including the data check.tests/test_modal_requirements.pyandtests/test_smoke_test_api.py: 24 pass. CI runs the rest of the API tests.income=0: opens with $0 in the box. The cards show Medicaid (2026) and $1,094 (2027), with the work-requirement explanation.income=0. Clearing the box removes it.🤖 Generated with Claude Code