---
id: WF-PFM-MTD-015
title: Reset or delete a workspace's metadata and custom records
trigger: Reset makes a workspace ready for another initial load, whereas deletion removes the module’s complete
  local data.
product_area: platform
module: metadata
revision: 1
status: draft
design_intent: confirmed
origin: 'PLAT-M5 D7 (Andrew, 2026-10-19: what a data reset keeps, keep types), services-platform:docs/milestones/PLAT-M5-custom-records.md#Decisions;
  services-platform:docs/data-jobs/tenant-reset.md (reset keeps configuration no data operation loads)'
implementation_evidence: observed
inference: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
implements:
- CAP-PFM-MTD-009
- CAP-PFM-MTD-010
- CAP-PFM-MTD-015
- CAP-PFM-MTD-019
- CAP-PFM-MTD-014
moves:
- STATE-PFM-MTD-005
- STATE-PFM-MTD-008
crosses:
- SVC-PFM-MTD-metadata
- SVC-PFM-MTD-layouts
- SVC-PFM-MTD-custom-objects
- SVC-PFM-MTD-associations
- SVC-PFM-MTD-files
idempotency: Each invocation removes a bounded batch and reports whether more remains. Authorized workspace state
  blocks ordinary routes during reset or deletion, and retries operate on remaining data.
concurrency: Each invocation removes a bounded batch and reports whether more remains. Authorized workspace state
  blocks ordinary routes during reset or deletion, and retries operate on remaining data.
hops:
- n: 1
  actor_or_service: Tenant lifecycle job (reset)
  action: The reset contract invokes bounded participants to remove fields, labels, record data, revisions, delivery
    facts, links and files while retaining objects, apps, relationship types and layouts.
  anchor: services-platform:modules/tenants/services/lifecycle/reset-participants.ts:RESET_PARTICIPANTS
  seam: state_machine
  on_failure: The lifecycle engine retries failed batches and reports exhausted work to Rhythm HQ.
  left_inconsistent: Retained active object definitions lack their properties until configuration reload succeeds.
  observer: The initiating person and job execution state.
  provenance: observed
  source: services-platform:modules/custom-objects/services/maintenance/tenant-participant.ts
- n: 2
  actor_or_service: Data run (after reset)
  action: The data package reloads field definitions and rules before dependent custom records and links.
  anchor: services-platform:docs/data-jobs/platform-data-operations.md#Custom object records and associations
  seam: queue
  on_failure: Apply the load workflow’s rejection and partial-commit handling.
  left_inconsistent: Definitions can remain unusable if property reload does not finish.
  observer: Job or message outcomes and operational monitoring.
  provenance: documented
  source: services-platform:docs/custom-objects.md#Import, export and reset
- n: 3
  actor_or_service: Tenant lifecycle job (deletion)
  action: Deletion invokes reverse-dependency participants, clearing dependants before definitions and using authorized
    ledger and revision purgers.
  anchor: services-platform:modules/tenants/services/lifecycle/participants.ts:platformMetadataParticipant
  seam: state_machine
  on_failure: Retry bounded batches and reject purging outside the deletion context.
  left_inconsistent: Remaining rows await subsequent batches while the workspace remains unavailable.
  observer: The initiating person and job execution state.
  provenance: observed
  source: services-platform:modules/associations/services/maintenance/tenant-participant.ts:platformAssociationsParticipant
branches:
- New-workspace provisioning has no applicable participant work in these stores.
waits: []
evidence:
- 'services-platform at ad3f6a65: modules/tenants/services/lifecycle/participants.ts (metadata, layouts, assets
  participants), reset-participants.ts; modules/custom-objects/services/maintenance/tenant-participant.ts; modules/associations/services/maintenance/tenant-participant.ts;
  modules/custom-objects/services/persistence/business-events.ts, record-revisions.ts; docs/data-jobs/tenant-reset.md;
  docs/custom-objects.md#Import, export and reset'
controls: [TC-AI-001, TC-AI-002, TC-AI-003, TC-AI-004, TC-AI-006, TC-AI-007, TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, 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-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Reset or delete a workspace's metadata and custom records

## What It Does

Reset makes a workspace ready for another initial load, whereas deletion removes the module’s complete local data. Both use bounded lifecycle participants rather than ordinary record deletion.

## The Flow

```mermaid
sequenceDiagram
  participant HQ as Rhythm HQ
  participant Job as Lifecycle job (batches)
  participant Meta as Metadata participant
  participant CO as Custom objects participant
  participant Rel as Relationship participant
  participant Assets as Assets participant
  HQ->>Job: reset workspace
  Job->>Meta: empty custom fields, rules, labels
  Job->>CO: purge revisions, empty records, files rows, outbox, ledger; keep objects and apps
  Job->>Rel: empty links; keep types
  Job->>Assets: remove workspace files
  Job-->>HQ: done
  HQ->>Job: load package again (fields, records, links)
```

## When Something Fails

The lifecycle engine retries failed batches and reports exhausted work to Rhythm HQ. Retained active object definitions lack their properties until configuration reload succeeds. Apply the load workflow’s rejection and partial-commit handling. Definitions can remain unusable if property reload does not finish. Retry bounded batches and reject purging outside the deletion context. Remaining rows await subsequent batches while the workspace remains unavailable.

## Open Design Questions

Planning conflicts with the implemented retention of relationship types during reset; Product must resolve that disagreement.
