fix: preserve Codex policies and credential refresh during setup

Restore actor guards before runner resolution and gated experimental provider access. Keep existing legacy fixtures explicit and synchronize documentation anchors.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-09 10:12:15 -05:00
1 parent eaabc5c624
commit 38199ea8e6
25 files changed
+354 -107

No files matched your search

-24
View File
@@ -1,24 +0,0 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { adaptersApi } from "./adapters";
import { api } from "./client";
import { queryKeys } from "../lib/queryKeys";
afterEach(() => vi.restoreAllMocks());
describe("adapter availability discovery", () => {
it("keeps inventory unscoped and sends the selected company and target", async () => {
const get = vi.spyOn(api, "get").mockResolvedValue([]);
await adaptersApi.list();
await adaptersApi.list({ companyId: "company-1", environmentId: "linux ssh" });
await adaptersApi.list({ companyId: "company-2", environmentId: null });
expect(get.mock.calls.map(([path]) => path)).toEqual([
"/adapters", "/adapters?companyId=company-1&environmentId=linux+ssh", "/adapters?companyId=company-2",
]);
});
it("isolates target availability from inventory, other targets, and other companies", () => {
const selected = queryKeys.adapters.availability("company-1", "linux");
expect(selected).not.toEqual(queryKeys.adapters.all);
expect(selected).not.toEqual(queryKeys.adapters.availability("company-1", "mac"));
expect(selected).not.toEqual(queryKeys.adapters.availability("company-2", "linux"));
});
});