131b11d07d
P0-1: DetectionTimer.check() und _detection_loop() loggen jetzt jeden Tick: - check #N: gateway_state=X, result=active/inactive - check #N: pgrep=N pids (self-excluded), result=active/inactive - check #N: no background activity detected - tick #N (interval=10s) - state changed: inactive→active / active→inactive P0-2: pgrep self-exclude mit os.getpid(): - Eigene PID wird aus pgrep-Ergebnissen herausgefiltert - Pruefung auf len(pids) > 0 statt > 1 - PID-Parsing mit isdigit()-Validierung P1-1: PulseController.start() prueft DDP-Verfuegbarkeit: - logger.warning wenn start() ohne bind_ddp() aufgerufen wird - Kein Crash, Thread laeuft sauber durch P1-2: Neue Tests fuer Live-Verhalten: - TestDetectionTimerPgrepSelfExclude: mock pgrep, self-exclude - TestDetectionTimerOnChangeCallback: mock gateway_state, on_change feuert - TestPulseControllerStartWithoutDdp: start() ohne DDP → warning, kein Crash Callback-Logik von _detection_loop() nach check() verschoben (single source of truth). 55/55 presence_engine Tests gruen, 0 Regressionen.