aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_security_regressions.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-24 17:42:10 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-24 17:58:08 +0200
commitef942b93d1e9bfc28bf607dfaf501cc7d9685e7b (patch)
tree644ffc1884d506036a279f7f19a2d302f45d9064 /packages/meshbay-node/tests/test_security_regressions.py
parentdf6fafa76b0eec167fa1fa18a40632c2e95181ff (diff)
downloadmeshbay-ef942b93d1e9bfc28bf607dfaf501cc7d9685e7b.tar.gz
test(node): read the daemon's source wherever it is split
Tests that read daemon.py now take their text from node_source (daemon.py, NodeDaemon's bases, the cli package once it exists). The CLI tests that sliced main() run the CLI instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests/test_security_regressions.py')
-rw-r--r--packages/meshbay-node/tests/test_security_regressions.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/meshbay-node/tests/test_security_regressions.py b/packages/meshbay-node/tests/test_security_regressions.py
index 5e8badf..8e90332 100644
--- a/packages/meshbay-node/tests/test_security_regressions.py
+++ b/packages/meshbay-node/tests/test_security_regressions.py
@@ -18,7 +18,7 @@ from meshbay_common.crypto import generate_gek
from meshbay_node.indexer.group_index import GroupIndex
from meshbay_node.roots import RootSet
from meshbay_node.transport.webrtc_server import WebRTCPeerSession
-from node_source import TRANSPORT, webrtc_files, webrtc_source
+from node_source import TRANSPORT, daemon_source, webrtc_files, webrtc_source
from conftest import one_root, opened_ack, sealed_upload
@@ -434,8 +434,7 @@ def test_chat_store_and_peers_are_per_group(tmp_path):
def test_daemon_sets_no_global_chat_store(tmp_path):
"""H1: the daemon must not hoist one group's chat store onto the transport."""
- source = (Path(__file__).parent.parent
- / "src" / "meshbay_node" / "daemon.py").read_text(encoding="utf-8")
+ source = daemon_source()
assert '_ctx["chat_store"]' not in source, (
"daemon must not assign a transport-wide chat_store — it leaks chat "
"across groups (H1)"
@@ -610,8 +609,7 @@ def test_swarm_registration_skips_private_groups():
mis-mounted route, so fixing the route without this filter would have turned a
dormant leak into a live one.
"""
- source = (Path(__file__).parent.parent / "src" / "meshbay_node"
- / "daemon.py").read_text(encoding="utf-8")
+ source = daemon_source()
assert 'visibility' in source and '_register_swarm' in source
# Both registration sites must gate on public visibility.
for marker in ['gctx.get("visibility") == "public"',