Draft
Conversation
Realm Server Test Results 1 files ±0 1 suites ±0 13m 41s ⏱️ -26s Results for commit 526570c. ± Comparison against base commit e549179. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
- Increase test timeout to 120s for the room deletion/creation test - Wait for the deleted room to leave the DOM before polling for the new one - Increase waitUntil timeout to 60s for room auto-creation under CI load - Only upload blob reports from repeat=1 to avoid corrupted merge Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each repeat's blob report gets a unique artifact name. On download, each artifact goes to its own subdirectory. A flatten step copies all .zip files into a single directory with unique prefixes so duplicate filenames across repeats don't collide. This ensures the merged Playwright report includes results from all 30 runs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The { timeout } object passed as 2nd arg to test() is for
annotations/tags, not timeout config. Use test.setTimeout() inside
the test body which is the correct Playwright API.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The root cause of the flaky test is that room creation after deleting all rooms is slow — it loads skill cards from the realm server and uploads them to Matrix before creating the room. Under CI load this can take 60+ seconds or fail entirely. Fix: when creating a fallback room (after the last room is deleted), pass skipDefaultSkills to avoid the expensive loadDefaultSkills() call. The room is created with empty skills, which is fine for an initial landing room. Also await the createNewSession() call for correctness. Test improvements: - Detect [data-test-room-error] to fail fast with a clear message instead of polling until timeout when room creation errors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Preview deployments |
The newSessionId getter checks roomResources.has(id), but doLeaveRoom deletes the room from roomResourcesCache right before this check. So the getter always returns undefined, making the comparison (this.newSessionId === roomId) always false — localStorage is never cleared. Later, a Matrix sync event can re-add the deleted room to the cache via setRoomData (which calls roomResourcesCache.set if the key is missing). Now newSessionId returns the stale room ID, and createNewSession enters the deleted room instead of creating a new one. Fix: check localStorage directly instead of going through the getter. Also await createNewSession() to prevent floating promises. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With the localStorage race condition fixed in the service, room creation after deletion is reliable. Remove the inflated timeouts and the wait-for-deletion step that were compensating for the bug. Keep the non-blocking polling (better than getRoomId which blocks on waitFor) and the error detection (fails fast with a clear message). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When no explicit skills are provided, create the room immediately without skills so the UI updates fast, then load and apply default skills in the background via a room state event update. Previously, loadDefaultSkills() blocked room creation — fetching skill cards from the realm server and uploading them to Matrix before the room could be entered. This made room creation unreliable under load. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit deferred skills for ALL room creation, breaking tests that expect skills to be present immediately. Scope this to only the fallback path (creating a room after all rooms are deleted) via a deferDefaultSkills flag. All other room creation (new session button, initial load, error retry) loads skills synchronously. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove incorrect await inside Promise.all that made room creation and module loading run sequentially instead of in parallel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The original test effectively had ~60s via Playwright's waitFor() timeout. The non-blocking polling approach is better (many fast retries vs one blocking call) but needs a realistic budget since Matrix room creation involves real network calls that can take >30s on CI VMs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This test creates 3 rooms, sends messages in each, deletes all 3, then waits for auto-creation. The setup alone takes 30-40s, so the default 60s timeout doesn't leave enough headroom for the room creation polling (45s). 90s gives adequate breathing room. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Matrix room creation on CI VMs can take well over 45s. Stop incrementing and give this test the headroom it needs: 120s total test timeout and 60s for room creation polling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After leave/forget, sync events can re-add a room to the cache via setRoomData (which calls roomResourcesCache.set if the key is missing). The room still has the AI bot as a member, so it passed the existing hasActiveMember(botId) check and appeared in aiSessionRooms. This caused latestRoom to return a zombie room the user had already left, making doLeaveRoom enter it instead of creating a new session. The test would then poll forever for a new room ID that never appears. Fix: also check hasActiveMember(userId) to exclude rooms the user has left. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The hasActiveMember(userId) check depends on sync event timing — a deleted room can be re-added to the cache with stale state that still shows the user as a member. This happens when a sync response prepared before the leave was processed arrives after the cache deletion. Fix: track deleted room IDs in a local Set (populated at the start of doLeaveRoom, before the async leave/forget calls). aiSessionRooms checks this Set first, providing an instant, sync-timing-independent filter that prevents zombie rooms from appearing in latestRoom. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CreateAiAssistantRoomCommand loads a JS module from the realm server via loadCommandModule(). This can hang when the realm server returns 404s, blocking room creation indefinitely — the room is never entered and no error is shown (the catch block never runs because Promise.all is still waiting for loadCommandModule). Fix: for the deferDefaultSkills path (fallback after all rooms deleted), call matrixService.createRoom() directly. This only depends on the Matrix server, not the realm server. Skills and the command module are not needed for the initial room creation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
I’m seeing this repeatedly fail, like here.