You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(workbuddy): prefer versions layout and recognize WorkBuddy-app.exe - #1398
Fixes three remaining Windows WorkBuddy 5.12+ launcher-layout edge cases inside @codexhost/adapter-workbuddy:
Recognize WorkBuddy-app.exe as an explicit Desktop runtime (packages/adapters/workbuddy/src/command.ts): extend the Windows explicitDesktop basename check to match WorkBuddy-app.exe alongside WorkBuddy.exe / WorkBuddy AI.exe / WorkBuddyAI.exe, so setting CODEXHOST_WORKBUDDY_COMMAND to ...\versions\<version>\WorkBuddy-app.exe resolves the full bundle (ELECTRON_RUN_AS_NODE=1, --eval, bundled CLI, and --serve for lite-only builds).
Recognize WorkBuddy-app.exe in a selected version directory (packages/adapters/workbuddy/src/discovery.ts): include "WorkBuddy-app.exe" in resolveWorkBuddyInstallDirectory Windows entries so pointing Connections directly at ...\versions\<version> discovers the app and its bundled CLI.
Prefer versions/<version>/ over stale root resources/ (packages/adapters/workbuddy/src/discovery.ts): probe resolveWorkBuddyLauncherLayout(...) before checking sibling resources/.../codebuddy in resolveWorkBuddyBundle, preventing in-place upgrades with leftover root resources/ from launching the root WorkBuddy.exe launcher.
Validation (TDD)
Before fix (red): ran npx vitest run --config tests/vitest.config.js packages/adapters/workbuddy/test/discovery.test.ts packages/adapters/workbuddy/test/command.test.ts — all 3 new regression tests failed (3 failed | 61 passed).
After fix (green):
npx tsc -b packages/adapters/workbuddy — passed
npx vitest run --config tests/vitest.config.js packages/adapters/workbuddy/test/*.test.ts — 14 test files passed, 188/188 tests passed
This change lets WorkBuddy on Windows be discovered when its executable is named WorkBuddy-app.exe. It also prefers the newer versions layout over stale root files. Regression tests cover the new behavior, and no merge-blocking risk was found.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Applicability reference: AGENTS.md: # Repository Guidelines `npm start` / `npm start web` rebuild and relaunch the user's Desktop / Web and may restart the shared Host; `npm stop` stops all local codexhost services across worktrees.
Learnt from: CR
Repo: BytePioneer-AI/codex-host PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-17T12:08:43.655Z
Learning: Source excerpt:
# Repository Guidelines
## Testing & Completion
- Writing tests. Every test is code to maintain and CI time to pay; add one only when it earns that.
- Small, low-risk changes need no new tests. Add focused tests for high-risk or cross-package changes, or when asked.
- A new test must catch a regression the existing tests would miss. Extend the nearest existing case or `test.each` instead of adding near-duplicates.
- Assert observable behavior (inputs, outputs, protocol messages, persisted state), not internal call order, private state, or mock call counts.
- Mock only external boundaries (network, clock, real CLIs, the OS), never the code under test. Avoid large snapshots and long literal expectations that can only be updated mechanically.
- A bug-fix test must fail before the fix. Never weaken assertions or delete tests just to make a change pass; report the conflict instead.
- When a change makes existing tests redundant or ties them to removed internals...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1382
Summary
Fixes three remaining Windows WorkBuddy 5.12+ launcher-layout edge cases inside
@codexhost/adapter-workbuddy:WorkBuddy-app.exeas an explicit Desktop runtime (packages/adapters/workbuddy/src/command.ts): extend the WindowsexplicitDesktopbasename check to matchWorkBuddy-app.exealongsideWorkBuddy.exe/WorkBuddy AI.exe/WorkBuddyAI.exe, so settingCODEXHOST_WORKBUDDY_COMMANDto...\versions\<version>\WorkBuddy-app.exeresolves the full bundle (ELECTRON_RUN_AS_NODE=1,--eval, bundled CLI, and--servefor lite-only builds).WorkBuddy-app.exein a selected version directory (packages/adapters/workbuddy/src/discovery.ts): include"WorkBuddy-app.exe"inresolveWorkBuddyInstallDirectoryWindows entries so pointing Connections directly at...\versions\<version>discovers the app and its bundled CLI.versions/<version>/over stale rootresources/(packages/adapters/workbuddy/src/discovery.ts): proberesolveWorkBuddyLauncherLayout(...)before checking siblingresources/.../codebuddyinresolveWorkBuddyBundle, preventing in-place upgrades with leftover rootresources/from launching the rootWorkBuddy.exelauncher.Validation (TDD)
npx vitest run --config tests/vitest.config.js packages/adapters/workbuddy/test/discovery.test.ts packages/adapters/workbuddy/test/command.test.ts— all 3 new regression tests failed (3 failed | 61 passed).npx tsc -b packages/adapters/workbuddy— passednpx vitest run --config tests/vitest.config.js packages/adapters/workbuddy/test/*.test.ts— 14 test files passed, 188/188 tests passednode tools/check-boundaries.mjs— passednpx prettier --check packages/adapters/workbuddy/{src,test}/{command,discovery}*.ts— passednpx eslint packages/adapters/workbuddy/src/command.ts packages/adapters/workbuddy/src/discovery.ts— 0 errors