Skip to content

Guided lesson tests: wait out the simulator's rebuild, not a fixed time - #175

Merged
david-firia merged 1 commit into
mainfrom
guided-ring-flake
Dec 3, 2026
Merged

david-firia merged 1 commit into
mainfrom
guided-ring-flake

Conversation

@david-firia

Copy link
Copy Markdown
Contributor

Fixes two intermittent CI failures that block unrelated PRs (seen on #172, and on a build of main): learn-guided "and the ring is on the board again" and learn-journey "changing the words meets it". Tests only; nothing a person sees changes.

Cause. Timed in the browser: after device.disconnect() the simulator is back and the CodeX part the step points at is found and on screen within about a second, but the ring shows only 8 to 15 seconds later. A PerformanceObserver shows one long task of about 8.6 s starting right after the restart: the simulator's 3D view being built again under the software renderer the tests run on (no GPU). The coach's 250 ms follow timer cannot fire until it ends (it fired twice in 10 s); it is never cleared, and no new coach is made. The check allowed 10 s. The journey check waited a fixed 900 ms for the goal watcher, which the same stall can outlast.

Fix. Wait for the ring up to 30 s, and for the step to be met up to 15 s, with the reason in a comment. Both files pass locally against a build of main.

Worth a look separately: the length of that rebuild on a real Chromebook's GPU. Under software rendering it is 8 to 15 s of a frozen page; if a real device shows even a few seconds, the view's rebuild (shader compiles, the showroom's sky) is the place to look.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SS5gJ3k8r2g6DZMxocZDyP

learn-guided's "the ring is on the board again" and learn-journey's
"changing the words meets it" failed now and then in CI and locally.
Traced: when the simulator comes back, its 3D view is built again, and
under the software renderer the tests run on (no GPU) that is one task
holding the page's main thread for 8 to 15 seconds; the coach's 250 ms
timer (and the goal watcher) run only after it. The lesson logic is
right: the part is found and on screen within a second. The tests now
wait for the ring (30 s) and for the met step (15 s) instead of 10 s and
a fixed 900 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SS5gJ3k8r2g6DZMxocZDyP
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 38fd018):

https://firialabs-open-editor--pr175-guided-ring-flake-xqwv442b.web.app

(expires Thu, 10 Dec 2026 16:28:11 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 81259a1fec315ca1af3747d225d9c7424890be3e

@david-firia
david-firia merged commit 9f007b8 into main Dec 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant