From 3a6115924b26dbc53d6c8b92731a650a206ea783 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Tue, 12 May 2026 22:53:06 +0200 Subject: [PATCH] feat(auth): bindProductionAuth self-asserts conformance at tail Co-Authored-By: Claude Sonnet 4.6 --- packages/auth/src/di/bind-production.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/auth/src/di/bind-production.ts b/packages/auth/src/di/bind-production.ts index 94d5868..b422fb0 100644 --- a/packages/auth/src/di/bind-production.ts +++ b/packages/auth/src/di/bind-production.ts @@ -6,7 +6,9 @@ import { type ILogger, } from "@repo/core-shared/instrumentation"; import type { BindProductionContext } from "@repo/core-shared/di"; +import { assertFeatureConformance } from "@repo/core-shared/conformance"; import type { ProductionUseCase } from "@repo/core-shared/conformance"; +import { authManifest } from "../feature.manifest"; import type { AuthManifest } from "../feature.manifest"; import type { SignInInput, @@ -158,4 +160,17 @@ export function bindProductionAuth(ctx: BindProductionContext): void { // // // + + // Boot-time conformance check: refuses to start if any use-case binding + // is missing a required brand (withSpan / withCapture / withAudit). + assertFeatureConformance( + authContainer, + authManifest, + { + signIn: AUTH_SYMBOLS.ISignInUseCase, + signUp: AUTH_SYMBOLS.ISignUpUseCase, + signOut: AUTH_SYMBOLS.ISignOutUseCase, + }, + ctx, + ); }