Repository navigation
#125 feat: adopt notifier-client 0.4.0; the service moves to httpx2 - #126
Merged
Merged
Conversation
notifier-client 0.4.0 sends through httpx2 and re-raises its exceptions, so alerting's five `except httpx.TransportError` clauses stopped matching an unreachable notifier. The whole process now runs httpx2: alerting, heartbeat, drift and rotate_key. httpx leaves the runtime dependencies; only respx (dev) still needs it. - Tests: httpx2.alias_httpx() at the top of tests/conftest.py, respx's plugin loaded there (-p no:respx). The five unreachable cases raise httpx2.ConnectError at httpx2's transport (`unreachable` fixture); without the alias they failed on the old clauses. - The hc-ping key redaction moves to the `httpx2` logger: on `httpx` it masked nothing, and the key reached the request log. - Trust store: httpx2 defaults to the OS store, which still trusts emSign C1 and ECC C3. src/core/tls.trusted() keeps certifi's bundle alone; every httpx2 call passes verify=trusted(), and test_trust_store.py checks the context and every call site. certifi declared, floored. - tests/ci/test_http_stack.py: no httpx/httpcore import in src/, scripts/, alembic/, nor loaded by a fresh interpreter importing all of src. - monitors.md: 0.4.0's 60 s channel limit can double a redelivery; accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 2026
Closed
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #125
Adopts notifier-client v0.4.0 (
003693d). Per the operator's decision, the whole process moves to httpx2:alerting,heartbeat,driftandscripts/rotate_key.py.httpxleaves the runtime dependencies; only respx (dev) still pulls it in.uv export --no-devhas nohttpxorhttpcore.Red first
With the SDK on 0.4.0, no alias, and
src/unchanged, the five unreachable-notifier cases raisehttpx2.ConnectErrorat httpx2's own transport (newunreachablefixture):Why not with the alias:
alias_httpx()rebindssys.modules["httpx"]process-wide. Under it,alerting.py's oldimport httpxis httpx2, so the old clauses pass. The alias hides exactly this bug. So the red ran without it, and these guards keep it fixed:tests/ci/test_http_stack.py: an AST walk finds nohttpx/httpcoreimport insrc/,scripts/oralembic/. A fresh interpreter, with no alias, imports everysrcmodule and loads neither.unreachable), independent of respx and the alias.Red with the alias in place (8 failed): the guards above, plus three heartbeat tests. One of those is a real leak.
Found beyond the brief: hc-ping key in the journal
The brief said nothing attaches to the
httpxlogger.heartbeat._RedactKeydoes: it masks the healthchecks.io ping key in theHTTP Request: POST <url>line. httpx2 logs that line onhttpx2, so after a plain swap the filter masked nothing.test_the_key_never_reaches_the_request_logfailed onKEY not in message. The filter now sits onREQUEST_LOGGER = "httpx2".Trust store: certifi stays
httpx2 verifies against the OS store, not certifi. On this host the OS store still trusts emSign C1 and ECC C3, which certifi 2026.10.23 dropped (CannObserv/provisioner#77). Moving would widen trust silently.
src/core/tls.trusted():ssl.create_default_context(cafile=certifi.where()), cached. httpx2'sverify=takes anSSLContext(checked inhttpx2/_config.py).src/andscripts/passesverify=trusted(): heartbeat ×2, drift, rotate_key.tests/ci/test_trust_store.py(certifi ≥ 2026.10.19: venvs still trust emSign ECC Root CA - G3 (eMudhra compromise) #58) now also checks:trusted()holds exactly certifi's roots (DER sets equal) and verifies hostnames;httpx2.<Client|AsyncClient|get|post|…>(…)call site hasverify=trusted(), with a found-something floor;from httpx2 import Clientthat would hide a site from the walk.certifi>=2026.10.23,<2027is declared, with aSECURITY_FLOORSentry: 2026.10.19, PYSEC-2026-4320.trusted()completes TLS tohc-ping.comandapi.github.com.SSL_CERT_FILEno longer applies to our clients. No unit sets it.http://over the tailnet.Tests
tests/conftest.py:httpx2.alias_httpx()comes before any import.pytest_plugins = ["respx.plugin"], and-p no:respxis inaddopts. A late alias raises rather than splitting the stack.httpx2explicitly; respx is the only thing importinghttpx.uv audit: no known vulnerabilities (52 packages).Docs
src/core/tls.py.docs/reference/monitors.md§ At least once: 0.4.0's 60 s channel limit can double a redelivery. Accepted, not fixed. Over the last 30 days, all 150 dispatches weresucceeded.Not done here
chime://(gone in apprise 2.2.0) or Telegram (now gets Markdown). Both are server-side, already live, and outside this PR.Deploy after merge: dev → live through
scripts/deploy.sh, then the brief's ping checks.🤖 Generated with Claude Code