[P1] Preserve replay oxygen peaks at gas-switch boundaries #19

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

Priority: P1
Type: bug
Source: project review requested 2026-10-26

Location: src/diveReplay.ts:262

Problem and evidence

Replay uses the departure gas for each leg endpoint and misses the new gas at the switch depth. Air to EAN50 at 21 m followed by ascent reports peak ppO2 0.654 bar instead of 1.557 bar and suppresses the elevated oxygen warning.

Suggested correction

Evaluate both sides of gas-switch boundaries for peak exposure and represent instantaneous gas changes in timeline presentation.

Acceptance criteria

Regression covers richer-gas ascent switch, correct peak/warning and exact-boundary scrubber behavior; gas demand and tissues remain correct; 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 Location: `src/diveReplay.ts:262` Problem and evidence Replay uses the departure gas for each leg endpoint and misses the new gas at the switch depth. Air to EAN50 at 21 m followed by ascent reports peak ppO2 0.654 bar instead of 1.557 bar and suppresses the elevated oxygen warning. Suggested correction Evaluate both sides of gas-switch boundaries for peak exposure and represent instantaneous gas changes in timeline presentation. Acceptance criteria Regression covers richer-gas ascent switch, correct peak/warning and exact-boundary scrubber behavior; gas demand and tissues remain correct; pnpm verify passes. Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
Author
Owner

Fixed and pushed to main. Replay retains both sides of instantaneous gas switches, so EAN50 selected at 21 m contributes its full 1.557 bar ppO2 peak and exact-boundary readout. Regression confirms no invented gas demand or tissue evolution at the instant of switching. All 136 tests, typecheck/build/offline/release checks pass. Commit and test evidence are in the repository maintenance log.

Fixed and pushed to main. Replay retains both sides of instantaneous gas switches, so EAN50 selected at 21 m contributes its full 1.557 bar ppO2 peak and exact-boundary readout. Regression confirms no invented gas demand or tissue evolution at the instant of switching. All 136 tests, typecheck/build/offline/release checks pass. Commit and test evidence are in the repository maintenance log.
pedro closed this issue 2026-10-27 02:02:33 +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#19
No description provided.