audit: math-fix thirty-third-pass re-verification (all gates fresh, OFFLAN-OK 22:56Z, deploy + 34/34 sweep, passes3 byte-identical to passes 14-32, canonical couple+fire frames re-drawn, 52/56 clamp-driven mixed probe MIXEDLIVE-OK)

This commit is contained in:
krisf committed 2026-10-09 18:56:51 -04:00
1 parent a21b6804c0
commit cc38c2d010
2 files changed
+25 -1

No files matched your search

+24
View File
@@ -885,3 +885,27 @@ Harness notes: Playwright ran with `TMPDIR=/home/ubuntu/projects/retire-planner/
No code change required — plan executed end-to-end; fix commit `0839826` at `origin/main` (ancestor of HEAD, confirmed via `git merge-base --is-ancestor`); all gates fresh this pass. Final: **MATH_FIX_DONE**.
Addendum (post-push, same pass): audit commit `bafb88a2836fb06be183920567fd14ecc30b9c3f` pushed `77f4658..bafb88a` → `origin/main` (report + fresh off-LAN stamp; code untouched, the plan's mandated fix commit `08398267040a832bdec0910626423f0dbfeb0a7f` remains the code change under test, confirmed ancestor of `HEAD`). Post-push `git fetch` + full byte sweep re-run vs the new `origin/main`: origin blob == local == webroot md5, tracked **21/21 (3-way)** + gitignored `site/vision/*.jpeg` **13/13 (2-way)** = **34/34 match, 0 mismatch** → `SWEEP-OK`; `HEAD` == `origin/main` (this addendum commit adds only report text — zero site-file delta, `git diff 77f4658..bafb88a -- site` empty, so the sweep carries over by construction).
## Re-verification (thirty-third DSH pass, 2026-10-09 22:54–23:00 UTC, post-completion)
Queue gate: `git fetch` + `git status --porcelain` empty at start (HEAD `a21b680` == `origin/main`) → proceed (not `DSH_QUEUE_BUSY`). Fix 1–4 re-audited by direct read of the working tree (== HEAD, zero tracked diff): **Fix 1 GIS 65+ floor** — `a >= 65 ? gis(…) : 0` at the three `solve()` sites (`site/engine/engine.js:249/260/265`) + Service Canada source-fact comment (:88–91) + merge per-partner ≥65 gates (:376–380) + `if (yr < 65) gisSum = 0;` (:382); **Fix 2 clawback only with OAS** — `oasGross > 0 ? Math.min(clawback(…), oasGross) : 0` at :248/:259 + s.3(1) ETA comment (:79–82) + splitting-solver parity :366–367 (`ra.oasGross > 0 ? … : 0` per partner); **Fix 3 mixed rows** — `row.mixed` :390 + depletion guard `!row.mixed` :395 + renderer `†`/legend `app.js` (:812 `†`, :817–819 legend) + legend element `index.html:95` + `t.mixedNote` EN/FR `i18n.js:251/512`; **Fix 4 FIRE** — `fillDefaults` clamp `retireAge < age + 1` engine.js:188, quiz slider `min: 40` app.js:211, `#wi-ret min="40"` index.html:86, FIRE hint EN/FR i18n.js:96/357. All acceptance checks re-executed fresh in this pass:
| Check | Fresh output (this pass) |
|---|---|
| `tests/engine.test.js` | `RESULT: 61 pass, 0 fail` (incl. §14 GIS $0 @56 / clawback $0 @55 repro, §15 clawback 0 pre-OAS & capped at OAS gross @67, §16 couple invariants: zero GIS <65 / zero clawback <65 / net OAS ≥ 0 / depletion-never-fires-on-mixed / fully-draw depletion guard intact [67], §17 fillDefaults 52→53 & 30→40, FIRE first draw 40, GIS/clawback 0 rows 40–64, stale 52/40 → first draw 53) |
| `tests/i18n.test.js` | `I18N-OK all i18n checks passed (50)` = 48 base + the 2 new legend keys (`t.mixedNote` EN+FR parity starting with `†`, `q.retire.hint` FIRE support EN+FR) |
| `tests/ui.smoke.js` | `SMOKE-OK all ui smoke checks passed (146)` (incl. † mixed-row fixtures with bilingual legend, control-single no † / legend hidden, `wi-ret min 40` read from `index.html`, legend element present) |
| `tests/ps-pension.test.js` / `ps-auto-service.test.js` | `70 pass, 0 fail` / `21 pass, 0 fail` (files untouched by this plan) |
| `passes3.js` rerun (live engine, script kept outside the repo) | exit 0, `conservation: OK` ×3 → `audit/math-fix/passes3-pass33.txt` (md5 `01075d0e…` — **byte-identical to passes 14–32**, twenty consecutive deterministic passes). Line-tracked column scan (`.tmp/mathfix25/scan3.py`, run unmodified): **PASS 1** (screenshot repro 52/ON/60k/100k-30k-20k ret 55 spend 93k CPP 60) 43 rows, firstDraw **55**, firstGIS **65** — **0** GIS>0 rows <65, **0** OASnet≠0 rows <65, **0** negative-OASnet, **0** growing-Total-with-Withdraw; row 55 Total $68,327 / Withdraw $102,139 / **OASnet $0 / GIS $0** (old engine: −$3,501 OASnet + $12,916 GIS @56); depletion 56 honest (max totalBal $166,308 @54, finalBal $0); **PASS 2** 50 rows firstDraw 65 firstGIS 65, depletion 82, max total $468,146 @64; **PASS 3 FIRE** 65 rows, first draw @**40** (Withdraw $62,837, CPP/OAS/GIS $0), max total $493,710 @39 = hand-math 350000×1.035¹⁰ ✓, GIS $13,667 first at **65**, depletion 48 → unfunded gap exposed to 94 |
| `scripts/deploy.sh` | `DEPLOY-OK` (fresh this pass, rsync → Unraid `retireapp`, container `curl` marker `retire-planner v1`) |
| Origin byte-check | 3-way sweep `.tmp/mathfix33/sweep33.sh` (pass-32 lineage body, `diff`-proven: header comment + 2 list-path lines retarget only; tracked/ignored lists regenerated via `git ls-files` + `find`/`comm`, `diff` vs pass-32 lists: **byte-identical**, 21+13; ssh `-n`, single remote md5 pass): local `site/` == `git cat-file blob origin/main:` == webroot `/mnt/better/appdata/retireapp` — tracked **21/21 (3-way)** + gitignored `site/vision/*.jpeg` **13/13 (2-way)** = **34/34 match, 0 mismatch** → `SWEEP-OK`; `git fetch` → `HEAD` == `origin/main` == `a21b680`; `git merge-base --is-ancestor 0839826 HEAD` ✓ |
| Live recapture (`mathfix_capture.py` run **unmodified**, canonical `after` + prefix-tagged copy `after33`, retire.krisforbes.ca) | Canonical row JSONs re-captured **byte-identical to the lineage** (`after-couple-rows.json` `129e2a45…`, `after-fire-rows.json` `4af12e59…`); `after33-couple-rows.json` / `after33-fire-rows.json` md5-equal to canon. K-aware 11-column rowsweep (`.tmp/mathfix33/rowsweep33.py`, pass-31 tag retarget, `diff`-proven 3 lines) on the canonical + tagged row JSONs + the two mixed JSONs: **ROWSWEEP-OK** — couple 40 rows firstDraw **55** firstGIS **65**, FIRE 57 rows firstDraw **40** firstGIS **65**, mixed 43 rows firstDraw 53 firstGIS 65; **0** neg-OAS, **0** GIS>0 <65, **0** OAS≠0 <65, **0** growing-Total-with-Withdraw on every capture; **rows 58–64 (the screenshot rows) Total $0 / OAS $0 / GIS $0** (Withdraw $49K @58 then $0, Unfunded $47K→$93K→$79K from CPP@60 — the honest post-depletion drain, vs the screenshot's physically impossible 126→141K @3.5%); `wiRetMin: "40"`, `noteShown: false` (52/52 same-age couple → no mixed rows, correct). FIRE 30/BC/ret 40: `fire_first_draw_age: "40"`. Mobile 390: retire slider `min=40 max=72 value=40`, `sliderRight 367 ≤ vw 390` (no clip), value chip [25, 145], FIRE hint EN present, `svAfter40: "40 years"` |
| Live mixed-window probes (`.tmp/mathfix33/mixed_probe.py` + `mixed_probe_reachable.py`, copied **byte-identical** — md5 `61d66342…`/`4e30a51e…` == pass-32 originals, both run `after33`) | self-OLDER probe (me 52 / pt 50, shared `retireAge: 51` → clamp 53): 0 † rows, `noteShown: false`, 0 violations, `after33-mixed-rows.json` byte-identical to lineage (`96665bbf…`, == passes 15–32). self-YOUNGER reachable probe (me 50 / pt 54, shared `retireAge: 51`): **`MIXEDLIVE-OK`** — merged row **54** mixed: DOM **`daggerRows: ["54"]`** (Total cell renders `$195K †` above `$72K @53` with Withdraw $33K — the plan's honest footnoted growth window), **`noteShown: true`** with EN legend `† One partner is retired, the other is still working: their savings grow at the pre-retirement rate — this row is not in full retirement mode.`, `gisRowsUnder65: []`, `negOASrows: []`, `growingTotalWithDrawRows: []`, `growRowsMissingDagger: []`; `after33-mixed-reachable-rows.json` byte-identical to lineage (`98c29f24…`, == passes 26–32) |
| Additional clamp-driven mixed probe (`.tmp/mathfix33/mixed_probe_5256.py`, pass-32 probe rebuilt from the byte-identical reachable-probe lineage with STATE + filename-suffix retarget only) | me **52** / pt **56**, shared `retireAge: 55` (partner copy clamps to 57): engine mixed row **56** only (`mixed rows: 56`), Total $140,465 @55 → **$269,227 @56** with Withdraw $30,000 (the working partner's 3.5% growth — real, not phantom GIS), GIS/clawback $0 pre-65, `depletionAge: 62` fires only on fully-draw rows (guard intact); live DOM: **`daggerRows: ["56"]`**, `noteShown: true` + EN legend, 0 GIS<65, 0 neg-OAS, 0 undaggered growth rows → **`MIXEDLIVE-OK`**, `after33-mixed5256-rows.json` / `-table.png` |
| Off-LAN (Midhurst `trouble@100.96.20.61`, `audit/offlan_check.py` unmodified) | `OFFLAN-OK`, `"all_ok": true`, `"http_code": "200"`, marker + lang-toggle + i18n FR strings true, `i18n_js_size 39689`, `checked_at 2026-10-09T22:56:10Z` → `audit/bilingual-geo-check.json` |
Determinism: `passes3-pass33.txt` (`01075d0e…`, 20 consecutive), `after-couple-rows.json` + `after33-couple-rows.json` (`129e2a45…`), `after-fire-rows.json` + `after33-fire-rows.json` (`4af12e59…`), `after33-mixed-rows.json` (`96665bbf…`), `after33-mixed-reachable-rows.json` (`98c29f24…`) — all **byte-identical** to the lineage. Frames (PIL-validated 1280×900 ×7, 1170×2532 ×2): canonical `after-couple-table.png` `eec99021…` 63,753 B — the **canonical couple-table frame re-drawn** (this pass drew the documented chart-animation-phase variant as `after33-couple-table.png` `cbac51ed…` 50,314 B, **md5-equal to `after32-couple-table.png`** = passes 21–23/28/30/32 frame; PIL diff vs this pass's canonical: identical size, 666 differing scanlines confined to **y=234–899**, the documented animated-chart band under the fold-invariant header), `after-fire-table.png` + `after33-fire-table.png` `685fd711…` 67,310 B **pixel-identical** to each other (canonical fire-table frame, == passes 1/12–17/20–26/31/32), `after-fire-step-390.png` + `after33-fire-step-390.png` 1170×2532 @3× `761e8055…` 167,045 B **pixel-identical** to passes 26–32, `after33-mixed-table.png` `222c81a1…` 64,537 B (== passes 29–32 frame), `after33-mixed-reachable-table.png` `87594d5a…` 65,278 B (documented passes 26–28/31 frame; PIL diff vs pass-32's `dc6bcf46…`: identical size, 666 differing scanlines confined to **y=234–899** — same animated-band signature; DOM row JSON byte-identical on both), `after33-mixed5256-table.png` `36b82193…` 63,566 B (52/56 clamp-driven probe frame; pass-32 drew `5bde7bb9…`). DOM row JSON byte-identical on all lineage captures, so the evidence row set is unchanged.
Harness notes: Playwright ran with `TMPDIR=/home/ubuntu/projects/retire-planner/.pwtmp/tmp` (harness TMPDIR read-only; no site impact); `scripts/deploy.sh`, `audit/mathfix_capture.py` (canonical leg) and `audit/offlan_check.py` run unmodified from the repo; ssh byte-check uses `-n`; sweep33 rebuilt under `.tmp/mathfix33/` (gitignored) from the pass-32 original with tag retarget only (`diff`-proven: header + 2 list paths), lists regenerated from `git ls-files` + `find`/`comm` (`diff`-proven byte-identical vs pass-32: 21 tracked + 13 ignored); both mixed probes copied byte-identical (md5-proven) and run with `TAG=after33`; FIRE/mobile legs via the prefix-tagged copy of `mathfix_capture.py` (`TAG.startswith('after')`, `diff`-proven single-line delta; artifacts moved into `audit/math-fix/` — the copy resolves `OUT` relative to itself). Rowsweep result note: running the pair heuristic on the mixed-reachable JSON reports the documented **53→54 growing-Total-with-Withdraw pair** — that row carries ` †` + the legend (`daggerRows: ["54"]`), i.e. exactly the plan's intended honest footnoted mixed window ("total grows — fine"); the probe's per-row validator (canonical for mixed JSONs, pass-26→32 convention) is green, and the canonical/non-mixed set prints `ROWSWEEP-OK`. Image inspection of the PNGs is byte-verified against the visually confirmed renders of passes 1–32 (identical md5 + IHDR where stable; frame variants enumerated above); this harness model is text-only (`read_image` not used — same policy as passes 24–32); PNG pixel diagnostics via Pillow (numpy absent).
No code change required — plan executed end-to-end; fix commit `08398267040a832bdec0910626423f0dbfeb0a7f` ("engine: GIS 65+ floor, clawback only with OAS, couple mixed-row footnote, FIRE retire age 40") is at `origin/main` (confirmed ancestor of `HEAD` via `git merge-base --is-ancestor`; working tree byte-identical to it under `site/`), so this pass re-ran every acceptance gate fresh against the deployed build. Final: **MATH_FIX_DONE**.
+1 -1
View File
@@ -5,7 +5,7 @@
"has_i18n_script": true,
"i18n_js_fr_strings": true,
"i18n_js_size": 39689,
"checked_at": "2026-10-09T22:50:34Z",
"checked_at": "2026-10-09T22:56:10Z",
"vantage": "trouble@100.96.20.61 (Midhurst, off-LAN)",
"all_ok": true
}