Answer stability round 1: 0 🔴, 1 🟡 (0 misread); say the checkout's commits, not git, hold no version of a file outside it, and find a symlinked config folder

This commit is contained in:
2026-11-13 02:10:33 +01:00
parent c180bda54b
commit 5c7969e7c8
8 changed files with 31 additions and 17 deletions
+10 -2
View File
@@ -9,8 +9,8 @@ import unittest.mock
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from failure import Failure
from test_env import isolated_env
from project_config.settings import held, load, ProjectConfig
from test_env import isolated_env
TOOL = pathlib.Path(__file__).resolve().parents[1] / "project-config"
@@ -178,13 +178,21 @@ class HeldTest(ConfigCase):
assert isinstance(found, ProjectConfig), found
self.assertEqual((found.folder, found.top, found.paths["plan"]), (folder, self.checkout, folder / "todo.md"), "the config's ~/ checkout read under home")
def test_only_a_folder_under_the_projects_folder_that_holds_a_config_is_one(self) -> None:
def test_a_folder_holds_no_config_unless_it_is_under_the_projects_folder_and_has_one(self) -> None:
self.assertIsNone(held(self.home / ".claude-projects" / "empty", self.home), "no config.toml")
elsewhere = self.home / "code" / "acme"
elsewhere.mkdir()
(elsewhere / "config.toml").write_text(CLIENT, encoding="utf-8")
self.assertIsNone(held(elsewhere, self.home), "a config.toml outside ~/.claude-projects/")
def test_a_configs_folder_reached_through_a_symlink_holds_its_config(self) -> None:
target = self.home / "kept" / "acme"
target.mkdir(parents=True)
(target / "config.toml").write_text(CLIENT, encoding="utf-8")
(self.home / ".claude-projects").mkdir()
(self.home / ".claude-projects" / "acme").symlink_to(target)
self.assertIsInstance(held(target, self.home), ProjectConfig, "git names the folder by its resolved path")
class ToolTest(ConfigCase):
def run_tool(self, *args: str, cwd: pathlib.Path | None = None) -> subprocess.CompletedProcess[str]: