---
id: WF-CMT-MTG-004
title: Settle Video Room Requests
trigger: 'Meeting writes append room work, and the daily and hourly jobs drain it.'
product_area: committees
module: meetings
revision: 2
status: draft
design_intent: proposed
implementation_evidence: inconsistent
inference: []
source_sha:
  services-committees: 36129c24daeaadcdb339218c38cdeaff9861359d
implements:
  - CAP-CMT-MTG-006
crosses:
  - SVC-CMT-MTG-meetings
  - SVC-PFM-INT-integrations
idempotency: >-
  The stored provider key identifies meeting and action; update keys also
  distinguish the meeting version. Retries reuse that key, while a create is
  discarded if the meeting already has a room.
concurrency: >-
  Claims skip locked rows and expire after two minutes. Expiry can permit
  another drain before the first finishes; settlement has no ownership token, so
  provider deduplication remains necessary.
hops:
  - 'n': 1
    actor_or_service: Meeting write
    action: Insert room work alongside the meeting change.
    anchor: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:enqueueRoomRequest
    seam: sync
    on_failure: Roll back together with the meeting.
    left_inconsistent: No durable request after rollback.
    observer: Pending room-request rows.
    provenance: observed
    source: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:enqueueRoomRequest
  - 'n': 2
    actor_or_service: Meetings jobs
    action: >-
      Claim at most fifty due rows and commit the two-minute lease before
      calling out.
    anchor: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:drainRoomRequests
    seam: schedule
    on_failure: Leave unprocessed claims to expire.
    left_inconsistent: Room changes can lag behind meeting changes.
    observer: Job outcome counters.
    provenance: observed
    source: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:drainRoomRequests
  - 'n': 3
    actor_or_service: Video port
    action: >-
      Invoke the configured Integration Platform capability; an unconfigured
      gateway reports provider unavailable.
    anchor: >-
      services-committees:modules/meetings/ports/virtual-rooms.ts:integrationVirtualRooms
    seam: queue
    on_failure: >-
      Retain failed or unknown calls for another drain; settle
      provider-unavailable responses without an attempt cap.
    left_inconsistent: >-
      No room is created when the provider is unavailable, and failed calls stay
      pending.
    observer: Room-call warning entries.
    provenance: observed
    source: >-
      services-committees:modules/meetings/ports/virtual-rooms.ts:integrationVirtualRooms
  - 'n': 4
    actor_or_service: Meetings jobs
    action: Record the settled video outcome and remove its request.
    anchor: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:settledPlace
    seam: sync
    on_failure: >-
      Keep the request if settlement fails, allowing the stored key to be
      retried.
    left_inconsistent: The provider may have acted before the meeting records that result.
    observer: The recorded video-room outcome.
    provenance: observed
    source: >-
      services-committees:modules/meetings/services/persistence/meeting-room-requests.ts:settledPlace
branches: []
waits:
  - Scheduled room draining runs hourly and daily; failures can extend the wait.
evidence:
  - >-
    services-committees at 36129c24:
    modules/meetings/services/persistence/meeting-room-requests.ts;
    ports/virtual-rooms.ts; services/persistence/attendance-events.ts;
    aws/logic/meetings-functions.lambda.ts (platformIntegrationsInvoke off by
    default)
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-SEC-001
  - TC-SEC-002
  - TC-SEC-003
  - TC-SEC-004
  - TC-CRY-001
  - TC-DAT-001
  - TC-DAT-002
  - TC-DAT-003
  - 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-VEN-001
  - TC-VEN-002
  - TC-VEN-003
  - TC-PRV-001
  - TC-PRV-002
---
# Settle Video Room Requests

## What It Does

Meeting writes append room work, and the daily and hourly jobs drain it. The gateway flag defaults off. Registrant and attendance handlers exist, but the production paths that enqueue registrants or deliver attendance events are absent. A lease is temporary exclusion rather than proof that calls cannot overlap.

## The Flow

```mermaid
flowchart TD
  H1["Insert room work alongside the meeting change."]

  H2["Claim at most fifty due rows and commit the two-minute lease before calling out."]
  H3["Invoke the configured Integration Platform capability"]
  H4["Record the settled video outcome and remove its request."]
  H1 --> H2
  H2 --> H3
  H3 --> H4
```

Insert room work alongside the meeting change. Claim at most fifty due rows and commit the two-minute lease before calling out. Invoke the configured Integration Platform capability; an unconfigured gateway reports provider unavailable. Record the settled video outcome and remove its request.

## When Something Fails

Roll back together with the meeting. No durable request after rollback. Leave unprocessed claims to expire. Room changes can lag behind meeting changes. Retain failed or unknown calls for another drain; settle provider-unavailable responses without an attempt cap. No room is created when the provider is unavailable, and failed calls stay pending. Keep the request if settlement fails, allowing the stored key to be retried. The provider may have acted before the meeting records that result.

## Open Design Questions

The gateway flag defaults off. Registrant and attendance handlers exist, but the production paths that enqueue registrants or deliver attendance events are absent. A lease is temporary exclusion rather than proof that calls cannot overlap.
