Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/drivers/codex-fixture-mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export function createFixtureLauncher(cwd: string, resultPath: string, timeoutMs
RIG_JUDGE_ENGINE: "codex",
RIG_DEBUG: "agent:failure,engine:codex:create,engine:codex:close",
GITHUB_WORKSPACE: cwd,
TMPDIR: "/tmp",
};
for (const name of ["PATH", "HOME", "LANG", "TMPDIR", "NODE_EXTRA_CA_CERTS", "SSL_CERT_FILE"]) {
for (const name of ["PATH", "HOME", "LANG", "NODE_EXTRA_CA_CERTS", "SSL_CERT_FILE"]) {
if (process.env[name] !== undefined) env[name] = process.env[name];
}
const output = await new Promise<string>((resolve, reject) => {
Expand Down
5 changes: 4 additions & 1 deletion src/codex-fixture-mcp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ it("runs only the checked-in fixture and persists independently validated output
vi.stubEnv("GITHUB_TOKEN", "upstream-secret");
vi.stubEnv("CODEX_API_KEY", "upstream-key");
vi.stubEnv("COPILOT_CONNECTION_TOKEN", "connection-secret");
vi.stubEnv("TMPDIR", "/tmp/gh-aw-runtime-inaccessible");
const launch = createFixtureLauncher("/checkout", "/output.json");
expect(await launch()).toEqual(result);
expect(mocks.readFile.mock.calls.map(([path]) => path)).toEqual([
Expand All @@ -57,6 +58,8 @@ it("runs only the checked-in fixture and persists independently validated output
expect(args).toContain(`--userspec=${process.getuid?.() ?? 1001}:${process.getgid?.() ?? 1001}`);
expect(args).toContain("/usr/bin/env");
expect(args).toContain("-i");
expect(args).toContain("TMPDIR=/tmp");
expect(args).not.toContain("TMPDIR=/tmp/gh-aw-runtime-inaccessible");
expect(args).toContain("/usr/bin/timeout");
expect(args.slice(-3)).toEqual([process.execPath, "/checkout/.github/drivers/codex-fixture-mcp.ts", "--run-fixture"]);
expect(args.join(" ")).not.toContain("upstream-secret");
Expand All @@ -65,7 +68,7 @@ it("runs only the checked-in fixture and persists independently validated output
expect(options.cwd).toBe("/checkout");
expect(options.env).toMatchObject({
CODEX_API_KEY: "awf-proxy", CODEX_HOME: "/tmp/gh-aw/mcp-config",
GH_AW_MODEL_AGENT_CODEX: "gpt-5.3-codex", RIG_JUDGE_ENGINE: "codex",
GH_AW_MODEL_AGENT_CODEX: "gpt-5.3-codex", RIG_JUDGE_ENGINE: "codex", TMPDIR: "/tmp",
});
for (const name of ["GITHUB_TOKEN", "COPILOT_CONNECTION_TOKEN", "COPILOT_GITHUB_TOKEN", "OPENAI_API_KEY", "RIG_FIXTURE_MCP_TOKEN"]) {
expect(options.env[name]).toBeUndefined();
Expand Down