diff --git a/.dependency-cruiser.json b/.dependency-cruiser.json index 133c1641..c3c50d5d 100644 --- a/.dependency-cruiser.json +++ b/.dependency-cruiser.json @@ -251,7 +251,7 @@ }, { "name": "adapters-do-not-know-other-concrete-adapters", - "comment": "docs/architecture/layers.md §4: a concrete adapter never depends on another concrete adapter. The adapter kernel is shared on purpose and any adapter may import it: src/adapters/platform/** (clock, abort primitive, capacity guard), src/adapters/browser-file-storage/result.ts (browser-data result helpers) and src/adapters/cross-context-invalidation/index.ts (the cross-context invalidation transport and its types). Owner: frontend-platform. No new file-level exception is added here; a new shared primitive goes into src/adapters/platform/.", + "comment": "docs/architecture/layers.md §4: a concrete adapter never depends on another concrete adapter. The adapter kernel is shared on purpose and any adapter may import it: src/adapters/platform/** (shared mechanisms only: clock, abort primitive, capacity guard, IndexedDB connection and transaction, Retry-After, JSON member scanner; plus two bootstrap-only services, see layers.md), src/adapters/browser-file-storage/result.ts (browser-data result helpers) and src/adapters/cross-context-invalidation/index.ts (the cross-context invalidation transport and its types). Owner: frontend-platform. No new file-level exception is added here; a new shared primitive goes into src/adapters/platform/.", "severity": "error", "from": { "path": "^src/adapters/([^/]+)/" diff --git a/docs/architecture/layers.md b/docs/architecture/layers.md index 973e6e6a..63d25c2c 100644 --- a/docs/architecture/layers.md +++ b/docs/architecture/layers.md @@ -80,8 +80,14 @@ passing. which is shared on purpose and is the only adapter code an adapter may reach across a group for: -- `src/adapters/platform/**` — the system clock, the shared abort primitive and - the bounded-capacity guard +- `src/adapters/platform/**` — mechanisms more than one adapter group shares: + the system clock, the shared abort primitive, the bounded-capacity guard, + the IndexedDB connection and transaction helpers, `Retry-After` parsing and + the JSON member scanner. Two bootstrap-only platform services live there + too: the browser lifecycle runtime and the mutation intent factory (no + adapter imports them). A kernel file owns mechanics only, never names, + schemas, failure codes or observation shapes; the full list of what it must + never own is at the top of `indexeddb-connection.ts` - `src/adapters/browser-file-storage/result.ts` — the browser-data result and failure constructors - `src/adapters/cross-context-invalidation/index.ts` — the cross-context