From 1fd4c2f7b38f7a0cf7587442ac4f9660ad074177 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Tue, 28 Jul 2026 23:14:32 +0200 Subject: [PATCH] =?UTF-8?q?docs(api):=20note=20the=20fa=C3=A7ade=20guard's?= =?UTF-8?q?=20intended=20scope=20boundary=20(type-name=20clashes=20are=20t?= =?UTF-8?q?sc-caught)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lib/api/facade.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/lib/api/facade.test.ts b/frontend/src/lib/api/facade.test.ts index 64deace..4ac8b5e 100644 --- a/frontend/src/lib/api/facade.test.ts +++ b/frontend/src/lib/api/facade.test.ts @@ -4,6 +4,13 @@ import { describe, it, expect, beforeAll } from "vitest"; // mechanise the two invariants that make that structure safe — so a future edit that reintroduces // the interleave (a method dropped into two slices → a silent last-wins spread override) or bloats // the barrel (a method defined inline instead of in a domain module) fails CI instead of shipping. +// +// Scope, on purpose: this covers RUNTIME method-key collisions — the only *silent* failure mode, +// since tsc does not flag overlapping spread keys. It deliberately does NOT cover exported-TYPE-name +// clashes across slices (two slices exporting the same interface name): types are erased at runtime +// so they're invisible here, and that case is already build-caught — the barrel's `export type *` +// makes the ambiguous name a downstream tsc "no exported member" error, so nothing ships. Left to +// tsc rather than re-checked by a fragile source parse. type Slice = Record;