From ae1b1a97765ac7d8cf34decf7ad06c4e0be72687 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 7 Jul 2026 15:41:09 +0000 Subject: [PATCH] =?UTF-8?q?Orchestrate=20an=20abandonment=20from=20a=20dea?= =?UTF-8?q?l's=20recorded=20job=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- orchestration/abri_orchestrator.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/orchestration/abri_orchestrator.py b/orchestration/abri_orchestrator.py index f4b82943a..0de04f0dc 100644 --- a/orchestration/abri_orchestrator.py +++ b/orchestration/abri_orchestrator.py @@ -273,7 +273,17 @@ class AbriOrchestrator: def abandon_job( self, abandonment: DealAbandonment ) -> AbandonJobOrchestrationResult: - raise NotImplementedError + job_no = self._deal_database.job_no_for_deal(abandonment.deal_id) + if job_no is None: + raise JobNoNotYetRecordedError(deal_id=abandonment.deal_id) + + return self._abri.abandon_job( + AbandonJobRequest( + job_no=job_no, + reason=abandon_reason_for_outcome(abandonment.outcome), + date_abandoned=self._clock(), + ) + ) def log_job(self, booking: ConfirmedSurveyBooking) -> LogJobOrchestrationResult: descriptions = build_job_descriptions(booking.deal_name)