---
id: WF-CMT-MTG-011
title: Sweep Recorded Votes and Acknowledgements
trigger: The decisions job starts at minute 17 each hour.
product_area: committees
module: meetings
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-committees: 36129c24daeaadcdb339218c38cdeaff9861359d
implements:
  - CAP-CMT-MTG-010
  - CAP-CMT-MTG-019
moves:
  - STATE-CMT-MTG-006
crosses:
  - SVC-CMT-MTG-decisions
  - SVC-CMT-MTG-recruitment
  - SVC-PFM-NOT-communications
idempotency: >-
  Closing checks for an open decision again. Closing-soon notices are marked in
  the same transaction and are attempted once; repeated acknowledgements rely on
  their receiving contract.
concurrency: >-
  Each decision runs in a separate transaction. A concurrent staff close is
  detected before the sweep acts.
hops:
  - 'n': 1
    actor_or_service: Decisions jobs
    action: >-
      Close overdue open recorded e-mail votes through the normal close rules
      for each active workspace.
    anchor: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:sweepTenantDecisions
    seam: schedule
    on_failure: Log a refusal and retain the open decision.
    left_inconsistent: >-
      An overdue vote may need staff action, particularly for a chair-decides
      tie.
    observer: Unclosed-decision job results and logs.
    provenance: observed
    source: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:sweepTenantDecisions
  - 'n': 2
    actor_or_service: Decisions jobs
    action: >-
      Remind unvoted members within twenty-four hours of closing and stamp the
      reminder attempt.
    anchor: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:sweepTenantDecisions
    seam: schedule
    on_failure: Log a skipped submission while still stamping the reminder.
    left_inconsistent: The member is not retried for that reminder.
    observer: Warning entries in the function log.
    provenance: observed
    source: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:sweepTenantDecisions
  - 'n': 3
    actor_or_service: Decisions jobs
    action: Drain outstanding Submissions acknowledgements.
    anchor: >-
      services-committees:modules/recruitment/services/submissions/acknowledgements.ts:drainAcknowledgements
    seam: queue
    on_failure: Retain failed acknowledgements for another drain without an attempt limit.
    left_inconsistent: Submissions has not received the owner outcome yet.
    observer: Error entries in the function log.
    provenance: observed
    source: >-
      services-committees:modules/recruitment/services/submissions/acknowledgements.ts:drainAcknowledgements
  - 'n': 4
    actor_or_service: Decisions jobs
    action: Continue across workspaces when a workspace fails.
    anchor: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:runDecisionsHourly
    seam: schedule
    on_failure: Record the failed workspace in the result and logs.
    left_inconsistent: Its work waits for a later hourly invocation.
    observer: Job results and scheduled invocation dead letters.
    provenance: observed
    source: >-
      services-committees:modules/decisions/services/jobs/decisions-jobs.ts:runDecisionsHourly
branches: []
waits: []
evidence:
  - >-
    services-committees at 36129c24:
    modules/decisions/services/jobs/decisions-jobs.ts;
    aws/logic/decisions-functions.lambda.ts;
    modules/recruitment/services/submissions/acknowledgements.ts
controls:
  - TC-IAM-006
  - TC-AZ-001
  - TC-AZ-002
  - TC-AZ-003
  - TC-AZ-004
  - TC-AZ-006
  - TC-TEN-001
  - TC-TEN-002
  - TC-TEN-003
  - TC-TEN-004
  - TC-SEC-001
  - TC-SEC-004
  - TC-DAT-001
  - TC-DAT-002
  - TC-DAT-003
  - TC-LOG-001
  - TC-LOG-002
  - TC-LOG-003
  - TC-LOG-004
  - TC-LOG-005
  - TC-AVL-004
  - TC-MON-001
  - TC-MON-002
  - TC-PI-001
  - TC-PI-002
  - TC-PI-003
  - TC-PI-004
  - TC-PI-005
  - TC-PRV-001
  - TC-PRV-002
---
# Sweep Recorded Votes and Acknowledgements

## What It Does

The decisions job starts at minute 17 each hour. The job reports failures rather than forcing a decision result that its rules refuse. Scheduled invocation has a dead letter path, while application-level refusal remains in the job result and logs.

## The Flow

```mermaid
flowchart TD
  H1["Close overdue open recorded e-mail votes through the normal close rules for each active workspace."]

  H2["Remind unvoted members within twenty-four hours of closing and stamp the reminder attempt."]
  H3["Drain outstanding Submissions acknowledgements."]
  H4["Continue across workspaces when a workspace fails."]
  H1 --> H2
  H2 --> H3
  H3 --> H4
```

Close overdue open recorded e-mail votes through the normal close rules for each active workspace. Remind unvoted members within twenty-four hours of closing and stamp the reminder attempt. Drain outstanding Submissions acknowledgements. Continue across workspaces when a workspace fails.

## When Something Fails

Log a refusal and retain the open decision. An overdue vote may need staff action, particularly for a chair-decides tie. Log a skipped submission while still stamping the reminder. The member is not retried for that reminder. Retain failed acknowledgements for another drain without an attempt limit. Submissions has not received the owner outcome yet. Record the failed workspace in the result and logs. Its work waits for a later hourly invocation.

## Open Design Questions

The job reports failures rather than forcing a decision result that its rules refuse. Scheduled invocation has a dead letter path, while application-level refusal remains in the job result and logs.
