Say when the employer unemployment-tax total is an estimate, and keep the no-worker regression in its New Jersey test

オープン 初心者向け
#11,653 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, yaml
領域
databases, testing

調査の方向性

employer_total_state_unemployment_tax.py と nj_employer_state_unemployment_tax.yaml を読み、特に参照されているfixture行付近の従業員がいないケースを確認してください。示されている期待値を保ったまま推定の文言を更新し、雇用主の総賃金の入力を復元してください。税率がゼロの改革ケースを追加し、ケース名で7月の税率変更を明確にしてください。ドキュメントで推定の両方の条件が説明され、New Jerseyのケースで旧式を検出し、呼び出し経路をカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Agent-written for Max, by Claude Code for Max Ghenis.

The last review of #10700 approved it at 8c92c28b and left two follow-ups.

1. Documentation

employer_total_state_unemployment_tax applies one worker's effective rate to the employer's taxable wages. Its documentation says the total is an estimate when workers' wages differ (variable). It is also an estimate when worker wages are missing and the rate changes during the year, even for one worker.

In New Jersey in 2022, one worker paid $100,000 evenly owes $1,067.635: $25,000 taxed in Q1 and $14,800 in Q2 at 2.6825%. With worker wages left out, the total uses the average of the four quarterly rates, 2.8325%, and gives $1,127.335 on $39,800.

Proposed: say the total is an estimate whenever the rate changes during the year and the worker profile is missing or unrepresentative.

2. Test

In nj_employer_state_unemployment_tax.yaml, the no-worker row leaves out the $100,000 employer gross wages that the case had before (fixture). Without that input, the old and new formulas both give $1,127.335, so the row cannot catch a return to the old formula.

Proposed:

  • Restore employer_total_payroll_tax_gross_wages: 100_000 in that row and keep the $1,127.335 expectation; the old formula gave $1,067.635.
  • Add a reform that sets the effective rate to zero, to test the caller path next to the supplied-zero case.
  • Name the July rate change in the case title: the $60,000 row taxes $9,800 in Q3 at the higher rate.
主要言語
Python
スター
178
フォーク
224
平均マージ
3日 13時間
マージ済み PR(30日)
309

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine-us のほかの issue

PolicyEngine/policyengine-us の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。