Skip to content

Use hourly wage in overtime premium for hourly workers#7945

Open
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/overtime-hourly-wage
Open

Use hourly wage in overtime premium for hourly workers#7945
MaxGhenis wants to merge 1 commit intoPolicyEngine:mainfrom
MaxGhenis:codex/overtime-hourly-wage

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • use hourly_wage in fsla_overtime_premium for hourly workers when a positive hourly wage is available
  • keep the existing earnings-based implied-rate fallback when hourly_wage is unavailable
  • add policy regression cases and a changelog fragment

Why

hourly_wage is now available from the ORG imputation work, but the overtime premium formula was still reconstructing a base rate from annual earnings even for hourly workers. This wires the ORG-backed hourly wage into the formula in the guarded case where it represents the right straight-time rate.

Testing

  • uv run python policyengine_us/tests/run_selective_tests.py --files policyengine_us/tests/policy/baseline/gov/irs/income/exemptions/fsla_overtime_premium.yaml
  • uv run pytest policyengine_us/tests/core/test_org_input_variables.py -q
  • uv run python -m py_compile policyengine_us/variables/household/income/person/fsla_overtime_premium.py
  • direct engine-level checks via Simulation(..., situation=...) returned [5200.0] for the hourly-wage branch and [2727.272705078125] for the fallback branch

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (20b8599) to head (8eef86d).
⚠️ Report is 38 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7945   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           17        18    +1     
=========================================
+ Hits            17        18    +1     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant