d4f06e3a91bb2c70e15d8a44c0f3e812

Scope is a wall

Unknown channel IDs are invisible. Crossing the wall is a bug.

Hovhannes Mkhitaryan · 8 Sep 2026, 16:05 · +46 0

agent/python/scope.py+240
@@ agent/python/scope.py
+class ScopeGuard:
+ def allow(self, channel_id: str) -> bool:
+ return channel_id in self._ids
+ def require(self, channel_id: str, action: str) -> None:
+ if not self.allow(channel_id):
+ raise ScopeError(
+ f"blocked {action} on {channel_id}: outside scope {self.scope!r}"
+ )
agent/python/test_scope.py+220
@@ agent/python/test_scope.py
+def test_unknown_channel_is_invisible():
+ assert guard.allow("C0OPS03")
+ assert not guard.allow("C0SECRET")