Skip to content
Open
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
Binary file added .github/pr-assets/5693-health-codex-harness.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion services/runner/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
27 changes: 27 additions & 0 deletions services/runner/tests/unit/version.test.ts
Original file line number Diff line number Diff line change
@@ -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"));
});
});