feat(diagnostics): debug sessions — start, stop, the tag on every line, screenshots (E16 S1)

A session is one recording, capped at 60 minutes by the server. While it is
open, a request naming the caller's own session in X-Debug-Session is logged
at the session's level with every line tagged; a header naming anything else
is ignored. The browser's batches count a session as consent to its level and
keep the tag only on its own events. Screenshots are judged by their bytes,
capped in size and count, and served back to their owner only.

- debug_sessions / debug_screenshots tables, one open session per user
  (partial unique index), log_events.debug_session_id indexed
- /api/debug-sessions: start (joins a running one), stop, list, get, events,
  screenshots; /api/me reports the live session
- the hourly log job closes expired sessions and drops them with the logs
- logsink.serialize and routes._common.capped_body shared by their readers
This commit is contained in:
2026-09-19 21:38:53 +02:00
parent 44a792c34f
commit a7d7456279
18 changed files with 1133 additions and 54 deletions
+2
View File
@@ -20,6 +20,8 @@
"recipient": "There's no user with that email address.",
"job": "This job doesn't exist any more.",
"download": "This download doesn't exist any more.",
"debug_session": "This debug session doesn't exist any more.",
"screenshot": "This screenshot doesn't exist any more.",
"link": "This share link doesn't exist any more.",
"notification": "This notification doesn't exist any more.",
"account": "That account no longer exists.",
+2
View File
@@ -20,6 +20,8 @@
"recipient": "Nincs felhasználó ezzel az e-mail címmel.",
"job": "Ez a feladat már nem létezik.",
"download": "Ez a letöltés már nem létezik.",
"debug_session": "Ez a hibakereső munkamenet már nem létezik.",
"screenshot": "Ez a képernyőkép már nem létezik.",
"link": "Ez a megosztási link már nem létezik.",
"notification": "Ez az értesítés már nem létezik.",
"account": "Ez a fiók már nem létezik.",