Skip to content

Run the daemon, CLI, app, desktop, and plugin tests on Windows - #4739

Merged
SawyerHood merged 3 commits into
mainfrom
bb/windows-tests-daemon-app-plugins-thr_jensq3v9th
Oct 2, 2026
Merged

SawyerHood merged 3 commits into
mainfrom
bb/windows-tests-daemon-app-plugins-thr_jensq3v9th

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

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

AGENT GENERATED

@SawyerHood
SawyerHood added this pull request to stack #4741 October 2, 2026 15:55
@SawyerHood
SawyerHood marked this pull request as ready for review October 2, 2026 16:50
@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:55:08.832895Z 65a5660 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65a5660b10

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

expect(result).toEqual({
enabled: false,
supported: process.platform === "darwin",
supported: process.platform === "darwin" || process.platform === "win32",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the Keep Awake expectation consistent with its host

When this test runs on Windows, it deterministically expects supported: true, but the bundled implementation in plugins/keep-awake/host.ts still returns supported: deps.platform === "darwin" and also refuses to enable itself on any other platform. Consequently the plugin-build suite that this commit is intended to enable on Windows will always fail here; either keep the expectation Darwin-only or implement the corresponding Windows host support.

Useful? React with 👍 / 👎.

@SawyerHood
SawyerHood force-pushed the bb/windows-tests-daemon-app-plugins-thr_jensq3v9th branch from 65a5660 to d181e2a Compare October 2, 2026 17:29
@SawyerHood
SawyerHood force-pushed the bb/windows-tests-daemon-app-plugins-thr_jensq3v9th branch from d181e2a to 6041c30 Compare October 2, 2026 17:57
Base automatically changed from bb/windows-tests-server-tooling-thr_jensq3v9th to main October 2, 2026 18:03
SawyerHood and others added 3 commits October 2, 2026 11:03
Tests build paths the way the product does, write .cmd shims beside fake
CLIs, escape backslashes in the systemd fixtures they generate, and
expect the messages and PATH that Git for Windows prints. File-mode and
execute-bit assertions, launchd and systemd shell helpers, and the POSIX
bin/bb wrapper are skipped on Windows.

Co-Authored-By: Claude Code <[email protected]>
The app's forkable-plugin resolver compared native paths with the
forward-slash ids Vite passes on Windows, so the @/ alias never resolved
there for tests and Ladle; it now normalizes both. The demo server reads
a POST body before replying, which workerd on Windows otherwise reports
and then stalls the next request. Tests build expected paths the way the
product does, and the tests of POSIX signals, AppImage, the shell machine
installer, and the iOS simulator script are skipped on Windows.

Co-Authored-By: Claude Code <[email protected]>
The parity 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. Tests build expected paths the way each
plugin does, stub USERPROFILE with HOME, use .cmd or .exe fake CLIs where
the product looks for them, and run a Node fake gh. Tests of the DevBrowser
runtime, bash script automations, POSIX signals, kill-by-working-directory,
and a replay recorded with POSIX separators are skipped on Windows.

Co-Authored-By: Claude Code <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/windows-tests-daemon-app-plugins-thr_jensq3v9th branch from 6041c30 to 3c8b6d1 Compare October 2, 2026 18:03
@SawyerHood
SawyerHood merged commit f594028 into main Oct 2, 2026
27 checks passed
@SawyerHood
SawyerHood deleted the bb/windows-tests-daemon-app-plugins-thr_jensq3v9th branch October 2, 2026 18:09
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]>
stephendolan added a commit to stephendolan/bb that referenced this pull request Oct 6, 2026
Port the Account Pooler changes from get-bb/bb get-bb#4739, get-bb#4918, and get-bb#5052:
safe OAuth refresh diagnostics, Windows-compatible permission checks,
and deterministic parent retry tests.

Preserve least-usage selection and durable conversation assignments.
Regenerate the standalone plugin for SDK 0.6.15 and include its TLS test
fixtures so the exported package can run the complete test suite.

Validation: 360 tests, lint, type checking, SDK contract check, and plugin build.
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