refactor(backend): extract shared bottle preparation planner
test / integration-macos (pull_request) Has been skipped
test / integration-docker (pull_request) Successful in 18s
tracker-policy-pr / check-pr (pull_request) Successful in 7s
test / unit (pull_request) Successful in 53s
lint / lint (push) Failing after 1m1s
test / integration-firecracker (pull_request) Successful in 3m42s
test / coverage (pull_request) Successful in 19s
test / publish-infra (pull_request) Has been skipped

This commit is contained in:
2026-07-26 06:27:16 +00:00
parent 6ad817cedd
commit cc166f4b67
3 changed files with 143 additions and 75 deletions
@@ -64,3 +64,16 @@ class TestRuntimeModuleSizes(unittest.TestCase):
".addon_core import" in text:
violations.append(str(path.relative_to(ROOT)))
self.assertEqual([], violations)
def test_backend_contract_does_not_absorb_preparation_logic(self) -> None:
caps = {
ROOT / "bot_bottle" / "backend" / "base.py": 580,
ROOT / "bot_bottle" / "backend" / "preparation.py": 160,
}
oversized = [
f"{path.relative_to(ROOT)} "
f"({len(path.read_text().splitlines())}>{cap})"
for path, cap in caps.items()
if len(path.read_text().splitlines()) > cap
]
self.assertEqual([], oversized)