fix: resolve TypeScript errors in orchestrator and API
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

Fixed CI typecheck failures:
- Added missing AgentLifecycleService dependency to AgentsController test mocks
- Made validateToken method async to match service return type
- Fixed formatting in federation.module.ts

All affected tests pass. Typecheck now succeeds.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 20:07:49 -06:00
parent 7c9bb67fcd
commit 701df76df1
4 changed files with 20 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
import { AgentsController } from "./agents.controller";
import { QueueService } from "../../queue/queue.service";
import { AgentSpawnerService } from "../../spawner/agent-spawner.service";
import { AgentLifecycleService } from "../../spawner/agent-lifecycle.service";
import { KillswitchService } from "../../killswitch/killswitch.service";
import type { KillAllResult } from "../../killswitch/killswitch.service";
@@ -17,6 +18,9 @@ describe("AgentsController - Killswitch Endpoints", () => {
let mockSpawnerService: {
spawnAgent: ReturnType<typeof vi.fn>;
};
let mockLifecycleService: {
getAgentLifecycleState: ReturnType<typeof vi.fn>;
};
beforeEach(() => {
mockKillswitchService = {
@@ -32,9 +36,14 @@ describe("AgentsController - Killswitch Endpoints", () => {
spawnAgent: vi.fn(),
};
mockLifecycleService = {
getAgentLifecycleState: vi.fn(),
};
controller = new AgentsController(
mockQueueService as unknown as QueueService,
mockSpawnerService as unknown as AgentSpawnerService,
mockLifecycleService as unknown as AgentLifecycleService,
mockKillswitchService as unknown as KillswitchService
);
});