Repository navigation
Description
What's the problem
When the appliance's Healthchecks ping fails, nothing on the box records why. dashboard/mining_dashboard/service/notify/healthchecks.py logs a ping that cannot reach the endpoint at DEBUG only, logs a non-2xx rejection once at WARNING, and records nothing to the store. So in the dashboard a failed ping is indistinguishable from a real outage — exactly the confusion the 2026-11-11 incident turned on. Child issue of #4032.
What it impacts
Every owner who self-monitors with the dead-man's switch, and the project when triaging a DOWN alert: without a local record of failed ping attempts and their reasons (Tor SOCKS timeout, DNS, connection error, HTTP status), a Tor-path failure and an actual stack outage look identical.
How I found it
From parent issue #4032: the 2026-11-11 production DOWN windows could not be confirmed; indirect evidence pointed at the Tor egress path but the appliance's own record would have said so. Verified in this checkout: healthchecks.py returns False on failure with at most a DEBUG log ("Healthchecks ping failed (offline?)") and a once WARNING for HTTP rejection; the dashboard's SQLite schema is dashboard/mining_dashboard/service/storage_schema.py, which already creates bounded history tables (e.g. events, network_history); the notifier already has test seams (tor_proxy injection, a clock argument) used by existing pytest.
How important is it
High: it is an explicit acceptance criterion of the owner-requested #4032 and the difference between "the box is down" and "our ping could not get out".
Acceptance criteria
- Every failed ping attempt is recorded in a ring buffer in the dashboard's existing SQLite store: a new
ping_failures(ts REAL, reason TEXT, detail TEXT)table instorage_schema.py, trimmed on insert to a bounded row count. reasonclassifies the failure:tor_socks(SOCKS connect/timeout),dns,connect,http_status(with the status indetail). The exception mapping must be tested per class through the existingHealthchecksClientseams.- The recorded
detailnever contains the ping URL: a Healthchecks URL embeds the check UUID and is a credential. A test seeds a failing request and asserts the stored row contains none of the URL. - The health page shows the last ping failures (timestamp + reason), with a clear empty state, via the existing health/status API so both the page and the data endpoint carry it.
- Recovery continues to work as today (throttle advances only on success); the ring write must never raise into the data loop.
- Docs:
docs/monitoring.mdsays what is recorded, where it is shown, and that the ping URL itself is never stored.
Possible solutions
Map requests exceptions to reason classes at the existing except requests.RequestException and status branches in HealthchecksClient.ping; keep the client pure (inject a recorder, default a no-op) so the throttle/rejection tests stay green; render the list in the same panel the health page already uses for events.
Parent: #4032
Worker brief: Test tier: tiers 1-3 only — dashboard logic and tests per the repo profile (uv run --extra test pytest modules you touch, the frontend node --test for any new client logic, biome on edited JS); no bench job needed, say so in the PR body. Do not run make test or Docker locally.
Implement ping-failure recording and display for parent issue #4032, per the acceptance criteria on the issue. Read dashboard/mining_dashboard/service/notify/healthchecks.py first (its module docstring sets the silent-on-offline discipline you are deliberately changing only for the local record), dashboard/mining_dashboard/service/storage_schema.py for the table pattern, and how the health page gets its data today. The ping URL is a secret: never log or store it, and test that. Write the pytest first: one row per reason class (Tor SOCKS, DNS, connect, HTTP status), a URL-never-stored assertion, and a ring-cap assertion. Keep healthchecks.py raise-free. Do not touch the support-bundle collection, the recovery CLI, or journald config — sibling child issues own those.
Activity
#4037: record every failed Healthchecks ping in a ring table and show…
pithead-developer commentedon Nov 12, 2026
Grouped with #4036, but PR #4053 does not close it: the worker left it out. Released for its own pick.
appliance: fix #4036, #4037 and start #4038 — download a redacted sup…
pithead-developer commentedon Nov 13, 2026
Merged in #4053.
Tor diagnostics snapshot: circuits, consensus, guards, bootstrap and …