# Web admission diagnostics host tests Run from the repository root: ```sh python3 tests/web_diagnostics/run.py python3 tests/web_admin_transport/server_lifecycle.py python3 tests/admin_console_boundary/lifecycle.py python3 tests/admin_ssh_policy/run.py ``` `run.py` compiles the entire production `web_diagnostics.c` (only includes are substituted) plus all four actual server tracing wrappers, with strict C11 warnings. `CC` selects the compiler. No dependencies beyond Python 3 and a C compiler; no device/network/build actions or persistent generated files. Twelve runtime groups cover disabled capture, existing live connections, handler return/route preservation, WS classification, heap/stack field mapping, six slots and duplicate/overflow callbacks, stale TLS identity/fd reuse, capture-epoch interleavings, exact ring overwrite accounting, formatted-output secrecy with poisoned URI/header/body fields, bounded concurrent show/clear, stale upgrade completion, partial stop/restart, invalid input, and nonwrapping IDs/saturating counters. One additional source guard group checks production wiring and absence of request/logging/allocation/task/queue APIs. Fakes assert that printing, heap sampling and public HTTPD/TLS calls never run under the metadata lock. These are deterministic injected interleavings, not a real FreeRTOS concurrency or TLS/socket simulation. The restart test models synchronous callbacks; the separate lifecycle harness executes real server orchestration with dependency fakes and verifies callback configuration, six sockets/no LRU, unchanged timeouts and all 16 existing failure/restart groups. Canonical CLI routing and SSH/browser policy have separate tests. No target heap, stack margin, admission reliability or secrecy of external SDK logging is proven by these tests. See [admission diagnostic usage and interpretation](../../docs/web_admission_diagnostics.md#usage-and-interpretation), the [SDK cleanup audit and blind spots](../../docs/web_admission_diagnostics.md#sdk-audit-and-explicit-blind-spots), and [regression entry points and limits](../../docs/web_admission_diagnostics.md#regression-entry-points-and-limits).