[P2] Separate CCR oxygen accounting from user-controlled gas names #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: P2
Type: bug
Source: project review requested 2026-10-26
Location:
src/models/zhl16c.ts:426; src/profile.ts:126Problem and evidence
An accepted imported CCR plan can name its diluent Oxygen and its pure oxygen supply O2 supply. The name collides with the internal metabolic oxygen bucket. A two-minute profile needing 11.843 L diluent and 2 L oxygen charges both cylinders 13.843 L.
Suggested correction
Track metabolic oxygen independently from breathing-gas names using stable supply identity; preserve or migrate existing plan compatibility.
Acceptance criteria
Custom-name CCR regression attributes exact independent demands to supplies; existing OC/CCR and import/share round trips pass; pnpm verify passes.
Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
Fixed and pushed to main. CCR metabolic oxygen has its own cumulative field and is attributed independently in planner and live cylinder accounting. Custom diluent named Oxygen now consumes 11.843 L diluent and 2 L oxygen in the reproduced profile; open-circuit pure Oxygen retains normal gas accounting. The independent reference adapter translates its historical serialized Oxygen bucket at the comparison boundary only. All 137 tests, including the unchanged independent numerical/demand corpus, and typecheck/build/offline/release checks pass.
cmpreproduction step fails at HEAD #122