From c27785271bb372e2849e4bd3f003941350df769b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 14:51:50 +0000 Subject: [PATCH] Enforce t3 runtime service boundary through runtime-core Co-authored-by: Theo Browne --- apps/t3/src/runtimeArchitecture.test.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 apps/t3/src/runtimeArchitecture.test.ts diff --git a/apps/t3/src/runtimeArchitecture.test.ts b/apps/t3/src/runtimeArchitecture.test.ts new file mode 100644 index 0000000000..c7fd239038 --- /dev/null +++ b/apps/t3/src/runtimeArchitecture.test.ts @@ -0,0 +1,24 @@ +import fs from "node:fs"; +import path from "node:path"; +import { describe, expect, it } from "vitest"; + +describe("runtime architecture boundaries", () => { + it("keeps runtime API server wired through runtime-core services", () => { + const sourcePath = path.resolve(import.meta.dirname, "runtimeApiServer.ts"); + const source = fs.readFileSync(sourcePath, "utf8"); + + expect(source).toContain("from \"@acme/runtime-core\""); + expect(source).toContain("ProcessManager"); + expect(source).toContain("ProviderManager"); + expect(source).toContain("TodoStore"); + }); + + it("avoids direct desktop service imports in runtime API server", () => { + const sourcePath = path.resolve(import.meta.dirname, "runtimeApiServer.ts"); + const source = fs.readFileSync(sourcePath, "utf8"); + + expect(source).not.toContain("../../desktop/src/processManager"); + expect(source).not.toContain("../../desktop/src/providerManager"); + expect(source).not.toContain("../../desktop/src/todoStore"); + }); +});