fix(ci): make nightly green — four independent causes behind #376 - #378
Merged
Conversation
The package-smoke consumer installs fresh from core's `libheif-js: ^1.19.8` with no lockfile - deliberately, so it resolves the way a real consumer would. libheif-js 1.23.2 published 2026-09-05T19:18Z and grew the opt-in HEIC emscripten bundle from 1,459 kB to 1939.4 KiB, so the very next nightly (2026-09-06) went red on a budget no repo change had touched, and every nightly since has died the same way: Error: Consumer JS asset libheif-bundle-DeNY_ZvL.js is 1939.4 KiB, above 1600.0 KiB The same job gates PRs through e2e.yml. No PR ran between the upstream publish and 2026-09-09, which is the only reason PRs still looked green; today's run fails on this job and nothing else. This ceiling guards the OPT-IN chunk, which is upstream WASM we neither author nor can shrink. Core's mandatory path keeps its own tighter guards (consumerEntryChunkBudget, .size-limit.json), so re-basing here does not weaken them. Vite's chunkSizeWarningLimit moves in step.
Identical failure on the 2026-08-26, 09-02, 09-04, 09-05 and 09-06 nightlies -
the same single test every time, with the other 24 assertions green:
FAIL tests/integration/drive-clients-live.integration.test.ts
> drive-clients live - one-drive
> a client can download each fixture and the bytes are byte-exact ...
Error: Test timed out in 5000ms.
Every test in this file is network-bound against a production cloud API, and
the download case costs a folder listing plus a redirect-followed fetch and a
full stream drain per fixture. Vitest's 5 s default is a unit-test budget that
nobody chose for this suite, so the gate was reporting the clock rather than
the code.
What the suite actually gates is byte-integrity - sha256 against the committed
fixture - and never latency, so a 30 s ceiling loses nothing: a provider that
is down, or a token that is broken, still goes RED. hookTimeout moves with it
because beforeAll's OAuth mint is the same kind of round trip.
vi.setConfig applies file-wide and keeps the diff at 13 lines; restructuring
the describe call to take a timeout argument would have re-indented the whole
suite body for no additional guarantee. Verified rather than assumed: a
throwaway spec sleeping 7 s passes under vi.setConfig({ testTimeout: 20_000 })
where the 5 s default fails it.
The 2026-09-06 nightly's Full E2E job died here: Error: listen EADDRINUSE: address already in use :::53062 Error: presign harness never bound http://localhost:53062 - is @useupup/server built? Linux draws ephemeral source ports from 32768-60999, so 53061 and 53062 - the fixed LISTEN ports the two real-MinIO resume specs own - sit inside the window the kernel hands out for the runner's own outbound connections. Losing that race costs the whole job: the child dies immediately and the harness poll then burns its full 60 s against a port nothing is bound to. Moved to 31061 and 31062, below the range, and recorded the rule on startPresignHarness so the next spec that needs a harness picks a safe port instead of the next number up. The rest of the 5306x family is deliberately untouched: :53060 is the cross-framework gate's harness and sits inside the OAuth clients' registered redirect range (53050-53060), so it is pinned by external registration, not by convention.
… poll
The nightly "AI thumbs events landed" case failed 8 of the last 9 nights
with a 90 s poll timeout, while PostHog's own `created_at` shows both
`ai_response_rated` and `ai_response_feedback_comment` ingested 1-2 s
after capture on every one of those nights (run ids e2e:1788769131541-…,
e2e:1788594082953-…, e2e:1788509140023-…, …). The data was there for the
whole poll; the poll never saw it.
Cause: the Query API's default execution mode ("blocking") serves a cached
result whenever one exists for identical query text and is not yet stale,
and every iteration of `expect.poll` sends byte-identical text. A first
poll that lands before the events are queryable caches an empty result and
the remaining 90 s replay that cache. The support case right before it
passes because its events are already minutes old by the time it polls.
Send `refresh: 'force_blocking'` so every poll recalculates, and log a
transient non-OK status so a future timeout is never a silent mystery.
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
This was referenced Sep 9, 2026
Closed
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.
Summary
Nightly has failed on every run since 2026-08-02 (#376). The failing job rotated night to night, which hid that there are four independent causes. Each is fixed here with the evidence that pins it.
created_atshows both events ingested 1-2 s after capture on every failing night. The Query API's defaultrefreshmode serves a cached result for identical query text until it goes stale, andexpect.pollre-sends byte-identical text, so the first empty answer was replayed for the whole poll. Fix:refresh: 'force_blocking'on every query, plus a log line for transient non-OK statuses.EADDRINUSE :::53062then "presign harness never bound". The real-MinIO resume specs listened on 53061/53062, inside Linux's ephemeral source-port range (32768-60999), so the runner's own outbound connections could hold the port. Fix: 31061/31062, below the range.libheif-bundle is 1939.4 KiB, above 1600.0 KiB. libheif-js 1.23.2 shipped 2026-09-05 and the smoke consumer installs fresh from core's^1.19.8range with no lockfile, exactly as a real consumer does. Fix: re-base the OPT-IN chunk budget 1600→2100 KiB (core's mandatory path stays guarded by the entry budget and.size-limit.json).Refs #376 — the landing project runs only in nightly, so #376 closes after the next green nightly rather than on merge.
Test Plan
prettier --checkon every changed file (exit 0)@useupup/e2e-testtypecheck (exit 0)pnpm run test:quality(exit 0)Smoke-Packageson this PR passes with the re-based budgetworkflow_dispatchnightly.yml on dev)Follow-up not covered here
The HEIC step was only build-checked against libheif-js 1.23.x; a live HEIC conversion against the bumped dependency is still worth a manual check.