Repository navigation
Fix flaky CI tests by adding retry logic and increasing timeouts - #15635
Conversation
Add Electron launch retry for CI runners where startup wedges before reaching 'ready', with fresh profile per attempt to avoid mid-init state. Increase skill install lock timeout from 100ms to 5s to account for fsync cost plus retry duration on loaded CI runners.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughElectron fixture tests now detect startup timeouts before 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a9e8798-2791-409e-86d5-77025ac400d9
📒 Files selected for processing (2)
src/main/browser/browser-cookie-import-partition.electron.test.tssrc/main/skills/skill-install-lock.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
…blyai#15635) * Fix flaky CI tests by adding retry logic and increasing timeouts Add Electron launch retry for CI runners where startup wedges before reaching 'ready', with fresh profile per attempt to avoid mid-init state. Increase skill install lock timeout from 100ms to 5s to account for fsync cost plus retry duration on loaded CI runners. * shorten comments (cherry picked from commit 4e058d4)
…blyai#15635) * Fix flaky CI tests by adding retry logic and increasing timeouts Add Electron launch retry for CI runners where startup wedges before reaching 'ready', with fresh profile per attempt to avoid mid-init state. Increase skill install lock timeout from 100ms to 5s to account for fsync cost plus retry duration on loaded CI runners. * shorten comments
…blyai#15635) * Fix flaky CI tests by adding retry logic and increasing timeouts Add Electron launch retry for CI runners where startup wedges before reaching 'ready', with fresh profile per attempt to avoid mid-init state. Increase skill install lock timeout from 100ms to 5s to account for fsync cost plus retry duration on loaded CI runners. * shorten comments
Problem
Two tests fail intermittently on CI runners due to timing and system load:
browser-cookie-import-partition.electron.test.ts: Electron launch never reaches 'ready' state before watchdog timeout, especially on busy runnersskill-install-lock.test.ts: Lock acquisition timeout (100ms) expires before fsync + retry cycle completes under loadSolution
browser-cookie-import-partition.electron.test.ts:
skill-install-lock.test.ts:
ELI5
Some tests fail randomly on busy CI runners. We added retry logic to restart Electron when it hangs, and we gave lock acquisition more time to complete its work.
What Changed
browser-cookie-import-partition.electron.test.ts: Added retry mechanism for flaky Electron launches with fresh profiles per attempt, increased timeoutskill-install-lock.test.ts: Increased lock acquisition timeout from 100ms to 5sWhy
CI runners are sometimes busy or slow, causing tests to fail due to timing issues rather than actual bugs. Retrying transient Electron launch failures and allowing sufficient time for system operations reduces flakiness without masking real issues.
Linked Issue
Fixes #
Visual Proof
N/A — test-only changes with no UI or behavior modifications
Testing
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)