Skip to content

CAP-PFM-TNL-007Account for each application’s lifecycle responsibilities

Markdown

CAP-PFM-TNL-007

Account for each application’s lifecycle responsibilities

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleWorkspace Lifecycle Across ApplicationsRevision2

Read atservices-platform ad3f6a65services-crm a8d1364fservices-commerce c8b66a98services-committees 36129c24services-membership 5994c270services-submissions 64236c19services-websites 5fc6823cservices-marketing d071a159

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Applications expose a shared lifecycle protocol with optional operations declared explicitly.Completeness checks account for workspace-keyed tables exactly once.Platform’s enabled declarations control when an application participates.
Surfaces
jobapi
Intent sources
services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.1services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.2services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.4 Completeness check

Controls

30 controls apply, from the corpus control catalogue.

TC-AVL-001 TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-004 TC-DAT-005 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-LOG-001 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-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

9 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Each application’s lifecycle function can describe its participants before a workspace exists; its other operations act on a named workspace and participant.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.1 Registration (approved 2026-10-09)
policyservicetest
services-crm:modules/tenant-lifecycle/tests/unit/lifecycle/tenant-lifecycle-operations.spec.js#answers describe without reaching a tenant, so Platform can ask before a tenant exists
02must prove
Proposed
CRM validates the operation, participant, write-run identity and batch bounds before participant execution.
validationservicetest
03must prove
Proposed
Participant dependencies determine provisioning order and reversed deletion order, keeping the workspace record first to build and last to remove.
calculationservicetest
services-crm:modules/tenant-lifecycle/tests/unit/participants/deletion-order.spec.js#leaves the tenant row until last, in a stage of its own
04must prove
Proposed
Completeness checks require one participant per workspace-keyed table and verify that declared tables exist.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.4 Completeness check (approved)
invariantservicetest
05must prove
Proposed
Platform’s enabled declarations determine which applications enter a plan; an application with no enabled participants is neither described nor invoked.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.1 Accounting part 1 (approved 2026-10-15)
policyservicetest
services-platform:modules/tenants/tests/unit/services/lifecycle/remote-participants.spec.js#never asks Accounting to describe itself while Platform enables none of its participants
06must prove
Proposed
CRM advertises participant reset support, and Platform checks remote reset declarations before emptying its selected participants.
origin: services-platform:docs/data-jobs/tenant-reset.md#§3.1 Declaring support
validationservicetest
services-crm:modules/tenant-lifecycle/tests/unit/lifecycle/tenant-lifecycle-operations.spec.js#names reset among the operations of every participant it describes, which is how Platform knows it may reset the tenant
07must prove
Proposed
Repeated registration of an external resource adopts the existing register row instead of duplicating it.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§4.4 External success, then failure to record it (approved)
invariantservice, databasetest
services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers the row that was already there rather than refusing the uniqueness rule
08must prove
Proposed
Participant purges exclude shared infrastructure; customer deletion is a separate, explicitly requested action for the final workspace.
no proof recorded yet
policyservicedocumented
services-platform:docs/tenants/tenant-lifecycle-plan.md#§6.4 shared (declared, never purged)
09
Proposed
Platform’s registry includes each local participant once, excludes remote implementations and validates the declarations it publishes.
invariantservicetest
services-platform:modules/tenants/tests/unit/services/lifecycle/participants.spec.js#passes the contract’s own validator for every participant, local and remote

Scenarios

IdGivenWhenThenProvenance
01Commerce gains an undeclared workspace-keyed table.Its completeness check compares declarations and schema.The undeclared table makes that check fail.test
02Platform disables all Accounting participants.It builds the provisioning plan.Accounting contributes no planned participant.test
services-platform:modules/tenants/tests/unit/services/lifecycle/remote-participants.spec.js#leaves the provisioning plan exactly as it was without Accounting’s declaration once it is switched off (the negative control)

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.