Thread-2 audit of the platform seams, verifying atrium builds and runs on macOS.
atrium is developed on Windows; macOS is reached through the cfg(unix) branches,
which it shares with Linux. This documents what was checked and the result.
Updated 2026-09-04 after a real-Mac audit (macOS 26.6.2, Apple_Terminal 470.2, rustc 1.97.1). The original "no code changes required" verdict below came from a Windows-host
cargo check --target …-apple-darwin, which type-checks but never links or runs — so it could not catch a behavioral platform difference. The real-Mac run found one:Path::file_stemtreats\as a separator only on Windows, so a Windows-authored fleet command likeC:\tools\claude.cmdwas not recognized as an agent on macOS (no status chrome, no--session-id, no identity injection). Fixed via a platform-independentbind::command_stem(splits on/and\on every OS), used everywhere a command stem is derived. The other real-Mac findings were packaging/tooling (a UTF-8 BOM ondev.py, missing exec bit,pythonvspython3docs, brittle byte-layout test assertions) — all addressed. Build green, clippy clean, frames column-exact. One item stays open: garbled box-drawing borders in Terminal.app, not yet reproduced — atrium does no terminal capability detection (theme.rscommits to truecolor; macOS 26 Tahoe added truecolor to Terminal.app, so that is likely not the cause) — a screenshot is needed to discriminate.
The whole tree — atrium plus every unix-facing dependency (rawterm's
sys_unix.rs, pty, abus, vterm, …) and all unit + integration test
targets — compile-checks cleanly for both Apple architectures, and now also
builds and runs green on a real Mac.
cargo check --all-targets # windows host -> green
cargo check --target aarch64-apple-darwin --all-targets # Apple Silicon -> green
cargo check --target x86_64-apple-darwin --all-targets # Intel Mac -> green
cargo check --target x86_64-unknown-linux-gnu --all-targets # unix parity -> green
(A macOS link+run still needs a Mac; only the Apple SDK/linker is missing on this host. Nothing in atrium's own code blocks it.)
| Seam | Location | macOS behavior | Status |
|---|---|---|---|
| Default shell | main.rs::default_shell |
unix branch uses $SHELL, falls back to sh |
✓ correct |
| Command hosting | main.rs::effective_command |
#[cfg(windows)] does PATHEXT/.cmd-shim hosting; #[cfg(not(windows))] returns argv unchanged, so a macOS agent launches directly |
✓ correct |
| Control-plane IPC | ipc.rs #[cfg(unix)] mod sys |
std::os::unix::net::UnixListener, address $TMPDIR/atrium-ctl-<pid>.sock, stale-socket cleanup on bind + drop |
✓ correct |
| Global fleet path | fleet.rs::global_path |
unix branch uses $XDG_CONFIG_HOME else ~/.config/atrium/fleet.json |
✓ builds & runs |
| Session id (uuid) | uid.rs::v4 |
pure-std entropy (wall clock + RandomState + counter); no OS RNG syscall |
✓ portable |
| Raw terminal / PTY | external rawterm (sys_unix.rs), pty |
not in this repo; both compile-check clean for darwin | ✓ (deps) |
No Linux-only assumptions exist in the repo: a sweep found no /proc,
epoll/inotify, libc, or non-Windows extern blocks. The only raw FFI is
the #[cfg(windows)] named-pipe block in ipc.rs. Integration tests are
cfg-branched (cmd//Q on Windows → sh/-i on unix), so they execute on
macOS rather than assuming a Windows shell.
- Unix-domain-socket path length. macOS caps
sun_pathat 104 bytes (Linux 108).ipc/sys_unix.rs::default_addressbuilds$TMPDIR/atrium-ctl-<pid>.sock. Under launchd$TMPDIR(/var/folders/…) is ~50 chars, so the total stays ~70 < 104 — fine in practice; only a pathologically deep$TMPDIRwould overflow. Addressed: a 104-bytesun_pathguard + test was added (ipc/sys_unix.rs, tested inipc/tests_unix.rs) by the agent-cli/ipc thread (boardmacos-support), so an overflow now fails fast with a clear error instead of a truncated bind. - Resolver case-sensitivity (test-only). Addressed:
resolver_finds_shims_and_flags_shell_hosting(tests/atrium/resolve.rs) matchestool.exeagainst ext.EXE, which assumes a case-insensitive filesystem, so it is now#[cfg(windows)]. The resolver (resolve.rs) is only used on Windows — the unixeffective_commandbypasses it — so this was a test artifact, never a runtime path.
- Run the suite on a real Mac (CI runner) to exercise the two runtime caveats.
- If macOS-native config location is desired, consider
~/Library/Application Support/atriumforglobal_pathontarget_os = "macos"(currently shares the Linux~/.configconvention — intentional, left as-is).