Fix Codex supervise MCP registration #248

Merged
didericis merged 12 commits from fix-codex-mcp-supervise-transport into main 2026-06-23 16:42:20 -04:00
Collaborator

Closes #247.

Summary

  • Updates Codex supervise MCP registration to use the current codex mcp add supervise --url <url> syntax for HTTP MCP servers.
  • Updates the Codex provider unit test to assert the exact registration command and prevent the old --transport http form from returning.
Closes #247. ## Summary - Updates Codex supervise MCP registration to use the current `codex mcp add supervise --url <url>` syntax for HTTP MCP servers. - Updates the Codex provider unit test to assert the exact registration command and prevent the old `--transport http` form from returning.
didericis-codex added 1 commit 2026-06-23 00:06:33 -04:00
fix: update codex supervise mcp registration
lint / lint (push) Successful in 1m54s
test / unit (pull_request) Successful in 38s
test / integration (pull_request) Successful in 22s
3ea35ba5d2
didericis approved these changes 2026-06-23 00:07:16 -04:00
Dismissed
didericis added 1 commit 2026-06-23 01:25:25 -04:00
fix(supervise): restore egress proposal tools
lint / lint (push) Successful in 1m35s
test / unit (pull_request) Successful in 30s
test / integration (pull_request) Successful in 16s
4c39b45e34
didericis added 1 commit 2026-06-23 01:35:05 -04:00
fix(supervise): apply egress approvals
lint / lint (push) Failing after 1m34s
test / unit (pull_request) Successful in 33s
test / integration (pull_request) Successful in 15s
0ec1085238
didericis added 1 commit 2026-06-23 01:39:56 -04:00
fix(macos-container): mount live egress routes dir
lint / lint (push) Failing after 1m35s
test / unit (pull_request) Successful in 33s
test / integration (pull_request) Successful in 16s
eb3e64ea8f
didericis added 1 commit 2026-06-23 01:47:20 -04:00
fix: add type annotations to fake_run in test_egress_apply
lint / lint (push) Successful in 1m40s
test / unit (pull_request) Successful in 36s
test / integration (pull_request) Successful in 18s
ebbb4053cf
didericis reviewed 2026-06-23 01:48:13 -04:00
@@ -45,0 +60,4 @@
def _routes_path(slug: str) -> Path:
state_dir = egress_state_dir(slug)
routes_path = state_dir / EGRESS_ROUTES_FILENAME
legacy_path = state_dir / "egress_routes.yaml"
Owner

No need to preserve legacy behavior

No need to preserve legacy behavior
didericis marked this conversation as resolved
didericis added 1 commit 2026-06-23 01:48:59 -04:00
refactor: drop legacy routes path fallback from _routes_path
lint / lint (push) Successful in 1m37s
test / unit (pull_request) Failing after 29s
test / integration (pull_request) Successful in 18s
5606797ac2
didericis-claude reviewed 2026-06-23 01:49:03 -04:00
didericis-claude left a comment
Collaborator

Done — stripped the legacy fallback, _routes_path now just returns egress_state_dir(slug) / EGRESS_ROUTES_FILENAME. (5606797)

Done — stripped the legacy fallback, `_routes_path` now just returns `egress_state_dir(slug) / EGRESS_ROUTES_FILENAME`. (5606797)
didericis reviewed 2026-06-23 01:50:40 -04:00
@@ -45,0 +74,4 @@
elif backend:
candidates = [["docker", "kill", "--signal", "HUP", container]]
else:
candidates = [
Owner

there should be a separate method per backend/macos container related code should live in the macos folder, not in the docker folder.

there should be a separate method per backend/macos container related code should live in the macos folder, not in the docker folder.
didericis marked this conversation as resolved
didericis added 1 commit 2026-06-23 01:57:20 -04:00
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
7a991e1f5e
didericis-claude reviewed 2026-06-23 01:57:28 -04:00
didericis-claude left a comment
Collaborator

Done (7a991e1):

  • docker/egress_apply.py: _signal_bundle_reload now docker-only, read_metadata usage dropped
  • macos_container/egress_apply.py: new file with its own apply_routes_change + _signal_bundle_reload using container kill
  • cli/supervise.py: dispatches to the right backend based on read_metadata, dropped the legacy test too
Done (7a991e1): - `docker/egress_apply.py`: `_signal_bundle_reload` now docker-only, `read_metadata` usage dropped - `macos_container/egress_apply.py`: new file with its own `apply_routes_change` + `_signal_bundle_reload` using `container kill` - `cli/supervise.py`: dispatches to the right backend based on `read_metadata`, dropped the legacy test too
didericis added 1 commit 2026-06-23 02:54:02 -04:00
feat: add smolmachines/egress_apply proxying docker backend
lint / lint (push) Successful in 1m40s
test / unit (pull_request) Successful in 33s
test / integration (pull_request) Successful in 16s
5808d0b828
Owner

@didericis-claude Can you duplicate the behavior we added for the macos backend for the docker and smolmachines backend?

@didericis-claude Can you duplicate the behavior we added for the macos backend for the docker and smolmachines backend?
didericis added 1 commit 2026-06-23 05:05:49 -04:00
fix: mount egress dir (not file) for docker and smolmachines backends
lint / lint (push) Successful in 1m37s
test / unit (pull_request) Successful in 31s
test / integration (pull_request) Successful in 16s
5eb27cd9a8
Mirrors the fix already applied to the macos-container backend in
eb3e64e: bind-mount the parent egress directory instead of the
routes file itself, so the live routes update is visible inside the
running sidecar bundle when the host overwrites the file.
Collaborator

Done (5eb27cd): changed docker/compose.py and smolmachines/launch.py to bind-mount the egress directory (/etc/egress) instead of just the routes file, matching the fix applied to macos-container in eb3e64e. Test updated accordingly.

Done (5eb27cd): changed `docker/compose.py` and `smolmachines/launch.py` to bind-mount the egress directory (`/etc/egress`) instead of just the routes file, matching the fix applied to macos-container in eb3e64e. Test updated accordingly.
didericis added 1 commit 2026-06-23 16:13:24 -04:00
fix: add lowercase proxy env vars, route_to_yaml_dict, and richer tool descriptions
lint / lint (push) Successful in 1m51s
test / unit (pull_request) Successful in 41s
test / integration (pull_request) Successful in 18s
7e344bbb53
- Set http_proxy/https_proxy (lowercase) alongside uppercase variants in smolmachines guest env for tools that only check lowercase
- Replace dataclasses.asdict with route_to_yaml_dict in /allowlist introspection so returned routes use YAML-schema-compatible keys
- Expand routes_yaml tool description in supervise_server to document all accepted route keys, making the round-trip from list-egress-routes to propose/apply explicit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
didericis reviewed 2026-06-23 16:27:54 -04:00
@@ -0,0 +17,4 @@
from .launch import sidecar_container_name
def apply_routes_change(slug: str, content: str) -> tuple[str, str]:
Owner

This belongs in a base class shared between backends, named something like "EgressApplicator", and calls an internal/overridden _signal_bundle_reload function that differs by backend (seems to be the only difference between backends)

This belongs in a base class shared between backends, named something like "EgressApplicator", and calls an internal/overridden `_signal_bundle_reload` function that differs by backend (seems to be the only difference between backends)
didericis marked this conversation as resolved
didericis added 1 commit 2026-06-23 16:33:52 -04:00
refactor: extract EgressApplicator base class shared between backends
lint / lint (push) Successful in 1m56s
test / unit (pull_request) Successful in 42s
test / integration (pull_request) Successful in 20s
77bdaf0a96
Pulls the duplicated apply_routes_change / validate_routes_content /
_routes_path logic into EgressApplicator (ABC) in backend/egress_apply.py.
DockerEgressApplicator and MacOSContainerEgressApplicator override the
single abstract _signal_bundle_reload method with their respective kill
commands. Module-level shims preserve the existing public API.
didericis reviewed 2026-06-23 16:37:00 -04:00
@@ -0,0 +33,4 @@
)
_applicator = MacOSContainerEgressApplicator()
Owner

export the applicator from each of the backends as a singleton instead of exporting a apply_routes_change function wrapper

export the applicator from each of the backends as a singleton instead of exporting a `apply_routes_change` function wrapper
didericis marked this conversation as resolved
didericis added 1 commit 2026-06-23 16:39:13 -04:00
refactor: export applicator singletons from egress_apply backends
test / unit (pull_request) Successful in 35s
test / integration (pull_request) Successful in 21s
lint / lint (push) Successful in 1m44s
test / unit (push) Successful in 32s
test / integration (push) Successful in 19s
Update Quality Badges / update-badges (push) Successful in 1m17s
200306f1cf
Replace module-level apply_routes_change wrappers with a public
applicator singleton in each backend. Callers now work with the
EgressApplicator instance directly (applicator.apply_routes_change)
rather than through a function shim.
didericis approved these changes 2026-06-23 16:42:11 -04:00
didericis merged commit 200306f1cf into main 2026-06-23 16:42:20 -04:00
didericis deleted branch fix-codex-mcp-supervise-transport 2026-06-23 16:42:20 -04:00
Sign in to join this conversation.