From 5a963a63e8b4525cde63a17dee37caaa24e5424e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 15:00:46 +0000 Subject: [PATCH] Add runtime-core architecture boundary regression tests Co-authored-by: Theo Browne --- .../src/runtimeCoreArchitecture.test.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/runtime-core/src/runtimeCoreArchitecture.test.ts diff --git a/packages/runtime-core/src/runtimeCoreArchitecture.test.ts b/packages/runtime-core/src/runtimeCoreArchitecture.test.ts new file mode 100644 index 0000000000..e7945b1e46 --- /dev/null +++ b/packages/runtime-core/src/runtimeCoreArchitecture.test.ts @@ -0,0 +1,24 @@ +import fs from "node:fs"; +import path from "node:path"; +import { describe, expect, it } from "vitest"; + +const SOURCE_FILES = [ + "index.ts", + "processManager.ts", + "todoStore.ts", + "providerManager.ts", + "codexAppServerManager.ts", +] as const; + +describe("runtime-core architecture boundaries", () => { + for (const fileName of SOURCE_FILES) { + it(`${fileName} does not reach into app-layer paths`, () => { + const filePath = path.resolve(import.meta.dirname, fileName); + const source = fs.readFileSync(filePath, "utf8"); + + expect(source).not.toContain("../apps/"); + expect(source).not.toContain("../../apps/"); + expect(source).not.toContain("../../../apps/"); + }); + } +});