fix(gateway): add missing @Inject() decorators causing silent startup hang
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

tsx/esbuild doesn't support emitDecoratorMetadata, so NestJS can't
infer constructor parameter types at runtime. Three services were
missing explicit @Inject() decorators:

- SummarizationService: EmbeddingService parameter
- CronService: SummarizationService parameter
- SkillsController: SkillsService parameter

Without these, NestJS DI hangs forever during onModuleInit resolution
with no error output — the process silently exits (or hangs with a
keepAlive).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 20:51:28 -05:00
parent 9d01a0d484
commit 4c37162b55
5 changed files with 14 additions and 6 deletions

View File

@@ -1,4 +1,10 @@
import { Injectable, Logger, type OnModuleInit, type OnModuleDestroy } from '@nestjs/common';
import {
Inject,
Injectable,
Logger,
type OnModuleInit,
type OnModuleDestroy,
} from '@nestjs/common';
import cron from 'node-cron';
import { SummarizationService } from './summarization.service.js';
@@ -7,7 +13,7 @@ export class CronService implements OnModuleInit, OnModuleDestroy {
private readonly logger = new Logger(CronService.name);
private readonly tasks: cron.ScheduledTask[] = [];
constructor(private readonly summarization: SummarizationService) {}
constructor(@Inject(SummarizationService) private readonly summarization: SummarizationService) {}
onModuleInit(): void {
const summarizationSchedule = process.env['SUMMARIZATION_CRON'] ?? '0 */6 * * *'; // every 6 hours

View File

@@ -29,7 +29,7 @@ export class SummarizationService {
constructor(
@Inject(LOG_SERVICE) private readonly logService: LogService,
@Inject(MEMORY) private readonly memory: Memory,
private readonly embeddings: EmbeddingService,
@Inject(EmbeddingService) private readonly embeddings: EmbeddingService,
@Inject(DB) private readonly db: Db,
) {
this.apiKey = process.env['OPENAI_API_KEY'];