Remove the supervise flag; supervise every bottle
Issue #249: in practice the per-bottle `supervise` flag was never turned off — all bottles should be supervised. Remove the manifest flag and make the supervise sidecar unconditional, mirroring egress. - Reject `supervise:` as a removed bottle key with a migration hint. - Drop the `supervise` field from ManifestBottle and the extends merge. - prepare_supervise always returns a SupervisePlan; the plan type is now non-optional and the per-backend `is None` guards are gone, so the supervise daemon, current-config mount, aliases, and MCP registration always render. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YcU7nerbg8cVj9R4EkpfLJ
This commit is contained in:
@@ -42,38 +42,26 @@ class TestExtendsBasic(unittest.TestCase):
|
||||
# same way they did before the resolver landed.
|
||||
m = _build(dev={
|
||||
"env": {"FOO": "bar"},
|
||||
"supervise": True,
|
||||
})
|
||||
b = m.bottles["dev"]
|
||||
self.assertEqual({"FOO": "bar"}, dict(b.env))
|
||||
self.assertTrue(b.supervise)
|
||||
|
||||
def test_child_inherits_parent_fields_unchanged(self):
|
||||
m = _build(
|
||||
base={
|
||||
"env": {"BASE": "1"},
|
||||
"supervise": True,
|
||||
},
|
||||
child={"extends": "base"},
|
||||
)
|
||||
c = m.bottles["child"]
|
||||
self.assertEqual({"BASE": "1"}, dict(c.env))
|
||||
self.assertTrue(c.supervise)
|
||||
|
||||
def test_child_overrides_supervise_scalar(self):
|
||||
m = _build(
|
||||
base={"supervise": True},
|
||||
off={"extends": "base", "supervise": False},
|
||||
)
|
||||
self.assertTrue(m.bottles["base"].supervise)
|
||||
self.assertFalse(m.bottles["off"].supervise)
|
||||
|
||||
def test_parent_resolved_once_for_multiple_children(self):
|
||||
# Two children sharing one parent: both inherit; the parent
|
||||
# is resolved once + cached. (Cache behavior is internal; we
|
||||
# observe correctness on both children.)
|
||||
m = _build(
|
||||
base={"env": {"BASE": "1"}, "supervise": True},
|
||||
base={"env": {"BASE": "1"}},
|
||||
a={"extends": "base", "env": {"A": "1"}},
|
||||
b={"extends": "base", "env": {"B": "1"}},
|
||||
)
|
||||
@@ -366,7 +354,6 @@ class TestExtendsChain(unittest.TestCase):
|
||||
m = _build(
|
||||
grandparent={
|
||||
"env": {"GP": "1"},
|
||||
"supervise": True,
|
||||
},
|
||||
parent={
|
||||
"extends": "grandparent",
|
||||
@@ -381,8 +368,6 @@ class TestExtendsChain(unittest.TestCase):
|
||||
{"GP": "1", "P": "1", "C": "1"},
|
||||
dict(m.bottles["child"].env),
|
||||
)
|
||||
# supervise threads through unchanged.
|
||||
self.assertTrue(m.bottles["child"].supervise)
|
||||
|
||||
def test_intermediate_can_override(self):
|
||||
m = _build(
|
||||
|
||||
Reference in New Issue
Block a user