Skip to content

Windows builds and renders: the CLI, the paths, and the daemon (windows-portability.md chunk 2) - #160

Merged
ninjudd merged 14 commits into
windows/inventoryfrom
windows/build
Oct 11, 2026
Merged

ninjudd merged 14 commits into
windows/inventoryfrom
windows/build

Conversation

@eve-nyx-13

@eve-nyx-13 eve-nyx-13 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Chunk 2 of the Windows portability plan: field builds on Windows, and the whole offline render path works — real DSP through field-audiod.exe --render, the live-session renderer through --render-live, plugin scanning through --scan — with the control socket left honestly refused until chunk 4's named pipe.

The finding the plan never saw

Label pkgs derive from song.dir, which was raw relative() output — songs\creek on Windows — so no typed label or pattern could ever match: ~70 tests failed "no such label" while git status and field check both looked clean. The fix states an invariant the model half-enforced already (its schemas reject \ in YAML paths): project-relative paths are slash-separated wherever they are data — song.dir, diagnostics, the session JSON the daemon reads, projectRelative's output — and native only where they are genuinely local, like BuildOutcome.outputPath.

What MSVC found that reading could not

  • M_PI is not standard C++. glibc and Apple's libc++ hand it out; MSVC does not. Six uses across biquad.cpp, mixdown.cpp, resample.cpp are now std::numbers::pi — the identical double, bit for bit, so no render changes on any platform.
  • LiveSession::Track was accidentally copyable. MSVC's std::map move constructor is not noexcept, so Track's two maps make its implicit move constructor not noexcept either, and vector<Track> reallocation falls back through move_if_noexcept to the implicit copy constructor, which cannot copy the chain's unique_ptrs. libstdc++ and libc++ maps move noexcept, so clang and gcc never reach the copy. Track is explicitly move-only now — which it always was in fact.
  • capture.cpp called POSIX file functions. Recording arrived from main after the Windows run below, and its capture file used fsync and ftruncate. On Windows it now calls the CRT's _commit and _chsize_s.
  • keys.cpp used poll and a macOS/Linux-only JUCE call. The keyboard instrument arrived from main with the helper behind field keys, whose non-blocking stdin check used <poll.h> and <unistd.h>; on Windows it asks PeekNamedPipe. It also called MidiOutput::createNewDevice, which JUCE declares only on macOS and Linux because Windows has no virtual MIDI ports, so there the helper refuses as it does on any failed publish, and the plan's §7.2 records the gap.

Build and paths

daemonBinary() gains the .exe suffix; build:native gains --config Release (MSVC is multi-config; single-config generators ignore it); SIGPIPE is guarded out on _WIN32 with its "on every platform" comment amended to say which mechanism holds there; and server.cpp gets the chunk-4 stub — serve mode refuses with a pointer at the plan while --render, --render-live and --scan run as plain subprocesses, which is what lets the binary link before the pipe transport exists.

Smaller, each fixed where it lay: pnpm is a .cmd shim execFile cannot spawn (the one test that shells it gets shell on win32); the stub worker is a shebang script Windows cannot exec, so a .js/.mjs interpreter override runs through process.execPath — more hermetic on every platform; a test helper built .venv/bin where the probe reads .venv/Scripts; four suffix assertions compared native paths against /-joined literals.

Guards, by what removes them

Per-test with the reason beside each, linux-portability decision-4 style: 9 fake-daemon tests in version.test.ts and the serve-mode guards (the describes in audiod/client, play-daemon, plugin-hosting's live chains, punch-daemon, record-daemon, and record-midi-daemon, four socket tests in live-session, and three in click-daemon) name chunk 4; 21 stub-spawning tests in generate.test.ts plus three describes in aced/voiced name the workers' §4, which is not chunk 4; two #!/bin/sh sclang fakes in build.test.ts name nothing, since only a second stub dialect would remove them.

Verification, on a real Windows machine

This run was at 1acb58f on 2026-08-18, before the merge that brought recording in from main. The linux CI job covers every later head; nothing after 1acb58f has been built on Windows, and #161's windows-latest job is the first to build this layer's daemon there.

pnpm typecheck                          clean
pnpm build                              clean
field check (examples/bloom)            ok
pnpm build:native                       field-audiod.exe, field-dsp-check.exe, Field Fixture.vst3 — 0 errors
field-dsp-check                         all block partitions bit-identical (resampler included)
vitest, batched:
  audio + audiod + schema               80 passed |  19 skipped | 0 failed
  graph + generators                    153 passed |   3 skipped (4 load-flakes, each green in isolation)
  commands + model + workers + rest     363 passed |  57 skipped (5 load-flakes, each green in isolation)

Every test file passes. The load-flakes are this machine's own conditions — an OneDrive-synced checkout with Defender re-scanning the fresh exe on every spawn — and each flaked test re-ran green isolated; a CI runner shares none of that. The field-dsp-check line is chunk 3's first good omen: MSVC at the VS 2022 floor holds block-invariance bit-identically, resampler included. Cross-platform byte comparison stays chunk 3's to measure.

Testing

Run these from the root of a checkout of windows/build on macOS or Linux. The daemon tests need a built field-audiod: either run pnpm build:native first, which leaves it in native/audiod/build, or point FIELD_AUDIOD at one built from this stack, as I did. The commands change nothing in the tree.

pnpm install --frozen-lockfile
pnpm typecheck
FIELD_AUDIOD=/path/to/field-audiod pnpm test
project check
grep -c "itOverSocket(" src/audiod/live-session.test.ts src/commands/click-daemon.test.ts
grep -n "win32" src/commands/punch-daemon.test.ts src/commands/record-daemon.test.ts src/commands/play-daemon.test.ts src/audiod/client.test.ts

You should see a clean typecheck, a passing suite with the daemon tests running (they skip only when no daemon is built), and Project plans are valid. The grep -c prints 4 for live-session and 3 for click-daemon, and the grep -n shows one win32 describe guard in each of the four files, each naming chunk 4. The change is wrong if any daemon test fails on macOS or Linux, or if a guard skips a test there, because every guard tests process.platform === 'win32' alone.

You cannot exercise the Windows behavior on macOS. The Windows run above is the record for this layer, and #161's windows-latest job builds and tests it on every push.

🤖 Generated with Claude Code

📽️ Projector summary of c82062a: https://field.amnes.ac/reviews/160

@eve-nyx-13

Copy link
Copy Markdown
Contributor Author

Starting review of 00b4f51.

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No findings that withhold this on 00b4f51058007de82b997b1395d2e84a057da101; this is an approval in words. Submitted as a COMMENT review because the reviewing account authored the pull request. One cosmetic nit and one merge-ordering note below, neither of which I am holding the chunk on.

I reproduced the headline finding rather than taking it

This review ran on a Windows machine, so the claim was testable directly. At this head, src/model/project.test.ts is 93/93. With only src/model/project.ts reverted to main and everything else at this head:

× check > flags schema violations with paths
× fmt > formats a track named "song" with track order, not song order
× fmt > canonicalizes shuffled keys and preserves comments
× committedFileResolver: one relation for validate and the graph > resolves ledger names and chosen takes
× generative-entry takes carry the same pins a sound's do > fmt sees a noncanonical takes file
Tests  5 failed | 88 passed (93)

So the invariant is load-bearing, in one file alone, and projectPath() is what turns those green. The conversion is a no-op on POSIX (sep is already /), so nothing moves on macOS or Linux.

I also checked the invariant is applied completely, which is the way this class of fix usually fails. Every relative() call site in non-test src/:

build.ts:23        inside projectRelative — converted
graph/live.ts:286  converted (session JSON)
model/project.ts:131  converted (projectPath)
transport.ts:58    data, and already correct — see below
transport.ts:120   display
version.ts:286     display ("daemons in <where>")
socketPath.ts:19   native by design; chunk 4 replaces it

transport.ts:58 is worth naming because it is the counterpart to this fix rather than an exception to it: songDirOfPath splits on sep and returns songs/<name> slash-joined, and transport.ts:44 compares that against song.dir — the field this PR just normalized. Before this change those two disagreed on Windows; after it they match. It needs no edit, and it would break if anyone "converted" it, since the split immediately after is on the native separator.

The C++

  • std::numbers::pi is the same double as M_PI bit for bit, <numbers> is C++20 and CMAKE_CXX_STANDARD is 20, so the renders cannot move. Six sites, all converted.
  • Track move-only is right, and Track() = default correctly restores the default constructor that declaring the others would have suppressed. Deleting the copy is also what keeps vector<Track> growth on the move path.
  • The server.cpp stub defines exactly server.h's public surface — constructor, destructor, start, beginShutdown, broadcast, sweepClosedConnections, connectionCount — and leaves only the private loop methods undefined, which nothing on the Windows path can reach. Members all carry default initializers, so the two-member ctor is complete.
  • The SIGPIPE guard amends the "whole mechanism, on every platform" comment instead of leaving it to rot, which is what §1.3 asked for. <csignal> stays unconditional and is harmless on MSVC.

Guards and the rest

Counted at this head, and they match both the body and the corrected attribution in §7: 9 itOverPosixSocket in version.test.ts, 21 itSpawnsAWorker in generate.test.ts, 4 itOverSocket in live-session.test.ts, 2 win32 skips in build.test.ts, 3 describes across aced/voiced. The pnpm shell: win32 narrowing, the .venv/Scripts helper, and the four suffix assertions moved to join(sep) are each correct and each scoped to the platform that needed them. The .js/.mjs override through process.execPath changes POSIX behaviour too, and is equivalent there — a shebang exec produces the same argv.

The one nit

resample.cpp puts <numbers> between <cmath> and <cstdint>, breaking the alphabetical order the file had before and that biquad.cpp and mixdown.cpp both keep — numbers sorts after cstdint. One line, cannot break anything, not worth a thread of its own.

Merge ordering

This branched from main, not from the stack, so its own tree still reads status: Draft and ## 2 Decisions to make while the text it adds describes chunk 2 as implemented and cites "#158 review". I trial-merged it against #158's head (29c8f30) rather than guessing:

git merge-tree --write-tree 29c8f30 00b4f51  →  exit 0, no conflicts
merged plan: status: Active, "## 2 Decisions (DECIDED…)", §7 present, both chunk-2 amendments present

So the stale base costs nothing mechanically — git reconciles it and the merged document is coherent. It only constrains order: land #157 and #158 first. If this one goes in ahead of them, main briefly carries a Draft plan documenting completed implementation and a dangling reference to a #158 review of a section that is not there yet.

eve-nyx-13 added a commit that referenced this pull request Aug 18, 2026
The one nit from #160's review: <numbers> landed between <cmath> and
<cstdint>, breaking the ordering biquad.cpp and mixdown.cpp both keep.

Co-Authored-By: Claude Fable 5 <[email protected]>
@eve-nyx-13

Copy link
Copy Markdown
Contributor Author

Starting review of bfa8660.

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No findings on bfa866054ade6ecce63c5f4ac0c6bc65f1cd8bf6; this is an approval in words, submitted as a COMMENT review because the reviewing account authored the pull request.

The one nit from 00b4f51 is fixed and the range contains nothing else — one file, one line pair:

#include <algorithm>
#include <cmath>
#include <cstdint>
#include <numbers>     <- was above <cstdint>
#include <numeric>
#include <stdexcept>
#include <string>

Alphabetical again, matching biquad.cpp and mixdown.cpp, and <numbers> is still there so std::numbers::pi still resolves. Everything I verified on 00b4f51 — the path invariant and its 5-test proof, the Track and server.cpp changes, the guard counts, the merge-order check against #158's head — is untouched by this range and stands.

The merge-ordering note from that review still applies: land #157 and #158 ahead of this one.

eve-nyx-13 and others added 4 commits August 18, 2026 13:17
…-portability.md chunk 2)

The first red run found the largest defect somewhere the plan never
looked: label pkgs derive from song.dir, which was raw relative()
output — songs\creek on Windows — so no typed label or pattern could
ever match, and ~70 tests failed with "no such label" while `git
status` and `field check` both looked fine. The fix states the
invariant the model already half-enforced (its schemas reject `\` in
YAML paths): project-relative paths are slash-separated wherever they
are data — song.dir, diagnostics, the session JSON the daemon reads,
projectRelative's output — and native only where they are genuinely
local, like BuildOutcome.outputPath.

The build side of the chunk: daemonBinary() gains the .exe suffix,
build:native gains --config Release (MSVC is multi-config; single-config
generators ignore it), SIGPIPE is guarded out on _WIN32 with its "on
every platform" comment amended to say which mechanism holds there, and
server.cpp gets the chunk-4 stub — serve mode refuses with a pointer at
the plan while --render, --render-live and --scan run as plain
subprocesses, which is what lets the binary link before the named-pipe
transport exists.

Small discoveries, each fixed where it lay: pnpm is a .cmd shim execFile
cannot spawn (the one test that shells it gets shell on win32); the stub
worker is a shebang script Windows cannot exec, so a .js/.mjs
interpreter override runs through process.execPath now — more hermetic
on every platform; a test helper built .venv/bin where the probe reads
.venv/Scripts; two suffix assertions compared native paths against
/-joined strings.

Transport-bound tests are guarded per test with the reason beside them,
linux-portability decision-4 style: 9 fake-daemon tests in
version.test.ts, 21 stub-spawning tests in generate.test.ts, three
describes in aced/voiced, two #!/bin/sh sclang fakes in build.test.ts.
The version.test.ts guards name chunk 4; the generate.test.ts and aced/voiced guards name the workers' own future chunk (§4), which is not chunk 4; the sclang stubs name none, because only a second stub dialect would remove them (#158 review corrected the original sentence here, which claimed chunk 4 for all of them). With the daemon binary
absent, the remaining failures on this machine are all "field-audiod is
not built" — the compiler landing turns them into the chunk's
verification run.

Co-Authored-By: Claude Fable 5 <[email protected]>
The same defect the watch tests had, found by the readiness run:
build.test.ts compared native outputPath values against /-joined
literals, so both assertions failed on Windows while the paths they
checked were correct.

Co-Authored-By: Claude Fable 5 <[email protected]>
…dows-portability.md chunk 2)

M_PI is not standard C++: glibc and Apple's libc++ define it in cmath,
MSVC does not without a macro, and the daemon used it six times across
biquad, mixdown and resample. All six are std::numbers::pi now — the
identical double, so no render changes anywhere — and the include is
<numbers>, which the C++20 floor already pays for.

The second finding is the sharper one: LiveSession::Track had an
implicit copy constructor nothing ever used, so clang never instantiated
the vector<ChainStage> copy path it references and the code built for a
year over unique_ptrs that cannot copy. MSVC's STL compiles that path
eagerly and refused. Track is explicitly move-only now, which is what it
always was in fact.

With the binary present, the serve-mode tests run and refuse at the
chunk-2 stub, so they take the same per-test guard as the fake-daemon
tests: audiod/client, play-daemon, plugin-hosting's live chains, and the
four socket tests in live-session skip on win32 naming chunk 4, while
the --render, --render-live and --scan subprocess tests run. Verified in
batches on the Windows machine: every test file passes — real DSP
through field-audiod.exe --render, the live session renderer through
--render-live, offline plugin hosting through --scan — and
field-dsp-check reports all block partitions bit-identical, resampler
included. Under full parallel load this OneDrive-synced,
Defender-watched machine drops an occasional spawn; every such failure
re-ran green in isolation, and CI shares none of those conditions.

Co-Authored-By: Claude Fable 5 <[email protected]>
The one nit from #160's review: <numbers> landed between <cmath> and
<cstdint>, breaking the ordering biquad.cpp and mixdown.cpp both keep.

Co-Authored-By: Claude Fable 5 <[email protected]>
@eve-nyx-13

Copy link
Copy Markdown
Contributor Author

Starting review of 1acb58f.

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

One finding on 1acb58ff9e814a4821fc98a0787aa001b7828a22, about the pull request's base rather than its contents. Submitted as a COMMENT review because the reviewing account authored the pull request. Requesting changes.

The rebase preserved chunk 2 exactly

I compared chunk 2's own diff against its new parent with the diff I approved at bfa8660 against main, content lines only:

content-line differences: 0

Byte for byte across .gitattributes-adjacent docs and all of src/ and native/ — the path invariant, the std::numbers::pi conversions, Track's move-only declarations, the server.cpp stub, the guards, build:native's --config Release. Everything verified on bfa8660, including the 5-test proof that projectPath() is load-bearing, carries over untouched. The rebase did what it was supposed to.

But the base did not move with the branch

The branch now sits on windows/inventory; the pull request still says base=main, so it displays nine commits and twenty-nine files and claims chunks 1 and the inventory as its own. Detail inline, including why this matters at squash-merge time rather than being cosmetic.

gh pr edit 160 --base windows/inventory is the whole fix — no rebase, no force-push, and the diff drops back to chunk 2.

Comment thread .gitattributes Resolved
@eve-nyx-13
eve-nyx-13 changed the base branch from main to windows/inventory August 18, 2026 20:25

@eve-nyx-13 eve-nyx-13 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No findings on 1acb58ff9e814a4821fc98a0787aa001b7828a22; this is an approval in words, submitted as a COMMENT review because the reviewing account authored the pull request. Re-reviewed at the same head, since retargeting a base pushes nothing.

The base now points at windows/inventory, and the diff dropped back to chunk 2 alone:

before  base=main               9 commits, 29 files
after   base=windows/inventory  4 commits, 25 files

Twenty-five files, and the four that left — .gitattributes, docs/README.md, later.md, now.md — are exactly #157's and #158's. That matches the file list I reviewed at bfa8660 one for one.

The stack's bases now form the chain the merge order implies, each link pointing at its parent rather than at main:

#157  windows/gitattributes -> main
#158  windows/inventory     -> windows/gitattributes
#160  windows/build         -> windows/inventory
#161  windows/transport     -> windows/build

So each squash carries its own title and its own review trail, and merging #160 no longer takes chunk 1 and the inventory along with it uncredited. The head is unchanged and its content was already verified identical to the approved bfa8660, so nothing in chunk 2 needs looking at again.

minjudd
minjudd previously requested changes Sep 6, 2026

@minjudd minjudd 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.

🔭 Projector review · model claude-opus-5[1m] · effort xhigh · CHANGES REQUESTED · took 6m 19s

2 finding threads: 1 resolved, 1 open — this review opens the 1.

The port work itself holds up, and I ran it rather than reading it. The scratch clone had no field-audiod, which made 78 tests fail for reasons that had nothing to do with this branch, so I linked the built artefact in and re-ran the whole suite at this head and at its base:

HEAD (#160)  Test Files  1 failed | 43 passed | 1 skipped (45)
             Tests       1 failed | 660 passed | 25 skipped (686)
BASE (#158)  Test Files  1 failed | 43 passed | 1 skipped (45)
             Tests       1 failed | 660 passed | 25 skipped (686)

Identical, and the single failure is plan-limits.test.ts shelling pnpm gen:limits, which fails the same way on main — my clone, not your diff. tsc --noEmit is clean. The skip count is the same on both sides, which is the useful part: every new skipIf is inert on macOS, so the Windows guards cost no coverage here.

The two MSVC defects are correctly diagnosed and correctly fixed. std::numbers::pi is not merely "close enough" to M_PI — I compiled both and compared the bytes, because §1.4 stakes a byte-identical render claim on it:

M_PI             = 3.141592653589793116
std::numbers::pi = 3.141592653589793116
bitwise equal    = YES

So the six substitutions across biquad.cpp, mixdown.cpp and resample.cpp cannot move a rendered sample, and grep -rn M_PI native/ is now empty. CMAKE_CXX_STANDARD is 20, so <numbers> is available. All three files pass c++ -fsyntax-only -std=c++20. The Track change is right for the reason given — with the copy constructor deleted, std::move_if_noexcept still selects the move during vector reallocation, so nothing regresses on clang.

The Windows Server stub links. server.h declares seven public members — constructor, destructor, start, beginShutdown, broadcast, sweepClosedConnections, connectionCount — and the _WIN32 block defines exactly those seven; the five private loop methods stay declared and unreferenced, as the comment claims. The header itself pulls in only JUCE and <atomic> <memory> <mutex> <thread> <vector>, so nothing POSIX escapes it, and the five POSIX includes sit inside the #else. main.cpp:323 handles the refusal properly rather than ignoring it — if (auto error = server.start(); error.isNotEmpty()) prints and returns 1.

I also checked the separator sweep for gaps rather than trusting it, since an incomplete one is the failure mode here. Every remaining relative() in non-test src/ is accounted for: live.ts:286 and project.ts:131 are converted, build.ts converts in projectRelative, transport.ts:120 and version.ts:286 are display-only, socketPath.ts:19 belongs to chunk 4, and transport.ts:58 already slash-joins after splitting on the native sep — the case #158 §7.4 works through. Nothing left over. And since sep === '/' on POSIX, every one of these conversions is an identity here, which is why the two runs above match exactly.

The one finding is package.json, and it is not really about this diff being wrong. main moved the same line for a different reason, and both of the obvious conflict resolutions break something.

On the rest: this inherits #157's layout blocker — docs/projects/all/windows-portability.md no longer exists on main — which is the parent's to fix and which I have not filed here. The linux check on this head is the Actions spending-cap failure again, three seconds with the billing annotation.

Comment thread package.json Resolved
Brings chunk 2 up to date with its parent, which now carries main.

One conflict, in package.json's build:native: main bounded the native
build to four jobs (#165) on the same line where this branch added
--config Release. The resolution keeps both:

  cmake --build native/audiod/build --parallel 4 --config Release

Either side alone breaks something. Unbounded -j brings back the cold
CI builds that killed the runner, and dropping --config Release makes
MSVC put the binary outside field-audiod_artefacts/Release/, where
daemonBinary() looks. Single-config generators ignore --config, so the
line is right on all three platforms.

server.cpp auto-merged: main's recording ops, including the ::getpid()
in hello, land inside the POSIX #else arm, and server.h is unchanged
on main, so the Windows stub still defines every public member.
Recording arrived on main after this chunk was written, and its
crash-safe capture (recording.md chunk 1) calls ::fsync and
::ftruncate from <unistd.h>, which MSVC's CRT does not have. The
first windows-latest run on #161 and #163 stopped there:

  capture.cpp(4,10): error C1083: Cannot open include file: 'unistd.h'

Two helpers beside the file's other statics, syncToDisk() and
truncateTo(), spell them _commit (FlushFileBuffers) and _chsize_s on
Windows and leave POSIX exactly as it was, so the four call sites stay
free of platform branches and the crash-safety story is unchanged.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 13m 34s over 2 heads

This change is chunk 2 of the Windows portability plan: field builds on Windows, and offline rendering works there. Project-relative paths become slash-separated wherever they are data: song.dir, loaded file paths, projectRelative, and the session JSON's file paths. daemonBinary() gains the .exe suffix, and build:native gains --config Release. The daemon compiles under MSVC through five changes: std::numbers::pi replaces M_PI, LiveSession::Track becomes move-only, SIGPIPE is guarded, a Windows Server stub refuses serve mode until chunk 4's named pipe, and capture.cpp spells fsync and ftruncate as _commit and _chsize_s. The change knowingly leaves the control socket, the workers' transport, and the cross-platform byte comparison to later chunks. It guards the tests that depend on them on win32, with the reason beside each guard.

2 finding threads: 1 resolved, 1 open

Covered 26 of 26 changed files; no generated files.

The head was reviewed by reading only. Its author has no write access to okamnesiac/field, so no build, test, or script from the head ran on the review machine. The linux CI job at this SHA passed, which shows the C++ and TypeScript compile under GCC and the suite passes on Linux. Nothing at this head has been built on Windows. The head moved from d041256 to 18849a0 during the review, and every finding was checked again at 18849a0.

The merge of windows/inventory brought recording chunks 1 to 4 (#166, #169, #170) in from main. That merge came after the Windows run the description reports, which was at 1acb58f on 2026-08-18. The head's last commit ports the one POSIX-only file that merge brought in, capture.cpp. The port is correct as read: _commit is the CRT's FlushFileBuffers, _chsize_s takes a 64-bit size, both opens use binary modes, and the helpers sit in the file's anonymous namespace. The thread below is about the merged test files meeting this change on Windows.

Suggestions

  • native/audiod/src/dsp/wavfile.cpp:57 is base code that opens files from a narrow std::string, and MSVC reads a narrow path in the ANSI code page, not UTF-8. On Windows, --render and --render-live therefore fail to open any input or output whose path holds a non-ASCII character, such as a temp directory under a user name like Zoë. Open through a std::filesystem::path built from the UTF-8 bytes (lines 57, 233, and 295), and do the same for the std::fopen calls at capture.cpp:139 and capture.cpp:177 before chunk 4 makes recording reachable.
  • src/audio/dsp-check.test.ts:19 is base code that looks for native/audiod/build/field-dsp-check. The Visual Studio generator writes a plain add_executable to build/Release/field-dsp-check.exe, so the block-invariance test skips on Windows instead of running. Resolve the path the way daemonBinary() now does.
  • src/audio/plugin-hosting.test.ts:364 guards the whole describe on win32, which also skips the five tests that need no socket (lines 434, 470, 483, 659, and 690, which render through --render-live or only compile). Guard only the socket tests at lines 531 and 587, as live-session.test.ts does with itOverSocket. The comment at line 361 and the plan's statement that --render-live tests run on Windows then both hold.
  • src/commands/generate.test.ts:50 says Windows cannot exec the stub bare, but workerLaunchCommand now runs a .mjs override through process.execPath. Drop that clause, so the AF_UNIX listen is the only reason the comment gives.
  • src/graph/live.ts:286 spells out projectPath from model/project.ts:138, and commands/build.ts:62 spells it a third time. Export projectPath and call it here, so the slash invariant lives in one function.
  • src/model/project.ts:1213 and line 1221 still build the stranded-takes diagnostic paths with join(song.dir, ...). On Windows those two diagnostics print backslashes while every other diagnostic prints slashes. Spell them as template strings.
  • native/audiod/src/live.h:142 says MSVC "eagerly compiles" the copy path. The trigger is that MSVC's std::map move constructor is not noexcept, so vector<Track> reallocation falls back to the implicit copy constructor through move_if_noexcept; libstdc++ and libc++ maps move noexcept. Name that trigger in the comment.
  • docs/projects/windows-portability/readme.md:352 says "two suffix assertions", and this head has four: two in watch.test.ts and two in build.test.ts. §7.1 (line 460) still names only the 9 guards in version.test.ts as chunk 4's to remove, and leaves out the serve-mode guards this change adds. Update both counts, and add the capture.cpp port to the chunk 2 amendment.

windows-portability is at in-progress, and this change does not move it. The amendment adds no open question, so the readiness gate does not apply.

Comment thread src/audiod/client.ts Resolved
ninjudd added a commit that referenced this pull request Oct 10, 2026
§7.2 filed the field init item as unclaimed, but #159 is open and makes
init write the text=auto eol=lf line and the *.state override. Say so, as
§7.4 names other pull requests.

§7.4 cited "the §1.5 invariant", which is the daemon-binary finding and
states no rule about separators. Write the rule in place and attribute it
to chunk 2 (#160), where it arrives.

Also from the review's suggestions: name pnpm/action-setup@v4 rather than
corepack in the CI bullet, and add the workers' fcntl import and pkill
advice to §7.3.
The merge from main brought click-daemon, punch-daemon, and record-daemon,
which skip only when daemonBinary() finds nothing. With the .exe suffix it
finds field-audiod.exe on any Windows machine that has built it, so their
socket tests ran there and failed at the serve-mode stub with "field-audiod
did not start".

Skip the three socket tests in click-daemon with itOverSocket, and the
daemon describe in punch-daemon and record-daemon, naming chunk 4 as the
other serve-mode guards do. click-daemon's --render-live test and the
helper describes still run everywhere. With process.platform faked to
win32, the three files run 3 tests and skip 16.

The plan records the new guards in a chunk 2 amendment and in §7.1's list
of what chunk 4 removes, and corrects "two suffix assertions" to the four
path assertions chunk 2 changed.
live.ts spelled out projectPath's relative-then-slash-join by hand; export
projectPath and call it, so the rule lives in one function. The two
stranded-takes diagnostics built their paths with join(song.dir, ...),
which prints backslashes on Windows while every other diagnostic prints
slashes; spell them as slash-joined strings.

The generate.test.ts guard comment said Windows cannot exec the stub bare,
but workerLaunchCommand runs a .mjs override through process.execPath, so
the AF_UNIX listen is the only reason left. live.h's Track comment now
names the real trigger: MSVC's std::map move constructor is not noexcept,
so vector<Track> reallocation falls back to the implicit copy constructor.
ninjudd added a commit that referenced this pull request Oct 10, 2026
#160 guarded the socket tests in click-daemon, punch-daemon, and
record-daemon on win32, naming chunk 4, after the merge from main brought
them in. This is chunk 4, so they run on Windows again, as the other
serve-mode guards do here. The plan's chunk 4 paragraph lists them with
the guards it retired, and §6's 104-byte answer names src/socketPath.ts
as where the Windows branch lives.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CLEAN · took 6m 16s

This change is chunk 2 of the Windows portability plan: field builds on Windows, and offline rendering works there. Project-relative paths become slash-separated wherever they are data, through one exported projectPath in the model: song.dir, loaded file paths, diagnostics, and the session JSON's file paths. projectRelative also slash-separates its output. daemonBinary() gains the .exe suffix, and build:native gains --config Release. The daemon compiles under MSVC through five changes: std::numbers::pi replaces M_PI, LiveSession::Track becomes move-only, SIGPIPE is guarded, a Windows Server stub refuses serve mode until chunk 4's named pipe, and capture.cpp spells fsync and ftruncate as _commit and _chsize_s. The change knowingly leaves the control socket, the workers' transport, and the cross-platform byte comparison to later chunks. It guards the tests that depend on them on win32, with the reason beside each guard.

2 finding threads: 2 resolved, 0 open

Covered 29 of 29 changed files; no generated files.

The head was reviewed by reading only. Its author has no write access to okamnesiac/field, so no build, test, or script from the head ran on the review machine. The linux CI job passed at this SHA, which shows the C++ and TypeScript compile under GCC and the suite passes on Linux. Nothing at this head has been built on Windows.

This head looks clean. A human approval is what remains.

What was checked at bd26b8a:

  • The open finding is fixed. click-daemon.test.ts skips its three socket tests on win32 with itOverSocket. Its --render-live test still runs, and its afterEach catches the failed connect. In punch-daemon.test.ts and record-daemon.test.ts, every test in the daemon describe either calls AudiodClient.connect directly or goes through recordTake, which connects. So skipping the whole describe on win32 is exact. The thread was already resolved.
  • Paths. Every comparison against song.dir compares a slash-joined value: a label package, songDirOfPkg, songDirOfPath, or a graph node's songDir. The daemon resolves the session JSON's file paths with JUCE's getChildFile, which swaps / for \ on Windows. graph/live.ts uses no relative or sep after dropping those imports.
  • The daemon. The Windows Server stub defines every non-inline public member that server.h declares. capture.cpp's helpers sit in the file's anonymous namespace, and its files open in binary mode. The daemon builds as C++20, which <numbers> needs. The Track comment now names the noexcept trigger.
  • The binary. daemonBinary() and build:native agree on field-audiod_artefacts/Release/. Every test that finds the binary through daemonBinary() and dials the socket now skips on win32.
  • The plan. The 2026-10-10 amendment's guard counts match the diff, and §7.1 now lists every guard that names chunk 4. windows-portability stays in-progress, and the amendments add no open question, so the readiness gate does not apply.

Suggestions

  • native/audiod/src/dsp/wavfile.cpp:57 is base code that opens files from a narrow std::string, and MSVC reads a narrow path in the ANSI code page, not UTF-8. On Windows, --render and --render-live therefore fail to open any input or output whose path holds a non-ASCII character, such as a temp directory under a user name like Zoë. Open through a std::filesystem::path built from the UTF-8 bytes (lines 57, 233, and 295), and do the same for the std::fopen calls at capture.cpp:139 and capture.cpp:177 before chunk 4 makes recording reachable.
  • src/audio/dsp-check.test.ts:19 is base code that looks for native/audiod/build/field-dsp-check. The Visual Studio generator writes a plain add_executable to build/Release/field-dsp-check.exe, so the block-invariance test skips on Windows instead of running. Resolve the path the way daemonBinary() now does.
  • src/audio/plugin-hosting.test.ts:364 guards the whole describe on win32, which also skips the five tests that need no socket (lines 434, 470, 483, 659, and 690, which render through --render-live or only compile). Guard only the socket tests at lines 531 and 587, as click-daemon.test.ts and live-session.test.ts do with itOverSocket.
  • docs/projects/windows-portability/readme.md:344 lists diagnostics and projectRelative's output as data, but both are printed for a person. §7.4 (line 583) now says a printed path keeps the platform's separator. Say in one of the two places that these printed paths take slashes, and why.

The scan and the render lookup both split FIELD_PLUGIN_PATH on ":", which
cuts a Windows path at its drive colon: D:\a\...\VST3 became "D" and a
drive-relative \a\...\VST3 that resolves against the drive of the
process's cwd. On the windows CI runner the scan ran from the checkout on
D: and found the fixture, while --render-live ran in a temp project on C:
and reported the plugin not installed, failing the five hosted-chain
tests. Both call sites now share one helper that splits on ";" under
_WIN32 and ":" elsewhere, the way each platform splits PATH.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CLEAN · took 0m 58s

This change is chunk 2 of the Windows portability plan: field builds on Windows, and offline rendering works there. Project-relative paths become slash-separated wherever they are data, through one exported projectPath in the model: song.dir, loaded file paths, diagnostics, and the session JSON's file paths. projectRelative also slash-separates its output. daemonBinary() gains the .exe suffix, and build:native gains --config Release. The daemon compiles under MSVC through five changes: std::numbers::pi replaces M_PI, LiveSession::Track becomes move-only, SIGPIPE is guarded, a Windows Server stub refuses serve mode until chunk 4's named pipe, and capture.cpp spells fsync and ftruncate as _commit and _chsize_s. The plugin scan and the render's plugin lookup split FIELD_PLUGIN_PATH on ; on Windows, where : would cut a path at its drive letter. The change knowingly leaves the control socket, the workers' transport, and the cross-platform byte comparison to later chunks. It guards the tests that depend on them on win32, with the reason beside each guard.

2 finding threads: 2 resolved, 0 open

Covered 30 of 30 changed files; no generated files.

The head was reviewed by reading only. Its author has no write access to okamnesiac/field, so no build, test, or script from the head ran on the review machine. The linux CI job passed at this SHA, which shows the C++ and TypeScript compile under GCC and the suite passes on Linux. This pull request runs no Windows CI job, so no Windows build of this head is on record here.

This head looks clean. A human approval is what remains.

What was checked at 13c068e:

  • The earlier finding stays fixed. click-daemon.test.ts skips its three socket tests on win32 with itOverSocket. Its --render-live test still runs, and its afterEach catches the failed connect. In punch-daemon.test.ts and record-daemon.test.ts, every test in the daemon describe either calls AudiodClient.connect directly or goes through recordTake, which connects. So skipping the whole describe on win32 is exact. The thread was already resolved.
  • Paths. Every comparison against song.dir compares a slash-joined value: a label package, songDirOfPkg, songDirOfPath, or a graph node's songDir. The daemon resolves the session JSON's file paths with JUCE's getChildFile, which swaps / for \ on Windows. graph/live.ts uses no relative or sep after dropping those imports.
  • The daemon. The Windows Server stub defines every non-inline public member that server.h declares. capture.cpp's helpers sit in the file's anonymous namespace, and its files open in binary mode. The daemon builds as C++20, which <numbers> needs. The Track comment now names the noexcept trigger.
  • The plugin search path. pluginPathFromEnvironment replaces two identical loops in hosting.cpp, one in runScan and one in the render's plugin lookup. It is defined in an earlier anonymous namespace of the same file. It still splits on : on macOS and Linux, and splits on ; under _WIN32, as Windows splits PATH. Every test sets FIELD_PLUGIN_PATH to a single directory, so no test depends on the separator.
  • The binary. daemonBinary() and build:native agree on field-audiod_artefacts/Release/. Every test that finds the binary through daemonBinary() and dials the socket now skips on win32.
  • The plan. The 2026-10-10 amendment's guard counts match the diff, and §7.1 now lists every guard that names chunk 4. windows-portability stays in-progress, and the amendments add no open question, so the readiness gate does not apply.

Suggestions

  • native/audiod/src/dsp/wavfile.cpp:57 is base code that opens files from a narrow std::string, and MSVC reads a narrow path in the ANSI code page, not UTF-8. On Windows, --render and --render-live therefore fail to open any input or output whose path holds a non-ASCII character, such as a temp directory under a user name like Zoë. Open through a std::filesystem::path built from the UTF-8 bytes (lines 57, 233, and 295), and do the same for the std::fopen calls at capture.cpp:139 and capture.cpp:177 before chunk 4 makes recording reachable.
  • src/audio/dsp-check.test.ts:19 is base code that looks for native/audiod/build/field-dsp-check. The Visual Studio generator writes a plain add_executable to build/Release/field-dsp-check.exe, so the block-invariance test skips on Windows instead of running. Resolve the path the way daemonBinary() now does.
  • src/audio/plugin-hosting.test.ts:364 guards the whole describe on win32, which also skips the five tests that need no socket (lines 434, 470, 483, 659, and 690, which render through --render-live or only compile). Guard only the socket tests at lines 531 and 587, as click-daemon.test.ts and live-session.test.ts do with itOverSocket. With FIELD_PLUGIN_PATH now split correctly on Windows, those five tests can run there.
  • docs/projects/windows-portability/readme.md:344 lists diagnostics and projectRelative's output as data, but both are printed for a person. §7.4 (line 583) now says a printed path keeps the platform's separator. Say in one of the two places that these printed paths take slashes, and why.

# Conflicts:
#	native/audiod/src/capture.cpp
The keyboard-instrument chunks from main brought keys.cpp, which MSVC
would reject twice. Its non-blocking stdin check used poll and read from
<poll.h> and <unistd.h>; on Windows it now asks PeekNamedPipe, and a
closed pipe reads as ERROR_BROKEN_PIPE. It also called
MidiOutput::createNewDevice, which JUCE declares only on macOS and Linux
because Windows has no virtual MIDI ports; there the helper now refuses
with the message it gives any failed publish.

keys/helper-native.test.ts skips its round trip on win32 for want of a
virtual port, as it already does on Linux without ALSA, and
record-midi-daemon's daemon describe takes the serve-mode guard, naming
chunk 4. The plan records the port in a chunk 2 amendment, adds the new
describe to §7.1's list, and records in §7.2 that field keys cannot
publish a source on Windows.
ninjudd added a commit that referenced this pull request Oct 11, 2026
… port

#160 guarded record-midi-daemon's daemon describe on win32, naming chunk
4. This is chunk 4, so the describe runs on Windows again, and its tests
that need a published source now meet the reason Windows still cannot
run them: there are no virtual MIDI ports, so --keys refuses. publish()
reports that as unavailable on win32, as it already does on Linux without
ALSA, and those tests skip; advertising record-midi and refusing to arm
with no source still run. The plan's chunk 4 paragraph lists the guard
with the ones it retired.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 6m 47s over 2 heads

This change is chunk 2 of the Windows portability plan: field builds on Windows, and offline rendering works there. Project-relative paths become slash-separated wherever they are data, through one exported projectPath in the model: song.dir, loaded file paths, diagnostics, and the session JSON's file paths. projectRelative also slash-separates its output. daemonBinary() gains the .exe suffix, and build:native gains --config Release. The daemon compiles under MSVC through these changes: std::numbers::pi replaces M_PI, LiveSession::Track becomes move-only, SIGPIPE is guarded, a Windows Server stub refuses serve mode until chunk 4's named pipe, capture.cpp spells fsync and ftruncate as _commit and _chsize_s, and keys.cpp checks stdin with PeekNamedPipe and refuses to publish a virtual MIDI source, which Windows does not have. The plugin scan and the render's plugin lookup split FIELD_PLUGIN_PATH on ; on Windows. The change knowingly leaves the control socket, the workers' transport, the cross-platform byte comparison, and a Windows route for field keys to later work. It guards the tests that depend on them on win32, with the reason beside each guard.

3 finding threads: 2 resolved, 1 open

Covered 33 of 33 changed files; no generated files.

The head was reviewed by reading only. Its author has no write access to okamnesiac/field, so no build, test, or script from the head ran on the review machine. The linux CI job passed at this SHA, which shows the C++ and TypeScript compile under GCC and the suite passes on Linux. This pull request runs no Windows CI job, so no Windows build of this head is on record here.

The merge base moved from e6ef0ae to 1283ef8. That brings in main's keyboard-instrument chunks (#178, #179, #181, #182) and #159, plus a §7.2 note in the plan that sclangCommand cannot find sclang on Windows. This pull request's own change since 13c068e is the commit 76049b2 and the merge resolution in capture.cpp. The head moved from 76049b2 to e5af809 during this review. That was a merge of the base branch, and it left this pull request's own hunks byte-identical. What was checked at e5af809:

  • The merge kept this change intact. In the shared files main.cpp, server.cpp, audiod/client.ts, model/project.ts, punch-daemon.test.ts, and record-daemon.test.ts, this pull request's hunks are the same as at 13c068e. main restructured capture.cpp into Transaction, truncateAndSync, and syncData. The resolution routes all three through syncToDisk and truncateTo, and no raw fsync, ftruncate, or fileno call remains outside them.
  • main's native code builds under MSVC as read. keys.cpp and keyboard-layout.cpp join field-audiod; they do not add a binary, so daemonBinary() already finds --keys with .exe. keys.cpp keeps poll, read, and STDIN_FILENO in the POSIX branch. Its Windows branch includes <windows.h> after every JUCE header, and the file uses no name that header turns into a macro. createNewDevice sits behind JUCE_WINDOWS, matching where JUCE declares it. keyboard-layout.cpp has a non-Apple fallback, and server.h gained no member the Windows stub would have to define.
  • main's new tests are guarded where this change turns them on. Of the 17 test files main added or changed, three gate on daemonBinary(), the gate this pull request opens on Windows. punch-daemon and record-daemon carry their guards from c12dac0. Every test in record-midi-daemon's guarded describe goes through connect() or recordTake. helper-native skips when --keys reports its error on win32. That error is the first line --keys prints, because the non-Apple layout reader prints nothing.
  • The slash rule meets main's new code. None of main's new lines compares a join() or relative() result against song.dir or a loaded file's path. land.ts compares songDirOfPath against song.dir, and this change makes both sides slash-joined.
  • The SuperCollider lookup. #179 put sclangCommand() in front of the execFile call in runScProgram. Before that, execFile itself found sclang.exe on Windows. Now sclangCommand() finds neither sclang.exe on PATH nor a backslash FIELD_SCLANG. That gap is base code, and §7.2 records it as standalone work. It makes this change's comment at src/graph/build.test.ts:473 untrue, which is this review's one thread.
  • Threads. Both earlier finding threads were already resolved and still hold at this head.
  • The plan. The new chunk 2 amendment names the right pull requests, and §7.1 adds record-midi-daemon to what chunk 4 removes. The §7.2 entry for field keys is new work outside every chunk, which it marks as standalone and a design question. windows-portability stays in-progress, which this change does not move, so the readiness gate does not apply.

Suggestions

  • native/audiod/src/dsp/wavfile.cpp:57 is base code that opens files from a narrow std::string, and MSVC reads a narrow path in the ANSI code page, not UTF-8. On Windows, --render and --render-live therefore fail to open any input or output whose path holds a non-ASCII character, such as a temp directory under a user name like Zoë. Open through a std::filesystem::path built from the UTF-8 bytes (lines 57, 233, and 295), and do the same for the std::fopen calls at capture.cpp:144 and capture.cpp:220 before chunk 4 makes recording reachable.
  • src/audio/dsp-check.test.ts:19 is base code that looks for native/audiod/build/field-dsp-check. The Visual Studio generator writes a plain add_executable to build/Release/field-dsp-check.exe, so the block-invariance test skips on Windows instead of running. Resolve the path the way daemonBinary() now does.
  • src/audio/plugin-hosting.test.ts:364 guards the whole describe on win32, which also skips the five tests that need no socket (lines 434, 470, 483, 659, and 690, which render through --render-live or only compile). Guard only the socket tests at lines 531 and 587, as click-daemon.test.ts and live-session.test.ts do with itOverSocket. With FIELD_PLUGIN_PATH now split correctly on Windows, those five tests can run there.
  • docs/projects/windows-portability/readme.md:344 lists diagnostics and projectRelative's output as data, but both are printed for a person. §7.4 (line 615) says a printed path keeps the platform's separator. Say in one of the two places that these printed paths take slashes, and why.

Comment thread src/graph/build.test.ts Resolved
The comment on the two sclang-stub tests said a real sclang.exe goes
through the same spawn untouched. Since #179, runScProgram finds sclang
through sclangCommand first, which looks for "sclang" without ".exe" and
treats a native FIELD_SCLANG path as a name to search for, so on Windows
a real sclang never reaches the spawn. The comment now says so and
points at windows-portability.md §7.2, which records the gap.

@ninjudd ninjudd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CLEAN · took 10m 59s

This change is chunk 2 of the Windows portability plan: field builds on Windows, and offline rendering works there. Project-relative paths become slash-separated wherever they are data, through one exported projectPath in the model: song.dir, loaded file paths, diagnostics, and the session JSON's file paths. projectRelative also slash-separates its output. daemonBinary() gains the .exe suffix, and build:native gains --config Release. The daemon compiles under MSVC through these changes: std::numbers::pi replaces M_PI, LiveSession::Track becomes move-only, SIGPIPE is guarded, a Windows Server stub refuses serve mode until chunk 4's named pipe, capture.cpp spells fsync and ftruncate as _commit and _chsize_s, and keys.cpp checks stdin with PeekNamedPipe and refuses to publish a virtual MIDI source, which Windows does not have. The plugin scan and the render's plugin lookup split FIELD_PLUGIN_PATH on ; on Windows. The change knowingly leaves the control socket, the workers' transport, the cross-platform byte comparison, and a Windows route for field keys to later work. It guards the tests that depend on them on win32, with the reason beside each guard.

3 finding threads: 3 resolved, 0 open

Covered 33 of 33 changed files; no generated files.

The head was reviewed by reading only. Its author has no write access to okamnesiac/field, so no build, test, or script from the head ran on the review machine. The linux CI job passed at this SHA, which shows the C++ and TypeScript compile under GCC and the suite passes on Linux. This pull request runs no Windows CI job, so no Windows build of this head is on record here.

This head looks clean. A human approval is what remains.

The merge base moved from e6ef0ae to 1283ef8. That brings in main's keyboard-instrument chunks (#178, #179, #181, #182) and #159, plus a §7.2 note in the plan that sclangCommand cannot find sclang on Windows. This pull request's own change since 13c068e is the commit 76049b2, the merge resolution in capture.cpp, and the comment fix in c82062a. What was checked at c82062a:

  • The merge kept this change intact. In the shared files main.cpp, server.cpp, audiod/client.ts, model/project.ts, punch-daemon.test.ts, and record-daemon.test.ts, this pull request's hunks are the same as at 13c068e. main restructured capture.cpp into Transaction, truncateAndSync, and syncData. The resolution routes all three through syncToDisk and truncateTo, and no raw fsync, ftruncate, or fileno call remains outside them.
  • main's native code builds under MSVC as read. keys.cpp and keyboard-layout.cpp join field-audiod; they do not add a binary, so daemonBinary() already finds --keys with .exe. keys.cpp keeps poll, read, and STDIN_FILENO in the POSIX branch. Its Windows branch includes <windows.h> after every JUCE header, and the file uses no name that header turns into a macro. createNewDevice sits behind JUCE_WINDOWS, matching where JUCE declares it. keyboard-layout.cpp has a non-Apple fallback, and server.h gained no member the Windows stub would have to define.
  • main's new tests are guarded where this change turns them on. Of the 17 test files main added or changed, three gate on daemonBinary(), the gate this pull request opens on Windows. punch-daemon and record-daemon carry their guards from c12dac0. Every test in record-midi-daemon's guarded describe goes through connect() or recordTake. helper-native skips when --keys reports its error on win32. That error is the first line --keys prints, because the non-Apple layout reader prints nothing.
  • The slash rule meets main's new code. None of main's new lines compares a join() or relative() result against song.dir or a loaded file's path. land.ts compares songDirOfPath against song.dir, and this change makes both sides slash-joined.
  • The SuperCollider lookup. #179 put sclangCommand() in front of the execFile call in runScProgram. Before that, execFile itself found sclang.exe on Windows. Now sclangCommand() finds neither sclang.exe on PATH nor a backslash FIELD_SCLANG. That gap is base code, and §7.2 records it as standalone work. The review of e5af809 found that it made this change's comment at src/graph/build.test.ts:473 untrue. c82062a rewrites the comment to say a real sclang does not reach the spawn on Windows yet, for the two reasons sclangCommand shows, and points at §7.2, which carries the entry. The fix session had already resolved the thread.
  • Threads. All three finding threads were already resolved, and each still holds at this head.
  • The plan. The new chunk 2 amendment names the right pull requests, and §7.1 adds record-midi-daemon to what chunk 4 removes. The §7.2 entry for field keys is new work outside every chunk, which it marks as standalone and a design question. windows-portability stays in-progress, which this change does not move, so the readiness gate does not apply.

Suggestions

  • native/audiod/src/dsp/wavfile.cpp:57 is base code that opens files from a narrow std::string, and MSVC reads a narrow path in the ANSI code page, not UTF-8. On Windows, --render and --render-live therefore fail to open any input or output whose path holds a non-ASCII character, such as a temp directory under a user name like Zoë. Open through a std::filesystem::path built from the UTF-8 bytes (lines 57, 233, and 295), and do the same for the std::fopen calls at capture.cpp:144 and capture.cpp:220 before chunk 4 makes recording reachable.
  • src/audio/dsp-check.test.ts:19 is base code that looks for native/audiod/build/field-dsp-check. The Visual Studio generator writes a plain add_executable to build/Release/field-dsp-check.exe, so the block-invariance test skips on Windows instead of running. Resolve the path the way daemonBinary() now does.
  • src/audio/plugin-hosting.test.ts:364 guards the whole describe on win32, which also skips the five tests that need no socket (lines 434, 470, 483, 659, and 690, which render through --render-live or only compile). Guard only the socket tests at lines 531 and 587, as click-daemon.test.ts and live-session.test.ts do with itOverSocket. With FIELD_PLUGIN_PATH now split correctly on Windows, those five tests can run there.
  • docs/projects/windows-portability/readme.md:344 lists diagnostics and projectRelative's output as data, but both are printed for a person. §7.4 (line 615) says a printed path keeps the platform's separator. Say in one of the two places that these printed paths take slashes, and why.

@ninjudd
ninjudd dismissed stale reviews from minjudd and themself October 11, 2026 04:06

Superseded: the review loop's CLEAN verdict on c82062a covers the current head. Dismissed at Justin's request while Projector learns to clear its own stale verdicts.

@ninjudd
ninjudd merged commit 8f9f3a3 into main Oct 11, 2026
1 check passed
@ninjudd
ninjudd deleted the windows/build branch October 11, 2026 04:16
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.

3 participants