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

This commit is contained in:
krisf committed 2026-10-09 19:06:43 -04:00
1 parent 864ce3afea
commit ab9e1f9123
2 files changed
+25 -1

No files matched your search

+24
View File
@@ -937,3 +937,27 @@ Harness notes: Playwright ran with `TMPDIR=/home/ubuntu/projects/retire-planner/
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**.
Addendum (post-push, same pass): audit commit `f20e62a29c62a45948b3b1f705755846d003aa0c` pushed `b8bef71..f20e62a` → `origin/main` (report + fresh off-LAN stamp `2026-10-09T23:01:30Z`; 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`: `git diff b8bef71..f20e62a -- site` = **0 lines** (zero site delta, so the sweep carries over by construction), 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` == `f20e62a`.
## Re-verification (thirty-fifth DSH pass, 2026-10-09 23:03–23:08 UTC, post-completion)
Queue gate: `git fetch` + `git status --porcelain` empty at start (HEAD `864ce3a` == `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` (:810 `mixedAny`, :812 `†` on Total cell, :818–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-pass35.txt` (md5 `01075d0e…` — **byte-identical to passes 14–34**, twenty-two consecutive deterministic passes). Line-tracked column scan (`.tmp/mathfix25/scan3.py`, run unmodified → `.tmp/mathfix35/scan35.log`): **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); row 65 CPP $7,200 / OASnet $9,150 / **GIS $12,567** (first GIS); **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/mathfix35/sweep35.sh` (pass-34 lineage body, `diff`-proven: header comment + 2 list-path lines retarget only; tracked/ignored lists regenerated via `git ls-files` + `find -printf '%P\n'`/`comm`, `diff` vs pass-34 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` == `864ce3a`; `git merge-base --is-ancestor 0839826 HEAD` ✓ |
| Live recapture (`mathfix_capture.py` run **unmodified**, canonical `after` + prefix-tagged copy `after35` [md5 `9489cef4…` == pass-30→34 copy], retire.krisforbes.ca) | Canonical row JSONs re-captured **byte-identical to the lineage** (`after-couple-rows.json` `129e2a45…`, `after-fire-rows.json` `4af12e59…`); `after35-couple-rows.json` / `after35-fire-rows.json` md5-equal to canon. K-aware 11-column rowsweep (`.tmp/mathfix35/rowsweep35.py`, pass-34 tag retarget, `diff`-proven 2 lines) on the canonical + tagged row JSONs: **ROWSWEEP-OK** — couple 40 rows firstDraw **55** firstGIS **65**, FIRE 57 rows firstDraw **40** 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/mathfix35/mixed_probe.py` + `mixed_probe_reachable.py` + `mixed_probe_5256.py`, all copied **byte-identical** — md5 `61d66342…`/`4e30a51e…`/`377a4167…` == pass-34 originals, all run with argv tag `after35`) | self-OLDER probe (me 52 / pt 50, shared `retireAge: 51` → clamp 53): 0 † rows, `noteShown: false`, `gisRowsUnder65: []`, `after35-mixed-rows.json` byte-identical to lineage (`96665bbf…`, == passes 15–34). self-YOUNGER reachable probe (me 50 / pt 54, shared `retireAge: 51`): **`MIXEDLIVE-OK`** — DOM **`daggerRows: ["54"]`**, **`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: []`; `after35-mixed-reachable-rows.json` byte-identical to lineage (`98c29f24…`, == passes 26–34) |
| 52/56 clamp-driven mixed probe (`mixed_probe_5256.py`, byte-identical copy, run `after35`) + engine-side legs (inline node, app-normalized percents ÷100) | me **52** / pt **56**, shared `retireAge: 55`: engine mixed row **56** only, Total $140,465 @55 → **$269,227 @56** with Withdraw $30,000 (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) — reproduces the pass-33/34 figures exactly; live DOM: **`daggerRows: ["56"]`** (`$269K †` @56), `noteShown: true` + EN legend, 0 GIS<65, 0 neg-OAS, 0 undaggered growth rows → **`MIXEDLIVE-OK`**, `after35-mixed5256-rows.json` (`53d0dec5…` == passes 33–34) / `-table.png`. Reachable-pair engine leg (me 50 / pt 54, ret 51): mixed rows **[54]**, firstDraw 51, GIS/clawback $0 on every <65 draw row |
| Off-LAN (Midhurst `trouble@100.96.20.61`, `audit/offlan_check.py` unmodified) | `OFFLAN-OK`, `"all_ok": true`, `"http_code": "200"`, `i18n_js_size 39689`, `checked_at 2026-10-09T23:05:52Z` → `audit/bilingual-geo-check.json` |
Determinism: `passes3-pass35.txt` (`01075d0e…`, 22 consecutive), `after-couple-rows.json` + `after35-couple-rows.json` (`129e2a45…`), `after-fire-rows.json` + `after35-fire-rows.json` (`4af12e59…`), `after35-mixed-rows.json` (`96665bbf…`), `after35-mixed-reachable-rows.json` (`98c29f24…`), `after35-mixed5256-rows.json` (`53d0dec5…`) — all **byte-identical** to the lineage. Frames (PIL-validated 1280×900 ×7, 1170×2532 ×2): canonical `after-couple-table.png` + `after34-couple-table.png` `cbac51ed…` 50,314 B **pixel-identical** (documented chart-animation-phase variant, == passes 21–23/28/30/32–34 frame; this pass drew the canonical frame as `after35-couple-table.png` `eec99021…` 63,753 B, == passes 20/24–27/33 canonical; PIL diff canonical-vs-tagged: identical size, 666 differing scanlines confined to **y=234–899**, the documented animated-chart band under the fold-invariant header), `after-fire-table.png` `685fd711…` 67,310 B (canonical fire-table frame, == passes 1/12–17/20–26/31–34; `after35-fire-table.png` `b4ed3a16…` 53,323 B = passes 18–30/34 variant; PIL diff band confined to **y=234–899**), `after-fire-step-390.png` + `after35-fire-step-390.png` 1170×2532 @3× `761e8055…` 167,045 B **pixel-identical** to passes 26–34, `after35-mixed-table.png` `c1d065cc…` 51,653 B **pixel-identical** to `after28-mixed-table.png` (documented pass-28 frame; PIL diff vs this pass-34 frame `222c81a1…`: band **y=234–899**), `after35-mixed-reachable-table.png` `87594d5a…` 65,278 B **pixel-identical** to `after33-mixed-reachable-table.png` (documented passes 26–28/31/33 frame; pass-34 drew `dc6bcf46…`, PIL band **y=234–899**), `after35-mixed5256-table.png` `36b82193…` 63,566 B **byte-identical** to `after33/34-mixed5256-table.png`. 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`; sweep35 rebuilt under `.tmp/mathfix35/` (gitignored) from the pass-34 original with tag retarget only (`diff`-proven: header + 2 list paths), lists regenerated from `git ls-files` + `find -printf '%P\n'`/`comm` (`diff`-proven byte-identical vs pass-34: 21 tracked + 13 ignored); all three mixed probes copied byte-identical (md5-proven) and run with argv `after35`; FIRE/mobile legs via the md5-identical prefix-tagged copy of `mathfix_capture.py` (artifacts moved into `audit/math-fix/` — the copy resolves `OUT` relative to itself); engine-side mixed legs inline in node with app-normalized rates (`app.js inputs()` divides percents by 100). Image inspection of the PNGs is byte-verified against the visually confirmed renders of passes 1–34 (identical md5 + IHDR where stable; frame variants enumerated above); this harness model is text-only (`read_image` not used — same policy as passes 24–34); 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`; `git diff 0839826 HEAD -- site` empty → 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-09T23:01:30Z",
"checked_at": "2026-10-09T23:05:52Z",
"vantage": "trouble@100.96.20.61 (Midhurst, off-LAN)",
"all_ok": true
}