Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

test: restore backend and reference-provider integration coverage

dee038bb63a2961
diff --git a/backend/src/lib/providerLink.realProvider.e2e.test.ts b/backend/src/lib/providerLink.realProvider.e2e.test.ts
index 54fdaa880..7b470ec99 100644
--- a/backend/src/lib/providerLink.realProvider.e2e.test.ts
+++ b/backend/src/lib/providerLink.realProvider.e2e.test.ts
@@ -1,4 +1,4 @@
-// The WHOLE chain, across both repositories:
+// The WHOLE chain, across the backend and provider packages:
//
// client frame → providerLink → HTTP/SSE → the real reference-provider → frames back
//
@@ -16,8 +16,8 @@ import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vites
const ENABLED = process.env.PROVIDER_E2E === '1'
const HERE = dirname(fileURLToPath(import.meta.url))
-/** The published contract lives in a sibling checkout. */
-const PROVIDER_DIR = resolve(HERE, '../../../../../autonomous-harness/provider/reference-provider')
+/** Exercise the reference implementation shipped in this monorepo. */
+const PROVIDER_DIR = resolve(HERE, '../../../provider/reference-provider')
const published = vi.hoisted(() => [] as Array<{ machineId: string; frame: { type?: string; payload?: Record<string, unknown> } }>)
const binding = vi.hoisted(() => ({ current: null as Record<string, unknown> | null }))
@@ -81,7 +81,7 @@ describeIf('the real chain, against the published reference-provider', () => {
if (!existsSync(PROVIDER_DIR)) {
throw new Error(
`PROVIDER_E2E=1 but the published provider is not at ${PROVIDER_DIR}. `
- + 'Check out autonomous-ai/autonomous-harness beside this repository, or unset PROVIDER_E2E.',
+ + 'Install dependencies in provider/reference-provider before running this suite.',
)
}
baseUrl = await bootPublishedProvider()
diff --git a/backend/src/lib/terminalRouting.test.ts b/backend/src/lib/terminalRouting.test.ts
index df76dc855..44f618375 100644
--- a/backend/src/lib/terminalRouting.test.ts
+++ b/backend/src/lib/terminalRouting.test.ts
@@ -6,6 +6,11 @@ const bus = vi.hoisted(() => ({
publishDown: vi.fn(async () => 1),
}))
+// These are remote machines; provider routing and its database lookup have their own suite.
+vi.mock('./providerLink.js', () => ({
+ routeDown: async (_machine: string, _down: unknown, fallback: () => Promise<number>) => fallback(),
+}))
+
vi.mock('./bus.js', () => ({
subscribeUp: async () => () => undefined,
subscribeTerminalUp: async () => () => undefined,