NM Child Income Tax Credit: $75,001 bracket start gives $212 instead of $106
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
バグは policyengine_us/parameters/gov/states/nm/tax/income/credits/ctc/amount.yaml のブラケット表にあります。4つ目のブラケットは75_001から始まっていますが、他のブラケットは切りのよい数値から始まっています。issue の再現スクリプトでは、AGI 75,001 のときに nm_ctc が 212 を返していますが、公式の表では 106 になります。開始値を 75_000 に変更し、issue の表にある 75,001 の3ケースを確認してください。その後、nm_ctc の YAML テストを実行し、他のブラケットが引き続き正しいことを確認してください。すべてのブラケット境界で公式の値と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
For AGI exactly $75,001, nm_ctc returns the $50,000–$75,000 amount instead of the next bracket.
The 2025 New Mexico Child Income Tax Credit table (https://www.tax.newmexico.gov/new-mexico-child-tax-credit/, and PIT-RC Table 4 in the 2025 PIT packet already cited in the parameter) gives $212 per child for AGI over $50,000 through $75,000 and $106 per child over $75,000 through $100,000.
PolicyEngine-US 2.38.9, 2025:
| Case | Official | nm_ctc |
|---|---|---|
| Single, AGI $75,000, one child | $212 | $212 |
| Single, AGI $75,001, one child | $106 | $212 |
| Joint, AGI $75,001, one child | $106 | $212 |
| Single, AGI $75,001, two children | $212 | $424 |
| Single, AGI $75,002, one child | $106 | $106 |
A 45-case panel (every bracket endpoint and adjacent value, single and joint, two children, age, dependency, TIN, no-child and negative-AGI controls) fails only at these three $75,001 cases, on 2.2.1 and 2.30.3 as well.
Cause and possible fix
nm_ctc uses p.amount.calc(agi, right=True) (upper-inclusive), which is right for the table. But in policyengine_us/parameters/gov/states/nm/tax/income/credits/ctc/amount.yaml the fourth bracket starts at 75_001 while the others start at the round number (25_000, 50_000, 100_000, ...). Changing 75_001 to 75_000 makes all 45 cases in that panel match.
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"}, "adjusted_gross_income": {Y: 75_001}}},
"households": {"h": {"members": ["p", "c"], "state_code": {Y: "NM"}}},
"families": {"f": {"members": ["p", "c"]}}, "spm_units": {"s": {"members": ["p", "c"]}},
"marital_units": {"m": {"members": ["p"]}},
})
print(sim.calculate("nm_ctc", Y)) # 212, official table gives 106
- 主要言語
- Python
- スター
- 170
- フォーク
- 217
- 平均マージ
- 4日 10時間
- マージ済み PR(30日)
- 396
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-us のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
PolicyEngine/policyengine-us#10552 ·
メンテナーはふだん 2 日以内に返信
-
South Carolina OSS: require SSI's citizen or qualified-noncitizen test (S.C. Code Regs. 126-920)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PolicyEngine/policyengine-us#10545 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
PolicyEngine/policyengine-us#10524 ·
メンテナーはふだん 2 日以内に返信
-
bug state-income-tax states/ia
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
PolicyEngine/policyengine-us#10512 ·
メンテナーはふだん 2 日以内に返信
-
bug state-income-tax states/la
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PolicyEngine/policyengine-us#10510 ·
メンテナーはふだん 2 日以内に返信
PolicyEngine/policyengine-us の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
521xueweihan/HelloGitHub#4237 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jejjohnson/gaussx#721 ·
メンテナーはふだん 1 日以内に返信
-
mock-core-configs/etc/mock/rocky-10-riscv64.cfg contains the wrong architecture in config_opts['root']対応中かも @jasonmontleon が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
rpm-software-management/mock#1834 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
elastic/elastic-otel-python#683 ·
メンテナーはふだん 1 日以内に返信
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retriesオープンfollow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信