Repository navigation
fix(xr): an analysis that hangs or fails can no longer freeze the switcher (S7) - #88
Merged
Merged
Conversation
…tcher Story S7 (#79) of epic #72. The in-scene mode switcher queued every transition behind the previous one with no limit, so one activate that never settled froze it for the session (LIFECYCLE-1). - changeAnalysis cancels instead of queueing: a newer pick aborts the activation in flight (AbortSignal on the activation and its token), activate has a timeout (45 s, project evolution 90 s), the cleanup hooks are abandoned after 8 s, and an abandoned activate that settles later is deactivated again. - A failure lands on the selector with its reason and a "Retry" option, does not become requestedMode, tells the room when the pick was local, and the room's echo of the failed pick is ignored (LIFECYCLE-3). - openSelector skips its selection announcement when a newer pick happened meanwhile (LIFECYCLE-2). - Dependency graph and historical comparison pass the signal to fetch and reject on a load failure; the dependency load error is sticky (LIFECYCLE-5); the dependency start shows progress on the selector, re-arms its watchdog on progress, attaches to a running analysis and bounds its send retries (LIFECYCLE-6, DEPGRAPH-7). - Project evolution re-entry after a half-built frame no longer throws (LIFECYCLE-4). - Collaboration: per-runtime error isolation with logging, analysis-view applied last, reconnect back-off, revision floor reset by a room snapshot, no silent give-up registering (LIFECYCLE-9, LIFECYCLE-11). - The end of a containment fit animation no longer re-shows a chart hidden meanwhile. - The mode and immersive harnesses are served over HTTP so the modes' datasets load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
…nto claude/project-thread-kvvyg6-lifecycle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adrián · project thread
Closes #79 (story S7 of epic #72). Also fixes LIFECYCLE-4 (from S10 #82) and DEPGRAPH-7 (from S13 #85), because both sit on the same code path.
What was wrong
The in-scene switcher queued every transition behind the one before it, with no time limit. One
activate()that never settled froze the switcher for the rest of the session. For example, a dependency dataset fetch that stalled over a tunnel did this, and even "Normal analysis" stopped responding (LIFECYCLE-1, blocker).Failures also had problems:
analysis-mode-selectioncould send everyone back to the selector after they had picked an analysis.Changes
AbortSignalon the activation and its token. Abandoned activations that settle later are deactivated again.activatetimes out after 45 s by default, set per lifecycle withactivateTimeoutMs(project evolution uses 90 s). The cleanup hooks time out after 8 s.requestedMode.analysis-mode-selectionwhen the pick was local.getState()exposesactivation,lastErrorandselectorStatus.openSelectoronly announces the selection if no newer pick happened since it opened.fetch.fetch, a failed load rejects, and an abandoned activation exits early.null.setAttribute.analysis-viewis applied last in a snapshot.test:xr-mode-harnessandtest:xr-immersive-harnessnow serve over HTTP (test/helpers/staticHttpServer.cjs). Underfile://every dataset fetch was blocked, so data failures could never show up in them.Verification
npm test: 1097/1097 passing, lint at 158 warnings (the budget).analysisModeLifecycleContract.test.cjs(8 tests): a hung activate is abandoned on a new pick; a timeout produces a visible error with Retry; the echo does not retry a failure; a failure caused by an echo does not move the room; no late selection; a hung hook is abandoned; selector progress; revision reset on snapshot.test:xr-mode-harness,test:xr-harness,test:project-evolution-harnessandtest:xr-immersive-harnessall pass locally.activateHangs: Normal analysis opens.activateThrows: a visible error, one deactivate, the room gets the selection.selectorLateMessage: the pick is kept.datasetFails: a visible HTTP 500.rapidSwitch: converges.Needs your eyes in a headset: read the error and the Retry label on the selector, and the dependency graph's "Opening dependencies…" progress.
Generated by Claude Code