dash works !!! good data. billing seems to work

This commit is contained in:
Dobromir Popov
2026-07-02 23:07:41 +02:00
parent 1e0aa6ea8f
commit a938c19a82
14 changed files with 617 additions and 49 deletions

View File

@@ -0,0 +1,45 @@
"""Tracker control-plane boundaries."""
import subprocess
import sys
import textwrap
def test_tracker_startup_does_not_import_or_load_model_backends():
"""The public tracker is a router/API endpoint, not an inference worker."""
code = textwrap.dedent(
"""
import builtins
import sys
blocked_roots = {"meshnet_node", "torch", "transformers"}
real_import = builtins.__import__
def guarded_import(name, globals=None, locals=None, fromlist=(), level=0):
root = name.split(".", 1)[0]
if root in blocked_roots:
raise AssertionError(f"tracker imported model backend dependency: {name}")
return real_import(name, globals, locals, fromlist, level)
builtins.__import__ = guarded_import
from meshnet_tracker.server import TrackerServer
tracker = TrackerServer()
port = tracker.start()
assert port > 0
tracker.stop()
imported = blocked_roots & set(sys.modules)
assert not imported, f"unexpected model modules imported: {sorted(imported)}"
"""
)
result = subprocess.run(
[sys.executable, "-c", code],
check=False,
capture_output=True,
text=True,
)
assert result.returncode == 0, result.stderr