fix(macos-container): launch gateway as a module, not /app/gateway_init.py #428

Merged
didericis merged 1 commits from fix-gateway-package-paths into main 2026-07-20 14:58:35 -04:00
Owner

Closes #427.

bot_bottle/backend/macos_container/infra.py spawned the gateway supervisor as python3 /app/gateway_init.py. 5ad3449 moved bot_bottle into a pip-installed package, so that file no longer exists — the supervisor never started, mitmdump never generated its CA, and bot-bottle start died downstream with GatewayError: gateway CA not available, which points at TLS rather than at the supervisor.

Same defect 127ba49 fixed for firecracker. It survived on macOS because CI has no Apple Container runner (#426).

test_macos_infra asserted the substring "gateway_init.py", which the broken path satisfies, so it stayed green. Tightened to the module form, matching the assertion 127ba49 already made in test_firecracker_infra_vm.

Verification

Verified end to end on the macos-container backend: gateway image builds, CA is generated (fingerprint printed), agent registers, supervise MCP is wired, and a headless bottle runs a prompt to completion and exits 0.

Full unit suite: 1879 passing.

Note

This branch originally also carried fixes for pyproject.toml, Dockerfile.gateway, and bot_bottle/backend/firecracker/infra_vm.py. All three had already been fixed independently on main (0d69667, 127ba49) — they were dropped when the branch was rebased. What remains is only the macOS-specific defect.

Closes #427. `bot_bottle/backend/macos_container/infra.py` spawned the gateway supervisor as `python3 /app/gateway_init.py`. `5ad3449` moved `bot_bottle` into a pip-installed package, so that file no longer exists — the supervisor never started, mitmdump never generated its CA, and `bot-bottle start` died downstream with `GatewayError: gateway CA not available`, which points at TLS rather than at the supervisor. Same defect `127ba49` fixed for firecracker. It survived on macOS because CI has no Apple Container runner (#426). `test_macos_infra` asserted the substring `"gateway_init.py"`, which the broken path satisfies, so it stayed green. Tightened to the module form, matching the assertion `127ba49` already made in `test_firecracker_infra_vm`. ## Verification Verified end to end on the macos-container backend: gateway image builds, CA is generated (fingerprint printed), agent registers, supervise MCP is wired, and a headless bottle runs a prompt to completion and exits 0. Full unit suite: 1879 passing. ## Note This branch originally also carried fixes for `pyproject.toml`, `Dockerfile.gateway`, and `bot_bottle/backend/firecracker/infra_vm.py`. All three had already been fixed independently on `main` (`0d69667`, `127ba49`) — they were dropped when the branch was rebased. What remains is only the macOS-specific defect.
didericis added 1 commit 2026-07-20 14:37:19 -04:00
fix(macos-container): launch gateway as a module, not /app/gateway_init.py
test / stage-firecracker-inputs (pull_request) Successful in 5s
test / integration-docker (pull_request) Successful in 8s
tracker-policy-pr / check-pr (pull_request) Successful in 7s
test / unit (pull_request) Successful in 30s
test / build-infra (pull_request) Successful in 3m56s
test / integration-firecracker (pull_request) Successful in 1m36s
test / coverage (pull_request) Successful in 2m33s
test / publish-infra (pull_request) Has been skipped
test / stage-firecracker-inputs (push) Successful in 2s
test / integration-docker (push) Successful in 33s
test / unit (push) Successful in 34s
lint / lint (push) Successful in 48s
Update Quality Badges / update-badges (push) Failing after 44s
test / build-infra (push) Successful in 3m48s
test / integration-firecracker (push) Successful in 1m44s
test / coverage (push) Successful in 1m36s
test / publish-infra (push) Successful in 2m33s
44479f328e
The macOS infra container's init script still spawned the supervisor as
`python3 /app/gateway_init.py`. 5ad3449 moved bot_bottle from flat files
under /app into a pip-installed package, so that file no longer exists:
the supervisor never started, mitmdump never generated its CA, and the
launch failed downstream with a misleading "gateway CA not available"
error pointing at TLS rather than at the supervisor.

This is the same defect 127ba49 fixed for the firecracker backend. It
survived on macOS because CI has no Apple Container runner — the KVM
runner added in c193b04 covers firecracker, and ubuntu-latest covers
docker, but nothing exercises macos_container.

test_macos_infra asserted the substring "gateway_init.py", which the
broken path satisfied; it now asserts the module form, matching the
assertion 127ba49 already made in test_firecracker_infra_vm.

Verified end to end on the macos-container backend: image builds, CA is
generated, agent registers, and a headless bottle runs a prompt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
didericis force-pushed fix-gateway-package-paths from 83e8468927 to 44479f328e 2026-07-20 14:37:19 -04:00 Compare
didericis merged commit 44479f328e into main 2026-07-20 14:58:35 -04:00
didericis deleted branch fix-gateway-package-paths 2026-07-20 14:58:36 -04:00
Sign in to join this conversation.