Repository navigation
Conversation
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11045 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 24 20 -4
=========================================
- Hits 24 20 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Apply the credit against liability for 2018–2020 and include it in TAXSIM from its first tax year. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
nj_refundable_credits now adds a parameter list, so the route test reads the list in force each year instead of the formula text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
P.L. 2018, c.45 limits the credit to $500 for one qualifying individual and $1,000 for two or more. P.L. 2021, c.308 removed the limits from 2021. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Worksheet J limits the 2018-2020 credit by the number of qualifying individuals claimed on Form 2441. The model counts them from annual ages, so a return that claims a child who turned 13 can now supply the number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the historical Form 2441 limits before proration and read the qualifying count only in capped years. Cover the historical property tax credit refund and the birthday fixture's federal tax. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DTrim99
left a comment
There was a problem hiding this comment.
Program review
Base repository: PolicyEngine/policyengine-us
PR number: 11045
Reviewed head SHA: 86b442e
Merge base SHA: 094934a
Mode: full
Scope: changed behavior and affected dependencies
Source manifest: /private/tmp/policyengine-command-runs/ea33c0bb2b64/pr-11045-review-sources.json
Review status: COMPLETE
Source Documents
- pl2018c45.pdf — cached original.
- pl2018c45.htm — cached original.
- pl2021c308.pdf — cached original.
- pl2009c69.pdf — cached original.
- pl1996c60.htm — cached original.
- annual-2016.pdf — cached original.
- nj1040i-2017.pdf — cached original.
- nj1040i-2018.pdf — cached original.
- nj1040i-2019.pdf — cached original.
- nj1040i-2020.pdf — cached original.
- nj1040i-2021.pdf — cached original.
- nj1040i-2022.pdf — cached original.
- rulespec-us-issue-2037.json — cached original.
Critical
None.
Should Address
A1 — The axiom line covers only part of the policy this PR changes (OPEN)
- Location: the PR body
axiom:line ("rulespec-us/issues/2037 queued") and the closing paragraph of the PR body; the rule is at CLAUDE.md:151-153 ("Axiom Parity (required for policy changes)"). - Trigger: the PR adds or changes these provisions:
- the 2018–2020 CDCC under N.J.S.A. 54A:4-17 as enacted by P.L. 2018, c.45, §5: the $20k–$60k brackets, the $500/$1,000 limits, nonrefundability and proration;
- the 2021 refundability switch under P.L. 2021, c.308;
- the 2022+ part-year eligibility test that uses full-year income;
- the 2018–2020 deduction-versus-credit interaction;
- the historical $10,000 cap.
- Expected: CLAUDE.md requires that "any PR that adds, updates or fixes policy must also leave the same provision correct in rulespec-us". A
queuedentry must point to a dispatch-readype-parityissue that records its blocker. - Observed: rulespec-us#2037 (OPEN,
pe-parity) covers PR #10654's 2022–2023 election. Its 2026-11-16 comment adds the 2015–2020 general cap and records the approval blocker. Searching the issue body and both comments finds no P.L. 2018, c.45 §5 CDCC schedule, no $500/$1,000 limit, nothing on nonrefundability, nothing on part-year residents and nothing on the 2018–2020 election. The issue's 54A:4-17 target only says to check historical versions against P.L. 2021, c.308 and P.L. 2023, c.72. The PR body itself says the historical CDCC rates and limits, the 2021 refundability change, the payment floors, the historical election interaction, part-year eligibility and the override bounds "still need companion parity coverage" or "companion cases". No issue for them is linked. - Impact: merging would put model behavior into PE-US that rulespec-us has no queued, dispatch-ready request to match. That is a demonstrated failure of an explicit repository completion requirement.
- Fix: open a dispatch-ready
pe-parityrequest, or amend #2037, for the items below, and list each one in the axiom line.- 54A:4-17 as enacted by P.L. 2018, c.45 §5 (physical page 5) for 2018–2020, as amended by c.308 from 2021.
- The 2022 part-year eligibility rule (2022 NJ-1040 instructions, physical page 44).
- Any of the remaining items, or mark them
n/a: <reason>where they are only model hygiene, such as the negative-input floors and the 0–12 clip.
- Source:
CLAUDE.mdlines 151–153 in the snapshot;/tmp/policyengine-command-runs/ea33c0bb2b64/pr-11045-policy-sources/rulespec-us-issue-2037.json; the PR body.
Coordinator assessment: The policy reviewer rated this critical under the rule for repository completion requirements. I've rated it should-address, as with the Axiom-line problems on the other PRs in this round, because model output isn't affected. It still blocks approval. rulespec-us #2037 covers the 2022–2023 election and, in a comment, the historical cap. Extending it, or opening a companion pe-parity issue, for the 2018–2020 credit, the 2021 refundability switch, the 2022 part-year test and the credit's interaction with the election would resolve it. The PR body already says these need companion parity coverage.
A2 — The new rent floor in nj_potential_property_tax_deduction has no test (OPEN)
- Location:
policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_potential_property_tax_deduction.py:21(rent = max_(0, add(tax_unit, period, ["rent"]))). - Trigger: a tax unit with negative summed
rent, such as a rent rebate or a data artifact, alongside positivereal_estate_taxes. - Expected: the PR body says each payment source is floored at zero, and a test should pin that for rent.
- Observed: only the real estate tax floor is tested, by the -$200 case in
nj_potential_property_tax_deduction.yamland the -$3,200mixed_sign_rentercase innj_income_tax.yaml. No New Jersey YAML case has a negative rent input (checked with grep over the property tax and income tax folders). If the rentmax_were removed, every test would still pass. - Impact: this is a coverage gap on a changed branch, not a wrong output. Today the floor works: negative rent would otherwise reduce
property_taxthroughrent * qualifying_rent_fraction. One case would close the gap, for example rent -1,000 with real_estate_taxes 2,000 giving 2,000.
Suggestions
S1 — The election comparison cites Worksheet H but departs from it; cite the statutory election instead (OPEN)
- Location:
policyengine_us/variables/gov/states/nj/tax/income/property_tax/nj_taking_property_tax_deduction.py:20-23(reference) and:81-96(comparison). - Trigger: tax years 2018–2020. The nonrefundable CDCC wipes out, or unevenly reduces, the tax in the two columns.
- Expected vs observed:
- Worksheet H compares line 6 tax before any credit. See the 2018 NJ-1040 instructions, physical page 33, lines 6–8, and the 2019 and 2020 instructions, physical page 31: "subtract line 6, column A from line 6, column B". The CDCC is applied later, on line 44, against the balance of tax (2018, physical page 38).
- The PR compares both columns after the CDCC. For a household whose CDCC eliminates tax in both columns, Worksheet H picks the deduction whenever pre-credit savings are at least $50. The PR picks the $50 credit.
- The statute supports the PR's result. P.L. 1996, c.60 §6(a) (C.54A:3A-20) provides that a taxpayer "may elect to take a credit instead of the deduction". The 2018 instructions (physical page 32) say "you can take either", and the 2016 annual report (physical page 34) says "the larger of either a $50 tax credit or a deduction".
- However, the new reference list cites only Worksheet H (2018 physical page 33), which describes the opposite comparison, plus the CDCC law. The PR removed the 54A:3A-17 link and added no 54A:3A-20 citation.
- Impact: documentation only. The modeled outcome is a lawful election.
- Fix: add P.L. 1996, c.60 §6(a) (https://pub.njleg.gov/bills/9697/PL96/60_.htm) or the 54A:3A-20 citation. Add a one-line comment saying the model picks the lower net tax rather than following Worksheet H's pre-credit line 6 test.
S2 — Garbled reference titles and test header comments (OPEN)
parameters/gov/states/nj/tax/income/deductions/property_tax/limit.yaml: two reference titles put page anchors into the title text ("P.L. 2009, c.69, sections 2 and 5 #page 2-4" and "... property tax deduction #page 34,47"). In other references the page goes in thehreffragment only.tests/.../property_tax/history/nj_potential_property_tax_deduction.yamllines 1-15: the header comments have missing spaces ("WorksheetGline2", "P.L.2018c45 sections1-3/12", "taxyear2009"). Neither affects behavior.
S3 — test_nj_cdcc_dependencies.py asserts tracer internals (OPEN)
policyengine_us/tests/test_nj_cdcc_dependencies.py:31-33checks thatnj_cdcc_qualifying_individualsis a child of the top tracer node only in 2020. The value assertions duplicate the YAML cases: "New Jersey had no child and dependent care credit in 2017", the 2020 limit cases, and "New Jersey's 2021 credit is independent of the supplied Form 2441 count".- The trace assertion depends on the structure of
simulation.tracer.trees[-1].children, which a core upgrade could change. It does not test any additional outcome. The test is deterministic and quick: 3 small simulations, and it passed.
Evidence Gaps
No material gaps reported.
Notes
- The modelled policy matches the sources. The property tax deduction cap is $10,000 for 2015–2017 and $15,000 from 2018, halved for separate filers sharing a home. Rent counts at 18%, and flooring each payment source at zero only drops negative inputs. The 2018–2020 credit uses brackets from $20,000 to $60,000 at 50/40/30/20/10%, with the limit set by the number claimed on Form 2441 ($500 or $1,000). It is nonrefundable, and the cap applies before part-year proration. From 2021 the brackets run $30,000–$150,000, the credit is refundable and the limits are gone. From 2022, part-year eligibility uses full-year income. TAXSIM reporting from 2018 is right.
- Comparing the deduction and the credit after the 2018–2020 credit is supported by the election statute (P.L. 1996 c.60 §6(a), N.J.S.A. 54A:3A-20), even though the official worksheet orders it differently (policy-2). There is no loop between the credit and the election: the election recomputes the credit from taxable income with and without the deduction. For a 2018 homeowner the model now correctly keeps the property tax credit.
- The credit is never counted twice: it is only on the nonrefundable list for 2018–2020 and only on the refundable list from 2021. Setting
nj_cdccto zero moves household net income and SPM net income by the same amount.
Validation Summary
Local tests at the reviewed head (review venv, policyengine-core 3.37.2, matching uv.lock; imports resolved to the snapshot): 556 passed and 0 failed. They cover the NJ income tax folder, the TAXSIM state CDCC test and the two new Python tests. Households built from ordinary inputs for 2017–2020 and 2022 ran end to end without a cycle error. Sources: 13, including P.L. 2018 c.45, P.L. 2021 c.308, P.L. 1996 c.60 and NJ-1040 instructions; the manifest check passed. CI: 36/36 checks pass at 86b442e.
Timing
setup seconds: 5.00s; scope seconds: 60.00s; parallel review seconds: 511.40s; policy role seconds: 433.30s; code role seconds: 511.40s; adjudication seconds: 120.00s; consolidation cleanup seconds: 30.60s; elapsed seconds: 574.00s
Review Severity
COMMENT. Open findings: 0 critical, 2 should address, 3 suggestions.
Correct New Jersey’s historical property tax deduction caps and floor qualifying payments at zero. Compare the property tax deduction and credit after applying the 2018–2020 nonrefundable dependent care credit. Bound residency proration, check full-year taxable income for part-year eligibility from 2022, and report the credit in TAXSIM from 2018.
Fixes #11043
The general property tax deduction cap is $10,000 for 2015–2017 and $15,000 from 2018. The deduction counts property taxes and rent after flooring each payment source at zero. The Child and Dependent Care Credit starts in 2018 and uses the original taxable-income brackets through 2020. It is nonrefundable in those years and limited to $500 for one qualifying individual and $1,000 for two or more (P.L. 2018, c.45, §5(a), physical page 5). P.L. 2021, c.308 dropped the limits from 2021. Worksheet J applies the limit by the number of people claimed on federal Form 2441 (2018 NJ-1040 instructions, physical page 38). A new tax-unit variable,
nj_cdcc_qualifying_individuals, holds that number. It defaults to the federal count from annual ages, which leaves out a child who turned 13 during the year, and accepts the number on the form. The expanded schedule and refundable treatment start in 2021. TAXSIM reports the credit from 2018. The model starts in 2015, and the property tax deduction predates that year.nj_cdcc_residency_monthsdefaults to 12 and is bounded to 0–12 for proration. Negative federal credit overrides count as zero when calculating the state match. From 2022, part-year filers can supplynj_cdcc_full_year_taxable_incomefor the eligibility check. Worksheet J uses resident-return taxable income to set the match rate.Under P.L. 2009, c.69, §2, physical page 2, a qualifying resident may deduct property taxes up to $10,000. The Division documented that cap in its 2016 annual report, physical page 34, and 2017 NJ-1040 instructions, Worksheet G, physical page 36. The Legislature increased the cap to $15,000 for taxable years beginning on and after January 1, 2018 in P.L. 2018, c.45, §§1–3 and 12.
The history fixture has nine cases and 31 monetary assertions. It covers the general cap for 2015–2020 and checks the claimed deduction, property tax credit, and taxable income for three returns. A single filer with $50,000 of wages and $20,000 of qualifying property taxes claims a $10,000 deduction and has $39,000 of taxable income in 2017. The shared-home separate filers claim $5,000 in 2017 and $7,500 in 2018. Separate fixtures cover enactment, the original bracket edges and one dollar above each edge, the 2021 bracket and refundability changes, the dollar limits at and above each amount with a 2021 control, a return that claims a child who turned 13 during the year, a renter with a negative real estate tax input, and TAXSIM reporting from 2018.
The shared-home cases exercise the existing separate-filer rules. This PR covers the interaction between the property tax election and the 2018–2020 nonrefundable care credit. PR #10654 covers the refundable-credit interactions and the tie rule. The cases cover household calculations for the amounts asserted.
Validation:
In 2018–2020, a mixed-sign renter with $18,600 of New Jersey taxable income has a $300 tentative credit against $260.40 of liability, so New Jersey tax is $0 rather than a $39.60 refund. For a single filer with $40,000 of New Jersey taxable income and a $600 federal credit, TAXSIM reports the $180 New Jersey credit in each of 2018–2020, $240 in 2021 and $0 in 2017. All 197 cases across 20 New Jersey and TAXSIM YAML files pass on Linux on the branch and on a merge with main, including the 12 dollar-limit cases. Ruff format and check pass on
nj_agi.py,nj_cdcc.py,nj_cdcc_full_year_taxable_income.pyandnj_taking_property_tax_deduction.py. A separate filer with $15,000 of wages, a $1,050 federal credit and children aged 5 and 13 gets $500 in 2018 by default and $525 when two people claimed on Form 2441 are supplied.The property tax credit route test now checks the New Jersey credit against the parameter list in force each year, because
nj_refundable_creditsadds that list.axiom: TheAxiomFoundation/rulespec-us#2037 queued
The historical cap remains queued in the linked amendment. The payment floors, historical dependent care credit rates and dollar limits, and 2021 refundability change still need companion parity coverage. The historical election interaction, part-year eligibility, and override bounds also need companion cases.
🤖 Generated with Claude Code