fix(alerts): asSystem builds its system session with the runtime instance #42

Merged
KofTwentyTwo merged 1 commits from fix/alerts-system-session-instance into develop 2026-10-15 12:38:27 +00:00
KofTwentyTwo commented 2026-10-15 12:26:13 +00:00 (Migrated from github.com)

Production noise fix (kof22): the alerts-sink drain thread runs engine work through AlertsRuntime.asSystem without a QContext. AlertsSecurity.systemSession() called new QSystemUserSession(), which read a null instance. Every call logged the WARN "QInstance was not supplied when creating a QSystemUserSession", and the session had no core all-access keys.

  • New AlertsSecurity.systemSession(QInstance). asSystem passes the runtime's instance. The no-arg form now delegates using the context instance.
  • AlertsSystemSessionTest: asSystem with an empty QContext runs as the system user and logs no warning. It failed before this change.

./mvnw verify passes locally. The matching core fix for the qqq-jobs-sched-* threads is QRun-IO/qqq#1222. Merging with release:rc cuts the next RC.

🤖 Generated with Claude Code

Production noise fix (kof22): the `alerts-sink` drain thread runs engine work through `AlertsRuntime.asSystem` without a QContext. `AlertsSecurity.systemSession()` called `new QSystemUserSession()`, which read a null instance. Every call logged the WARN "QInstance was not supplied when creating a QSystemUserSession", and the session had no core all-access keys. - New `AlertsSecurity.systemSession(QInstance)`. `asSystem` passes the runtime's instance. The no-arg form now delegates using the context instance. - `AlertsSystemSessionTest`: `asSystem` with an empty QContext runs as the system user and logs no warning. It failed before this change. `./mvnw verify` passes locally. The matching core fix for the `qqq-jobs-sched-*` threads is QRun-IO/qqq#1222. Merging with `release:rc` cuts the next RC. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.