degenbot.runner.diag ==================== .. py:module:: degenbot.runner.diag .. autoapi-nested-parse:: Incident-diagnostic harnesses for the driver cockpit. The three operator-runtime probes — the tracemalloc diff thread, the ``/proc/self`` RSS/purge CSV sampler, and the faulthandler repeat dumper — live here, configured through the typed loader (``ArbitrageConfig.diag``, populated by :meth:`ArbitrageConfig.build`). The cockpit (:meth:`~degenbot.runner.bot_runner.BotRunner.start`) arms them at startup; any entrypoint that runs the cockpit (the settlement-arbitrage example, the ``degenbot`` console) gets the probes uniformly. Module Contents --------------- .. py:class:: DiagConfig The three probe toggles, carried from the declared diagnostics keys. No field has a default: the core schema declaration owns them (zero is OFF, the production posture), so a second literal here could drift from what an operator set. .. py:attribute:: tracemalloc_secs :type: float .. py:attribute:: procmem_secs :type: float .. py:attribute:: procmem_csv :type: str .. py:attribute:: faulthandler_timeout_secs :type: float .. py:function:: arm_diagnostics(cfg: DiagConfig) -> list[str] Arm every configured probe; return the armed probe names (stable order). Zero-config arms nothing — production default. Called once per session from the cockpit's ``start()``; idempotent across runners (threads are daemon and probe-scoped). :returns: The armed probe names, in stable arm order.