PolicyEngine / PolicyEngine/policyengine-us
Model section 1402(b) nonresident-alien exceptions for self-employment income
- Dominant language
- Python
- Stars
- 162
- Forks
- 212
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 97
Description
Axiom's PolicyBench-weighted oracle triage surfaced a high-impact SECA parity gap for section 1402(b):
- RuleSpec source: `rulespec-us/us/statutes/26/1402/b.yaml`
- Axiom outputs:
- `us:statutes/26/1402/b#self_employment_income`
- `us:statutes/26/1402/b#self_employment_income_for_section_1401_a`
- Nearby PE variables:
- `taxable_self_employment_income`
- `social_security_taxable_self_employment_income`
The RuleSpec output applies section 1402(b)'s statutory exclusions before computing taxable self-employment income:
- nonresident alien exclusion, except where a Social Security Act section 233 agreement applies
- rule that a non-U.S. citizen resident of Puerto Rico, Virgin Islands, Guam, or American Samoa is not treated as a nonresident alien for this definition
- separate section 1401(a) cap using the contribution and benefit base less wages
PE currently builds `taxable_self_employment_income` from Schedule C/F/partnership SE income, applies the 92.35% net-earnings treatment and the $400 threshold, and caps social-security taxable SE income against `taxable_earnings_for_social_security`. I did not find PE inputs or formulas for the 1402(b) nonresident-alien, section 233 agreement, or territory-resident exceptions.
Because those branches can zero or preserve the section 1402(b) amount, Axiom cannot treat the current PE variables as exact oracle targets without either PE support for these inputs/branches or an explicit PE adapter surface that intentionally constrains them away.
Contributor guide
Research direction
Start with rulespec-us/us/statutes/26/1402/b.yaml and trace the PE formulas producing taxable_self_employment_income and social_security_taxable_self_employment_income. Search for existing inputs or formulas related to section 233 agreements and territory residency. Done means the section 1402(b) exceptions and separate section 1401(a) cap are represented, or an explicit adapter constraint is documented and oracle comparisons are aligned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100