/** * Per-read-model kill switch — RFC-003 §0. * * Contract: * - `isEnabled(name)` returns whether the named read model should * serve queries. When `false`, callers MUST fail open to the * write-model path. * - Implementations MUST be hot-readable (no restart required). * - The check is evaluated per-call so that a flag toggled mid-request * is honoured on the NEXT repository call within the same request. * In-flight calls complete against whichever source they already * started on. */ export const READ_MODEL_KILL_SWITCH = Symbol('READ_MODEL_KILL_SWITCH'); export interface IReadModelKillSwitch { /** * Returns `true` when the named read model is active and safe to query. * Returns `true` (fail-open) for unknown / un-configured names so that * an absent config key never blocks the write-model fallback path. */ isEnabled(readModelName: string): boolean; }