refactor(docker): drop legacy supervise_container_name alias
Supervise runs inside the sidecar bundle (PRD 0024), not in its own container. The `claude-bottle-supervise-<slug>` per-sidecar name only existed as a docker-network alias on the bundle so legacy code paths that referenced the old name would still resolve. Nothing inside the project relies on that resolution anymore — the short `supervise` alias is the one all consumers use — so the legacy long-form is dead. Drops the function entirely, plus its registration as a network alias and as an orphan probe in prepare. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,6 @@ from .sidecar_bundle import (
|
|||||||
SIDECAR_BUNDLE_IMAGE,
|
SIDECAR_BUNDLE_IMAGE,
|
||||||
sidecar_bundle_container_name,
|
sidecar_bundle_container_name,
|
||||||
)
|
)
|
||||||
from .supervise import supervise_container_name
|
|
||||||
|
|
||||||
|
|
||||||
# Repo root, used as the build context for the bundle Dockerfile.
|
# Repo root, used as the build context for the bundle Dockerfile.
|
||||||
@@ -246,7 +245,6 @@ def _sidecar_bundle_service(plan: DockerBottlePlan) -> dict[str, Any]:
|
|||||||
internal_aliases.append(git_gate_container_name(plan.slug))
|
internal_aliases.append(git_gate_container_name(plan.slug))
|
||||||
if sp is not None:
|
if sp is not None:
|
||||||
internal_aliases.append(SUPERVISE_HOSTNAME)
|
internal_aliases.append(SUPERVISE_HOSTNAME)
|
||||||
internal_aliases.append(supervise_container_name(plan.slug))
|
|
||||||
|
|
||||||
service: dict[str, Any] = {
|
service: dict[str, Any] = {
|
||||||
"image": SIDECAR_BUNDLE_IMAGE,
|
"image": SIDECAR_BUNDLE_IMAGE,
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ from .bottle_state import (
|
|||||||
write_metadata,
|
write_metadata,
|
||||||
)
|
)
|
||||||
from .pipelock import pipelock_container_name
|
from .pipelock import pipelock_container_name
|
||||||
from .supervise import supervise_container_name
|
|
||||||
|
|
||||||
|
|
||||||
def resolve_plan(
|
def resolve_plan(
|
||||||
@@ -141,8 +140,6 @@ def resolve_plan(
|
|||||||
sidecar_probes.append(("git-gate", git_gate_container_name(slug)))
|
sidecar_probes.append(("git-gate", git_gate_container_name(slug)))
|
||||||
if bottle.egress.routes:
|
if bottle.egress.routes:
|
||||||
sidecar_probes.append(("egress", egress_container_name(slug)))
|
sidecar_probes.append(("egress", egress_container_name(slug)))
|
||||||
if bottle.supervise:
|
|
||||||
sidecar_probes.append(("supervise", supervise_container_name(slug)))
|
|
||||||
for label, sidecar_name in sidecar_probes:
|
for label, sidecar_name in sidecar_probes:
|
||||||
if docker_mod.container_exists(sidecar_name):
|
if docker_mod.container_exists(sidecar_name):
|
||||||
die(
|
die(
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
"""Docker-side supervise helpers: container naming for the legacy
|
|
||||||
per-sidecar topology (kept so the bundle's docker-network alias
|
|
||||||
resolves the old name to the bundle IP). The prepare-time
|
|
||||||
queue-dir + current-config staging lives on the platform-neutral
|
|
||||||
`Supervise` ABC — backends instantiate it directly. The
|
|
||||||
supervise daemon's container lifecycle is owned by the sidecar
|
|
||||||
bundle (PRD 0024)."""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
|
|
||||||
def supervise_container_name(slug: str) -> str:
|
|
||||||
"""The legacy per-sidecar container name. Kept as a function so
|
|
||||||
the renderer can register it as a docker-network alias on the
|
|
||||||
bundle — any code still referring to
|
|
||||||
`claude-bottle-supervise-<slug>` resolves to the bundle's IP."""
|
|
||||||
return f"claude-bottle-supervise-{slug}"
|
|
||||||
@@ -21,8 +21,8 @@ to the agent.
|
|||||||
This module defines the host-side library: dataclasses for the queue
|
This module defines the host-side library: dataclasses for the queue
|
||||||
file shapes, queue read/write helpers, the audit log writer, and the
|
file shapes, queue read/write helpers, the audit log writer, and the
|
||||||
diff renderer. The in-container sidecar lives in
|
diff renderer. The in-container sidecar lives in
|
||||||
claude_bottle/supervise_server.py; the Docker lifecycle in
|
claude_bottle/supervise_server.py; the supervise daemon's container
|
||||||
claude_bottle/backend/docker/supervise.py.
|
lifecycle is owned by the sidecar bundle (PRD 0024).
|
||||||
|
|
||||||
For 0013 the supervisor's approval handlers are deliberately no-ops:
|
For 0013 the supervisor's approval handlers are deliberately no-ops:
|
||||||
on approval the audit log is written and the response file is
|
on approval the audit log is written and the response file is
|
||||||
|
|||||||
@@ -325,7 +325,6 @@ class TestSidecarBundleShape(unittest.TestCase):
|
|||||||
aliases = set(sc["networks"]["internal"]["aliases"])
|
aliases = set(sc["networks"]["internal"]["aliases"])
|
||||||
self.assertIn(f"claude-bottle-git-gate-{SLUG}", aliases)
|
self.assertIn(f"claude-bottle-git-gate-{SLUG}", aliases)
|
||||||
self.assertIn("supervise", aliases)
|
self.assertIn("supervise", aliases)
|
||||||
self.assertIn(f"claude-bottle-supervise-{SLUG}", aliases)
|
|
||||||
|
|
||||||
def test_daemons_csv_lists_only_active(self):
|
def test_daemons_csv_lists_only_active(self):
|
||||||
# Egress + pipelock are always in the daemon set even when
|
# Egress + pipelock are always in the daemon set even when
|
||||||
|
|||||||
Reference in New Issue
Block a user