Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Generated with mux

Fixes two independent flakes:

1. tests/ipcMain/runtimeExecuteBash.test.ts

Issue: The test was flaky because it expected the AI model to explicitly describe the output in its text response, which is non-deterministic.
Fix: Prioritized verifying the actual tool output (which is deterministic and proves the runtime works) and made the text response check optional.

2. tests/ipcMain/resumeStream.test.ts

Issue: The test relied on a setTimeout(100) to wait for IPC subscription, which caused race conditions in CI/loaded environments.
Fix: Replaced the sleep with collector.waitForEvent('caught-up'), which is the correct synchronization signal from the backend.

…umption

Generated with mux

Fixes two independent flakes:
1. tests/ipcMain/runtimeExecuteBash.test.ts:
   - Relaxed assertion on AI response text which is non-deterministic.
   - Added strict assertion on tool output to verify command execution success (the actual goal of the test).

2. tests/ipcMain/resumeStream.test.ts:
   - Replaced magic sleep(100) with proper event synchronization.
   - Now waits for 'caught-up' event before triggering resume, ensuring the event collector is ready.
Generated with mux

tests/ipcMain/createWorkspace.test.ts: Use example.com URL instead of github.com to avoid interference from global git url.insteadOf configuration (which rewrites https://github.com/ to git@github.com:).
@ammar-agent ammar-agent added this pull request to the merge queue Nov 24, 2025
Merged via the queue into main with commit 4209c3a Nov 24, 2025
12 of 13 checks passed
@ammar-agent ammar-agent deleted the fix-flake-runtime-ssh branch November 24, 2025 19:00
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