Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Model the 2025 Canada Workers Benefit secondary-earner exemption

Open
#554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start by locating the existing general Canada Workers Benefit implementation referenced by issue #9 and read the CRA Schedule 6 Step 2 source linked in this issue. Trace the AFNI and reduction calculations, then add coverage for the standard, Alberta, Quebec, and Nunavut schedules; done means the exemption selects the lower earner and respects all stated caps without producing zero for an eligible spouse.

Written by the indexing model from the issue text.

Description

enhancement

Problem

PolicyEngine Canada does not model the secondary-earner exemption used in the
2025 Canada Workers Benefit calculation. A repository search for
secondary_earner and equivalent terms returns no implementation.

CRA Schedule 6 Step 2 allows an eligible-spouse family to deduct up to $16,386
of the lower earner's qualifying amount from adjusted family net income. Without
this step, the final CWB amount is not comparable to the 2025 CRA calculation.

The older general CWB implementation issue was #9.

Scope

  • Add the 2025 secondary-earner exemption parameter.
  • Identify the secondary earner from claimant and eligible-spouse working
    income.
  • Cap the exemption by the secondary earner's working income, adjusted net
    income, and the published maximum.
  • Subtract the exemption from adjusted family net income before applying the
    basic CWB and disability-supplement reductions.
  • Preserve an explicit pre-exemption AFNI variable or otherwise expose both
    legal calculation boundaries.

Acceptance criteria

  • No eligible spouse produces a zero exemption.
  • The lower earner is selected correctly when claimant and spouse incomes
    differ.
  • The exemption respects the working-income, adjusted-net-income, and $16,386
    caps.
  • End-to-end tests cover the standard schedule and the Alberta, Quebec, and
    Nunavut variants.

Official source:
https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5000-s6/5000-s6-25e.pdf

Dominant language
Python
Stars
17
Forks
35
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-canada

All issues in PolicyEngine/policyengine-canada

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.