---
name: run-and-fetch-scan-results
description: Admin-only legacy result reference. Accepted recon must use operate-sonar-recon and durable control-plane seams.
category: pull
---

# Run and monitor a scan

This legacy reference does not authorize direct launch. The durable control plane owns creation,
start, cancellation, idempotency, and reconciliation for accepted bounded recon.

## Durable operation

1. Use `operate-sonar-recon` to confirm the immutable workflow version, explicit expected target
   manifest, correlation ID, content hash, manifest hash, and command hash.
2. Submit the durable control-plane command with its explicit immutable bounds.

## Monitor

- `get_scan` with the scan `id` → overall `status`, `stepCount`, `completedStepIds`,
  `runningStepIds`, `estimatedCompletionAt`.
- `get_scan_tasks_statistics` with the scan `id` → per-step counts (`pending`,
  `running`, `completed`, `failed`) and `lastError`. Filter by `steps`/`status`.
- Poll periodically; a scan ends as `Completed` or `CompletedWithErrors`.
- Cancellation is a durable control-plane decision, not a direct legacy stop call.

## Read results

Read only after finalization with the frozen `ResultRevision` and opaque cursor. Classify
execution status separately from affected/not-affected/inconclusive conclusions; partial,
missing, timed-out, and denied work is not “not affected”.

## Notes

- Workers must exist and advertise the steps' `targetTags`; `list_workers` shows capacity.
- An immutable workflow version and frozen result revision keep retries and pagination attributable.
