feat(M5-008,M6-001-005): session hardening tests + BullMQ job queue foundation
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed

- M5-008: Add session-hardening.test.ts verifying /model switch, /agent switch,
  session resume with conversationHistory, and metrics tracking (tokens + message count)
- M6-001: Install bullmq, configure connection via VALKEY_URL (redis://localhost:6380)
- M6-002: Create QueueService (apps/gateway/src/queue/) with typed job definitions
  (SummarizationJob, GCJob, TierManagementJob), worker registration with exponential
  backoff, queue health status, and admin API helpers (listJobs, retryJob, pause/resume)
- M6-003: Migrate summarization cron → BullMQ repeatable job (SUMMARIZATION_CRON env)
- M6-004: Migrate session GC cron → BullMQ repeatable job (SESSION_GC_CRON env)
- M6-005: Migrate tier management cron → BullMQ repeatable job (TIER_MANAGEMENT_CRON env)
- Add AdminJobsController for queue/job management at /api/admin/jobs
- All three quality gates pass: typecheck, lint, format:check
- 319 tests pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 20:15:56 -05:00
parent 701bb69e6c
commit bfc97422c7
13 changed files with 1458 additions and 31 deletions

View File

@@ -42,6 +42,7 @@
"@opentelemetry/semantic-conventions": "^1.40.0",
"@sinclair/typebox": "^0.34.48",
"better-auth": "^1.5.5",
"bullmq": "^5.71.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.15.1",
"dotenv": "^17.3.1",