NJ Child Tax Credit uses the lower amount at exact table thresholds
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Il bug si trova in variables/gov/states/nj/tax/income/credits/ctc/nj_ctc.py, dove l'importo per figlio deriva da p.amount.calc(taxable_income), che è inclusivo al limite inferiore. Confrontalo con la gestione right=True nella variabile nm_ctc, quindi riproduci il problema con lo snippet nell'issue a 30.000 $ e 29.999 $. È completato quando i casi esatti di soglia corrispondono alla tabella NJ in tutti e cinque i limiti, i valori adiacenti restano invariati e esistono test YAML per ciascun limite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The New Jersey Child Tax Credit table is upper-inclusive, but nj_ctc uses the next lower amount at each exact threshold.
The Division of Taxation's 2025 table (https://www.nj.gov/treasury/taxation/individuals/childtaxcredit.shtml, also NJ-1040 instructions line 65, https://www.nj.gov/treasury/taxation/pdf/current/1040i.pdf) gives per child: $1,000 at $30,000 or less; $800 over $30,000 through $40,000; $600 over $40,000 through $50,000; $400 over $50,000 through $60,000; $200 over $60,000 through $80,000.
PolicyEngine-US 2.38.9, single filer, one dependent child age 5, nj_taxable_income set directly, 2025:
| NJ taxable income | Official | nj_ctc |
|---|---|---|
| $29,999 | $1,000 | $1,000 |
| $30,000 | $1,000 | $800 |
| $40,000 | $800 | $600 |
| $50,000 | $600 | $400 |
| $60,000 | $400 | $200 |
| $80,000 | $200 | $0 |
A wider 67-case panel (single, head of household, joint and surviving spouse at each boundary and adjacent value, plus age, dependency and separate-filer controls) fails only at these 20 exact boundaries, by $200 per child, on 2.2.1, 2.30.1 and 2.30.3 as well. All adjacent values and controls match.
Cause and possible fix
policyengine_us/variables/gov/states/nj/tax/income/credits/ctc/nj_ctc.py calls p.amount.calc(taxable_income), which is lower-inclusive. Using right=True (as nm_ctc already does) while keeping the first bracket at its $0 lower endpoint fixes all 20 cases in that panel without changing the other 47:
amount_per_qualifying_child = where(
taxable_income == p.amount.thresholds[0],
p.amount.amounts[0],
p.amount.calc(taxable_income, right=True),
)
Reproduce
from policyengine_us import Simulation
Y = 2025
sim = Simulation(situation={
"people": {"p": {"age": {Y: 35}}, "c": {"age": {Y: 5}, "is_tax_unit_dependent": {Y: True}}},
"tax_units": {"t": {"members": ["p", "c"], "filing_status": {Y: "SINGLE"}, "nj_taxable_income": {Y: 30_000}}},
"households": {"h": {"members": ["p", "c"], "state_code": {Y: "NJ"}}},
"families": {"f": {"members": ["p", "c"]}}, "spm_units": {"s": {"members": ["p", "c"]}},
"marital_units": {"m": {"members": ["p"]}},
})
print(sim.calculate("nj_ctc", Y)) # 800, official table gives 1,000
Happy to open a PR with YAML tests at each boundary if that is useful.
- Lingua principale
- Python
- Stelle
- 168
- Fork
- 216
- Merge medio
- 3g 2m
- PR unite (30g)
- 339
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/policyengine-us
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PolicyEngine/policyengine-us#10179 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
PolicyEngine/policyengine-us#10073 ·
I maintainer di solito rispondono entro 2 giorni
-
bug state-income-tax states/vt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PolicyEngine/policyengine-us#9996 ·
I maintainer di solito rispondono entro 2 giorni
-
bug hhs/tanf states/nh
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PolicyEngine/policyengine-us#9984 ·
I maintainer di solito rispondono entro 2 giorni
-
taxsim_tfica includes state employee payroll contributions; TAXSIM's FICA is OASDI and HI onlyApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PolicyEngine/policyengine-us#9952 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di PolicyEngine/policyengine-us
Issue simili
-
Path subtraction removes repeated suffix characters instead of one suffixForse già presa @Gwerdonatus l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
joke2k/django-environ#671 ·
-
good first issue help wanted windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
test_pgbouncer deploys the server under test from Charmhub instead of the local build (track/1.31)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
canonical/temporal-k8s-operator#195 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
`burr` fails to start when the Python path has a space in itForse già presa @enekoreto l’ha presa oggi. Apertastatus/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
device support request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
zigpy/zha-device-handlers#5461 ·
I maintainer di solito rispondono entro 4 giorni