feat: complete client runtime foundation

This commit is contained in:
2026-07-22 16:25:38 +00:00
parent c11a7b5b5b
commit 1219117403
20 changed files with 1201 additions and 48 deletions
+12
View File
@@ -73,6 +73,18 @@ class ConfigTests(unittest.TestCase):
with self.assertRaisesRegex(ConfigError, "unknown jobs"):
ClientConfig.load(path)
def test_state_and_backups_cannot_live_under_data_roots(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
path = root / "client.toml"
nested = _config(root).replace(
f'state_db = "{root / "state.db"}"',
f'state_db = "{root / "qb/state.db"}"',
)
path.write_text(nested, encoding="utf-8")
with self.assertRaisesRegex(ConfigError, "outside data roots"):
ClientConfig.load(path)
def _config(root: Path, role: str = "cache") -> str:
return f'''client_id = "cache-1"