- Deploy zhixi-nest-worker.service after API restart
- Run test/run-integration-ci.sh with real MySQL/Redis/BullMQ
- Integration test failure blocks deployment (exit 1)
- timeout-minutes: 10 to prevent hung tests
Line: .gitea/workflows/deploy.yml:99-113
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- SIGKILL: enqueue job BEFORE kill, wait for pickup, verify recovery
- Document Import: track before/after KnowledgeItem IDs to prove
Worker created them (not direct DB INSERT)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Worker consumes from BullMQ Redis, not MySQL polling.
Replace all dbExec(INSERT INTO AiAnalysisJob) with enqueueJob()
which uses real BullMQ Queue.add() to the test Redis.
Add setRedisConfig() + enqueueJob() to integration harness.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- User INSERT: add updatedAt=NOW() (NOT NULL, no default)
- AiAnalysisJob: retryCount→progress (column doesn't exist)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- NEW test/helpers/mock-ai-provider.ts: Mock AI HTTP server with
normal/timeout/429/500/invalid-json behavior controls
- NEW test/helpers/integration-harness.ts: spawn real API/Worker
processes, HTTP helpers, PrismaClient-based DB helpers
- NEW test/m-ai-01-09.worker-int-spec.ts: real integration test
using actual MySQL/Redis/BullMQ/HTTP (Active Recall, Feynman,
Document Import, SIGKILL recovery, provider faults, idempotency)
- NEW test/jest-worker-integration.json: Jest config with NO mocks
- DELETE test/m-ai-01-09.e2e-spec.ts: removed mock-based pseudo-e2e
- UPDATE test/run-integration-ci.sh: uses real integration config
- UPDATE package.json: test:integration:worker uses real config
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>