fix: startup and diagnostics system sessions carry the instance #66

Merged
KofTwentyTwo merged 1 commits from fix/system-session-instance into develop 2026-10-16 06:29:34 +00:00
KofTwentyTwo commented 2026-10-16 06:24:27 +00:00 (Migrated from github.com)

Problem

kof22 0.1.121 (QQQ RC.18) logs QInstance was not supplied when creating a QSystemUserSession once per pod, on [main] at startup, right after the schedule manager starts.

The cause is QuickSearchRuntime.primeConfig. When there is no QContext, it calls QContext.init(qInstance, new QSystemUserSession()). The session is built before the context is set, so it has no instance and therefore no all-access keys. DiagnosticEventRecorder.insert has the same pattern.

Fix

Both now call new QSystemUserSession(qInstance).

Tests

  • QuickSearchRuntimeTest.primeConfigWithoutAContextGivesTheSystemSessionItsInstance: priming with no context logs no instance-less session warning. It fails before the fix.
  • ./mvnw test passes.

🤖 Generated with Claude Code

## Problem kof22 0.1.121 (QQQ RC.18) logs `QInstance was not supplied when creating a QSystemUserSession` once per pod, on `[main]` at startup, right after the schedule manager starts. The cause is `QuickSearchRuntime.primeConfig`. When there is no `QContext`, it calls `QContext.init(qInstance, new QSystemUserSession())`. The session is built before the context is set, so it has no instance and therefore no all-access keys. `DiagnosticEventRecorder.insert` has the same pattern. ## Fix Both now call `new QSystemUserSession(qInstance)`. ## Tests - `QuickSearchRuntimeTest.primeConfigWithoutAContextGivesTheSystemSessionItsInstance`: priming with no context logs no instance-less session warning. It fails before the fix. - `./mvnw test` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.