Repository navigation
Run the daemon, CLI, app, desktop, and plugin tests on Windows - #4739
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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", |
There was a problem hiding this comment.
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 👍 / 👎.
65a5660 to
d181e2a
Compare
d181e2a to
6041c30
Compare
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]>
6041c30 to
3c8b6d1
Compare
## 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]>
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.
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. Underwrangler devon 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;
HOMEstubs also stubUSERPROFILE; fake CLIs get a.cmdshim or run as a Node preload under a copy ofnode.exewhere 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/bbwrapper, 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
turbo run testhad 19,090 passing tests and 2 failing, both load timeouts in a server test file that passes alone. The Pibridge.bun-runtimesuite also errors there because the run setsCIand the VM has no Bun. The same run on main before any of these changes had 830 failing tests.turbo run lint typecheck test --filter='...[origin/main]': 211 of 212 tasks passed; the server test task failed onmachine-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
bashby name and look for an extensionlessbb; 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