mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-09-27 03:51:45 +02:00
fix: terminate failed scans in Temporal and surface the reason when following (#429)
* fix(cli): skip splash screen off a TTY (e.g. CI) * fix: terminate failed scans in Temporal and surface the reason when following * fix(cli): indent embedded newlines within failure-error segments * fix(worker): omit the Agent Breakdown section when no agents completed * fix(cli): don't reprint the failure reason when the log already showed it * fix(worker): indent embedded newlines within the workflow.log error block
This commit is contained in:
@@ -41,7 +41,6 @@ import type { ActivityInput } from './activities.js';
|
||||
import {
|
||||
type AgentMetrics,
|
||||
getProgress,
|
||||
PipelineExecutionError,
|
||||
type PipelineInput,
|
||||
type PipelineProgress,
|
||||
type PipelineState,
|
||||
@@ -718,9 +717,10 @@ export async function pentestPipeline(input: PipelineInput): Promise<PipelineSta
|
||||
});
|
||||
}
|
||||
|
||||
// Carry the populated state so a consumer can report real spend instead of a zeroed
|
||||
// failed state. The original error rides as `cause` for classification/reporting.
|
||||
throw new PipelineExecutionError(state.error ?? 'Pipeline failed', state, { cause: error });
|
||||
// Terminate the workflow in Temporal's FAILED state. WARNING: this must be an
|
||||
// ApplicationFailure — any other thrown type becomes an unhandled workflow-task failure
|
||||
// that Temporal retries indefinitely, leaving the run stuck in RUNNING.
|
||||
throw ApplicationFailure.nonRetryable(state.error ?? 'Pipeline failed', 'PipelineExecutionError');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user