Skip to content

Windows: #169's last bugs, and what the agent shell got wrong there - #203

Merged
shinyobjectz merged 7 commits into
mainfrom
windows-169-rc12
Nov 19, 2026
Merged

shinyobjectz merged 7 commits into
mainfrom
windows-169-rc12

Conversation

@shinyobjectz

@shinyobjectz shinyobjectz commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

rc11 on a Windows PC still had four of #169's bugs, and finding them turned up the reason several more never showed: raea's Node core (the agent shell's raea init, show, cut, brand... run on it) took every Windows path for a relative one and said it was an arm64 Mac.

#169 bug 6: Intl on QuickJS. A composition that formatted a number (toLocaleString, Intl.NumberFormat) threw "Intl is not defined" on Windows and Linux: QuickJS has no Intl. FormatJS's polyfills (MIT) and the CLDR data they carry (Unicode-3.0) are packed in runtime/jsengine/js/intl.pack (2.2 MB, deflate; bun build.ts in js/intl, versions pinned), and js/intl/loader.js runs the core the first time anything reads Intl or calls a toLocale* method, and a locale's data the first time something asks for it (40 locales besides English). A script that never formats pays nothing; the first format costs about 100 ms. A small Collator (letters, then accents, then case) backs localeCompare. quickjs_formats_as_javascriptcore_does: fourteen cases (numbers, money, compact, percent, dates in a zone, plurals, relative times, lists, sorting) give JavaScriptCore's answers, and on a Mac the test asks JavaScriptCore too. Apple builds are unchanged (the pack is only in QuickJS's).

#169 bug 7: blotching at --quality master. openh264's background detection took a slowly changing dark ground (a glow drifting over black) for still and copied its old blocks forward: 6-8% of dark blocks stepped in every sampled frame at any bitrate or quantiser. Off, 0.1%, as a lossless encode of the same frames. a_dark_glow_drifting_keeps_every_block_at_master (5.3% of blocks off before, 1.6% now; it asks under 3%).

#169 bug 4: raea show on Windows. It asked kill whether the app ran, looked only in /Applications, and said it had opened the files "in the Mac's own viewer". app.ts now asks each system its own way, through one Here a test can fake: tasklist on Windows; raea.exe in the folder the installer was given (InstallLocation, #178) or the default; Explorer to open files and start the app; Linux's raea.desktop and xdg-open. Windows' app has no raea:// link, so a post lands there as its notice. The harness that ran raea show is found from one PowerShell listing on Windows (claude.exe as claude). conformance/app.test.ts, 23 tests, each system faked.

The agent shell's Node core on Windows (found probing rc11 on the PC):

  • process.platform was Rust's word ("windows", "macos"), so every === "win32" and === "darwin" in the shell was false, on a Mac too (bug reports said "macos arm64", not the macOS version); os.platform() said "darwin" and the arch "arm64" everywhere. Now Node's words, and the real arch and pid.
  • No process.ppid on any system, so raea show never named the harness that ran it.
  • path was POSIX only: resolve(".") named "/C:\Users...", no folder at all; isAbsolute("C:\x") was false; dirname/basename ignored \. On Windows it parses Windows' paths now (drives, shares, \) and writes them with /, which Windows' calls all take; path.win32 parses them on any system. tests/node.rs's new test checks each against Node 22's answer.
  • fileURLToPath, pathToFileURL, createRequire, tmpdir (its trailing \), execSync (cmd on Windows) and the module URL (file:///C:/..., not file://C:\...).
  • The shell's own absolute-path tests (startsWith("/"), four places) are absolute()/fromCwd() in show.ts, which take C:\, \\server\share and \.
  • raea brand's logo sizes came from sips (a Mac's): now from the image's own header (PNG, GIF, JPEG, WebP, ICO; tested against real encoders' files), sips only as a Mac's fallback. Cutting a take by its words off a Mac now says what works there (a words.json, or --at) instead of pointing at tools/ensure.sh.

Git on a PC without it. raea workspace/project/controller failed with "git: program not found" on a PC whose only Git was the app's. raea_io_assets::git(): $RAEA_GIT, the PATH's, then on Windows the app's (InstallLocation\git), Git for Windows off the PATH, and raea's own in the tools cache, fetched once (dugite-native, the build and folder the app's host uses, sha256 checked). Elsewhere it says how to install git. The default root is joined a folder at a time (it printed Documents/raea with a / on Windows).

CI never ran any of these: the matrix's unit tests leave out raea-runtime-jsengine, raea-io-soft and raea-io-assets, tests/node.rs needs raea-native's modules feature, and io-soft's tests/quality.rs its h264. A step runs them on macOS and Linux (Linux runs the QuickJS Intl test).

macOS 15: import.meta.url in JavaScriptCore modules. CI's new step ran raea-runtime-jsengine's tests::jsc for the first time, and on the macos-15 runner it found import.meta.url undefined for a module from raea's Objective-C loader (macOS 27's JavaScriptCore sets it), so new URL("./x.png", import.meta.url) threw for Mac users on macOS 15. A module that reads import.meta gets import.meta.url ??= "URL"; on line 1, so its other lines keep their numbers and an engine's own URL is left alone.

NOTICE names FormatJS and CLDR, and raea.exe's own Git fetch.

Proved on the Mac: raea-runtime-jsengine (portable, QuickJS), raea-native (modules), raea-io-soft (h264), raea-io-assets, raea-app-workspace, the CLI's conformance (but surface.test.ts, which needs a fresh raea), and the gates (size, names, layers, one-version, no-void, dupes). Windows: rc11 probed on the PC for what was wrong; rc12 is checked there before the release.

🤖 Generated with Claude Code

… and Linux (#169)

QuickJS has no Intl, so toLocaleString or Intl.NumberFormat threw "Intl is not defined" off a Mac. FormatJS's polyfills
(MIT) and the CLDR data they carry (Unicode-3.0) are packed in runtime/jsengine/js/intl.pack (2.2 MB, deflate; js/intl
build.ts, versions pinned), and js/intl/loader.js runs the core the first time anything reads Intl or calls a toLocale*
method, and a locale's data the first time something asks for it, so a script that never formats pays nothing. A small
Collator (letters, then accents, then case) backs localeCompare. quickjs_formats_as_javascriptcore_does: fourteen cases
give JavaScriptCore's answers, and on a Mac it asks JavaScriptCore too. Apple builds are unchanged.
…ity master (#169)

Its background detection took a dim glow drifting over black for still and copied old blocks forward: 6-8% of dark
blocks stepped in every sampled frame, at any bitrate or quantiser. Off, 0.1%, as a lossless encode of the same frames.
a_dark_glow_drifting_keeps_every_block_at_master asks under 3% (5.3% before, 1.6% now).
…hs, file URLs (#169)

process.platform was Rust's word ("windows", "macos"), so every === "win32" and === "darwin" in the shell was false, on
a Mac too; os.platform() said "darwin" and the arch "arm64" everywhere; there was no process.ppid. path was POSIX only:
resolve(".") named "/C:\Users\...", isAbsolute("C:\x") was false and dirname/basename ignored \. On Windows path
parses drives, shares and \ now and writes /, path.win32 parses them anywhere, and fileURLToPath, pathToFileURL,
createRequire, tmpdir, execSync (cmd) and the module URL (file:///C:/...) follow. tests/node.rs checks each against
Node 22's answer. The arch and parent-pid helpers live in node/os.rs (node.rs was over the size limit).
raea show asked kill whether the app ran, looked only in /Applications and said it opened files in "the Mac's own
viewer". app.ts asks each system its own way through one Here a test can fake: tasklist and the installer's
InstallLocation (#178) on Windows, Explorer to open files and start the app, raea.desktop and xdg-open on Linux, and one
PowerShell listing to name the harness that ran it. The shell's absolute-path tests take C:\, \\server\share and \
(show.ts absolute/fromCwd). raea brand reads a logo's size from its own header (PNG, GIF, JPEG, WebP, ICO), sips only as
a Mac's fallback, and cutting by words off a Mac says what works there. conformance/app.test.ts fakes each system.
…#169)

raea workspace, project and controller failed with "git: program not found" on a PC whose only Git was the app's.
raea_io_assets::git(): $RAEA_GIT, the PATH's, then on Windows the app's (InstallLocation\git), Git for Windows off the
PATH, and raea's own in the tools cache, fetched once (dugite-native, the build the app's host uses, sha256 checked).
Elsewhere it says how to install git. The default root is joined a folder at a time. NOTICE names the fetch, and
FormatJS and CLDR for the Intl commit before this.
… at master, git, the Node core (#169)

The matrix's unit tests left out raea-runtime-jsengine, raea-io-soft and raea-io-assets, and tests/node.rs and
io-soft's tests/quality.rs need features (modules, h264), so none of #169's fixes ran in CI.
macOS 15's JavaScriptCore leaves import.meta.url undefined for a module from raea's Objective-C loader (macOS 27's
sets it), so new URL("./x.png", import.meta.url) threw there. jsengine's tests::jsc, run in CI for the first time by
#169's step, found it on the macos-15 runner. A module that reads import.meta gets `import.meta.url ??= "URL";` on
line 1, before its own first line, so every other line keeps its number and an engine's own URL is left alone.
@shinyobjectz
shinyobjectz merged commit 56cf86c into main Nov 19, 2026
4 checks passed
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