Skip to content

Run the server, launcher, tooling, and integration tests on Windows - #4738

Merged
SawyerHood merged 2 commits into
mainfrom
bb/windows-tests-server-tooling-thr_jensq3v9th
Oct 2, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
bb/windows-tests-server-tooling-thr_jensq3v9th

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The test suites were written on macOS and Linux and assumed POSIX in ways the product does not: /-separated expectations for paths the product builds with the native path module, native-separator expectations for host paths the server keeps POSIX, sh and Python fixtures, npm and tsc spawned by bare name, LF-only parsing of tar and git output, and file-mode assertions. On a Windows 11 VM the server package had 392 failing tests and the launcher, tooling, integration, and QA packages about 90. Part of #1206. Stacked on #4737, which these tests need.

What changed

Tests only, in apps/server, packages/bb-app, packages/scripts, packages/templates, packages/plugin-sdk/scripts, tests/integration, and tests/qa.

  • The server test harness matched workspace file commands with the ambient path separator. Host paths in tests are POSIX, so on Windows it never answered them and about 200 tests timed out. It now compares with /.
  • Expected paths are built the way the product builds them: path.posix or literals for host paths, native join/resolve for server-local paths.
  • Fixtures that were shell or Python scripts are Node scripts; npm and tsc run through Node; listings accept CRLF; os.tmpdir() stubs set TEMP/TMP as well as TMPDIR.
  • Skipped on Windows only, each with a stated reason: the POSIX shell machine installer suite, the sh enrollment pipeline, server-move imports from POSIX paths, signal delivery, bash CI scripts, and the QA harness's sh restart command. File-mode assertions (0600, 0755) are guarded, and the rest of each test still runs.

No assertion is weaker on macOS or Linux.

How you verified

  • Windows 11 Enterprise VM (build 26300), on a branch combining this with the other open Windows changes: full turbo run test had 19,090 passing tests and 2 failing, both 5-second timeouts in plugin-native-server-loading.test.ts under full-run load that pass when the file runs alone. The same run on main before any of these changes had 830 failing tests.
  • Linux: the full suite passes on the combined branch apart from machine-environment.test.ts and plugin-native-server-loading.test.ts, which time out under load on the development machine and pass alone. On this branch before the last rebase, turbo run lint typecheck test --filter='...[origin/main]': 188 of 190 tasks passed. The failing tasks were the app and server test tasks, with tests that time out when the development machine is loaded (PromptBoxInternal.test.tsx, machine-environment.test.ts, plugin-native-server-loading.test.ts) and pass when run alone. After the rebase onto current main, lint and typecheck pass for the same filter.

Not verified: Windows CI does not run these suites, so nothing keeps them passing on Windows after this lands.

🤖 Generated with Claude Code

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T16:54:47.447706Z 1e1f6a0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SawyerHood
SawyerHood force-pushed the bb/windows-tests-server-tooling-thr_jensq3v9th branch from 1e1f6a0 to f3b551d Compare October 2, 2026 17:29
Base automatically changed from bb/windows-port-fixes-thr_jensq3v9th to main October 2, 2026 17:57
SawyerHood and others added 2 commits October 2, 2026 10:57
Tests build host paths with POSIX separators and server-local paths with
the native ones, as the product does. Fixtures that were shell or Python
scripts are Node scripts, npm and tsc run through Node, and tar listings
accept CRLF. File-mode assertions, the POSIX shell enrollment pipeline,
and server-move imports from POSIX paths are skipped on Windows.

Co-Authored-By: Claude Code <[email protected]>
Tests build expected paths with the native path module as the product
does, accept the forward slashes git prints and the CRLF tar prints, run
npm through Node, and import by file URL. File-mode assertions, signal
delivery, bash CI scripts, and the QA harness's sh restart command are
skipped on Windows.

Co-Authored-By: Claude Code <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/windows-tests-server-tooling-thr_jensq3v9th branch from f3b551d to ce1e5de Compare October 2, 2026 17:57
@SawyerHood
SawyerHood merged commit e4e565d into main Oct 2, 2026
27 checks passed
@SawyerHood
SawyerHood deleted the bb/windows-tests-server-tooling-thr_jensq3v9th branch October 2, 2026 18:03
SawyerHood added a commit that referenced this pull request Oct 2, 2026
## Human comments

## What was wrong

Same cause as the PR below it in the stack: tests that assume POSIX
where the product does not. On a Windows 11 VM the host daemon, CLI,
app, desktop, mobile, and plugin packages had about 350 failing tests,
including 62 app tests that could not resolve the `@/` alias and 48
provider parity replays that could not start a bridge. Part of #1206.
Stacked on #4738.

## What changed

Mostly tests, in `apps/host-daemon`, `apps/cli`, `apps/app`,
`apps/desktop`, `apps/mobile`, `apps/demo-server`, the plugins,
`packages/provider-parity`, and a few small packages. Three non-test
changes:

- `apps/app/vite-forkable-plugin-paths.ts` (used by the app's Vitest
config and Ladle, not the production build): it compared native paths
with the forward-slash ids Vite passes on Windows, so the `@/` alias
never resolved there. It normalizes both sides.
- `apps/demo-server/src/demo-world.ts`: one handler replied to a POST
without reading its body. Under `wrangler dev` on Windows the next
request on that connection stalled.
- `packages/provider-bridge-protocol/src/testing/parity.ts`: the replay
maps the temp workspace back to the recorded path in its JSON-escaped
form, so a Windows path with backslashes is found, and retries removing
its workspace.

In tests: expected paths are built the way each package builds them;
`HOME` stubs also stub `USERPROFILE`; fake CLIs get a `.cmd` shim or run
as a Node preload under a copy of `node.exe` where the product looks for
an `.exe`; systemd fixtures escape backslashes; temp directories are
removed with retries.

Skipped on Windows only, each with a stated reason: POSIX signals and
execute bits, launchd and systemd shell helpers, AppImage, the POSIX
`bin/bb` wrapper, the DevBrowser runtime (no Windows build), bash script
automations, killing processes by working directory, a worktree path
over the Windows length limit, the iOS simulator script, and one replay
recorded with POSIX separators. File-mode assertions are guarded and the
rest of each test still runs.

## How you verified

- Windows 11 Enterprise VM (build 26300), on a branch combining this
with the other open Windows changes: full `turbo run test` had 19,090
passing tests and 2 failing, both load timeouts in a server test file
that passes alone. The Pi `bridge.bun-runtime` suite also errors there
because the run sets `CI` and the VM has no Bun. The same run on main
before any of these changes had 830 failing tests.
- Linux: the full suite passes on the combined branch apart from two
server test files that time out under load on the development machine
and pass alone. On this branch before the last rebase, `turbo run lint
typecheck test --filter='...[origin/main]'`: 211 of 212 tasks passed;
the server test task failed on `machine-environment.test.ts`, which
times out when the development machine is loaded and passes alone. After
the rebase onto current main, lint and typecheck pass for the same
filter.

Skipped tests that point at product gaps on Windows, not fixed here:
script automations spawn `bash` by name and look for an extensionless
`bb`; removing a worktree with a live terminal fails because processes
are not killed by working directory; a repository name of about 160
characters makes worktree paths too long.

Not verified: Windows CI does not run these suites, so nothing keeps
them passing on Windows after this lands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

---------

Co-authored-by: Claude Code <[email protected]>
SawyerHood added a commit that referenced this pull request Oct 2, 2026
## Human comments

## What was wrong

The Windows desktop app could be packaged (#4662) but nothing built or
published it, and `resolveDesktopUpdateSupport` returned no version
check and no auto-update for Windows, so an installed Windows app would
never learn about a newer release. Part of #1206.

## What changed

- `.github/workflows/build-desktop.yml`: new `windows` job (Blacksmith
Windows 2025) that packages the NSIS x64 installer with
`desktop:build:win`, smoke tests the packaged app, and writes
`desktop-version-windows.json`. The single `publish` job now needs it
and uploads the installer, block map, `latest.yml`, and the Windows feed
with the other platforms. A Windows build failure therefore stops the
release, as a Linux one does.
- `.github/workflows/publish-bb-app.yml`: new `nightly-desktop-windows`
job with the same shape; the nightly publish requires its version to
match the others and uploads `nightly.yml` and the Windows feed.
- Signing: both Windows jobs pass `WINDOWS_CERTIFICATE_PFX` and
`WINDOWS_CERTIFICATE_PASSWORD` to electron-builder as `WIN_CSC_LINK` and
`WIN_CSC_KEY_PASSWORD`. With neither secret the installer is unsigned
and still published (Windows SmartScreen warns before running it); with
only one the stable job fails.
- `apps/desktop/src/desktop-update-provider.ts`: Windows checks its
version feed and installs updates through electron-updater, like macOS.
- `apps/desktop/README.md` and `docs/bb-release-process.md` describe the
Windows artifacts, feeds, and secrets.

The Windows jobs do not run the desktop and launcher unit tests that the
macOS and Linux jobs run; those suites pass on Windows only with #4738
and #4739.

## How you verified

- Windows 11 Enterprise VM (build 26300): built installers for 0.44.0
and 0.44.1 from this change with the update URL pointed at a local HTTP
server holding the 0.44.1 installer, block map, `latest.yml`, and
`desktop-version-windows.json` (generated by `desktop:version-feed`).
The installed 0.44.0 fetched the version feed and `latest.yml`,
downloaded the 0.44.1 installer in the background, and after the window
was closed the installer ran silently; `bb.exe` then reported 0.44.1 and
the app started. The silent install took about a minute and a half,
during which `bb.exe` was absent.
- Linux: `desktop-update-provider.test.ts` passes; both workflow files
parse as YAML. On this branch before the last rebase, `turbo run lint
typecheck test --filter='...[origin/main]'`: 14 of 14 tasks passed.
After the rebase onto current main, lint and typecheck pass for the same
filter.

Not verified: the workflow jobs have never run (they only run from
`workflow_dispatch` and the nightly schedule); signing with a real
certificate; the Relaunch button path (the install-on-quit path is what
the test above exercised).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

Co-authored-by: Claude Code <[email protected]>
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.

1 participant