Conversation
- store.py: wrap every connection in contextlib.closing so they actually
close (sqlite3's own `with` only manages the transaction); matters for the
long-lived API process that opened a connection per request
- .gitignore: add monitoring.db{,-wal,-shm} (+ cache-id-daily.txt, nonces.txt)
so local/DEBUG runs don't leave committable state in the repo root
- telegram.py: drop the redundant skipped_debug delivery update; the single
insert already records the terminal status
- api/server.py: next_cursor uses rows[-1]["id"] (rows are id DESC) instead of min()
- conftest.py: strip TELEGRAM_*/PAT_DISPATCH and force LOG_LEVEL=INFO in the
isolation fixture so a developer's .env can't fail tests or fire live sends
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- deploy/Caddyfile: auto-TLS, public GET /healthz, bearer-token gate on the rest, upstream timeouts to shield the stdlib server, optional rate_limit blocks (caddy-ratelimit plugin), env-driven domain/token/email - alerts-api.md: Caddy install + Hetzner firewall guidance (keep 8923 local, allow 22/80/443 only, fail2ban, optional Cloudflare) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Caddyfile: gate /v1/* on any token in pipe-separated ALERTS_API_TOKENS via header_regexp, so each consumer gets its own revocable token - alerts-api.md: document generating tokens (openssl rand -hex 32), where to store them (password manager + systemd override, never in git), and add/rotate/revoke via restart Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Verification