merge: retain explicit Legacy acceptance fixture boundaries

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* codex/claude-runner-default:
  test(claude): preserve explicit Legacy fixture boundaries
This commit is contained in:
DottaandPaperclip committed 2026-10-12 17:18:55 -05:00
commit 137e5bf399
5 files changed
+13 -5

No files matched your search

@@ -133,7 +133,7 @@ describe("agent-created hires use managed AI connections", () => {
const f = await fixture("openai");
const p = await poolFixture(f);
await db.update(agents).set({ runtimeConfig: { aiConnection: p.binding } }).where(eq(agents.id, f.agentId));
const response = await request(f.app).post(`/api/companies/${f.companyId}/agent-hires`).send({ name: "Incompatible teammate", role: "engineer", adapterType: "claude_local" });
const response = await request(f.app).post(`/api/companies/${f.companyId}/agent-hires`).send({ name: "Incompatible teammate", role: "engineer", adapterType: "claude_local", runner: "legacy" });
expect(response.status, JSON.stringify(response.body)).toBe(422);
// Fixed bindings contain identity only; compatibility is decided from
// authoritative connection metadata when selecting each pool member.
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
import { promises as fs } from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
import { eq } from "drizzle-orm";
import { agents, companies, createDb } from "@paperclipai/db";
import {
@@ -11,6 +11,14 @@ import {
} from "./helpers/embedded-postgres.js";
import { teamsCatalogService } from "../services/teams-catalog.js";
// Bind the real creation resolver to the release target under test so the
// catalog contract is stable across the machines running this fixture.
vi.mock("../services/agent-runner-selection.js", async importOriginal => {
const actual = await importOriginal<typeof import("../services/agent-runner-selection.js")>();
return { ...actual, resolveNewAgentRunnerForCompany: async (_db: unknown, _companyId: string, input: Parameters<typeof actual.resolveNewAgentRunnerForCompany>[2]) =>
actual.resolveNewAgentRunner({ ...input, target: { driver: "local", platform: "linux", architecture: "x64", libc: "glibc", glibcVersion: "2.39" } }) };
});
const embeddedPostgresSupport = await getEmbeddedPostgresTestSupport();
const describeEmbeddedPostgres = embeddedPostgresSupport.supported ? describe : describe.skip;
@@ -106,7 +106,7 @@ const support = await getEmbeddedPostgresTestSupport();
const probe = vi.spyOn(adapter, "testEnvironment").mockResolvedValue({ adapterType, status: "warn",
testedAt: new Date().toISOString(), checks: [{ code: `${adapterType.split("_")[0]}_hello_probe_auth_required`, level: "warn", message: "Login required" }] });
try {
const agent = await createAgentLifecycle(db).requestHire(companyId, { name: "Login test", adapterType });
const agent = await createAgentLifecycle(db).requestHire(companyId, { name: "Login test", adapterType, runner: "legacy" });
const work = worker(createLifecycleDriver(db, {} as never).runHost);
await work.process(agent.id);
expect(probe).toHaveBeenCalled();
+1 -1
View File
@@ -18,7 +18,7 @@ for (const { unfinishedWrite, stopResponse } of [{ unfinishedWrite: false, stopR
try {
await json(await request.patch("/api/instance/settings/experimental", { data: { enableClassicTaskInterface: false } }));
const owner = await json(await request.post(`/api/companies/${company.id}/agents`, { data: {
name: "ACP Stop fixture", role: "engineer", adapterType: "claude_local",
name: "ACP Stop fixture", role: "engineer", adapterType: "claude_local", runner: "legacy",
adapterConfig: { engine: "acp", cwd: root, stateDir: path.join(root, "state"),
agentCommand: `${JSON.stringify(process.execPath)} ${JSON.stringify(path.resolve("scripts/mcp-fixtures/servers/acp-stop-agent.mjs"))}`,
// The ACP fixture has no provider login. Use a fixture key to keep setup offline.
@@ -24,7 +24,7 @@ for (const action of ["task_retry", "thread_retry", "inbox_retry", "message", "q
try {
await writeFile(path.join(root, "continued"), "ready");
const agent = await json(await request.post(`/api/companies/${company.id}/agents`, { data: {
name: "Recovery fixture", role: "engineer", adapterType: "claude_local",
name: "Recovery fixture", role: "engineer", adapterType: "claude_local", runner: "legacy",
adapterConfig: { engine: "acp", cwd: root, stateDir: path.join(root, "state"),
agentCommand: `${JSON.stringify(process.execPath)} ${JSON.stringify(path.resolve("scripts/mcp-fixtures/servers/acp-stop-agent.mjs"))}`,
// The ACP fixture has no provider login. Use a fixture key to keep setup offline.