fix: 收敛 one-shot runner 成功终态
This commit is contained in:
@@ -126,6 +126,7 @@ function assertRunnerJobUsesWritableCodexHome(manifest: JsonRecord, expectedCode
|
||||
assert.equal(value("HOME"), "/home/agentrun");
|
||||
assert.equal(value("CODEX_HOME"), expectedCodexHome);
|
||||
assert.equal(value("AGENTRUN_CODEX_SECRET_HOME"), projectionPath);
|
||||
assert.equal(value("AGENTRUN_RUNNER_ONE_SHOT"), "true");
|
||||
assert.notEqual(value("CODEX_HOME"), value("AGENTRUN_CODEX_SECRET_HOME"));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ const selfTest: SelfTestCase = async (context) => {
|
||||
assert.ok(events.items?.some((event) => event.type === "backend_status" && JSON.stringify(event.payload).includes("run-claimed")));
|
||||
assertNoSecretLeak(events);
|
||||
const finalRun = await client.get(`/api/v1/runs/${happy.runId}`) as { terminalStatus?: string | null; status?: string };
|
||||
assert.equal(finalRun.terminalStatus, null);
|
||||
assert.equal(finalRun.status, "claimed");
|
||||
assert.equal(finalRun.terminalStatus, "completed");
|
||||
assert.equal(finalRun.status, "completed");
|
||||
const finalCommand = await client.get(`/api/v1/runs/${happy.runId}/commands/${happy.commandId}`) as { state?: string };
|
||||
assert.equal(finalCommand.state, "completed");
|
||||
|
||||
|
||||
@@ -140,6 +140,10 @@ async function assertResourceBundleFailure(client: ManagerClient, context: SelfT
|
||||
assert.equal(envelope.failureKind, "infra-failed");
|
||||
const commandRecord = await client.get(`/api/v1/runs/${run.id}/commands/${command.id}`) as { state?: string };
|
||||
assert.equal(commandRecord.state, "failed");
|
||||
const runRecord = await client.get(`/api/v1/runs/${run.id}`) as { status?: string; terminalStatus?: string; failureKind?: string };
|
||||
assert.equal(runRecord.status, "failed");
|
||||
assert.equal(runRecord.terminalStatus, "failed");
|
||||
assert.equal(runRecord.failureKind, "infra-failed");
|
||||
}
|
||||
|
||||
function runPayload(context: SelfTestContext, backendProfile: BackendProfile, sessionId: string): JsonRecord {
|
||||
|
||||
Reference in New Issue
Block a user