PS pension: add case K (G1 55+ min(F1,F2) lowest-reduction rule, PSPC-verified) + report wording fixes
This commit is contained in:
1 parent
583b5ee2f8
commit
becdf53f1a
2 files changed
+24
-7
No files matched your search
@@ -1,5 +1,7 @@
|
||||
// Retire-planner PS pension tests — run: node tests/ps-pension.test.js (PS-PENSION-PLAN.md Stage 3)
|
||||
// Hand-computed cases A–J from the plan (AMPE proxy = 2026 YMPE = 74,600), verified to the cent,
|
||||
// Hand-computed cases A–K from the plan (AMPE proxy = 2026 YMPE = 74,600), verified to the cent,
|
||||
// plus K added post-deploy (Hermes, 2026-10-09): G1 55+ with S≥25 must apply PSPC's
|
||||
// "compare Formula 1 and 2 and apply the lowest reduction" — the subtlest branch, was untested.
|
||||
// plus engine integration checks (bridge window, start-age gating, PIA gating, pre-65 splitting).
|
||||
//
|
||||
// NOTE (documented in PS-PENSION-REPORT.md): two plan cases contain arithmetic typos.
|
||||
@@ -136,6 +138,19 @@ console.log("---- J. service 1.5 yrs: return of contributions only ----");
|
||||
ok("J notes lt2", r.notes.indexOf("lt2") >= 0, JSON.stringify(r.notes));
|
||||
}
|
||||
|
||||
console.log("---- K. G1, 70k, 25 yrs, retire 59: PSPC 55+ rule — lowest of F1 5% / F2 25% = 5% ----");
|
||||
{
|
||||
const r = calc(G1, 59, 25, 70000);
|
||||
ok("K pct 5% min(F1,F2) at 55+ (PSPC: compare F1 and 2, apply the lowest)", cent(r.reductionPct, 0.05) && r.formula === "min(F1,F2)", r.reductionPct + " " + r.formula);
|
||||
ok("K lifetime 24,062.50", cent(r.lifetime, 24062.50), r.lifetime);
|
||||
ok("K bridge 10,937.50", cent(r.bridge, 10937.50), r.bridge);
|
||||
ok("K atRetirement 33,250.00 (35,000 × 0.95)", cent(r.pensionAtRetirement, 33250.00), r.pensionAtRetirement);
|
||||
ok("K from65 22,859.38 (24,062.50 × 0.95)", cent(r.pensionFrom65, 22859.38), r.pensionFrom65);
|
||||
const r2 = calc(G1, 56, 25, 70000);
|
||||
ok("K2 pct 20% min(F1 20% / F2 25%) at 56", cent(r2.reductionPct, 0.20) && r2.formula === "min(F1,F2)", r2.reductionPct + " " + r2.formula);
|
||||
ok("K2 atRetirement 28,000.00 (35,000 × 0.80)", cent(r2.pensionAtRetirement, 28000.00), r2.pensionAtRetirement);
|
||||
}
|
||||
|
||||
console.log("---- Engine integration ----");
|
||||
const base = Object.assign({}, E.defaults, {
|
||||
age: 55, retireAge: 60, household: "single", province: "ON",
|
||||
|
||||
Reference in new issue
Block a user