Answer architecture round 1: 1 🔴, 2 🟡; split the filter's pure core out of main, stage settings.json before Update's move, read the stored settings in a repo check

This commit is contained in:
2026-10-21 21:38:50 +02:00
parent 7c3800337a
commit 7665087e1e
6 changed files with 54 additions and 27 deletions
+21
View File
@@ -0,0 +1,21 @@
import pathlib
import sys
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from git_repo import git
from repo_checks.test_python_floor import ROOT
from settings_filter import cleaned
class Settings(unittest.TestCase):
def test_the_stored_settings_hold_no_model_and_sorted_keys(self):
# The index, not the working file: the working file holds this machine's model in Claude Code's key order.
stored = git("show", ":settings.json", cwd=str(ROOT))
self.assertIsInstance(stored, str, stored)
self.assertEqual(stored, cleaned(stored))
def test_the_readme_installs_the_filter_git_attributes_name(self):
self.assertIn("settings.json filter=settings\n", (ROOT / ".gitattributes").read_text(encoding="utf-8"))
self.assertIn("git config filter.settings.clean bin/settings_filter.py\n", (ROOT / "README.md").read_text(encoding="utf-8"))