Complete the task for a void property instead of dead-lettering it 🟩

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-27 11:26:42 +00:00
parent 00adbcd519
commit da789392ab

View file

@ -23,6 +23,7 @@ from orchestration.abri_orchestrator import (
DealDatabaseGateway,
LogJobOrchestrationResult,
LogJobWriteBackError,
PropertyReportedVoid,
TenantDataSyncResult,
)
from utilities.aws_lambda.task_handler import NonRetriableTaskError
@ -198,6 +199,13 @@ def _run_tenant_sync(request: AbriTriggerRequest, flows: AbriFlows) -> str:
)
if isinstance(outcome, AbriRequestRejected):
raise AbriFlowRejectedError(flow="sync_tenant_data", rejection=outcome)
if isinstance(outcome, PropertyReportedVoid):
# Not a failure: an empty property has no signatories to sync, so
# redelivery could only park the message in the dead-letter queue.
return (
f"no live tenancy for place {outcome.place_ref}; "
"property noted as void"
)
return (
f"{len(outcome.contact_ids)} contacts created "
f"({outcome.vulnerable_contact_count} vulnerable)"