feat(navigation): bind binders accept (realtime, realtimeRegistry) params

Extend bindProductionNavigation and bindDevSeedNavigation to 7-arg signatures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 22:41:16 +02:00
parent 579c5911fd
commit 9b7878a623
4 changed files with 17 additions and 5 deletions

View File

@@ -1,7 +1,8 @@
import "reflect-metadata";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { NoopTracer, NoopLogger } from "@repo/core-shared/instrumentation";
import { RecordingEventBus, RecordingJobQueue } from "@repo/core-testing/instrumentation";
import { RecordingEventBus, RecordingJobQueue, RecordingRealtimeBroadcaster } from "@repo/core-testing/instrumentation";
import { RealtimeHandlerRegistry } from "@repo/core-realtime";
import { bindDevSeedNavigation } from "@/di/bind-dev-seed";
import { navigationContainer } from "@/di/container";
import { NAVIGATION_SYMBOLS } from "@/di/symbols";
@@ -32,7 +33,7 @@ describe("bindDevSeedNavigation", () => {
});
it("populates the header repository with the dev header", async () => {
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue());
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue(), new RecordingRealtimeBroadcaster(), new RealtimeHandlerRegistry());
const repo = navigationContainer.get<IHeaderRepository>(
NAVIGATION_SYMBOLS.IHeaderRepository,
@@ -43,7 +44,7 @@ describe("bindDevSeedNavigation", () => {
});
it("seeds a header with a non-empty items array", async () => {
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue());
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue(), new RecordingRealtimeBroadcaster(), new RealtimeHandlerRegistry());
const repo = navigationContainer.get<IHeaderRepository>(
NAVIGATION_SYMBOLS.IHeaderRepository,
@@ -57,13 +58,13 @@ describe("bindDevSeedNavigation", () => {
});
it("is idempotent — calling twice rebuilds a fresh populated repo", async () => {
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue());
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue(), new RecordingRealtimeBroadcaster(), new RealtimeHandlerRegistry());
const before = navigationContainer.get<IHeaderRepository>(
NAVIGATION_SYMBOLS.IHeaderRepository,
);
const beforeHeader = await before.getHeader();
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue());
await bindDevSeedNavigation(noop.tracer, noop.logger, new RecordingEventBus(), new RecordingJobQueue(), new RecordingRealtimeBroadcaster(), new RealtimeHandlerRegistry());
const after = navigationContainer.get<IHeaderRepository>(
NAVIGATION_SYMBOLS.IHeaderRepository,
);

View File

@@ -6,6 +6,7 @@ import {
type ILogger,
} from "@repo/core-shared/instrumentation";
import type { IEventBus } from "@repo/core-events";
import type { IRealtimeBroadcaster, IRealtimeHandlerRegistry } from "@repo/core-realtime";
import type { IJobQueue } from "@repo/core-shared/jobs";
import { navigationContainer } from "./container.js";
import { NAVIGATION_SYMBOLS } from "./symbols.js";
@@ -31,6 +32,8 @@ export async function bindDevSeedNavigation(
logger: ILogger,
bus: IEventBus,
queue: IJobQueue,
realtime: IRealtimeBroadcaster,
realtimeRegistry: IRealtimeHandlerRegistry,
): Promise<void> {
// Bind shared instrumentation into feature container
if (navigationContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
@@ -88,6 +91,8 @@ export async function bindDevSeedNavigation(
// output at the <gen:event-handlers> / <gen:jobs> anchors below.
void bus;
void queue;
void realtime;
void realtimeRegistry;
// <gen:event-handlers>
// <gen:jobs>
// <gen:realtime-handlers>

View File

@@ -7,6 +7,7 @@ import {
type ILogger,
} from "@repo/core-shared/instrumentation";
import type { IEventBus } from "@repo/core-events";
import type { IRealtimeBroadcaster, IRealtimeHandlerRegistry } from "@repo/core-realtime";
import type { IJobQueue } from "@repo/core-shared/jobs";
import { navigationContainer } from "./container";
import { NAVIGATION_SYMBOLS } from "./symbols";
@@ -20,6 +21,8 @@ export function bindProductionNavigation(
logger: ILogger,
bus: IEventBus,
queue: IJobQueue,
realtime: IRealtimeBroadcaster,
realtimeRegistry: IRealtimeHandlerRegistry,
): void {
// Bind shared instrumentation into feature container
if (navigationContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
@@ -79,6 +82,8 @@ export function bindProductionNavigation(
// output at the <gen:event-handlers> / <gen:jobs> anchors below.
void bus;
void queue;
void realtime;
void realtimeRegistry;
// <gen:event-handlers>
// <gen:jobs>
// <gen:realtime-handlers>