Repository navigation
test: make the twin host tests fast and deterministic - #472
Merged
Merged
Conversation
kody-w
force-pushed
the
fix/twin-test-speed
branch
2 times, most recently
from
September 27, 2026 16:56
bc5ef06 to
6246990
Compare
Use the real append-only store logic in host fixtures while disabling expensive POSIX fsync calls that are already covered by workspace-store durability tests. Production services keep durable syncs by default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b6562323-1ad0-4e5e-9951-f2273c033d4a
kody-w
force-pushed
the
fix/twin-test-speed
branch
from
September 27, 2026 17:20
6246990 to
5e65e50
Compare
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.
Root cause
The Twin shard was running large conversation/approval integration scenarios as single Vitest tests while the host fixture used the production append-only filesystem durability path. On macOS CI that made individual tests do several minutes of repeated canonical store scans, approval/runtime setup, and fsync-heavy commits, so different tests crossed Vitest's 120s per-test timeout depending on runner speed.
Fix
Timings
Before:
test/twin.test.ts827.25s total; failed tests at 120.073s and 136.889s; slow passing tests included 141.498s, 90.027s, 85.108s, 70.486s.After:
Validation
npm --workspace @rapp-work/host run buildnpm --workspace @rapp-work/host test -- --run test/twin.test.ts --reporter=verbosenpm --workspace @rapp-work/host run typechecknpm --workspace @rapp-work/workspace-store test -- --runnpm --workspace @rapp-work/host test -- --run test/production.test.ts --reporter=verbose -t "approval can be cancelled"denylist_scan.py diff <clone> origin/main=> 0 findingsGreen CI