Relationships
#4977 serve host: a host's own workspace is suspended on an unreadable wanted file on macOS (folder spelling), and a workspace hub test assumes reply order
Opened by stack72 · 11/21/2026
Two tests fail deterministically on macOS on main (10 of 10 runs), which blocks verify-build for every branch verified on a Mac.
1. A host's own workspace changes folder spelling once it is registered (real bug)
integration/serve_host_test.ts, "serve host: an unreadable wanted file leaves a running workspace running and names the reason".
hostedWorkspaceFolders (src/libswamp/workspace/hosted_roster.ts) lists a host's own workspace at the scanned spelling (join(workspacesDir, name)) while the registry has not been read, but at the realpath once the registry lists it. On macOS the temp and data dirs sit under /var, a symlink to /private/var, so the same folder is listed as /var/... and later /private/var/....
While the wanted file reads, folders are compared through realPath and nothing happens. When it becomes unreadable, the reconciler keeps the last record and compares its folder to the listing's by string (entry.recordFolder !== folder in workspace_reconciler.ts). The spellings differ, so it decides the wanted file was written for another folder, logs "Its wanted file was written for /var/..., not for /private/var/...", and suspends a running workspace, where the design says an unreadable wanted file leaves it as it is.
It passes wherever the host's dirs have no symlink in their path (Linux CI, a TMPDIR under a real path), which is why it slipped through. Any macOS host under a symlinked dir is affected.
Fix: list the host's own registered folder at the scanned spelling, as the scanned branch already does, so a folder's spelling does not depend on whether the registry was read.
2. A workspace hub test assumes replies arrive in send order (test bug)
integration/workspace_hub_test.ts, "workspaceHub: an app's own socket reaches the same child under the same allowlist, apart from the dashboard's" (added in #4927).
The test sends app:1 (workflow.search, forwarded to the child, echoed back) then app:2 (vault.get, refused by the hub itself with not_available_locally) and asserts the echo is the first frame. The hub answers the refusal at once while the echo makes a round trip to the child, so the refusal can arrive first, and on macOS it always does. Replies carry ids; the test should match them by id, not by position.
Closed
No activity in this phase yet.
stack72 commented 11/21/2026, 12:58:00 AM
Both failures are fixed on main, so this closes without a PR of its own. The serve host test (a host's own folder listed under two spellings, /var and /private/var, on macOS) stopped failing when #4970 removed the host folder layout. The workspace hub test's reply-order assumption was fixed by #3904, which matches replies by id. Both test files pass on current main (90 of 90 over five repeats on macOS). PR #3906, which carried the same hub fix, is closed as redundant.
Sign in to post a ripple.