Skip to content

test: fix macOS test failures caused by the /var temp symlink - #6

Merged
akosidencio merged 1 commit into
mainfrom
fix/macos-test-paths
Oct 31, 2026
Merged

akosidencio merged 1 commit into
mainfrom
fix/macos-test-paths

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Follow-up to #5. With the mkfifoat compile error fixed, the macOS job reached crates/cli/tests/investigate.rs and all 11 tests failed with SQLITE_CANTOPEN_SYMLINK (error code 1550).

Cause

macOS temp directories live under /var, which is a symlink to /private/var. The store opens SQLite with SQLITE_OPEN_NOFOLLOW, which rejects any symlink in the path. The CLI canonicalizes the repository root, but a few tests call the library directly with the raw temp path. One test also passed a non-canonical memory rebind --from, which must match the recorded canonical root exactly.

Because cargo test stops at the first failing test binary, more files were affected than CI showed. Running the suite on Linux with TMPDIR pointing at a symlink reproduced 32 failures across 5 files: investigate, knowledge, knowledge_relationships, knowledge_hardening and memory_durability.

Fix

Canonicalize the temp root at those call sites, as the MCP tests already do. Test-only change; product behavior is unchanged.

Verification

  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings: pass.
  • cargo test --workspace --no-fail-fast: 292 passed, 0 failed, both with the default TMPDIR and with a symlinked TMPDIR that reproduces the macOS layout.
  • This PR's macOS CI job is the final confirmation.

macOS temp directories live under /var, a symlink to /private/var. The
store opens SQLite with SQLITE_OPEN_NOFOLLOW, so tests that open the
index through the raw temp path failed with SQLITE_CANTOPEN_SYMLINK, and
the rebind test passed a --from that differed from the recorded
canonical root. Canonicalize the temp root at those call sites, as the
CLI and the MCP tests already do. Test-only change.
@akosidencio
akosidencio merged commit 98e771d into main Oct 31, 2026
2 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