From 087476ccedf03342604e110768d9b528b5ae00ba Mon Sep 17 00:00:00 2001 From: Peter Hense Date: Fri, 13 Nov 2026 14:46:26 +0100 Subject: [PATCH] fix(tests): resolve temp roots so the suite passes below symlinked /var macOS places TMPDIR under /var, a symlink to /private/var. The core lock check and the OpenCode installer correctly refuse symlinked ancestors, so 13 tests failed before reaching their subject. Canonicalize the fixture root; production path checks are unchanged. Co-Authored-By: Claude Fable 5.2 --- tests/test_core_sync.py | 3 ++- tests/test_method_identity.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_core_sync.py b/tests/test_core_sync.py index 1b09ba1..bca0d46 100644 --- a/tests/test_core_sync.py +++ b/tests/test_core_sync.py @@ -12,7 +12,8 @@ class CoreSyncTests(unittest.TestCase): def setUp(self): self.tmp = tempfile.TemporaryDirectory(prefix='method-sync-');self.addCleanup(self.tmp.cleanup) - self.base = Path(self.tmp.name);self.source = self.base/'source';self.source.mkdir() + # macOS temp roots sit below the /var symlink; the lock check refuses symlinked ancestors. + self.base = Path(self.tmp.name).resolve();self.source = self.base/'source';self.source.mkdir() self.target = self.base/'target';self.target.mkdir() subprocess.run(['git','init','-q','-b','main',str(self.source)],check=True) for key,value in [('user.name','Sync Test'),('user.email','sync@example.invalid')]: self.git('config',key,value) diff --git a/tests/test_method_identity.py b/tests/test_method_identity.py index 9be5446..80d4fc1 100644 --- a/tests/test_method_identity.py +++ b/tests/test_method_identity.py @@ -61,7 +61,8 @@ def test_writing_archive_uses_committed_manifest_identity(self): def test_both_opencode_loaders_coexist_and_uninstall_is_scoped(self): # A fixed loader filename must not overwrite or block the second method. with tempfile.TemporaryDirectory() as directory: - base=Path(directory);config=base/'config' + # Resolve first: the installer refuses symlinked parents such as macOS /var. + base=Path(directory).resolve();config=base/'config' for name in ['engineering-method','writing-method']: source=base/name for folder in ['integrations/opencode','shared/platform','skills','.codex-plugin']: