Skip to content

test(lox live): fix the exclusion test that hangs on macOS - #227

Merged
DavidGodefroid merged 1 commit into
mainfrom
fix/live-test-macos
Nov 18, 2026
Merged

DavidGodefroid merged 1 commit into
mainfrom
fix/live-test-macos

Conversation

@DavidGodefroid

Copy link
Copy Markdown
Owner

Why

ci is red on main since #226: test (macos-latest) times out after 10 minutes in TestRunAndLiveExclude (cmd/lox). The macOS job does not run on pull requests, so #226 was green.

Cause

A test bug, not a product bug. The test took the lox run lock for the raw temporary path, while lox live, like every command, names the workspace by its real path (family.Canonical in lockFile). On macOS a temporary directory is behind a link (/var -> /private/var), so the two paths gave two projects and two lock files: lox live found no lock, did not refuse, and served for ever.

In real use both commands go through lockFile, so they always agree.

Fix

  • The test takes its lock for the canonical path, as the commands do.
  • It now reaches the workspace through a link on every platform, so the same mistake fails on Linux too (checked: without the canonical path it fails here).
  • It bounds its wait (20 s) instead of hanging until the binary's timeout.

ci is run by hand on this branch to get the macOS job.

🤖 Generated with Claude Code

…test

On macOS a temporary directory is reached through a link (/var ->
/private/var). The test took the lock for the raw path while lox live,
like every command, names the workspace by its real one: it found no
lock, did not refuse and served until the test binary timed out, which
broke ci on main (the macOS job does not run on pull requests).

The test now goes through a link on every platform, so it fails on Linux
too without the canonical path, and bounds its wait.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YF8fKrK1XFPoTRMpemksuX
@DavidGodefroid
DavidGodefroid merged commit 0fc4cf0 into main Nov 18, 2026
27 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