diff --git a/.github/pr-assets/5693-health-codex-harness.png b/.github/pr-assets/5693-health-codex-harness.png new file mode 100644 index 0000000000..7f473e9b09 Binary files /dev/null and b/.github/pr-assets/5693-health-codex-harness.png differ diff --git a/services/runner/src/version.ts b/services/runner/src/version.ts index 185460f3fe..48fa7ec737 100644 --- a/services/runner/src/version.ts +++ b/services/runner/src/version.ts @@ -12,7 +12,7 @@ import pkg from "../package.json"; export const PROTOCOL_VERSION = 1; export const RUNNER_VERSION: string = pkg.version; export const ENGINES = ["sandbox-agent"] as const; -export const HARNESS_KINDS = ["pi_core", "claude", "pi_agenta"] as const; +export const HARNESS_KINDS = ["pi_core", "claude", "pi_agenta", "codex"] as const; export interface RunnerInfo { status: "ok"; diff --git a/services/runner/tests/unit/version.test.ts b/services/runner/tests/unit/version.test.ts new file mode 100644 index 0000000000..82b3b7ee88 --- /dev/null +++ b/services/runner/tests/unit/version.test.ts @@ -0,0 +1,27 @@ +/** + * Unit test for the runner's `/health` identity payload (`src/version.ts`). + * + * `HARNESS_KINDS` is a hardcoded list whose only consumer is `runnerInfo().harnesses` — nothing + * is gated on it, but a client probing `/health` uses it to learn what the runner supports. Codex + * became a harness of its own (its own model catalog, its own `CODEX_HOME` setup) without this + * list being extended, so `/health` under-reported it (#5693). + */ +import { describe, it } from "vitest"; +import assert from "node:assert/strict"; + +import { HARNESS_KINDS, runnerInfo } from "../../src/version.ts"; + +describe("HARNESS_KINDS", () => { + it("lists codex alongside the other harnesses the runner drives", () => { + assert.deepEqual( + [...HARNESS_KINDS].sort(), + ["claude", "codex", "pi_agenta", "pi_core"].sort(), + ); + }); +}); + +describe("runnerInfo", () => { + it("surfaces codex in the /health payload's harnesses list", () => { + assert.ok(runnerInfo().harnesses.includes("codex")); + }); +});