diff options
Diffstat (limited to 'tests/post-rebuild-check/test_post_rebuild_check.py')
| -rw-r--r-- | tests/post-rebuild-check/test_post_rebuild_check.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/post-rebuild-check/test_post_rebuild_check.py b/tests/post-rebuild-check/test_post_rebuild_check.py index a034f87..bc887c6 100644 --- a/tests/post-rebuild-check/test_post_rebuild_check.py +++ b/tests/post-rebuild-check/test_post_rebuild_check.py @@ -765,12 +765,31 @@ class ProjectTooling(unittest.TestCase): def test_ignored_but_absent_tooling_flags(self): with tempfile.TemporaryDirectory() as root: - self.project(root, [".ai/", ".claude/", "todo.org"]) + self.project(root, [".ai/", "todo.org"]) r = run_check(project_roots=root) self.assertEqual(r.returncode, 1) - for missing in (".ai", ".claude", "todo.org"): + for missing in (".ai", "todo.org"): self.assertIn(missing, r.stdout) + def test_claude_dir_absence_never_flags(self): + # Same shape as CLAUDE.md below, and proven the same way. The bootstrap + # and the gitignore sweep write `.claude/` into the ignore set of every + # gitignore-mode project whether or not one ever exists there, so the + # entry is aspirational rather than a promise. Three projects tripped + # this on velox, and ratio is missing the identical directory in the + # identical three, which is what proves it is the steady state and not + # reinstall drift. + # + # Nor does dropping it lose a real signal. A project that genuinely + # carries one (rules and hooks from a language bundle) has it re-synced + # by sync-language-bundle.sh at every session start, so a true absence + # heals itself before this check would ever run. + with tempfile.TemporaryDirectory() as root: + self.project(root, [".ai/", ".claude/"], present=(".ai/",)) + r = run_check(project_roots=root) + self.assertEqual(r.returncode, 0, r.stdout) + self.assertNotIn(".claude", r.stdout) + def test_ignored_and_present_tooling_passes(self): with tempfile.TemporaryDirectory() as root: self.project(root, [".ai/", "CLAUDE.md"], |
