import type { IProcessingRestriction } from "./processing-restriction.interface"; /** * Volatile in-memory IProcessingRestriction. Tracks restriction state in * memory; state is lost on process restart. * * Used in dev-seed and storybook contexts where Payload is unavailable. * Not a recording double — use RecordingProcessingRestriction from * @repo/core-testing for call-assertion in unit tests. */ export class InMemoryProcessingRestriction implements IProcessingRestriction { private readonly restricted = new Set(); async setRestriction(subjectId: string, granted: boolean): Promise { if (granted) { this.restricted.add(subjectId); } else { this.restricted.delete(subjectId); } } async isRestricted(subjectId: string): Promise { return this.restricted.has(subjectId); } }