Commit Graph
6 Commits
Author SHA1 Message Date
hermes 7dc32a50e2 Raise LLM read timeout to 300s; prefer LAN endpoint in env example
Midnight failures were read timeouts against the public URL — hairpin NAT
and/or the request queuing behind other traffic on the shared model.
LAN endpoint + longer timeout covers both.
2026-09-30 08:06:18 +00:00
hermes 6bc9fa0e8d Resume retries after cooldown instead of giving up for the day
Previously 3 failed attempts at 06:00 (e.g. llamaswap model cold/starting)
permanently blocked generation until the next day. Now the retry loop
pauses SLOW_RETRY_MINUTES (default 60) after the burst budget is spent,
then resumes — one attempt per hour until jokes exist.
2026-09-30 07:55:40 +00:00
hermes 7e60343ed5 Add security headers, external CSS, HTML escaping
- Middleware sets CSP (default-src 'none'; style-src 'self'), HSTS,
  X-Content-Type-Options, X-Frame-Options, Referrer-Policy,
  Permissions-Policy on every response
- Inline <style> moved to /styles.css so CSP needs no unsafe-inline
- /favicon.ico returns a 1x1 GIF (kills 404 noise)
- Escape LLM jokes, article title, and URL before HTML rendering (XSS fix)
2026-09-29 20:41:16 +00:00
hermes b8571b29cd Fix unreadable joke cards: explicit text color in light and dark mode
Cards set their own background but inherited the page text color, so in
dark mode they rendered pale-on-white. Pin color on .joke in both schemes.
2026-09-29 20:03:56 +00:00
hermes c6fd9a5c77 Repair curly-quote JSON from LLM before parsing
halogen-qwen3.8-flash-next sometimes uses typographic quotes (“ ”) as JSON
string delimiters, which breaks strict json.loads. Add a scanner that
normalizes curly-delimited strings to straight quotes while preserving
curly quotes used as content inside straight-quoted strings.
2026-09-29 19:54:56 +00:00
hermes 075b72ec6c Wiki Jokes: daily LLM jokes from Wikipedia featured article
- FastAPI + APScheduler + SQLite, single container
- Daily generation at 06:00 Europe/Copenhagen + cold-start generation
- Retry with backoff (3 attempts/15 min), stale fallback with banner
- OpenAI-compatible endpoint via env (OPENAI_BASE_URL/MODEL/API_KEY)
- docker-compose with named volume for joke persistence
2026-09-29 19:38:01 +00:00