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
3 changes: 2 additions & 1 deletion docs/openclawcode/run-json-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ those nested objects.
- boolean summary fields such as `verificationHasFindings` default to `false`
when the corresponding section is absent
- derived boolean fields such as `failureDiagnosticBootstrapWarningShown`
default to `false` when the nested diagnostic signal is absent
default to `false` when the nested diagnostic signal is absent and otherwise
mirror the recorded boolean signal
- string or timestamp fields use `null` when the underlying value is absent
- `failureDiagnostics` uses `null` when no structured workflow failure metadata
was recorded for the run
Expand Down
16 changes: 16 additions & 0 deletions src/commands/openclawcode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1839,6 +1839,22 @@ describe("openclawCodeRunCommand", () => {
expect(payload.failureDiagnosticUsageTotal).toBe(0);
});

it("prints failureDiagnosticBootstrapWarningShown as false when diagnostics omitted bootstrap warnings", async () => {
mocks.runIssueWorkflow.mockResolvedValue(
createRun({
stage: "failed",
failureDiagnostics: {
summary: "HTTP 400: Internal server error",
},
}),
);

await openclawCodeRunCommand({ issue: "2", repoRoot: "/repo", json: true }, runtime);

const payload = JSON.parse(runtime.log.mock.calls[0]?.[0] ?? "null");
expect(payload.failureDiagnosticBootstrapWarningShown).toBe(false);
});

it("prints failureDiagnosticBootstrapWarningShown as true when diagnostics flagged bootstrap warnings", async () => {
mocks.runIssueWorkflow.mockResolvedValue(
createRun({
Expand Down
5 changes: 4 additions & 1 deletion src/commands/openclawcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,10 @@ function toWorkflowRunJson(run: WorkflowRun) {
failureDiagnosticSkillCount: run.failureDiagnostics?.skillCount ?? null,
failureDiagnosticInjectedWorkspaceFileCount:
run.failureDiagnostics?.injectedWorkspaceFileCount ?? null,
failureDiagnosticBootstrapWarningShown: run.failureDiagnostics?.bootstrapWarningShown ?? false,
failureDiagnosticBootstrapWarningShown:
run.failureDiagnostics != null
? Boolean(run.failureDiagnostics.bootstrapWarningShown)
: false,
failureDiagnosticToolCount: run.failureDiagnostics?.toolCount ?? null,
failureDiagnosticUsageTotal: run.failureDiagnostics?.lastCallUsageTotal ?? null,
blueprintContext: run.blueprintContext ?? null,
Expand Down
Loading