diff --git a/src/index.ts b/src/index.ts index e5fed43..03efe40 100644 --- a/src/index.ts +++ b/src/index.ts @@ -125,6 +125,11 @@ async function main() { for (const f of response.new ?? []) { console.error(` NEW [${f.severity}] ${f.title}${f.file ? ` (${f.file}${f.line != null ? `:${f.line}` : ""})` : ""}${f.taskId ? ` → task ${f.taskId}` : ""}`); } + // Findings were accepted but never became work — the run would otherwise look + // clean while nothing lands in anyone's queue. + if (s.taskFailures) { + console.error(`cerberus: WARNING — ${s.taskFailures} finding(s) could not be turned into tasks: ${response.taskError ?? "unknown error"}`); + } const gate = evaluateGate(config.gate.failOn, response); if (gate.failed) { diff --git a/src/types.ts b/src/types.ts index 0854814..06b00e5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -57,6 +57,8 @@ export interface UploadResponse { baseline?: boolean; truncated?: boolean; error?: string; + /** Set when the backend accepted findings but could not turn them into work. */ + taskError?: string; summary?: { total: number; new: number; @@ -65,6 +67,7 @@ export interface UploadResponse { fixed: number; reopened: number; tasksCreated: number; + taskFailures?: number; }; new?: Array<{ title: string;