File size: 872 Bytes
06357e7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from agent_process_dashboard.classifier import classify_process
from .helpers import sample
def test_classifier_detects_bridge_script():
classification = classify_process(sample(10, ("node", "gemini_acp_mcp_bridge.mjs")))
assert classification.known_class == "mcp.bridge.gemini_acp"
assert classification.is_bridge
assert classification.is_mcp
def test_classifier_detects_codex_by_basename():
classification = classify_process(sample(10, ("/home/smlflg/.local/bin/codex",)))
assert classification.known_class == "agent.codex"
def test_classifier_does_not_treat_incidental_codex_path_as_agent():
proc = sample(10, ("python", "app.py"))
proc = proc.__class__(**{**proc.__dict__, "cwd": "/home/smlflg/Projekte/CodexDashBoard"})
classification = classify_process(proc)
assert classification.known_class == "wrapper.runtime"
|