feat: expand and secure mentor library

This commit is contained in:
leefer
2026-07-23 17:56:52 +08:00
parent d85529dce5
commit 771882ebf0
134 changed files with 4148 additions and 38 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ class DeploymentContractTests(unittest.TestCase):
cls.compose = (ROOT / "compose.yaml").read_text(encoding="utf-8")
cls.dockerfile = (ROOT / "Dockerfile").read_text(encoding="utf-8")
cls.dockerignore = (ROOT / ".dockerignore").read_text(encoding="utf-8")
cls.gitignore = (ROOT / ".gitignore").read_text(encoding="utf-8")
def test_compose_exposes_only_requested_lan_port(self):
self.assertIn('"0.0.0.0:8765:8765/tcp"', self.compose)
@@ -26,8 +27,9 @@ class DeploymentContractTests(unittest.TestCase):
self.assertIn('"--host", "0.0.0.0", "--port", "8765"', self.dockerfile)
def test_secrets_and_runtime_data_are_not_copied_into_image(self):
for pattern in (".env", "data/*.db", "data/*.db-wal", "data/*.db-shm"):
for pattern in (".env", "data/private-mentor-skills/", "data/*.db", "data/*.db-wal", "data/*.db-shm"):
self.assertIn(pattern, self.dockerignore)
self.assertIn("data/private-mentor-skills/", self.gitignore)
if __name__ == "__main__":