---
id: ADR-CRM-DQ-014
title: Queue re-check windows and retain their outcomes
product_area: crm
module: data-quality
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
decision: >-
  A business run stores re-check progress while a dispatcher queues record
  windows for bounded consumers; successful detection work remains when another
  batch fails.
constrains:
  - WF-CRM-DQ-002
  - STATE-CRM-DQ-003
  - SVC-CRM-DQ-duplicates
origin: >-
  services-crm:modules/duplicates/db/duplicate-rescans.table.ts (the queued-work
  standard, services-platform docs/queued-work.md)
alternatives:
  - option: Use the merge job workflow
    why_not: >-
      Re-check work is independently repeatable and does not require a single
      atomic transaction.
  - option: Store every record identity in queued work
    why_not: Window boundaries make the queue inventory substantially smaller.
consequences:
  - >-
    Ten-minute claims can expire while queue messages remain invisible for
    thirty minutes.
  - Other batches of a failed run continue to be dispatched.
supersedes: []
evidence:
  - >-
    services-crm at a8d1364f: modules/duplicates/services/queue/*.ts;
    services/persistence/duplicate-rescans.ts;
    aws/crm.duplicate-rescans.names.ts.
---

# Queue re-check windows and retain their outcomes

## Context

Changing configuration needs a way to refresh existing evidence without one unbounded request.

## Decision

A business run stores re-check progress while a dispatcher queues record windows for bounded consumers; successful detection work remains when another batch fails.

## Alternatives Considered

Use the merge job workflow. Re-check work is independently repeatable and does not require a single atomic transaction.

Store every record identity in queued work. Window boundaries make the queue inventory substantially smaller.

## Consequences

Ten-minute claims can expire while queue messages remain invisible for thirty minutes. Other batches of a failed run continue to be dispatched.
