- thor/web/mcp.py: stateless Streamable HTTP at POST /mcp (JSON-RPC 2.0), RFC 9728 metadata at
/.well-known/oauth-protected-resource[/mcp], 401 with resource_metadata. Tokens checked
against Authelia's JWKS: RS256, iss, aud (this server), exp, typ at+jwt, client_id thor-mcp,
scp array; group admin only; Remote-* headers never trusted; every tool call logged with the
user.
- Read tools (thor:read): list_incidents, get_incident, what_covers, thor_status,
list_known_conditions. Write tools (thor:write): add_known_condition, end_known_condition,
attach_ticket, detach_ticket. Tools a token's scopes can't use aren't listed.
- Migration 4: incident_links (who attached which ticket to which incident). attach_ticket
records an 'attach' action; in shadow nothing is sent, live sends a 'Root cause' comment.
- Incident page lists attached tickets. PyJWT[crypto] added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- checks/reboots.py (thor#4): boot-time changes classified as planned (logind line),
unexpected, or unknown (journal went quiet first); several together are one event.
- checks/cluster.py: HA fence lines, watchdog self-fences, corosync quorum loss: one host is
'lost its cluster link and was fenced' (P2), two or more a cluster partition (P1).
- checks/maintenance.py: Gandalf suppressions (with ended ones) as a cause that never
opens a ticket; everything under it goes on the timeline.
- Engine: higher causes first, lower causes they explain become symptoms; a higher cause
found later absorbs pending ones and comments 'Root cause' on opened ones; host-scoped
causes never explain another host's cause; incidents stay active while an attached host
is still down; silent state changes are saved; notes join timeline-only incidents.
- Known conditions (migration 3, seeded): compute-storage-02 reboots and Ceph noout ->
693930698, the old UPS battery. A match sends a note to that ticket instead of a new one.
- Replays: T2 0 tickets; T3 one P2 (fenced, cleared when the host is back); T4 one P1
partition (storage-01's later fence and all reboots fold in); DIMM one note on 693930698.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- thor/engine.py: one incident per root cause. New causes held one cycle, symptoms attached
to the highest cause they relate to (same host, or cluster-wide effects for causes that
can stall the cluster), priority only rises, rate-limited refresh, cleared after 15 min.
- thor/checks/memory.py: node_vmstat_oom_kill + kernel oom-kill lines; global vs cgroup,
victim and CT, trigger cpuset; P3 / P2 (loop) / P1 (Ceph or other hosts stalling).
- thor/checks/symptoms.py: scrape timeouts, pvestatd timeouts, Ceph alerts switching on.
- thor/outbox.py: live actions to Tinker with backoff; shadow actions are only recorded.
- Migration 2: incidents, actions, observations.
- PromQL/LogQL regex escaping fixed (found by recording against the real Prometheus).
- tests/replay.py + tests/fixtures/t1.json: 2026-11-23 replayed through the real monitor:
exactly one ticket (P1 from the start: pvestatd timed out on three other hosts with the
first kill), 15 symptoms as Also seen, cleared 06:18, Loki's 06:00 outage delays only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Work in progress for thor#1 phase 1 (PR 1 of 6). Not yet pushed: CI workflow and deploy files still to add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>