feat(m15): collect session-scoped system logs (kernel + coredumps) — 0.31.0

core/syslogs.py gathers, scoped to the diagnostic window:
- kernel-log slice (journalctl -k): Xid, OOM, MCE, PCIe AER, thermal, hung tasks
- crashed-process records (coredumpctl): exe, signal, when
Stored as syslogs.txt in the diagnostic dir, included in the Report bundle, and
fed to the AI on "Explain" alongside the game logs. Best-effort (degrades if the
tools are missing/denied); treats journalctl's "-- No entries --" as empty.
Tests + docs (M15/SPEC).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 14:10:30 +02:00
parent bffaf73ad4
commit 984292c368
9 changed files with 156 additions and 9 deletions
+5 -3
View File
@@ -133,9 +133,11 @@ Status: ⬜ not started · 🟦 designing · 🟨 in progress · ✅ done
- **M15 Logging & report bundles** (D25) — opt-in via one `logging_enabled` toggle (default off):
application logging to a rotating `app.log` (`core/applog.py`) and **per-diagnostic storage**
(`core/diagstore.py`) — each diagnostic gets its own `DATA_DIR/diagnostics/<id>/` (capture,
`result.json`, `report.txt`, scoped game logs, and an `ai/` record of every AI interaction:
exact data sent, model, reply). **"Report"** zips one into `DATA_DIR/reports/` (GUI button on
the diagnostic dialog; CLI `rigdoctor bundle`). Stays local; shareable on demand.
`result.json`, `report.txt`, scoped **game logs** (`core/gamelogs.py`) and **system logs**
(`core/syslogs.py``journalctl -k` slice + `coredumpctl` crashed-process records), and an
`ai/` record of every AI interaction: exact data sent, model, reply). **"Report"** zips one
into `DATA_DIR/reports/` (GUI button on the diagnostic dialog; CLI `rigdoctor bundle`). All
logs are session-scoped and fed to the AI on "Explain". Stays local; shareable on demand.
## Bundles (final — D14)
- **Essential:** M1 + M3 + M4 *(the MVP, NVIDIA-only — D5)*