audit.workflow-health.scan ​
Audit an organization's workflow-execution health (failed / stuck / deprecated-type runs) and emit trackable findings.
Audit the organization's workflow-execution health.
Applies the workflow-health rules (failed runs, stuck runs, deprecated types) over the org's recent runs and upserts findings — bumping last-seen and auto-resolving cleared conditions rather than duplicating. Returns the audit run id and a per-severity summary.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-audit |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Organization whose workflow runs are audited |
since | string | No | — | ISO 8601 lower bound of the scan window (default 7d ago) |
until | string | No | — | ISO 8601 upper bound of the scan window (default now) |
workflow_type_prefixes | json | No | — | Optional list of workflow_type prefixes to scope the scan |
rule_keys | json | No | — | Optional subset of rule keys to run (default: all) |
trigger | string | No | — | manual |
stuck_threshold_minutes | integer | No | — | Age past which a non-terminal run is 'stuck' (default 60) |
deprecated_types | json | No | — | Optional list of workflow_types to flag as deprecated |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id when invoked as a Step target |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
audit_run_uuid | uuid | No | — | — |
status | string | No | — | — |
new_findings | integer | No | — | — |
updated_findings | integer | No | — | — |
resolved_findings | integer | No | — | — |
total_findings | integer | No | — | — |
scanned_runs | integer | No | — | — |
by_severity | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | scan | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | scan | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
scanned | SUCCESS | Workflow health scan completed | audit_run_uuid, total_findings |
failed | FAILURE | Audit workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "audit.workflow-health.scan",
"initial_data": {
"organization_uuid": "value"
}
}