From 30b5ab4c8b5e949ac7282e90985dd9aad61c68ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20W=C3=B3jt?= Date: Fri, 10 Jul 2026 12:13:20 +0200 Subject: [PATCH] fix: normalize macOS paths and isolate tests --- CHANGELOG.md | 5 +++++ src/doc_compact.ts | 7 ++++--- src/install.ts | 4 +++- src/paths.ts | 18 ++++++++++++++++++ src/project.ts | 12 ++++++++++-- src/text_commands.ts | 5 +++-- tests/cli.test.ts | 9 ++++++++- tests/helpers/tsx_process.ts | 6 ++++++ tests/install.test.ts | 3 ++- tests/paths.test.ts | 22 +++++++++++++++++++++- tests/session_store_race.test.ts | 10 ++++------ tests/setup/isolate-home.ts | 7 +++++++ tests/util.test.ts | 17 +++++++++-------- tests/worker_daemon_e2e.test.ts | 8 +++++++- tests/worker_index_e2e.test.ts | 14 +++++++++++--- 15 files changed, 118 insertions(+), 29 deletions(-) create mode 100644 tests/helpers/tsx_process.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ea83af..9432d62b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to Token-Goat are documented in this file. Format follows Ke ## [Unreleased] +### Fixed + +- **macOS `/var` and `/private/var` aliases could produce different cache and index keys for the same file.** Path canonicalization now normalizes the Darwin system alias consistently, restoring relative `skeleton`/`outline`, trace frame detection, project discovery, settings paths, and doc-compact reuse for temporary paths. +- **The test harness could touch the live macOS data directory or fail to start TypeScript race helpers in restricted sandboxes.** Darwin tests now isolate `HOME`/`USERPROFILE`, and subprocess fixtures load `tsx` without its IPC-based CLI. + ## [2.6.12] - 2026-07-10 ### Fixed diff --git a/src/doc_compact.ts b/src/doc_compact.ts index 818dae79..0155ac82 100644 --- a/src/doc_compact.ts +++ b/src/doc_compact.ts @@ -12,7 +12,7 @@ import * as path from 'path' import { dataDir } from './constants.js' import { atomicWriteText } from './util.js' -import { normalizePath } from './paths.js' +import { resolveIndexPath } from './paths.js' const defaultSentencesPerSection = 2 const headerPrefix = '