chore: tighten upkeep boundaries and static checks
test / integration-macos (pull_request) Has been skipped
test / integration-docker (pull_request) Successful in 20s
tracker-policy-pr / check-pr (pull_request) Successful in 24s
test / unit (pull_request) Successful in 54s
test / integration-firecracker (pull_request) Successful in 3m59s
test / coverage (pull_request) Successful in 18s
test / publish-infra (pull_request) Has been skipped
lint / lint (push) Failing after 13m2s

This commit is contained in:
2026-07-26 06:42:03 +00:00
parent 17052cbf88
commit 99040ea0b1
7 changed files with 32 additions and 14 deletions
+6 -3
View File
@@ -21,9 +21,12 @@ class TestCliBackendBoundaries(unittest.TestCase):
for path in (ROOT / "bot_bottle" / "cli").rglob("*.py"):
tree = ast.parse(path.read_text(), filename=str(path))
for node in ast.walk(tree):
module = node.module if isinstance(node, ast.ImportFrom) else None
if module and module.startswith(forbidden):
violations.append(f"{path.relative_to(ROOT)}:{node.lineno}: {module}")
if isinstance(node, ast.ImportFrom):
module = node.module
if module and module.startswith(forbidden):
violations.append(
f"{path.relative_to(ROOT)}:{node.lineno}: {module}"
)
if isinstance(node, ast.Import):
violations.extend(
f"{path.relative_to(ROOT)}:{node.lineno}: {alias.name}"
+3 -3
View File
@@ -672,13 +672,13 @@ class TestReconcileRoute(unittest.TestCase):
self.orch, "POST", "/reconcile",
_body({"live_source_ips": [None, 7, "10.0.0.9"]}))
self.assertEqual(400, status)
self.assertIn("live_source_ips", payload["error"])
self.assertIn("live_source_ips", str(payload["error"]))
def test_empty_live_source_ip_is_rejected(self) -> None:
status, payload = dispatch(
self.orch, "POST", "/reconcile", _body({"live_source_ips": [""]}))
self.assertEqual(400, status)
self.assertIn("live_source_ips", payload["error"])
self.assertIn("live_source_ips", str(payload["error"]))
def test_invalid_grace_seconds_is_rejected(self) -> None:
for value in (True, "30", -1, float("inf"), float("nan")):
@@ -687,4 +687,4 @@ class TestReconcileRoute(unittest.TestCase):
self.orch, "POST", "/reconcile",
_body({"live_source_ips": [], "grace_seconds": value}))
self.assertEqual(400, status)
self.assertIn("grace_seconds", payload["error"])
self.assertIn("grace_seconds", str(payload["error"]))