refactor: split _signal_bundle_reload per backend, move macos egress to macos_container
lint / lint (push) Successful in 1m47s
test / unit (pull_request) Successful in 38s
test / integration (pull_request) Successful in 19s

This commit is contained in:
2026-06-23 05:57:07 +00:00
parent 5606797ac2
commit 7a991e1f5e
4 changed files with 80 additions and 69 deletions
+12 -2
View File
@@ -21,14 +21,17 @@ from datetime import datetime, timezone
from pathlib import Path
from .. import supervise as _supervise
# from ..bottle_state import read_metadata
from ..bottle_state import read_metadata
# from ..backend.docker.capability_apply import (
# CapabilityApplyError,
# apply_capability_change,
# )
from ..backend.docker.egress_apply import (
EgressApplyError,
apply_routes_change,
apply_routes_change as _docker_apply_routes_change,
)
from ..backend.macos_container.egress_apply import (
apply_routes_change as _macos_apply_routes_change,
)
from ..log import Die, error, info
@@ -73,6 +76,13 @@ class QueuedProposal:
ApplyError = (CapabilityApplyError, EgressApplyError)
def apply_routes_change(slug: str, content: str) -> tuple[str, str]:
meta = read_metadata(slug)
if meta is not None and meta.backend == "macos-container":
return _macos_apply_routes_change(slug, content)
return _docker_apply_routes_change(slug, content)
def discover_pending() -> list[QueuedProposal]:
"""Walk ~/.bot-bottle/queue/* and collect pending proposals."""
queue_root = _supervise.bot_bottle_root() / "queue"