fix(presence): pgrep Scanner erkennt hermes-Binary ohne .py-Endung (V8.9)
Bug: _pgrep_hermes_subagents() verlangte arg.endswith('.py') fuer
Python-gestartete hermes-Prozesse. Das schlug fehl bei argv wie
['python3', '/home/bernd/.local/bin/hermes', 'chat', '--profile', 'rainer']
weil 'hermes' ein Binary/Script ohne .py-Endung ist.
Fix: os.path.basename(arg) == 'hermes' statt
'hermes' in basename AND endswith('.py').
Tests: 5 neue Tests in TestPgrepArgvParsing:
- hermes-Binary in argv (Rainers realer Fall)
- generischer Pfad /pfad/zu/hermes
- direktes argv0='hermes'
- -m hermes_cli.main (bestehender Pfad intakt)
- non-hermes Python wird nicht gematcht
This commit is contained in:
@@ -1649,7 +1649,7 @@ class DetectionTimer:
|
||||
if argv[i + 1].startswith("hermes_cli"):
|
||||
is_hermes_python = True
|
||||
break
|
||||
elif "hermes" in os.path.basename(arg) and arg.endswith(".py"):
|
||||
elif os.path.basename(arg) == "hermes":
|
||||
is_hermes_python = True
|
||||
break
|
||||
if is_hermes_python:
|
||||
|
||||
Reference in New Issue
Block a user