Give the SQLCipher-heavy test suites room on Windows CI - #460
Merged
Conversation
Two rekeySharedDb tests timed out at the 5s default during the v0.2.0 release build. The cause is contention, not a regression: Linux got faster over the same range (279ms -> 170ms) and unrelated Windows suites were unchanged, so this is not an unoptimized native build. shared-db.test.ts was already running at ~3.1s on Windows against a 5s per-test ceiling. database-snapshot.test.ts, added for #437, builds a real file-backed encrypted DB and snapshots it four times over (~4.4s on Windows) and runs in parallel with it, which pushed the rekey tests past the limit. Both operations are legitimately expensive - rekeying re-encrypts every page and re-runs PBKDF2-HMAC-SHA512 - so the timeout is raised for those two suites only rather than globally, keeping the 5s default as a real signal everywhere else. Note: ci.yml runs ubuntu-only, so Windows is exercised only at release time. This class of failure will keep surfacing during releases until that changes. Co-Authored-By: Claude Opus 4.8 <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.
Unblocks the v0.2.0 release build, which failed on Windows with two
rekeySharedDbtests timing out at the 5s default.Diagnosis
This is contention, not a regression — and specifically not caused by the dependency bumps in #458:
shared-db.test.tsshared-db.test.tsdatabase-snapshot.test.tssettings-theme.test.tsUnrelated Windows suites are unchanged, which rules out an unoptimized native build or a node-gyp/toolchain regression — those would have slowed everything touching SQLite.
The real cause:
shared-db.test.tswas already running at ~3.1s on Windows against a 5s per-test ceiling — latent fragility that happened to fit.database-snapshot.test.ts, which I added for #437, builds a real file-backed encrypted database and snapshots it four times over (4.4s on Windows), and vitest runs test files in parallel. That extra crypto and I/O load pushed the rekey tests over the limit.So the trigger was my own test file from the backup-snapshot work.
Fix
An explicit 30s timeout on the two affected suites, with comments explaining why they're legitimately slow. Rekeying re-encrypts every page and re-runs PBKDF2-HMAC-SHA512; the snapshot suite does full KDF plus migrations per test. These are real costs, not hangs.
Scoped to those two suites rather than raised globally, so the 5s default stays a meaningful signal everywhere else.
The underlying process gap
ci.ymlruns ubuntu-only. Windows and macOS are exercised only by the release workflow, so platform-specific failures are guaranteed to surface as broken releases rather than failed PRs. This would have been caught on #459.Not addressed here — adding Windows to CI would roughly triple CI minutes and is worth deciding deliberately. Worth filing as an issue.
Testing
npm test531 passing,npm run typecheckclean — both on macOS. Windows timing can't be reproduced locally, so the real verification is the next release build.