Skip to content

🐛 Fix Windows test flakes and format blog SVGs#1145

Merged
cowboyd merged 3 commits intov4from
main-test-flake
Apr 3, 2026
Merged

🐛 Fix Windows test flakes and format blog SVGs#1145
cowboyd merged 3 commits intov4from
main-test-flake

Conversation

@cowboyd
Copy link
Copy Markdown
Member

@cowboyd cowboyd commented Apr 3, 2026

Motivation

Three Windows CI issues that must land together — each fix alone still fails CI due to the other two:

  1. Windows main test flake: The main tests (gracefully shuts down on SIGINT, works even if suspend is the only operation) fail on Windows because tinyexec.kill('SIGINT') forcefully terminates the process before ctrlc() can send a graceful CTRL_C_EVENT. The subprocess dies before its finally block runs, so stdout is empty.

  2. Unformatted blog SVGs: SVGs added in Why JavaScript Needs Structured Concurrency #1103 and Add blog post: AbortController.abort() Doesn't Mean It Stopped #1111 were hand-authored and merged without running deno fmt. This causes deno fmt --check to fail on Ubuntu CI.

  3. Windows interval test flake: The interval test uses a 50ms timeout, which isn't enough time to produce 10 intervals on Windows CI. The timeout fires before the intervals are observed.

Approach

  • Windows kill fix (test/suite.ts): On Windows with SIGINT, skip tinyexec.kill() and only call ctrlc(pid). This lets the daemon receive the ctrl-c, run its finally block, and exit cleanly.
  • SVG formatting (www/blog/**/*.svg): Run deno fmt on the three affected files. Changes are purely whitespace.
  • Interval timeout (test/interval.test.ts): Increase timeout from 50ms to 500ms. No impact on test duration since the race resolves as soon as 10 intervals are observed.

On Windows, tinyexec.kill('SIGINT') forcefully terminates the process
because Windows doesn't support POSIX signals. This kills the process
before ctrlc() can send a graceful CTRL_C_EVENT, so the finally block
never runs and stdout is empty.

Fix by only calling ctrlc() on Windows with SIGINT, skipping the
tinyexec.kill() that was preempting it.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 3, 2026

Open in StackBlitz

npm i https://pkg.pr.new/effection@1145

commit: 5cfd6f7

These SVGs were hand-authored and merged in #1103 and #1111 without
running deno fmt. The formatter normalizes style tag whitespace and
breaks long attribute lists across multiple lines.
@cowboyd cowboyd changed the title 🐛 Fix Windows main test flake: send ctrlc instead of kill 🐛 Fix Windows test flakes and format blog SVGs Apr 3, 2026
@cowboyd cowboyd requested review from jbolda and taras April 3, 2026 18:36
In Windows CI, we don't reliably get 10 intervals in 50ms. Raise the
timeout to half a second. This won't add time to the test because it
passes as soon as 10 intervals are observed.
@cowboyd cowboyd merged commit 08f35c0 into v4 Apr 3, 2026
17 checks passed
@cowboyd cowboyd deleted the main-test-flake branch April 3, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants