Compliance: stop a system-paused auditor task once

Task 6694 · Done · Coder · created · updated

An auditor task paused by the system (stop_reason `balance` or `jaah_unavailable`) makes its scan target read `error` (`scans.run_end`, PAUSED is in RUN_OVER). However, `paused` is not a stop source, so neither `scans._stop_overdue` nor the matrix Stop scan ends it. The task keeps its worktree slot, and a balance top-up later resumes it with nothing owed. - Stop such tasks for good through `scans.stop_run`. `_stop_task_core` already takes over a system pause. - Optionally, give a system-initiated compliance stop its own runner-termination cause, so the feed does not read `operator_stop`. Out of scope: RUN_TIME_BOUND, the matrix UI, docs. Done means: a test where a balance-paused auditor task with an errored target is reconciled ends with stop_reason `operator`, stopped by the system, and its slot released; `./dc check full` green.

Outcome

compliance-reconcile now stops system-paused (balance/jaah_unavailable) auditor runs for good via scans.stop_run, so they release their slot and a top-up can't resume them. Tests added; full gate green; PR #5637 merged. Its deploy run was superseded by a later one.

Pull request

Artifacts

Activity

  • Created
  • Run
  • Runner started
  • Runner ended (done)