GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — test(core): make Windows-flaky shell and npm tests deterministic by kitlangton · Pull Request #46610 · anomalyco/opencode Conversation
|
| Before | After |
|---|---|
| 26 real running shells removed with 10 ms sleeps | One removed shell followed by an explicitly delivered late exit |
| A two-second wait used as the liveness assertion | Controlled completions joined through the full exit handler |
| Session/tool fixture for retention bookkeeping | Direct Shell composition with isolated temporary directories |
The test crosses the 25-entry retention cap, verifies that the oldest retained command is actually evicted, and checks that a subsequent command completes with intact output. It also preserves the missing-capture assertion for a removed command.
Joining the exit-handler fiber matters: Shell.wait resolves before the retention queue is updated, so waiting for the shell result alone is not a bookkeeping barrier. The fixture finalizes those fibers with its scope.
Split combined install stories into independent cases so each real install gets its own default deadline. No timeout is raised.
| Before | After |
|---|---|
installs and resolves named and unnamed Git packages with dependencies (two cold installs) |
installs and resolves unnamed Git packages… and …named Git packages… via test.each |
checks registry targets without mutation and explicitly updates mutable targets (mutable add, pinned add, update, no-op update) |
checks a mutable registry target without mutation and explicitly updates it plus never reports a pinned registry target as outdated |
Every installation, cache, resolution, revision, dependency, and update assertion is preserved; the file keeps its 68 expect() calls across 15 tests instead of 13.
Test-only. The shell implementation, retention limit, and Npm runtime are unchanged. The ConfigInstructionPlugin … rescans them on change and Project.resolve > keeps the canonical project directory… Windows failures seen in the same v2 runs are not addressed here.
This is the root of a stack: #46682 (ACP activation wait) and #46631 (incremental State materialization) are based on it because the same Windows job blocked their CI.
Run locally on macOS with Bun 1.4.0:
# packages/core bun typecheck bun run test test/shell-retention.test.ts --rerun-each 1000 bun run test test/tool-shell.test.ts test/shell.test.ts test/effect/cross-spawn-spawner.test.ts bun run test test/npm.test.ts --rerun-each 5 bun run test test/npm.test.ts --test-name-pattern 'installs and resolves .* Git packages' --rerun-each 10 # Repository root bunx prettier --check packages/core/test/shell-retention.test.ts packages/core/test/tool-shell.test.ts packages/core/test/npm.test.ts git diff --check
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3267c66 to
6f6886c
Compare
Run the named and unnamed Git installs, and the mutable and pinned registry check/update paths, as independent cases instead of several real installs under one default watchdog. Each bun add child process costs over a second on the Windows runner, so the combined cases regularly exceeded five seconds there. All installation, cache, resolution, revision, dependency, and update assertions are preserved; deadlines are unchanged.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.