ci: Windows in the kbot test matrix + POSIX→PowerShell bash polyfill#49
Open
isaacsight wants to merge 2 commits into
Open
ci: Windows in the kbot test matrix + POSIX→PowerShell bash polyfill#49isaacsight wants to merge 2 commits into
isaacsight wants to merge 2 commits into
Conversation
Two changes that close the Windows gap as a class, not as instances:
1. ci.yml kbot job: ubuntu-only -> {ubuntu, windows, macos} matrix,
fail-fast off, workflow_dispatch added. The v4.2 sprint existed
because 46/1370 tests failed the first time the suite touched real
Windows (2026-05-13) - bugs of this class stay invisible without a
Windows runner in the loop. The Acer worker becomes real-hardware
testbed, not the verification gate.
2. bash.ts: translatePosixForWindows(). On win32, simple POSIX
commands (pwd/ls/cat/head/tail/rm/cp/mv/mkdir/touch/which/grep)
translate to PowerShell and run via powershell.exe; anything with
shell operators or unmappable flags (ls -t, tail -f, grep -r)
passes through untouched. Mistranslation is worse than no
translation. Safety check runs on the ORIGINAL command first.
Evidence: 43/43 bash.test.ts (16 new pure-function tests, run on all
platforms); 15/15 live smoke against real pwsh 7.5.2 (standalone
binary - verified touch does not truncate, grep stays case-sensitive
by default, apostrophe quoting); bash+git+files regression 100/100;
tsc --noEmit clean. Generated syntax is PS 5.1-compatible.
Also: kbot build script chmod -> platform-guarded node one-liner
(chmod does not exist on Windows; build was broken there), and
package.json picks up the bounty:* scripts from the bounty-hunter
session (already-shipped src/bounty/).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First windows-latest CI run (PR #49) failed 23 tests across 5 files. 22 were test bugs - assertions hardcoded POSIX separators while the source correctly uses path.join: - memory.test.ts (8), graph-memory.test.ts (5), agent-protocol.test.ts (1): expected-path constants now built with join(); fs-mock comparisons normalize backslashes before matching POSIX literals. - context.test.ts (8): same normalization via norm() helper. - computer.test.ts (1): skip coordinator-status test on win32 - computer use is unsupported there and errors before coordinator output (known feature gap). 1 was a real product bug: context.ts getFileTree built relPath with fullPath.replace(root + '/') - join() emits backslashes on Windows while git's root uses forward slashes, so the replace never matched and Windows users got absolute paths in their file tree. Now relative() + POSIX-normalized display on all platforms. Evidence: the 5 suites = 287/287 on macOS; tsc --noEmit clean; windows-latest verdict comes from this PR's CI run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
fail-fast: falseso one OS failing doesn't mask the others;workflow_dispatchadded for manual runs.pwd/ls/cat/head/tail/rm/cp/mv/mkdir/touch/which/grep) translate to PowerShell; anything with shell operators or flags that can't be mapped faithfully passes through untouched. Safety check runs on the original command, before translation.chmod +xreplaced with a platform-guarded node one-liner (chmoddoesn't exist on Windows;npm run buildwas broken there).Why
The v4.2 Windows sprint existed because 46/1370 tests failed the first time the suite ran on real Windows (2026-05-13). Unix-first bugs stay invisible without a Windows runner in the loop — this closes the class, not the instances. The Acer worker becomes a real-hardware testbed instead of the only verification gate.
Evidence
bash.test.ts(16 new pure-function translation tests, run on every platform)touchdoes not truncate existing files,grepstays case-sensitive by default (POSIX semantics), apostrophe filenames quote correctlytsc --noEmitcleanWatch on first run
This PR's Windows job is the first time kbot's suite runs on a GitHub Windows runner — flakes it shakes out are the point.
🤖 Generated with Claude Code