@tokenfactory/acc-runner 0.30.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +48 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +183 -8
- package/dist/doctor.js.map +1 -1
- package/dist/engines/claude-code.d.ts +9 -0
- package/dist/engines/claude-code.d.ts.map +1 -0
- package/dist/engines/claude-code.js +95 -0
- package/dist/engines/claude-code.js.map +1 -0
- package/dist/engines/codex.d.ts +27 -0
- package/dist/engines/codex.d.ts.map +1 -0
- package/dist/engines/codex.js +178 -0
- package/dist/engines/codex.js.map +1 -0
- package/dist/engines/registry.d.ts +18 -0
- package/dist/engines/registry.d.ts.map +1 -0
- package/dist/engines/registry.js +26 -0
- package/dist/engines/registry.js.map +1 -0
- package/dist/engines/types.d.ts +73 -0
- package/dist/engines/types.d.ts.map +1 -0
- package/dist/engines/types.js +2 -0
- package/dist/engines/types.js.map +1 -0
- package/dist/failure-classifier.d.ts +32 -1
- package/dist/failure-classifier.d.ts.map +1 -1
- package/dist/failure-classifier.js +193 -1
- package/dist/failure-classifier.js.map +1 -1
- package/dist/git.d.ts +10 -0
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +6 -0
- package/dist/git.js.map +1 -1
- package/dist/login.d.ts +26 -0
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +39 -1
- package/dist/login.js.map +1 -1
- package/dist/pr-body.d.ts +53 -0
- package/dist/pr-body.d.ts.map +1 -0
- package/dist/pr-body.js +154 -0
- package/dist/pr-body.js.map +1 -0
- package/dist/prepr-gate.d.ts +132 -2
- package/dist/prepr-gate.d.ts.map +1 -1
- package/dist/prepr-gate.js +260 -9
- package/dist/prepr-gate.js.map +1 -1
- package/dist/provider-auth.d.ts +120 -0
- package/dist/provider-auth.d.ts.map +1 -0
- package/dist/provider-auth.js +184 -0
- package/dist/provider-auth.js.map +1 -0
- package/dist/review-diff-guard.d.ts +12 -0
- package/dist/review-diff-guard.d.ts.map +1 -0
- package/dist/review-diff-guard.js +52 -0
- package/dist/review-diff-guard.js.map +1 -0
- package/dist/review-worktree-cleanup.d.ts +73 -0
- package/dist/review-worktree-cleanup.d.ts.map +1 -0
- package/dist/review-worktree-cleanup.js +103 -0
- package/dist/review-worktree-cleanup.js.map +1 -0
- package/dist/runtime/reviewer.d.ts.map +1 -1
- package/dist/runtime/reviewer.js +72 -29
- package/dist/runtime/reviewer.js.map +1 -1
- package/dist/runtime/worktree.d.ts.map +1 -1
- package/dist/runtime/worktree.js +8 -3
- package/dist/runtime/worktree.js.map +1 -1
- package/dist/task-runner.d.ts +1 -8
- package/dist/task-runner.d.ts.map +1 -1
- package/dist/task-runner.js +65 -66
- package/dist/task-runner.js.map +1 -1
- package/dist/watch.d.ts.map +1 -1
- package/dist/watch.js +36 -3
- package/dist/watch.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/engines/codex.ts"],"names":[],"mappings":"AAqBA,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAoC,MAAM,YAAY,CAAC;AAIhF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAGhF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAKhE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,MAAM,CAAC,UAAwB,GAAG,aAAa,CAG1F;AAiHD,eAAO,MAAM,WAAW,EAAE,WAUzB,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M4 (ENGINE-CODEX): the `codex` engine — the first non-Anthropic build
|
|
3
|
+
* engine, driving the OpenAI Codex CLI (`codex exec --json`). This is the
|
|
4
|
+
* HIGHEST-RISK track in the multi-model program: a mis-mapped OpenAI quota
|
|
5
|
+
* error would re-create the capacity pause-loop deadlock with a new provider
|
|
6
|
+
* (plan §0.1.5 / §3.3), so the failure classification (classifyCodexExit in
|
|
7
|
+
* failure-classifier.ts) is the P0 surface and is exhaustively fixture-tested.
|
|
8
|
+
*
|
|
9
|
+
* SHIPS FLAG-OFF. `codexEngineEnabled()` defaults false and the engine is NOT
|
|
10
|
+
* registered in engines/registry.ts, so the default fleet is byte-for-byte
|
|
11
|
+
* unaffected. Wiring the flag into the registry + the subscription→api-key
|
|
12
|
+
* spill orchestration is M5 (dispatch); this track only ships the engine, its
|
|
13
|
+
* classification, its auth resolution, and doctor validation.
|
|
14
|
+
*
|
|
15
|
+
* Flags/output are pinned to Codex CLI v0.44+; parseResult is deliberately
|
|
16
|
+
* TOLERANT (the v0.44 tolerant-parser lesson) so a point-release event-shape
|
|
17
|
+
* drift degrades to best-effort extraction rather than a hard failure.
|
|
18
|
+
*/
|
|
19
|
+
import { execa } from "execa";
|
|
20
|
+
import { classifyCodexExit } from "../failure-classifier.js";
|
|
21
|
+
import { openaiApiKey, resolveCodexAuthPreference, initialCodexAuthMode, withOpenAiAuth, } from "../provider-auth.js";
|
|
22
|
+
const BINARY = "codex";
|
|
23
|
+
/**
|
|
24
|
+
* Feature flag: `engines.codex_enabled`. DEFAULT OFF. Truthy env forms only
|
|
25
|
+
* ("1"/"true"/"yes"/"on"). Kept as an env read (config.ts is out of this
|
|
26
|
+
* track's scope) so the engine stays fully self-contained and dead-until-wired.
|
|
27
|
+
*/
|
|
28
|
+
export function codexEngineEnabled(env = process.env) {
|
|
29
|
+
const v = (env.ACC_ENGINE_CODEX_ENABLED ?? "").trim().toLowerCase();
|
|
30
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build the argv for a headless one-shot `codex exec`. `--json` emits the
|
|
34
|
+
* structured event stream parseResult reads; the approvals/sandbox bypass is
|
|
35
|
+
* the codex analog of claude's `--dangerously-skip-permissions` — the runner is
|
|
36
|
+
* non-interactive and enforces the permission boundary one level up (worktree
|
|
37
|
+
* isolation + prepr-gate scope + zero-diff guard), so codex must not block on
|
|
38
|
+
* its own approval prompts. `--model <id>` is forwarded only when non-blank.
|
|
39
|
+
*/
|
|
40
|
+
export function buildCodexArgs(modelId) {
|
|
41
|
+
const args = ["exec", "--json", "--dangerously-bypass-approvals-and-sandbox"];
|
|
42
|
+
const trimmed = (modelId ?? "").trim();
|
|
43
|
+
if (trimmed)
|
|
44
|
+
args.push("--model", trimmed);
|
|
45
|
+
return args;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolve the auth channel a codex spawn should START in from the environment:
|
|
49
|
+
* `ACC_CODEX_AUTH_PREFERENCE` (`subscription_first` default) + whether an
|
|
50
|
+
* OPENAI_API_KEY is present. The subscription→api-key SPILL on a cap-hit is
|
|
51
|
+
* driven by the (M5) task-runner, which re-invokes env()/spawn() with the mode
|
|
52
|
+
* pinned to "api-key" — so this only decides the first attempt.
|
|
53
|
+
*/
|
|
54
|
+
export function resolveCodexSpawnMode(base = process.env) {
|
|
55
|
+
const preference = resolveCodexAuthPreference(base.ACC_CODEX_AUTH_PREFERENCE);
|
|
56
|
+
return initialCodexAuthMode(preference, openaiApiKey(base).length > 0);
|
|
57
|
+
}
|
|
58
|
+
/** Augment the env for the resolved (first-attempt) auth channel. */
|
|
59
|
+
function codexEnv(base = process.env) {
|
|
60
|
+
return withOpenAiAuth(resolveCodexSpawnMode(base), base);
|
|
61
|
+
}
|
|
62
|
+
function spawnCodex(opts) {
|
|
63
|
+
const { cwd, modelId, baseEnv } = opts;
|
|
64
|
+
return execa(BINARY, buildCodexArgs(modelId), {
|
|
65
|
+
...(cwd !== undefined ? { cwd } : {}),
|
|
66
|
+
stdin: "pipe",
|
|
67
|
+
stdout: "pipe",
|
|
68
|
+
stderr: "pipe",
|
|
69
|
+
reject: false,
|
|
70
|
+
env: codexEnv(baseEnv),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function asRecord(v) {
|
|
74
|
+
return typeof v === "object" && v !== null ? v : null;
|
|
75
|
+
}
|
|
76
|
+
/** First non-empty string among `obj[key]` for the given candidate keys. */
|
|
77
|
+
function pickString(obj, keys) {
|
|
78
|
+
for (const k of keys) {
|
|
79
|
+
const v = obj[k];
|
|
80
|
+
if (typeof v === "string" && v.trim())
|
|
81
|
+
return v;
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
/** Map a codex/OpenAI usage object onto the shared ClaudeUsage shape. */
|
|
86
|
+
function pickUsage(obj) {
|
|
87
|
+
const u = asRecord(obj.usage);
|
|
88
|
+
if (!u)
|
|
89
|
+
return null;
|
|
90
|
+
const inTok = u.input_tokens ?? u.prompt_tokens;
|
|
91
|
+
const outTok = u.output_tokens ?? u.completion_tokens;
|
|
92
|
+
const usage = {};
|
|
93
|
+
if (typeof inTok === "number")
|
|
94
|
+
usage.input_tokens = inTok;
|
|
95
|
+
if (typeof outTok === "number")
|
|
96
|
+
usage.output_tokens = outTok;
|
|
97
|
+
return usage.input_tokens !== undefined || usage.output_tokens !== undefined ? usage : null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Tolerant parse of `codex exec --json` output into the shared result envelope.
|
|
101
|
+
* Codex emits a JSONL event STREAM (unlike claude's single object), so we scan
|
|
102
|
+
* every parseable line and keep the LAST assistant-message text, model, and
|
|
103
|
+
* usage seen — the final turn's values. A single-object output (older/newer
|
|
104
|
+
* codex) is handled by the same scan. Returns null when nothing is parseable so
|
|
105
|
+
* the caller falls back to plain-text extraction, exactly like parseClaudeJson.
|
|
106
|
+
*/
|
|
107
|
+
function parseCodexResult(stdout) {
|
|
108
|
+
const trimmed = stdout.trim();
|
|
109
|
+
if (!trimmed)
|
|
110
|
+
return null;
|
|
111
|
+
const out = {};
|
|
112
|
+
for (const line of trimmed.split(/\r?\n/)) {
|
|
113
|
+
const s = line.trim();
|
|
114
|
+
if (!s.startsWith("{"))
|
|
115
|
+
continue;
|
|
116
|
+
let parsed;
|
|
117
|
+
try {
|
|
118
|
+
parsed = JSON.parse(s);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const obj = asRecord(parsed);
|
|
124
|
+
if (!obj)
|
|
125
|
+
continue;
|
|
126
|
+
// The message text can live at the top level or nested under item/msg/response.
|
|
127
|
+
const nested = asRecord(obj.item) ?? asRecord(obj.msg) ?? asRecord(obj.response);
|
|
128
|
+
const text = pickString(obj, ["result", "text", "message", "content"]) ??
|
|
129
|
+
(nested ? pickString(nested, ["text", "message", "content", "output_text"]) : null);
|
|
130
|
+
if (text)
|
|
131
|
+
out.result = text;
|
|
132
|
+
const model = pickString(obj, ["model"]) ?? (nested ? pickString(nested, ["model"]) : null);
|
|
133
|
+
if (model)
|
|
134
|
+
out.model = model;
|
|
135
|
+
const usage = pickUsage(obj) ?? (nested ? pickUsage(nested) : null);
|
|
136
|
+
if (usage)
|
|
137
|
+
out.usage = usage;
|
|
138
|
+
}
|
|
139
|
+
return out.result !== undefined || out.model !== undefined || out.usage !== undefined
|
|
140
|
+
? out
|
|
141
|
+
: null;
|
|
142
|
+
}
|
|
143
|
+
function classifyCodexFailure(exitCode, stderr, stdout, durationMs) {
|
|
144
|
+
return classifyCodexExit(exitCode, stderr, stdout, durationMs);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Cheap health check: `codex --version`. Same contract as the claude probe —
|
|
148
|
+
* exit 0 means the binary/host is fine (a silent instant-empty exit was
|
|
149
|
+
* transient → engine_unavailable, retry), any spawn failure / non-zero exit /
|
|
150
|
+
* timeout means the binary or its deps are genuinely broken (→ env_broken).
|
|
151
|
+
*/
|
|
152
|
+
async function codexHealthProbe() {
|
|
153
|
+
try {
|
|
154
|
+
const res = await execa(BINARY, ["--version"], { reject: false, timeout: 5_000, env: process.env });
|
|
155
|
+
if (res.exitCode === 0) {
|
|
156
|
+
return { ok: true, detail: (res.stdout || "").trim().slice(0, 200) || "codex --version ok" };
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
ok: false,
|
|
160
|
+
detail: `codex --version exited ${res.exitCode ?? "signal"}: ${(res.stderr || "").trim().slice(0, 200)}`,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
return { ok: false, detail: `codex --version spawn failed: ${err.message}` };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
export const codexEngine = {
|
|
168
|
+
id: "codex",
|
|
169
|
+
binary: BINARY,
|
|
170
|
+
authMode: "api-key-or-subscription",
|
|
171
|
+
buildArgs: buildCodexArgs,
|
|
172
|
+
env: codexEnv,
|
|
173
|
+
spawn: spawnCodex,
|
|
174
|
+
parseResult: parseCodexResult,
|
|
175
|
+
classifyFailure: classifyCodexFailure,
|
|
176
|
+
healthProbe: codexHealthProbe,
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/engines/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,EAA0B,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAuB,MAAM,0BAA0B,CAAC;AAClF,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,cAAc,GAEf,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,GAAG,OAAO,CAAC;AAEvB;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACrE,MAAM,CAAC,GAAG,CAAC,G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ACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,0BAA0B,GAAG,CAAC,QAAQ,IAAI,QAAQ,KAAK,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;SACzG,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,iCAAkC,GAAa,CAAC,OAAO,EAAE,EAAE,CAAC;IAC1F,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,EAAE,EAAE,OAAO;IACX,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,yBAAyB;IACnC,SAAS,EAAE,cAAc;IACzB,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,gBAAgB;IAC7B,eAAe,EAAE,oBAAoB;IACrC,WAAW,EAAE,gBAAgB;CAC9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M2 (ENGINE-EXTRACT): the engine registry keyed by id. Wave 1 registers a
|
|
3
|
+
* single engine — `claude-code` — which is also the default. `getEngine()`
|
|
4
|
+
* with no id (or a blank id) returns the default, so the existing call sites
|
|
5
|
+
* that never selected an engine keep their exact behavior.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentEngine } from "./types.js";
|
|
8
|
+
/** The default engine id used when a caller does not pin one. */
|
|
9
|
+
export declare const DEFAULT_ENGINE_ID: string;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve an engine by id. A null/blank id resolves to the default. Throws on
|
|
12
|
+
* an unknown id — no Wave 1 call site passes one, so this is a guard for
|
|
13
|
+
* future multi-engine wiring, never a live path.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getEngine(id?: string | null): AgentEngine;
|
|
16
|
+
export declare function hasEngine(id: string): boolean;
|
|
17
|
+
export declare function engineIds(): string[];
|
|
18
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/engines/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO9C,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,QAAsB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAOzD;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE7C;AAED,wBAAgB,SAAS,IAAI,MAAM,EAAE,CAEpC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { claudeCodeEngine } from "./claude-code.js";
|
|
2
|
+
const ENGINES = {
|
|
3
|
+
[claudeCodeEngine.id]: claudeCodeEngine,
|
|
4
|
+
};
|
|
5
|
+
/** The default engine id used when a caller does not pin one. */
|
|
6
|
+
export const DEFAULT_ENGINE_ID = claudeCodeEngine.id;
|
|
7
|
+
/**
|
|
8
|
+
* Resolve an engine by id. A null/blank id resolves to the default. Throws on
|
|
9
|
+
* an unknown id — no Wave 1 call site passes one, so this is a guard for
|
|
10
|
+
* future multi-engine wiring, never a live path.
|
|
11
|
+
*/
|
|
12
|
+
export function getEngine(id) {
|
|
13
|
+
const key = (id ?? "").trim() || DEFAULT_ENGINE_ID;
|
|
14
|
+
const engine = ENGINES[key];
|
|
15
|
+
if (!engine) {
|
|
16
|
+
throw new Error(`unknown agent engine: ${key} (known: ${Object.keys(ENGINES).join(", ")})`);
|
|
17
|
+
}
|
|
18
|
+
return engine;
|
|
19
|
+
}
|
|
20
|
+
export function hasEngine(id) {
|
|
21
|
+
return id in ENGINES;
|
|
22
|
+
}
|
|
23
|
+
export function engineIds() {
|
|
24
|
+
return Object.keys(ENGINES);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/engines/registry.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,OAAO,GAAgC;IAC3C,CAAC,gBAAgB,CAAC,EAAE,CAAC,EAAE,gBAAgB;CACxC,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,EAAE,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EAAkB;IAC1C,MAAM,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,iBAAiB,CAAC;IACnD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,YAAY,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAU;IAClC,OAAO,EAAE,IAAI,OAAO,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M2 (ENGINE-EXTRACT): the `AgentEngine` interface abstracts the coding /
|
|
3
|
+
* review subprocess a runner drives — how to build its argv, augment its
|
|
4
|
+
* environment, spawn it, parse its structured result envelope, classify a
|
|
5
|
+
* failure into the shared class taxonomy, and probe whether the binary/host
|
|
6
|
+
* is healthy.
|
|
7
|
+
*
|
|
8
|
+
* Wave 1 ships exactly one implementation, `claude-code`, whose behavior is
|
|
9
|
+
* byte-identical to the pre-refactor inline logic that used to live in
|
|
10
|
+
* task-runner.ts and reviewer.ts. The interface + registry exist so a later
|
|
11
|
+
* wave can register additional engines without touching the drive loops.
|
|
12
|
+
*
|
|
13
|
+
* This is a PURE refactor: no DB value, telemetry value, or runner-protocol
|
|
14
|
+
* message shape changes. `failure-classifier.ts` remains the single shared
|
|
15
|
+
* class-mapper every engine's `classifyFailure` calls into.
|
|
16
|
+
*/
|
|
17
|
+
import type { ExecaChildProcess } from "execa";
|
|
18
|
+
import type { ClassifiedExit, ClaudeExitClass } from "../failure-classifier.js";
|
|
19
|
+
import type { ClaudeJsonOutput } from "../cost-pricing.js";
|
|
20
|
+
/**
|
|
21
|
+
* How an engine authenticates. Documentation + future gating.
|
|
22
|
+
* - claude-code: "api-key-or-oauth" (ANTHROPIC_API_KEY else interactive OAuth).
|
|
23
|
+
* - codex (M4): "api-key-or-subscription" — OPENAI_API_KEY (api-key channel)
|
|
24
|
+
* OR a stored ChatGPT login (subscription channel); the
|
|
25
|
+
* `subscription_first` preference tries subscription, then
|
|
26
|
+
* spills to api-key on a cap-hit (see src/provider-auth.ts).
|
|
27
|
+
*/
|
|
28
|
+
export type EngineAuthMode = "api-key-or-oauth" | "api-key-or-subscription" | "api-key" | "oauth" | "subscription" | "none";
|
|
29
|
+
/**
|
|
30
|
+
* The engine-agnostic failure taxonomy is `ClaudeExitClass` verbatim so the
|
|
31
|
+
* DB/telemetry values stay frozen. The claude-code class `claude_unavailable`
|
|
32
|
+
* is the engine's spelling of the generic "engine momentarily unavailable"
|
|
33
|
+
* class (aliased below); the emitted string value never changes.
|
|
34
|
+
*/
|
|
35
|
+
export type EngineFailureClass = ClaudeExitClass;
|
|
36
|
+
/** The low-level parse of the engine's structured stdout envelope (null = not the JSON form). */
|
|
37
|
+
export type EngineResult = ClaudeJsonOutput | null;
|
|
38
|
+
export interface EngineSpawnOptions {
|
|
39
|
+
/** Working directory for the child (task-runner sets the worktree; reviewer omits it → cwd unchanged). */
|
|
40
|
+
cwd?: string;
|
|
41
|
+
/** Model to pin via the engine's model flag; omitted/blank uses the operator default. */
|
|
42
|
+
modelId?: string | null;
|
|
43
|
+
/** Base environment to augment via env(); defaults to process.env. */
|
|
44
|
+
baseEnv?: NodeJS.ProcessEnv;
|
|
45
|
+
}
|
|
46
|
+
export interface AgentEngine {
|
|
47
|
+
/** Registry key + DB/telemetry id. */
|
|
48
|
+
readonly id: string;
|
|
49
|
+
/** Executable name resolved on PATH. */
|
|
50
|
+
readonly binary: string;
|
|
51
|
+
/** How the engine authenticates (documentation + future gating). */
|
|
52
|
+
readonly authMode: EngineAuthMode;
|
|
53
|
+
/** Build the CLI argv for a one-shot `--print` run (model pinned when non-blank). */
|
|
54
|
+
buildArgs(modelId?: string | null): string[];
|
|
55
|
+
/** Augment a base environment (default process.env) with the engine's auth channel. */
|
|
56
|
+
env(base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
57
|
+
/** Spawn the engine as a piped child (stdin/stdout/stderr = pipe, reject = false). */
|
|
58
|
+
spawn(opts: EngineSpawnOptions): ExecaChildProcess;
|
|
59
|
+
/** Parse the structured result envelope from stdout (null when not the JSON form). */
|
|
60
|
+
parseResult(stdout: string): EngineResult;
|
|
61
|
+
/**
|
|
62
|
+
* Classify a non-zero (or 429-on-zero) exit into the shared class taxonomy.
|
|
63
|
+
* Delegates to failure-classifier — the one shared class-mapper all engines
|
|
64
|
+
* call into — so the DB class values stay frozen and backward-compatible.
|
|
65
|
+
*/
|
|
66
|
+
classifyFailure(exitCode: number | null, stderr: string, stdout: string, durationMs?: number): ClassifiedExit;
|
|
67
|
+
/** Cheap health check: is the binary/host actually working? */
|
|
68
|
+
healthProbe(): Promise<{
|
|
69
|
+
ok: boolean;
|
|
70
|
+
detail: string;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0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IAEnD,sFAAsF;IACtF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;IAE1C;;;;OAIG;IACH,eAAe,CACb,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,CAAC;IAElB,+DAA+D;IAC/D,WAAW,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/engines/types.ts"],"names":[],"mappings":""}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* instead (capacity until a reset time, claude_unavailable with an
|
|
43
43
|
* exponential backoff).
|
|
44
44
|
*/
|
|
45
|
-
export type ClaudeExitClass = "capacity_exhausted" | "claude_unavailable" | "usage_limit" | "auth_expired" | "env_broken" | "task_error";
|
|
45
|
+
export type ClaudeExitClass = "capacity_exhausted" | "subscription_exhausted" | "claude_unavailable" | "usage_limit" | "auth_expired" | "env_broken" | "task_error";
|
|
46
46
|
export interface ClassifiedExit {
|
|
47
47
|
exitCode: number | null;
|
|
48
48
|
class: ClaudeExitClass;
|
|
@@ -75,6 +75,21 @@ export interface ClassifiedExit {
|
|
|
75
75
|
* classifier stays a pure (strings) → class function for unit tests.
|
|
76
76
|
*/
|
|
77
77
|
export declare function parseApiErrorStatus(stdout: string): number | null;
|
|
78
|
+
/**
|
|
79
|
+
* v0.58 (T-5058, FH-1a): the capacity-exhaustion predicate, factored out of
|
|
80
|
+
* `classifyClaudeExit` so callers can detect a spent capacity window WITHOUT a
|
|
81
|
+
* non-zero exit code to key on. Claude's `--output-format=json` envelope can
|
|
82
|
+
* report `{ is_error: true, api_error_status: 429 }` while the CLI still exits
|
|
83
|
+
* 0 (the exit code and the JSON error are set independently, and the code is
|
|
84
|
+
* version-dependent). The exit-code path in the task-runner only classifies on
|
|
85
|
+
* a non-zero exit, so a 0-exit-with-429 would otherwise be mistaken for a
|
|
86
|
+
* successful build — pushing a partial worktree and opening a PR that burns the
|
|
87
|
+
* scarce reviewer capacity this class exists to protect. The authoritative
|
|
88
|
+
* signal is the JSON `api_error_status` 429; CAPACITY_PATTERNS is the
|
|
89
|
+
* plain-text fallback. Kept disjoint from USAGE_LIMIT_PATTERNS (hard billing
|
|
90
|
+
* walls that stay quarantine-worthy), exactly as `classifyClaudeExit` is.
|
|
91
|
+
*/
|
|
92
|
+
export declare function isCapacityExhausted(stdout: string, stderr?: string): boolean;
|
|
78
93
|
/**
|
|
79
94
|
* v0.56 (T-56-1): parse the reset time Claude states when it pauses a
|
|
80
95
|
* session ("...resets 3:20pm (Asia/Calcutta)") into an absolute epoch
|
|
@@ -109,4 +124,20 @@ export declare function classifyClaudeExit(exitCode: number | null, stderr: stri
|
|
|
109
124
|
* since the collision is transient and the task re-provisions cleanly on retry.
|
|
110
125
|
*/
|
|
111
126
|
export declare function isGitProvisionContention(message: string): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* M4: parse a retry-after hint from a codex rate-limit message ("Please try
|
|
129
|
+
* again in 20s" / "retry-after: 1500ms"). Returns the delay in MILLISECONDS,
|
|
130
|
+
* or null when no hint is present — the caller then applies a fixed default
|
|
131
|
+
* pause (pause-till-reset semantics). Bare numbers are read as seconds, matching
|
|
132
|
+
* OpenAI's Retry-After header contract.
|
|
133
|
+
*/
|
|
134
|
+
export declare function extractCodexRetryAfterMs(text: string): number | null;
|
|
135
|
+
/**
|
|
136
|
+
* M4 (ENGINE-CODEX): classify a codex CLI exit into the shared taxonomy. Same
|
|
137
|
+
* signature contract as `classifyClaudeExit` (the AgentEngine.classifyFailure
|
|
138
|
+
* shape) so the drive loop is engine-agnostic. See the block comment above for
|
|
139
|
+
* the ordering rationale — the billing-before-rate-limit order is the guard
|
|
140
|
+
* against the pause-loop deadlock.
|
|
141
|
+
*/
|
|
142
|
+
export declare function classifyCodexExit(exitCode: number | null, stderr: string, stdout: string, durationMs?: number): ClassifiedExit;
|
|
112
143
|
//# sourceMappingURL=failure-classifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure-classifier.d.ts","sourceRoot":"","sources":["../src/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;
|
|
1
|
+
{"version":3,"file":"failure-classifier.d.ts","sourceRoot":"","sources":["../src/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AA2BH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,wBAAwB,GACxB,oBAAoB,GACpB,aAAa,GACb,cAAc,GACd,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AA0ED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYjE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,OAAO,CAGxE;AA2DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,GAAG,IAAI,CAiCtF;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,CAqFhB;AAwBD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAGjE;AAwFD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,CA2EhB"}
|
|
@@ -134,6 +134,25 @@ export function parseApiErrorStatus(stdout) {
|
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* v0.58 (T-5058, FH-1a): the capacity-exhaustion predicate, factored out of
|
|
139
|
+
* `classifyClaudeExit` so callers can detect a spent capacity window WITHOUT a
|
|
140
|
+
* non-zero exit code to key on. Claude's `--output-format=json` envelope can
|
|
141
|
+
* report `{ is_error: true, api_error_status: 429 }` while the CLI still exits
|
|
142
|
+
* 0 (the exit code and the JSON error are set independently, and the code is
|
|
143
|
+
* version-dependent). The exit-code path in the task-runner only classifies on
|
|
144
|
+
* a non-zero exit, so a 0-exit-with-429 would otherwise be mistaken for a
|
|
145
|
+
* successful build — pushing a partial worktree and opening a PR that burns the
|
|
146
|
+
* scarce reviewer capacity this class exists to protect. The authoritative
|
|
147
|
+
* signal is the JSON `api_error_status` 429; CAPACITY_PATTERNS is the
|
|
148
|
+
* plain-text fallback. Kept disjoint from USAGE_LIMIT_PATTERNS (hard billing
|
|
149
|
+
* walls that stay quarantine-worthy), exactly as `classifyClaudeExit` is.
|
|
150
|
+
*/
|
|
151
|
+
export function isCapacityExhausted(stdout, stderr = "") {
|
|
152
|
+
if (parseApiErrorStatus(stdout) === 429)
|
|
153
|
+
return true;
|
|
154
|
+
return matchesAny(`${stderr}\n${stdout}`, CAPACITY_PATTERNS);
|
|
155
|
+
}
|
|
137
156
|
const RESET_TIME_RE = /resets?\s+(?:at\s+|by\s+)?(\d{1,2})(?::(\d{2}))?\s*(am|pm)?\s*(?:\(([^)]+)\))?/i;
|
|
138
157
|
function tzDateParts(instant, tz) {
|
|
139
158
|
const dtf = new Intl.DateTimeFormat("en-US", {
|
|
@@ -255,7 +274,7 @@ export function classifyClaudeExit(exitCode, stderr, stdout, durationMs) {
|
|
|
255
274
|
// result JSON's api_error_status 429; the message patterns are the
|
|
256
275
|
// plain-text fallback. Disjoint from USAGE_LIMIT_PATTERNS below, which
|
|
257
276
|
// stay quarantine-worthy (hard billing walls).
|
|
258
|
-
if (
|
|
277
|
+
if (isCapacityExhausted(stdout, stderr)) {
|
|
259
278
|
return {
|
|
260
279
|
exitCode,
|
|
261
280
|
class: "capacity_exhausted",
|
|
@@ -350,4 +369,177 @@ export function isGitProvisionContention(message) {
|
|
|
350
369
|
return false;
|
|
351
370
|
return matchesAny(message, GIT_PROVISION_CONTENTION_PATTERNS);
|
|
352
371
|
}
|
|
372
|
+
// ===========================================================================
|
|
373
|
+
// M4 (ENGINE-CODEX): OpenAI Codex CLI failure classification — the P0 surface.
|
|
374
|
+
//
|
|
375
|
+
// The single most dangerous mistake here is mapping a HARD
|
|
376
|
+
// wall (a billing/quota exhaustion that will NOT clear on its own) onto a
|
|
377
|
+
// RETRYABLE/PAUSABLE class, so the runner pause-loops forever against a wall.
|
|
378
|
+
// The pattern ORDER below is chosen so the SAFE class always wins on ambiguity:
|
|
379
|
+
//
|
|
380
|
+
// 1. billing wall → usage_limit (quarantine; never retried)
|
|
381
|
+
// 2. subscription cap → subscription_exhausted (spill to api-key)
|
|
382
|
+
// 3. RPM/TPM 429 → capacity_exhausted (pause until reset)
|
|
383
|
+
// 4. auth failure → auth_expired
|
|
384
|
+
// 5. host env failure → env_broken
|
|
385
|
+
// 6. 5xx / conn / idle → claude_unavailable (engine_unavailable: probe+backoff)
|
|
386
|
+
// 7. everything else → task_error
|
|
387
|
+
//
|
|
388
|
+
// OpenAI returns HTTP 429 for BOTH `rate_limit_exceeded` AND `insufficient_quota`,
|
|
389
|
+
// so 429 alone cannot be routed — the billing check (specific quota/billing
|
|
390
|
+
// signatures) runs BEFORE the generic rate-limit check so a quota wall can
|
|
391
|
+
// never be mistaken for a pausable rate limit. Every set is kept disjoint.
|
|
392
|
+
// Hard billing wall (operator must top up / fix billing). OpenAI's canonical
|
|
393
|
+
// form is `insufficient_quota`: "You exceeded your current quota, please check
|
|
394
|
+
// your plan and billing details." A 402 / suspended account is the same class.
|
|
395
|
+
const CODEX_BILLING_PATTERNS = [
|
|
396
|
+
/insufficient_quota/i,
|
|
397
|
+
/exceeded your current quota/i,
|
|
398
|
+
/check your plan and billing/i,
|
|
399
|
+
/billing (?:hard )?limit/i,
|
|
400
|
+
/monthly (?:spend|budget) limit/i,
|
|
401
|
+
/payment required/i,
|
|
402
|
+
/\b402\b/,
|
|
403
|
+
/account.*(?:deactivated|suspended|disabled)/i,
|
|
404
|
+
];
|
|
405
|
+
// ChatGPT subscription session/plan cap — recoverable by SPILLING to the
|
|
406
|
+
// api-key channel (subscription_first). Distinct from the billing wall (which
|
|
407
|
+
// is on the API account, not the ChatGPT plan) and from an RPM rate limit.
|
|
408
|
+
const CODEX_SUBSCRIPTION_PATTERNS = [
|
|
409
|
+
/chatgpt.*(?:usage|message|rate)?\s*limit/i,
|
|
410
|
+
/subscription.*limit/i,
|
|
411
|
+
/\bplan limit\b/i,
|
|
412
|
+
/reached your (?:usage|message|weekly|daily) limit/i,
|
|
413
|
+
/you've (?:hit|reached) your .*limit/i,
|
|
414
|
+
/upgrade (?:to )?(?:chatgpt )?(?:plus|pro)/i,
|
|
415
|
+
];
|
|
416
|
+
// API-key RPM/TPM rate limit — a resource that resets on a clock. Pause until
|
|
417
|
+
// the reset, then resume (never quarantine, never a task_error).
|
|
418
|
+
const CODEX_CAPACITY_PATTERNS = [
|
|
419
|
+
/rate_?limit_?exceeded/i,
|
|
420
|
+
/rate limit reached/i,
|
|
421
|
+
/requests per (?:min|minute|day)/i,
|
|
422
|
+
/tokens per (?:min|minute)/i,
|
|
423
|
+
/try again in \d/i,
|
|
424
|
+
/too many requests/i,
|
|
425
|
+
];
|
|
426
|
+
// Codex auth failures beyond the shared AUTH_EXPIRED_PATTERNS.
|
|
427
|
+
const CODEX_AUTH_PATTERNS = [
|
|
428
|
+
/not logged in/i,
|
|
429
|
+
/run `?codex login`?/i,
|
|
430
|
+
/missing.*openai_api_key/i,
|
|
431
|
+
/no api key/i,
|
|
432
|
+
/incorrect api key/i,
|
|
433
|
+
];
|
|
434
|
+
// Momentarily-unavailable engine (server-side, not the host): 5xx, overloaded,
|
|
435
|
+
// connection drops, timeouts. Probe + backoff, like claude_unavailable. The 5xx
|
|
436
|
+
// match is anchored on an HTTP/error context so a bare "500" in task content
|
|
437
|
+
// (e.g. "500 files changed") does NOT misroute to this class.
|
|
438
|
+
const CODEX_UNAVAILABLE_PATTERNS = [
|
|
439
|
+
/\bhttp[\s/]?5\d\d\b/i,
|
|
440
|
+
/\b5\d\d\b[^\n]{0,40}(?:server|gateway|unavailable|timeout|overloaded|error)/i,
|
|
441
|
+
/server_?error/i,
|
|
442
|
+
/service unavailable/i,
|
|
443
|
+
/bad gateway/i,
|
|
444
|
+
/gateway time-?out/i,
|
|
445
|
+
/overloaded/i,
|
|
446
|
+
/connection (?:error|reset|refused|closed)/i,
|
|
447
|
+
/econnreset|econnrefused|etimedout|enotfound/i,
|
|
448
|
+
];
|
|
449
|
+
const CODEX_RETRY_AFTER_RE = /(?:retry[- ]after|try again in)\D*(\d+(?:\.\d+)?)\s*(ms|s|sec|seconds|m|min|minutes)?/i;
|
|
450
|
+
/**
|
|
451
|
+
* M4: parse a retry-after hint from a codex rate-limit message ("Please try
|
|
452
|
+
* again in 20s" / "retry-after: 1500ms"). Returns the delay in MILLISECONDS,
|
|
453
|
+
* or null when no hint is present — the caller then applies a fixed default
|
|
454
|
+
* pause (pause-till-reset semantics). Bare numbers are read as seconds, matching
|
|
455
|
+
* OpenAI's Retry-After header contract.
|
|
456
|
+
*/
|
|
457
|
+
export function extractCodexRetryAfterMs(text) {
|
|
458
|
+
if (!text)
|
|
459
|
+
return null;
|
|
460
|
+
const m = CODEX_RETRY_AFTER_RE.exec(text);
|
|
461
|
+
if (!m)
|
|
462
|
+
return null;
|
|
463
|
+
const n = Number(m[1]);
|
|
464
|
+
if (!Number.isFinite(n) || n < 0)
|
|
465
|
+
return null;
|
|
466
|
+
const unit = (m[2] ?? "s").toLowerCase();
|
|
467
|
+
if (unit === "ms")
|
|
468
|
+
return Math.round(n);
|
|
469
|
+
if (unit === "m" || unit === "min" || unit === "minutes")
|
|
470
|
+
return Math.round(n * 60_000);
|
|
471
|
+
return Math.round(n * 1_000);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* M4 (ENGINE-CODEX): classify a codex CLI exit into the shared taxonomy. Same
|
|
475
|
+
* signature contract as `classifyClaudeExit` (the AgentEngine.classifyFailure
|
|
476
|
+
* shape) so the drive loop is engine-agnostic. See the block comment above for
|
|
477
|
+
* the ordering rationale — the billing-before-rate-limit order is the guard
|
|
478
|
+
* against the pause-loop deadlock.
|
|
479
|
+
*/
|
|
480
|
+
export function classifyCodexExit(exitCode, stderr, stdout, durationMs) {
|
|
481
|
+
if (exitCode === 127) {
|
|
482
|
+
return { exitCode, class: "env_broken", detail: "codex binary not found in PATH (exit 127)" };
|
|
483
|
+
}
|
|
484
|
+
const combined = `${stderr}\n${stdout}`;
|
|
485
|
+
// 1. Hard billing wall FIRST (see rationale above). NEVER retried.
|
|
486
|
+
if (matchesAny(combined, CODEX_BILLING_PATTERNS)) {
|
|
487
|
+
return {
|
|
488
|
+
exitCode,
|
|
489
|
+
class: "usage_limit",
|
|
490
|
+
detail: "codex billing/quota wall (insufficient_quota) — quarantine + operator alert, never retried",
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
// 2. ChatGPT subscription cap → spill to the api-key channel.
|
|
494
|
+
if (matchesAny(combined, CODEX_SUBSCRIPTION_PATTERNS)) {
|
|
495
|
+
return {
|
|
496
|
+
exitCode,
|
|
497
|
+
class: "subscription_exhausted",
|
|
498
|
+
detail: "codex ChatGPT subscription cap reached — spill to api-key before any escalation",
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
// 3. RPM/TPM rate limit → pause until reset.
|
|
502
|
+
if (matchesAny(combined, CODEX_CAPACITY_PATTERNS)) {
|
|
503
|
+
return {
|
|
504
|
+
exitCode,
|
|
505
|
+
class: "capacity_exhausted",
|
|
506
|
+
detail: "codex API rate limit (RPM/TPM) reached — runner will pause until reset",
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
// 4. Auth failure (shared patterns + codex-specific "not logged in" etc.).
|
|
510
|
+
if (matchesAny(combined, AUTH_EXPIRED_PATTERNS) || matchesAny(combined, CODEX_AUTH_PATTERNS)) {
|
|
511
|
+
return {
|
|
512
|
+
exitCode,
|
|
513
|
+
class: "auth_expired",
|
|
514
|
+
detail: "codex authentication failure — OPENAI_API_KEY invalid or no ChatGPT login",
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
// 5. Host environment failure (dyld/OOM/missing libs).
|
|
518
|
+
if (matchesAny(combined, ENV_BROKEN_PATTERNS)) {
|
|
519
|
+
return { exitCode, class: "env_broken", detail: "host environment error detected in codex output" };
|
|
520
|
+
}
|
|
521
|
+
// 6. Momentarily-unavailable engine (5xx / connection) → probe + backoff.
|
|
522
|
+
if (matchesAny(combined, CODEX_UNAVAILABLE_PATTERNS)) {
|
|
523
|
+
return {
|
|
524
|
+
exitCode,
|
|
525
|
+
class: "claude_unavailable",
|
|
526
|
+
detail: "codex engine momentarily unavailable (server/connection) — retrying with backoff",
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
// 7. Silent instant-empty fast-exit — ambiguous, treat as retryable
|
|
530
|
+
// engine_unavailable (never quarantine on silence alone; the health probe
|
|
531
|
+
// is the authoritative tiebreaker), mirroring classifyClaudeExit.
|
|
532
|
+
if (durationMs !== undefined &&
|
|
533
|
+
durationMs < FAST_EXIT_MS &&
|
|
534
|
+
stderr.trim().length === 0 &&
|
|
535
|
+
stdout.trim().length < FAST_EXIT_MAX_OUTPUT_BYTES) {
|
|
536
|
+
return {
|
|
537
|
+
exitCode,
|
|
538
|
+
class: "claude_unavailable",
|
|
539
|
+
detail: `codex exited ${exitCode ?? "signal"} in ${durationMs}ms with empty output (silent instant-empty — momentarily unavailable, retrying)`,
|
|
540
|
+
heuristic: true,
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
return { exitCode, class: "task_error", detail: `codex exited ${exitCode ?? "signal"} — task-level failure` };
|
|
544
|
+
}
|
|
353
545
|
//# sourceMappingURL=failure-classifier.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure-classifier.js","sourceRoot":"","sources":["../src/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAiCH,0EAA0E;AAC1E,2EAA2E;AAC3E,mEAAmE;AACnE,wDAAwD;AACxD,oEAAoE;AACpE,wEAAwE;AACxE,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,MAAM,iBAAiB,GAAa;IAClC,2CAA2C;IAC3C,gBAAgB;IAChB,6CAA6C;IAC7C,qDAAqD;CACtD,CAAC;AAEF,MAAM,oBAAoB,GAAa;IACrC,cAAc;IACd,gDAAgD;IAChD,sBAAsB;IACtB,iBAAiB;IACjB,sBAAsB;IACtB,aAAa;IACb,iBAAiB;IACjB,sBAAsB;IACtB,oCAAoC;CACrC,CAAC;AAEF,MAAM,qBAAqB,GAAa;IACtC,kBAAkB;IAClB,yBAAyB;IACzB,oBAAoB;IACpB,eAAe;IACf,0CAA0C;IAC1C,mBAAmB;IACnB,yCAAyC;IACzC,oBAAoB;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C;AAChE,CAAC"}
|
|
1
|
+
{"version":3,"file":"failure-classifier.js","sourceRoot":"","sources":["../src/failure-classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AA2DH,0EAA0E;AAC1E,2EAA2E;AAC3E,mEAAmE;AACnE,wDAAwD;AACxD,oEAAoE;AACpE,wEAAwE;AACxE,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,MAAM,iBAAiB,GAAa;IAClC,2CAA2C;IAC3C,gBAAgB;IAChB,6CAA6C;IAC7C,qDAAqD;CACtD,CAAC;AAEF,MAAM,oBAAoB,GAAa;IACrC,cAAc;IACd,gDAAgD;IAChD,sBAAsB;IACtB,iBAAiB;IACjB,sBAAsB;IACtB,aAAa;IACb,iBAAiB;IACjB,sBAAsB;IACtB,oCAAoC;CACrC,CAAC;AAEF,MAAM,qBAAqB,GAAa;IACtC,kBAAkB;IAClB,yBAAyB;IACzB,oBAAoB;IACpB,eAAe;IACf,0CAA0C;IAC1C,mBAAmB;IACnB,yCAAyC;IACzC,oBAAoB;IACpB,uBAAuB;IACvB,gBAAgB;CACjB,CAAC;AAEF,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,MAAM,mBAAmB,GAAa;IACpC,8BAA8B;IAC9B,qBAAqB;IACrB,kBAAkB;IAClB,oCAAoC;IACpC,QAAQ;IACR,aAAa;IACb,qBAAqB;IACrB,SAAS;IACT,eAAe;IACf,oBAAoB;IACpB,4BAA4B;IAC5B,0BAA0B;IAC1B,WAAW;IACX,SAAS;IACT,6BAA6B;CAC9B,CAAC;AAEF,kEAAkE;AAClE,sEAAsE;AACtE,4EAA4E;AAC5E,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAEvC,SAAS,UAAU,CAAC,IAAY,EAAE,QAAkB;IAClD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,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