[P3] DECOMPRESSION-MODELS.md still says live automatic decompression runs synchronously, but #53 moved it to the projection worker #125

Open
opened 2026-10-31 19:47:42 +00:00 by pedro · 0 comments
Owner

Priority: P3
Type: bug
Source: full codebase review requested 2026-10-31 (independently reproduced against 2cac7cf)

Location: docs/DECOMPRESSION-MODELS.md:33, src/App.tsx:543, src/App.tsx:569-591, docs/MODEL-ARCHITECTURE.md:13, docs/USER-GUIDE.md:88, src/planner/ProfilePlanner.tsx:680-699

Problem and evidence

docs/DECOMPRESSION-MODELS.md:33 says: "Live automatic decompression and the planner Auto ascent button also compute their one-shot schedules synchronously." That stopped being true for the live half in commit d48a22e (#53). At HEAD, beginAutomaticDeco in src/App.tsx pauses the dive and stores an ascentRequest with purpose: "ascent". useProjection(ascentRequest?.input ?? null, ascentRequest?.id) (App.tsx:543) then sends that request to the projection worker. The safety-stop check uses the same path (kind "safety"). Only the planner's Auto ascent button still runs on the main thread: ProfilePlanner.tsx:680-699 calls autoAscent(...) from src/planner/profile.ts directly in the click handler. This sentence now contradicts the code and also MODEL-ARCHITECTURE.md:13 and USER-GUIDE.md:88, which describe the worker path and pending/cancel behavior correctly. The problem is only in the documentation; the app itself behaves correctly.

I read DECOMPRESSION-MODELS.md:33 at HEAD 2cac7cf; it contains the quoted sentence. App.tsx:543 has const ascentCalculation = useProjection(ascentRequest?.input ?? null, ascentRequest?.id);. beginAutomaticDeco(kind) (about App.tsx:569-591) calls setRunning(false) and then setAscentRequest({ ..., input: { model, conservatism, state: dive.tissues, ..., purpose: "ascent" } }), so the live ascent is worker-based and asynchronous. MODEL-ARCHITECTURE.md:13 says: "Authored-profile and live automatic-ascent requests for all models use the projection worker's ascent purpose ... Live safety-stop completion uses the same request path. The live clock pauses until the request completes". USER-GUIDE.md:88 describes the pause and the "Cancel ascent calculation" button. ProfilePlanner.tsx:685 calls autoAscent(resolvedRows, rmv, ...) inline in onClick, so that half of the sentence is still accurate. git show d48a22e --stat shows #53 changed MODEL-ARCHITECTURE.md, USER-GUIDE.md, App.tsx and the tests, but not DECOMPRESSION-MODELS.md. The last commit touching that file is 4550783, which is older.

Suggested correction

Replace the sentence in docs/DECOMPRESSION-MODELS.md:33 with something like: "Live automatic decompression and the post-safety-stop check send one-shot ascent requests to the projection worker; the live clock pauses until the result arrives and can be cancelled. Only the planner Auto ascent button still computes its schedule synchronously on the main thread."

Acceptance criteria

DECOMPRESSION-MODELS.md no longer says live automatic decompression is synchronous, and its wording matches MODEL-ARCHITECTURE.md:13 and USER-GUIDE.md:88. If the repo's doc-consistency checks cover this text, they pass. No code change is needed. Optional regression check: a grep or doc test that "synchronously" in DECOMPRESSION-MODELS.md refers only to the planner Auto ascent button. pnpm verify passes.

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

Priority: P3 Type: bug Source: full codebase review requested 2026-10-31 (independently reproduced against `2cac7cf`) Location: `docs/DECOMPRESSION-MODELS.md:33`, `src/App.tsx:543`, `src/App.tsx:569-591`, `docs/MODEL-ARCHITECTURE.md:13`, `docs/USER-GUIDE.md:88`, `src/planner/ProfilePlanner.tsx:680-699` Problem and evidence docs/DECOMPRESSION-MODELS.md:33 says: "Live automatic decompression and the planner Auto ascent button also compute their one-shot schedules synchronously." That stopped being true for the live half in commit d48a22e (#53). At HEAD, `beginAutomaticDeco` in src/App.tsx pauses the dive and stores an `ascentRequest` with `purpose: "ascent"`. `useProjection(ascentRequest?.input ?? null, ascentRequest?.id)` (App.tsx:543) then sends that request to the projection worker. The safety-stop check uses the same path (kind "safety"). Only the planner's Auto ascent button still runs on the main thread: ProfilePlanner.tsx:680-699 calls `autoAscent(...)` from src/planner/profile.ts directly in the click handler. This sentence now contradicts the code and also MODEL-ARCHITECTURE.md:13 and USER-GUIDE.md:88, which describe the worker path and pending/cancel behavior correctly. The problem is only in the documentation; the app itself behaves correctly. I read DECOMPRESSION-MODELS.md:33 at HEAD 2cac7cf; it contains the quoted sentence. App.tsx:543 has `const ascentCalculation = useProjection(ascentRequest?.input ?? null, ascentRequest?.id);`. `beginAutomaticDeco(kind)` (about App.tsx:569-591) calls setRunning(false) and then setAscentRequest({ ..., input: { model, conservatism, state: dive.tissues, ..., purpose: "ascent" } }), so the live ascent is worker-based and asynchronous. MODEL-ARCHITECTURE.md:13 says: "Authored-profile and live automatic-ascent requests for all models use the projection worker's `ascent` purpose ... Live safety-stop completion uses the same request path. The live clock pauses until the request completes". USER-GUIDE.md:88 describes the pause and the "Cancel ascent calculation" button. ProfilePlanner.tsx:685 calls `autoAscent(resolvedRows, rmv, ...)` inline in onClick, so that half of the sentence is still accurate. `git show d48a22e --stat` shows #53 changed MODEL-ARCHITECTURE.md, USER-GUIDE.md, App.tsx and the tests, but not DECOMPRESSION-MODELS.md. The last commit touching that file is 4550783, which is older. Suggested correction Replace the sentence in docs/DECOMPRESSION-MODELS.md:33 with something like: "Live automatic decompression and the post-safety-stop check send one-shot `ascent` requests to the projection worker; the live clock pauses until the result arrives and can be cancelled. Only the planner Auto ascent button still computes its schedule synchronously on the main thread." Acceptance criteria DECOMPRESSION-MODELS.md no longer says live automatic decompression is synchronous, and its wording matches MODEL-ARCHITECTURE.md:13 and USER-GUIDE.md:88. If the repo's doc-consistency checks cover this text, they pass. No code change is needed. Optional regression check: a grep or doc test that "synchronously" in DECOMPRESSION-MODELS.md refers only to the planner Auto ascent button. pnpm verify passes. Scope: maintenance of the educational simulator. Preserve historical R1 acceptance and operational-validation limits.
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#125
No description provided.