Skip to content

CAP-PFM-TNL-006Preserve valid workspace lifecycle states

Markdown

CAP-PFM-TNL-006

Preserve valid workspace lifecycle states

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleWorkspace Lifecycle Across ApplicationsRevision2

Read atservices-platform ad3f6a65

The Formal Contract

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

Outcomes
Client inputs cannot replace system lifecycle facts.Lifecycle transitions accept only permitted paths and harmless repeats.Loading and deletion retain their required business statuses.
Surfaces
apijob
Intent sources
services-platform:docs/tenants/tenant-lifecycle-plan.md#§2.2services-platform:docs/proposals/rhythm-data-job-engine-plan.md#§21.3 D5

Controls

29 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-AZ-005 TC-DAT-001 TC-DAT-003 TC-DAT-004 TC-DAT-006 TC-IAM-001 TC-IAM-003 TC-IAM-006 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

Permissions

KeyChecked atScope
platform.tenants.manage-statusapiglobal

Business Rules

7 rules, 6 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
Client writes discard lifecycle state and first-activation time; lifecycle workflows control those values.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§2.2 No API sets lifecycle_state directly (approved)
invariantapi, servicetest
services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#ignores a lifecycle state a write input carries, rather than letting a client set the system axis
02must prove
Proposed
Allowed lifecycle moves connect provisioning to active or failed, failed to provisioning or deletion pending, active to loading or deletion pending, loading to active or deletion pending, and deletion pending to active or deleting; deleting has no successor.
lifecycleservicetest
services-platform:modules/tenants/tests/unit/services/lifecycle/lifecycle-transitions.spec.js#refuses deleting, so nothing can skip the waiting period by writing the state
03must prove
Proposed
Repeating the current lifecycle state succeeds without a transition or further state change.
invariantservicetest
services-platform:modules/tenants/tests/unit/services/lifecycle/lifecycle-transitions.spec.js#allows deleting to deleting, so a retried purge step is idempotent
04must prove
Proposed
Database checks require disabled status during pending deletion and destruction, and implementation status during loading.
invariantdatabasetest
services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses a status change the lifecycle forbids, by the rule the database holds
05must prove
Proposed
Business-status changes belong to authorized Rhythm staff; customer administrators may correct ordinary workspace details but cannot change that status.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§2.2 Who can change status (approved)
permissionapitest
services-platform:modules/tenants/tests/e2e/tenant-deletion-requests.e2e.spec.js#may not disable it, because cutting an association off is a staff act
06
Proposed
Direct fixture creation outside a provisioning submission defaults the workspace to active lifecycle.
lifecycleservicetest
services-platform:modules/tenants/tests/e2e/tenants.e2e.spec.js#answers the lifecycle state of a tenant created ready to use
07must prove
Proposed
Disposable workspaces are a testing convention and their creation is rejected in Production.
origin: services-platform:docs/tenants/tenant-lifecycle-plan.md#§5.3 Disposable test tenants (approved)
validationservicetest
services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses a disposable tenant in Production, where no such tenant exists

Scenarios

IdGivenWhenThenProvenance
01A disabled workspace awaits deletion.A write attempts to make its status live while leaving deletion pending.The database rejects the inconsistent axes.test
services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses a status change the lifecycle forbids, by the rule the database holds

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.