Files
bot-bottle/bot_bottle/backend/macos_container/launch.py
T
didericis-codex 4abad499b6
lint / lint (push) Successful in 1m54s
test / unit (pull_request) Successful in 35s
test / integration (pull_request) Successful in 20s
feat: add macos container backend scaffold
2026-06-10 18:14:17 +00:00

35 lines
1.1 KiB
Python

"""Launch flow for the macOS Apple Container backend.
The backend is registered and its host primitives are implemented, but
full launch is intentionally blocked until the sidecar network
enforcement design is finished. Apple Container can publish ports and
create networks, but bot-bottle's Docker topology relies on an agent
container attached only to an internal network while the sidecar bundle
also has egress. The first runnable version must preserve that
no-direct-egress property.
"""
from __future__ import annotations
from contextlib import contextmanager
from typing import Callable, Generator
from ...log import die
from .bottle import MacosContainerBottle
from .bottle_plan import MacosContainerBottlePlan
@contextmanager
def launch(
plan: MacosContainerBottlePlan,
*,
provision: Callable[[MacosContainerBottlePlan, "MacosContainerBottle"], str | None],
) -> Generator[MacosContainerBottle, None, None]:
del provision
die(
"macos-container backend launch is not enabled yet: "
"the backend primitives are present, but sidecar network "
"enforcement still needs implementation."
)
yield # pragma: no cover