Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CCB: upper reduction band keeps an unrounded 3,061.45 instead of the indexed 3,061

Aperta
#561 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
61/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Find the CCB reduction schedule for the upper income band and compare its one-child 2025–26 calculation with the supplied worksheet example at income 100,000 CAD. Read the existing schedule and its tests first; verify the fixed amount and matching published values for each child count. Done means the modeled reduction and benefit match the stated worksheet figures and tests cover the band transition.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Above the second income threshold, the CCB reduction is a fixed amount plus a percentage of income over the threshold. The fixed amount is an indexed dollar amount, and ITA 122.61(7) rounds it to the nearest dollar. PolicyEngine builds the reduction as a continuous marginal-rate schedule, so the fixed part becomes (81,222 − 37,487) × 7% = 3,061.45, not 3,061. The difference is small, but it applies to every family in the upper band.

Example (benefit year July 2025 – June 2026, one child, full custody)

Adjusted family net income 100,000 CAD.

  • Official 2025–26 worksheet: reduction = 3,061 + 3.2% × (100,000 − 81,222) = 3,661.896
  • Expected benefit: 7,997 − 3,661.896 = 4,335.104 per year
  • PolicyEngine Canada 0.99.1: reduction 3,662.35, benefit 4,334.65 per year
  • Difference: −0.45 per year

Controls

  • Income 81,222 (still in the lower band): 4,935.55 — matches.
  • Income 81,223: 4,935.968 expected, 4,935.52 from the model — the gap of about 0.45 appears right at the band change.
  • Income 300,000: both give 0.

The same pattern should apply to the two-, three- and four-or-more-children schedules, since they are built the same way. We checked only the one-child case.

Suggested fix

Store the fixed amount for the upper band as its own parameter (3,061 for one child in 2025–26, with the matching published values for more children), and compute the upper band as fixed + rate × (income − threshold).

How this was checked

Same setup as the shared-custody issue: the unmodified PolicyEngine Canada 0.99.1 wheel (same code as master 029687260d), an independent model of ITA 122.61(1), (5) and (7), and the official 2025–26 CCB calculation sheet. We did not run a separate CRA calculator case for this small difference.

Found with Arxo (arxo.io) during a review of open benefit models against the statute.

Lingua principale
Python
Stelle
18
Fork
35
Merge medio
5h 36m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-canada

Tutte le issue di PolicyEngine/policyengine-canada

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.