ci: fail-fast job timeouts + de-flake webkit scroll invariant-1#966
Merged
Conversation
The scroll e2e job could sit for GitHub's 6h default when a step hung, and invariant-1 flaked intermittently on webkit under CI load, forcing retries. - Add timeout-minutes to all three CI jobs (test 15, e2e-scroll 30, rust 20) so a genuine hang fails fast instead of parking a runner for hours. - Cache the Playwright browser binaries and split OS-dep install so a slow CDN can't add minutes to the browser download. - Harden invariant-1: raise the demo-mount waitForSelector ceiling to 45s (webkit is slow to boot the demo bundle on a busy runner), and wait for the prepend restore to settle before the drift assertion instead of a single racy read. The settle-wait polls until drift stabilises without loosening PREPEND_DRIFT_PX, so a genuinely broken anchor still fails.
apps/fluux/tsconfig.json pinned @fluux/sdk + /react /core /stores to the workspace-relative SDK dist, but not the /demo and /cache subpaths the app also imports. In a git worktree those two escaped the paths mapping and resolved through node_modules to the *root* repo's dist, so demo.tsx pulled XMPPClient/E2EEManager from two different copies of the SDK and tsc flagged spurious type-identity mismatches (DemoClient not assignable to XMPPClient, e2ee possibly null). Mapping every exported subpath to the same local dist makes resolution consistent. No-op outside a worktree (single package).
…rance The first de-flake pass reduced but didn't eliminate the webkit invariant-1 flake — CI still hit 2880px (settle-wait timed out mid-restore at 2500ms) and 28px (settled but over the 20px bound). - Wait on scrollTop AND the anchor's virt offset both going quiet, not on their derived drift: during the re-assert loop the two move together so the drift reads ~0 mid-flight and falsely looks stable. Longer timeout (6s) so the read lands past the loop + trailing ResizeObserver even on a slow runner. - Engine-specific tolerance: WebKit's settled residual runs ~28-40px (coarser height-measurement cadence) vs Chromium's <20px. Add PREPEND_DRIFT_WEBKIT_PX (48) and keep Chromium strict at 20. Still far below a real mis-anchor (~2880px, a dropped batch) and the LARGE_JUMP_PX oscillation gate.
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.
CI jobs had no
timeout-minutes, so a hung step could park a runner for GitHub's 6h default (as seen on #963, where a slow apt mirror stretched the Playwright OS-dep install to ~35min). Separately, scrollinvariant-1flaked intermittently on webkit under CI load, burning retries and printing scary red mid-log.install-deps) step so a slow CDN can't add minutes to the browser download.waitForSelectorceiling to 45s (webkit is slow to boot the demo bundle on a busy runner), and wait for the prepend restore to settle before the drift assertion instead of a single racy read. The settle-wait polls until drift stabilises without looseningPREPEND_DRIFT_PX, so a genuinely broken anchor still fails.