updated lock
Some checks failed
🧪 Test / 🧪 Lock + lint (push) Has been cancelled

This commit is contained in:
2026-08-10 17:13:29 +02:00
parent 30bdc7c516
commit 1e90ac1737
5 changed files with 37 additions and 12 deletions

View File

@@ -42,11 +42,18 @@ class TestSkillPersistence(unittest.TestCase):
def test_autotune_names_every_target(self):
text = SKILL.read_text(encoding="utf-8")
for target in ("SKILLS_REPO", "skills/<name>/SKILL.md", "~/.claude/skills/", "~/.agents/skills/"):
for target in (
"SKILLS_REPO",
"skills/<name>/SKILL.md",
"~/.claude/skills/",
"~/.agents/skills/",
):
self.assertIn(target, text)
def test_autoskill_routes_to_the_same_persistence(self):
text = (REPO_ROOT / "skills" / "autoskill" / "SKILL.md").read_text(encoding="utf-8")
text = (REPO_ROOT / "skills" / "autoskill" / "SKILL.md").read_text(
encoding="utf-8"
)
for target in ("Persistence", "~/.claude/skills/", "~/.agents/skills/"):
self.assertIn(target, text)
@@ -84,7 +91,9 @@ class TestSettingsRegistration(unittest.TestCase):
self.settings = Path(self.tmp.name) / "settings.json"
def _patch(self) -> dict:
subprocess.run(["node", str(PATCHER), str(self.settings)], check=True, capture_output=True)
subprocess.run(
["node", str(PATCHER), str(self.settings)], check=True, capture_output=True
)
return json.loads(self.settings.read_text(encoding="utf-8"))
def test_hook_registered_once(self):
@@ -95,7 +104,15 @@ class TestSettingsRegistration(unittest.TestCase):
def test_existing_hooks_preserved(self):
self.settings.write_text(
json.dumps({"hooks": {"UserPromptSubmit": [{"hooks": [{"type": "command", "command": "true"}]}]}}),
json.dumps(
{
"hooks": {
"UserPromptSubmit": [
{"hooks": [{"type": "command", "command": "true"}]}
]
}
}
),
encoding="utf-8",
)
data = self._patch()

View File

@@ -15,7 +15,9 @@ HOOK = REPO_ROOT / "skills" / "dream" / "hooks" / "reminder.sh"
PATCHER = REPO_ROOT / "scripts" / "enable-plugins.js"
def _run_hook(cwd: Path, stamp: Path | None = None, interval: str = "43200") -> subprocess.CompletedProcess:
def _run_hook(
cwd: Path, stamp: Path | None = None, interval: str = "43200"
) -> subprocess.CompletedProcess:
env = {
"PATH": "/usr/bin:/bin",
"HOME": str(cwd),
@@ -73,7 +75,9 @@ class TestDreamHook(unittest.TestCase):
for name in ("one", "two"):
repo = self.cwd / name
repo.mkdir()
subprocess.run(["git", "init", "-q", str(repo)], check=True, capture_output=True)
subprocess.run(
["git", "init", "-q", str(repo)], check=True, capture_output=True
)
self.assertIn("/dream", _run_hook(repo).stdout)
self.assertTrue((repo / ".git" / ".dream-stamp").is_file())
self.assertEqual(_run_hook(repo).stdout, "")
@@ -87,7 +91,9 @@ class TestSettingsRegistration(unittest.TestCase):
self.settings = Path(self.tmp.name) / "settings.json"
def _patch(self) -> dict:
subprocess.run(["node", str(PATCHER), str(self.settings)], check=True, capture_output=True)
subprocess.run(
["node", str(PATCHER), str(self.settings)], check=True, capture_output=True
)
return json.loads(self.settings.read_text(encoding="utf-8"))
def test_hook_registered_once(self):

View File

@@ -20,7 +20,9 @@ class TestOptimizeObjective(unittest.TestCase):
def test_routers_point_at_it(self):
for skill in ROUTERS:
text = (SKILLS / skill / "SKILL.md").read_text(encoding="utf-8")
self.assertIn("`optimize` skill", text, f"{skill} does not route to optimize")
self.assertIn(
"`optimize` skill", text, f"{skill} does not route to optimize"
)
if __name__ == "__main__":