[P1] Planner holds at the bottom and reports a false 24-hour error when the first stop moves deeper during ascent #26

Closed
opened 2026-10-27 02:59:42 +00:00 by pedro · 1 comment
Owner

Priority: P1
Type: bug
Source: project review requested 2026-10-26 (second pass)

Location: src/models/zhl16c.ts:640-670 (decompressionPlan; shared by ZHL-16B/C and VPM-B)

Problem and evidence

The first stop (anchorDepth) is fixed from the GF-low ceiling at the start depth. Slow tissues keep loading during a long ascent, so the arrival check at that stop can fail. The planner then holds one minute at a time at the current depth (the bottom), which only makes the check worse, until the 24-hour guard fires. It never tries a deeper, reachable stop.

Reproduction: ZHL-16C, air, advance(newDive(), 42, 5.58, 18, 9), GF 45/85, 3 m spacing. GF-45 ceiling is 2.657 m (anchor 3 m); the ceiling on arrival at 3 m is 3.035 m. Observed: 1435 one-minute holds at 42 m, then "Projection exceeded the 24-hour limit", while NDL reports 3.1 min. Expected: a short schedule (a single 6 m stop, about 5.7 min). The review sweep found hundreds of such states (air, EAN32, trimix; 15–90 m; first hour). Live auto-deco, planner ascent append and VPM-B NDL (which throws at, e.g., air 45 m, conservatism 3, runtime 2.5–5 min) inherit it.

Suggested correction

When travel to the next stop fails and the diver is deeper than it, move to the shallowest reachable regular stop between the two before holding. Hold at a non-stop depth only when no regular stop is reachable. Keep the documented GF-low anchor convention.

Acceptance criteria

Regression for the reproduction and a sweep of short dives with no false horizon errors and no first-leg bottom hold; reference validation (pnpm validate:references) unchanged; pnpm verify passes.

Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.

Priority: P1 Type: bug Source: project review requested 2026-10-26 (second pass) Location: `src/models/zhl16c.ts:640-670 (decompressionPlan; shared by ZHL-16B/C and VPM-B)` Problem and evidence The first stop (anchorDepth) is fixed from the GF-low ceiling at the start depth. Slow tissues keep loading during a long ascent, so the arrival check at that stop can fail. The planner then holds one minute at a time at the current depth (the bottom), which only makes the check worse, until the 24-hour guard fires. It never tries a deeper, reachable stop. Reproduction: ZHL-16C, air, `advance(newDive(), 42, 5.58, 18, 9)`, GF 45/85, 3 m spacing. GF-45 ceiling is 2.657 m (anchor 3 m); the ceiling on arrival at 3 m is 3.035 m. Observed: 1435 one-minute holds at 42 m, then "Projection exceeded the 24-hour limit", while NDL reports 3.1 min. Expected: a short schedule (a single 6 m stop, about 5.7 min). The review sweep found hundreds of such states (air, EAN32, trimix; 15–90 m; first hour). Live auto-deco, planner ascent append and VPM-B NDL (which throws at, e.g., air 45 m, conservatism 3, runtime 2.5–5 min) inherit it. Suggested correction When travel to the next stop fails and the diver is deeper than it, move to the shallowest reachable regular stop between the two before holding. Hold at a non-stop depth only when no regular stop is reachable. Keep the documented GF-low anchor convention. Acceptance criteria Regression for the reproduction and a sweep of short dives with no false horizon errors and no first-leg bottom hold; reference validation (`pnpm validate:references`) unchanged; pnpm verify passes. Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
Author
Owner

Fixed on maintenance/review-2026-10-27 in e6dfb86 — PR #40.

Planner moves to the shallowest reachable regular stop before holding. 2,160-plan B/C/VPM sweep: 23 false horizon errors become schedules, 17 switch plans hold at a shallower reachable stop (same or 1 min shorter), none regress; ZHL-16C/VPM-B bottom-hold sweep 98/51 → 0. Reference comparison output byte-identical to main. Regression in src/maintenance.test.ts (fails on main).

Branch verification: pnpm verify 145 tests and release budgets; Chromium/Firefox/WebKit review, replay, compatibility and offline lifecycle checks; CI verify runs #111/#112 pass. Record: docs/MAINTENANCE-2026-10-27.md. Closes on merge of PR #40.

Fixed on `maintenance/review-2026-10-27` in `e6dfb86` — [PR #40](https://git.guresky.com/pedro/DiveSim/pulls/40). Planner moves to the shallowest reachable regular stop before holding. 2,160-plan B/C/VPM sweep: 23 false horizon errors become schedules, 17 switch plans hold at a shallower reachable stop (same or 1 min shorter), none regress; ZHL-16C/VPM-B bottom-hold sweep 98/51 → 0. Reference comparison output byte-identical to main. Regression in `src/maintenance.test.ts` (fails on main). Branch verification: `pnpm verify` 145 tests and release budgets; Chromium/Firefox/WebKit review, replay, compatibility and offline lifecycle checks; CI verify runs #111/#112 pass. Record: `docs/MAINTENANCE-2026-10-27.md`. Closes on merge of PR #40.
pedro closed this issue 2026-10-27 05:39:05 +00:00
Sign in to join this conversation.
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#26
No description provided.