Alert event sink: emit safe quant/error notifications for desktop consumers #57

Open
opened 2026-09-07 03:14:17 +00:00 by nsaspy · 0 comments
Owner

Goal

Expose llm-log anomaly/routing alerts through a generic safe event sink so desktop configuration can notify without coupling core llm-log to Dunst.

Depends on #57/#58; configurable through #59.

Contract

Emit compact typed alert events containing only safe metadata by default:

  • event id
  • timestamp
  • severity
  • detector/rule id
  • provider
  • model
  • disclosed quantization (unknown when undisclosed)
  • anomaly classes / score
  • HTTP/router error status when applicable

Do not put raw prompts, completions, auth headers or tool arguments into notification payloads.

Support at least:

  • append-only alerts.jsonl under the llm-log data directory;
  • optional argv-based command hook with fields passed as environment variables or fixed positional arguments, never shell-interpolated strings;
  • rate limiting/deduplication so one pathological stream does not notification-storm the desktop;
  • observe-only default: alerts never block proxy traffic.

Acceptance

  • deterministic alert fixtures;
  • no secret/raw-content leakage;
  • command hook uses exec argv, not shell=True;
  • repeated identical anomaly events are coalesced within configured window;
  • hook failure is recorded but never breaks forwarding;
  • Home Manager can wire notify-send/Dunst without llm-log depending on a desktop stack.
## Goal Expose llm-log anomaly/routing alerts through a generic safe event sink so desktop configuration can notify without coupling core llm-log to Dunst. Depends on #57/#58; configurable through #59. ## Contract Emit compact typed alert events containing only safe metadata by default: - event id - timestamp - severity - detector/rule id - provider - model - disclosed quantization (`unknown` when undisclosed) - anomaly classes / score - HTTP/router error status when applicable Do not put raw prompts, completions, auth headers or tool arguments into notification payloads. Support at least: - append-only `alerts.jsonl` under the llm-log data directory; - optional argv-based command hook with fields passed as environment variables or fixed positional arguments, never shell-interpolated strings; - rate limiting/deduplication so one pathological stream does not notification-storm the desktop; - observe-only default: alerts never block proxy traffic. ## Acceptance - deterministic alert fixtures; - no secret/raw-content leakage; - command hook uses exec argv, not `shell=True`; - repeated identical anomaly events are coalesced within configured window; - hook failure is recorded but never breaks forwarding; - Home Manager can wire `notify-send`/Dunst without llm-log depending on a desktop stack.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#57
No description provided.