fix(x): FakeTurnEventBus satisfies ITurnEventBus

The interface grew subscribe/subscribeAll when the IPC bridge moved
to resolving ITurnEventBus, but the runtime-test fake still only had
publish — a TS2739 invisible to vitest and the build tsconfig. The
fake now declares 'implements ITurnEventBus' so the next interface
change fails loudly here instead of silently drifting.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Ramnique Singh 2026-07-10 16:19:25 +05:30
parent de84b2e9ce
commit 05eb94cd3a

View file

@ -15,6 +15,7 @@ import type { IAgentResolver } from "./agent-resolver.js";
import type { TurnExecution, TurnOutcome } from "./api.js"; import type { TurnExecution, TurnOutcome } from "./api.js";
import { TurnDependencyError, TurnInputError } from "./api.js"; import { TurnDependencyError, TurnInputError } from "./api.js";
import type { TurnLifecycleEvent } from "./bus.js"; import type { TurnLifecycleEvent } from "./bus.js";
import type { ITurnEventBus } from "./event-hub.js";
import { TurnRepoContextResolver } from "./context-resolver.js"; import { TurnRepoContextResolver } from "./context-resolver.js";
import { InMemoryTurnRepo } from "./in-memory-turn-repo.js"; import { InMemoryTurnRepo } from "./in-memory-turn-repo.js";
import type { import type {
@ -278,11 +279,17 @@ class FakeBus {
} }
} }
class FakeTurnEventBus { class FakeTurnEventBus implements ITurnEventBus {
events: TurnBusEvent[] = []; events: TurnBusEvent[] = [];
publish(event: TurnBusEvent): void { publish(event: TurnBusEvent): void {
this.events.push(event); this.events.push(event);
} }
subscribe(): () => void {
return () => {};
}
subscribeAll(): () => void {
return () => {};
}
} }
class FakeIdGen { class FakeIdGen {