---
id: JNY-PFM-TNL-002
title: Staff finish an interrupted workspace build
feature: FEAT-PFM-TNL-01
product_area: platform
module: tenant-lifecycle
revision: 2
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes: []
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
actor: ACT-PFM-004
goal: A failed workspace becomes usable through an accountable replacement attempt.
capabilities:
  - CAP-PFM-TNL-003
  - CAP-PFM-TNL-005
  - CAP-PFM-TNL-002
  - CAP-PFM-TNL-013
screens:
  - '/hq/jobs/tenant_provisioning/{jobId}'
steps:
  - 'n': 1
    surface: 'tenant_provisioning: RecordFailure'
    action: Retain the failed participant result and stop construction.
    capability: CAP-PFM-TNL-003
    expected: The workspace remains with its partial resources and failed lifecycle.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#leaves
      the tenant saying its provisioning failed, which is what makes it
      retryable
  - 'n': 2
    surface: notifyJobRequester
    action: Read the failure notice.
    capability: CAP-PFM-TNL-003
    expected: >-
      The notice explains the outcome and the available retry or deletion
      choices.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/provisioning/provisioning-notices.integration.spec.js#says
      the tenant is left standing and can be retried or deleted
  - 'n': 3
    surface: '/console/{tenantId}'
    action: Attempt ordinary customer entry into the failed workspace.
    capability: CAP-PFM-TNL-005
    expected: Availability remains closed to customer context.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/unit/services/access/tenant-availability.spec.js#answers
      the rule for every combination of lifecycle state, status and caller
  - 'n': 4
    surface: getTenantProvisioning
    action: Inspect the provisioning snapshot’s failure explanation.
    capability: CAP-PFM-TNL-003
    expected: The snapshot retains the participant’s summary.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#says
      so in the snapshot too, with the failure summary the task refused with
  - 'n': 5
    surface: retryTenantProvisioning
    action: Correct the cause and request retry.
    capability: CAP-PFM-TNL-003
    expected: The response identifies a new attempt linked to the failed build.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#answers
      200 and a new job to the retry
  - 'n': 6
    surface: tenant_provisioning (retry)
    action: Complete the outstanding construction and readiness work.
    capability: CAP-PFM-TNL-002
    expected: Retained steps are not repeated and the workspace becomes active.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#leaves
      the tenant usable after the retry
alternates:
  - from_step: 5
    condition: Staff decide to abandon construction.
    path: Disable the failed workspace and submit deletion.
    outcome: The never-opened fixture enters its shorter waiting path.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/deletion/request-deletion.integration.spec.js#makes
      a tenant that was never provisioned wait one day
  - from_step: 1
    condition: Execution never reached a participant task.
    path: Repair the stranded workspace after job reconciliation.
    outcome: Staff can retry or request removal from failed lifecycle.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/provisioning/repair-stranded-provisioning.integration.spec.js#moves
      the stranded tenant to provisioning_failed, which makes it retryable and
      deletable again
failures:
  - from_step: 5
    condition: The existing build did not fail.
    path: Reject the retry request.
    outcome: Workspace and job remain unchanged.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#refuses
      to provision a tenant again whose provisioning did not fail
rules_in_play:
  - BR-CAP-PFM-TNL-003-02
  - BR-CAP-PFM-TNL-003-03
  - BR-CAP-PFM-TNL-003-04
  - BR-CAP-PFM-TNL-003-07
  - BR-CAP-PFM-TNL-002-06
  - BR-CAP-PFM-TNL-005-01
  - BR-CAP-PFM-TNL-013-08
assertions:
  - id: AS-JNY-PFM-TNL-002-01
    statement: Failure retains the constructed resources and a readable explanation.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/e2e/tenant-provisioning.e2e.spec.js#says
      so in the snapshot too, with the failure summary the task refused with
  - id: AS-JNY-PFM-TNL-002-02
    statement: >-
      Replacement construction completes outstanding work without duplicating
      completed steps.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/provisioning/provision-tenant.integration.spec.js#does
      the missing work and not the finished work when it is provisioned again
  - id: AS-JNY-PFM-TNL-002-03
    statement: >-
      Disposal of the disabled never-opened fixture uses a one-day eligibility
      period.
    provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/deletion/request-deletion.integration.spec.js#makes
      a tenant that was never provisioned wait one day
e2e_policy: required
e2e_reason: >-
  The outcome crosses lifecycle operations and warrants end-to-end verification;
  the current bindings establish backend fixtures, while screen and
  deployed-service coverage remain separate gaps.
---

# Staff finish an interrupted workspace build

## Story

The administrator learns that construction stopped and reads the recorded explanation. The customer cannot enter the unfinished workspace. Staff restore the missing dependency and request a replacement attempt, which finishes the outstanding work. If construction is no longer wanted, staff use the deletion process instead of erasing partial resources as a failure side effect.
