Fix second review findings #26–#39 #40

Merged
pedro merged 18 commits from maintenance/review-2026-10-27 into main 2026-10-27 05:39:05 +00:00
Owner

Fixes the 14 findings from the second project review (#26–#39), one commit per issue, plus two follow-ups found by an independent review of this diff.

P1

  • #26 Planner false 24-hour error. When the first stop moved deeper during a long ascent, the planner held at the bottom until the 24-hour guard fired. It now stops at the shallowest reachable regular stop. Of 2,160 plans swept (B/C/VPM, with and without switches), 23 false errors become schedules and 17 switch plans hold at a shallower reachable stop (same or 1 min shorter totals); none get worse. An independent 9,072-plan sweep agrees (57 changed, none longer, no new errors).
  • #27 Live crash near a switch depth. A tick ending a rounding error past a crossed switch produced a negative split and unmounted the app. Splits now clamp to the travel interval (152 of 735 crash combinations go to 0), and a live calculation error pauses the dive with an alert instead.

P2

  • #28 Saved plans no longer lost across tabs or after one unreadable entry; unreadable libraries are never overwritten.
  • #29 Number fields no longer write rounded values back on blur (this was cancelling auto-deco, drifting CCR settings and resetting planner replay); Escape closes dialogs from unedited fields.
  • #30 Opening Reef Runner keeps the simulator mounted: planner drafts, live units and planner requests survive.
  • #31 VPM-B NDL treats probe schedules beyond 24 h as "stops required" instead of failing.
  • #32 Reef Runner steering, bank and Escape keys work after clicking a game button (regression from #22).

P3

#33 safety stops and switch-depth drafts survive unit changes · #34 planner replay keeps the selected speed · #35 dive time restarts on re-descent · #36 no false "Update download failed" in other tabs · #37 superseded waiting offline copies are deleted · #38 SDM imports enforce 1–200 dives · #39 /assets/* cached immutably, as documented.

Behaviour change to review

#26 changes plans whose first ascent leg previously couldn't reach the anchor stop. It moves to the shallowest reachable regular stop rather than holding at the bottom or a switch depth. The ceiling checks on every leg are unchanged, and the independent reference comparison output is byte-identical to main.

Verification

  • pnpm verify: 145 tests, build and release budgets (JS 167,550 / startup 105,573 gzip bytes).
  • Reference comparison is identical to main after every planner commit.
  • New regressions: src/maintenance.test.ts and scripts/check-followup-browser.mjs. Each new browser check was confirmed to fail on the code without its fix.
  • Chromium, Firefox and WebKit: review, replay, compatibility and five-build offline lifecycle checks pass. Chromium only: maintenance, startup, import-performance and Reef Runner performance checks pass.
  • Fixes two pre-existing browser-check timing faults that also fail on main.

Hosted checks (deploy run, asset parity, /assets/* immutable header) need the deploy that runs on merge. Full record: docs/MAINTENANCE-2026-10-27.md.

Closes #26, closes #27, closes #28, closes #29, closes #30, closes #31, closes #32, closes #33, closes #34, closes #35, closes #36, closes #37, closes #38, closes #39

🤖 Generated with Claude Code

Fixes the 14 findings from the second project review (#26–#39), one commit per issue, plus two follow-ups found by an independent review of this diff. ## P1 - **#26 Planner false 24-hour error.** When the first stop moved deeper during a long ascent, the planner held at the bottom until the 24-hour guard fired. It now stops at the shallowest reachable regular stop. Of 2,160 plans swept (B/C/VPM, with and without switches), 23 false errors become schedules and 17 switch plans hold at a shallower reachable stop (same or 1 min shorter totals); none get worse. An independent 9,072-plan sweep agrees (57 changed, none longer, no new errors). - **#27 Live crash near a switch depth.** A tick ending a rounding error past a crossed switch produced a negative split and unmounted the app. Splits now clamp to the travel interval (152 of 735 crash combinations go to 0), and a live calculation error pauses the dive with an alert instead. ## P2 - **#28** Saved plans no longer lost across tabs or after one unreadable entry; unreadable libraries are never overwritten. - **#29** Number fields no longer write rounded values back on blur (this was cancelling auto-deco, drifting CCR settings and resetting planner replay); Escape closes dialogs from unedited fields. - **#30** Opening Reef Runner keeps the simulator mounted: planner drafts, live units and planner requests survive. - **#31** VPM-B NDL treats probe schedules beyond 24 h as "stops required" instead of failing. - **#32** Reef Runner steering, bank and Escape keys work after clicking a game button (regression from #22). ## P3 #33 safety stops and switch-depth drafts survive unit changes · #34 planner replay keeps the selected speed · #35 dive time restarts on re-descent · #36 no false "Update download failed" in other tabs · #37 superseded waiting offline copies are deleted · #38 SDM imports enforce 1–200 dives · #39 `/assets/*` cached immutably, as documented. ## Behaviour change to review #26 changes plans whose first ascent leg previously couldn't reach the anchor stop. It moves to the shallowest reachable regular stop rather than holding at the bottom or a switch depth. The ceiling checks on every leg are unchanged, and the independent reference comparison output is byte-identical to `main`. ## Verification - `pnpm verify`: 145 tests, build and release budgets (JS 167,550 / startup 105,573 gzip bytes). - Reference comparison is identical to `main` after every planner commit. - New regressions: `src/maintenance.test.ts` and `scripts/check-followup-browser.mjs`. Each new browser check was confirmed to fail on the code without its fix. - Chromium, Firefox and WebKit: review, replay, compatibility and five-build offline lifecycle checks pass. Chromium only: maintenance, startup, import-performance and Reef Runner performance checks pass. - Fixes two pre-existing browser-check timing faults that also fail on `main`. Hosted checks (deploy run, asset parity, `/assets/*` immutable header) need the deploy that runs on merge. Full record: `docs/MAINTENANCE-2026-10-27.md`. Closes #26, closes #27, closes #28, closes #29, closes #30, closes #31, closes #32, closes #33, closes #34, closes #35, closes #36, closes #37, closes #38, closes #39 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When travel to the planned next stop fails, the planner now moves to the shallowest reachable regular stop before holding, instead of holding at a deeper non-stop depth such as the bottom or a switch depth. Reference validation output is unchanged. In a 2,160-plan sweep, 23 false 24-hour errors become schedules and 17 switch plans hold at a shallower reachable stop (same or 1 min shorter totals).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gasTravel now clamps switch depths inside the tolerance to the travel interval, so a tick ending a rounding error past a crossed switch never produces a negative split. The live tick and +1:00 step pause with an alert on any calculation error instead of unmounting the app. The 735-combination rate/speed/depth/switch sweep goes from 152 crashes to none; reference validation output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PlanLibrary's hashchange listener kept the restore callback from its first render, so changeUnits converted from stale units. Read the latest restore and units through a ref.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An update accepted during the version round trips could activate the waiting build just before its cache was deleted. All checks now run after both round trips, including the waiting worker's installed state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The compatibility check sampled the educational notice once, before React opened it (fails on WebKit on main too). The follow-up check waits for planner content before clicking Close, avoiding a layout-shift race, and covers same-tab share links after a units change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record second maintenance review fixes #26–#39
All checks were successful
Verify simulator / verify (push) Successful in 21s
Verify simulator / verify (pull_request) Successful in 21s
Deploy Pages / deploy (push) Successful in 33s
37ca65020c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pedro merged commit 37ca65020c into main 2026-10-27 05:39:05 +00:00
Author
Owner

Hosted confirmation after merging PR #40 (main 37ca650, deploy run #113 succeeded):

  • check-hosted-assets against https://dive.pt3r.dev/: HTML, CSS, deferred chunks and calculation worker are byte-identical to a local build of 37ca650; MIME, security, index revalidation and hashed-asset caching headers pass. /assets/* serves Cache-Control: public, max-age=31536000, immutable.
  • Chromium against production: check-followup-browser (#28, #29, #30, #32, #33, #34, #38) and check-maintenance-browser pass.
Hosted confirmation after merging PR #40 (main `37ca650`, deploy run #113 succeeded): - `check-hosted-assets` against https://dive.pt3r.dev/: HTML, CSS, deferred chunks and calculation worker are byte-identical to a local build of `37ca650`; MIME, security, index revalidation and hashed-asset caching headers pass. `/assets/*` serves `Cache-Control: public, max-age=31536000, immutable`. - Chromium against production: `check-followup-browser` (#28, #29, #30, #32, #33, #34, #38) and `check-maintenance-browser` pass.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: pedro/DiveSim#40
No description provided.