---
id: WF-PFM-TNL-006
title: Reconcile the baseline on every CRM deployment
trigger: Bring eligible existing CRM workspaces up to the release’s declared baseline.
product_area: platform
module: tenant-lifecycle
revision: 1
status: draft
design_intent: confirmed
origin: services-platform:docs/standards/baseline-configuration.md#§3 How it is reconciled (D-48, Andrew 2026-10-19)
implementation_evidence: observed
inference: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  services-committees: 36129c24daeaadcdb339218c38cdeaff9861359d
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  services-submissions: 64236c19be89579ef5897aad7de3925ed3ce03bf
  services-websites: 5fc6823c69d5e6f208c21dba8c0eb3132f8bdc4c
  services-marketing: d071a159fe9782bb71ff246d5c67d5bbfe07fbfa
implements:
- CAP-PFM-TNL-009
- CAP-PFM-TNL-008
moves: []
crosses:
- SVC-PFM-TNL-crm-tenant-lifecycle
- SVC-PFM-TNL-tenants
idempotency: Ledgered reconciliation applies only missing seeds. Unchanged deployment properties do not request
  another pass.
concurrency: The deployment pass processes workspaces in one invocation. The function’s reserved concurrency and
  execution timeout bound the pass.
hops:
- n: 1
  actor_or_service: AWS CloudFormation
  action: Invoke release reconciliation after migrations and the lifecycle alias update.
  anchor: services-crm:aws/cdk/logic/baseline-reconciliation.ts:createBaselineReconciliation
  seam: sync
  on_failure: Report custom-resource failure to deployment.
  left_inconsistent: Earlier configuration writes can remain through stack rollback.
  observer: Job progress and service logs.
  provenance: observed
  source: services-crm:aws/cdk/logic/baseline-reconciliation.ts
- n: 2
  actor_or_service: CRM baseline reconciliation
  action: Select active, loading and failed-provisioning workspaces regardless of business standing.
  anchor: services-crm:modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts:reconcileBaselineConfiguration
  seam: sync
  on_failure: Fail the reconciliation read.
  left_inconsistent: No workspace initialization has begun from this read.
  observer: Job progress and service logs.
  provenance: observed
  source: services-crm:db/platform/tenants.ts:OPERATIONAL_TENANT_STATES
- n: 3
  actor_or_service: CRM baseline reconciliation
  action: Initialize enabled participants with seed sets in each selected workspace.
  anchor: services-crm:modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts:reconcileTenantsBaseline
  seam: sync
  on_failure: Collect that workspace’s failure and continue.
  left_inconsistent: Seed sets committed before failure remain applied.
  observer: Job progress and service logs.
  provenance: observed
  source: services-crm:modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts
- n: 4
  actor_or_service: CRM baseline reconciliation
  action: Return counts or a bounded failure summary for the deployment response.
  anchor: services-crm:modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts:baselineReconciliationResponse
  seam: sync
  on_failure: Fail deployment when workspace errors remain.
  left_inconsistent: Rolled-back code can coexist with newly applied defaults.
  observer: Job progress and service logs.
  provenance: observed
  source: services-crm:modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts:baselineReconciliationResponse
branches:
- CloudFormation deletion performs no workspace initialization.
waits: []
evidence:
- 'services-crm at a8d1364f: modules/tenant-lifecycle/services/lifecycle/baseline-reconciliation.ts; aws/cdk/logic/baseline-reconciliation.ts;
  db/platform/tenants.ts.'
- 'services-platform at ad3f6a65: docs/standards/baseline-configuration.md.'
controls: [TC-AVL-001, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-005, TC-CHG-006, TC-CHG-007, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-IAM-001, TC-IAM-002, TC-IAM-003, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-005, TC-MON-001, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Reconcile The Baseline On Every Crm Deployment

## What It Does

Bring eligible existing CRM workspaces up to the release’s declared baseline. Ledgered reconciliation applies only missing seeds. Unchanged deployment properties do not request another pass.

## The Flow

```mermaid
sequenceDiagram
  autonumber
  participant CFN as CRM deployment
  participant Fn as CRM lifecycle function
  participant PT as Workspace lifecycle (read)
  participant DB as CRM database
  CFN->>Fn: reconciliation run (release, function version)
  Fn->>PT: workspaces active, loading or failed
  loop each workspace
    Fn->>DB: initialize every participant's seed sets through the ledger
  end
  alt any workspace failed
    Fn-->>CFN: failure naming the workspaces
  else
    Fn-->>CFN: counts
  end
```

## When Something Fails

Report custom-resource failure to deployment. Earlier configuration writes can remain through stack rollback. Fail the reconciliation read. No workspace initialization has begun from this read. Collect that workspace’s failure and continue. Seed sets committed before failure remain applied. Fail deployment when workspace errors remain. Rolled-back code can coexist with newly applied defaults.

## Open Design Questions

One invocation covers the complete selected workspace set without continuation. Large releases can exceed function time, and other applications lack equivalent reconciliation.
