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
1 change: 1 addition & 0 deletions docs/openclawcode/run-json-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ those nested objects.

- `failureDiagnostics`
- `failureDiagnosticsSummary`
- `failureDiagnosticUsageTotal`

### Suitability Signals

Expand Down
2 changes: 2 additions & 0 deletions src/commands/openclawcode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ describe("openclawCodeRunCommand", () => {
expect(payload.historyEntryCount).toBeNull();
expect(payload.failureDiagnostics).toBeNull();
expect(payload.failureDiagnosticsSummary).toBeNull();
expect(payload.failureDiagnosticUsageTotal).toBeNull();
});

it("prints failure diagnostics when a failed workflow recorded provider metadata", async () => {
Expand Down Expand Up @@ -886,6 +887,7 @@ describe("openclawCodeRunCommand", () => {

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] ?? "null");
expect(payload.failureDiagnosticsSummary).toBe("HTTP 400: Internal server error");
expect(payload.failureDiagnosticUsageTotal).toBe(0);
expect(payload.failureDiagnostics).toEqual({
summary: "HTTP 400: Internal server error",
provider: "crs",
Expand Down
1 change: 1 addition & 0 deletions src/commands/openclawcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ function toWorkflowRunJson(run: WorkflowRun) {
noteCount: run.buildResult?.notes.length ?? null,
failureDiagnostics: run.failureDiagnostics ?? null,
failureDiagnosticsSummary: run.failureDiagnostics?.summary ?? null,
failureDiagnosticUsageTotal: run.failureDiagnostics?.lastCallUsageTotal ?? null,
suitabilityDecision: run.suitability?.decision ?? null,
suitabilitySummary: run.suitability?.summary ?? null,
suitabilityReasons: run.suitability?.reasons ?? null,
Expand Down
Loading