---
id: TST-PFM-TNL-050
title: Platform workspace access dispatcher
kind: api-lifecycle
product_area: platform
module: tenant-lifecycle
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js
implements:
  - ATS-PFM-TNL-005-02
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Run-owned target and comparison workspace records in the prepared test database; owner access is limited to
  fixture arrangement, independent inspection and cleanup of those records.
evidence:
  - 'services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js'
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../../tests/e2e/staff-context
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../../aws/api/platform-api-handler
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../../db/config
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../../db/seeds/integration/seed
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../communications/aws/api/communications.routes
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../../metadata/aws/api/metadata.routes
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../services/access/tenant-availability
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../services/persistence/tenants
  - >-
    services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js imports
    ../../db/tenants.table
binding_scope: >-
  Each implements link names a scenario whose retained cited checks all occur in this file. Partial assertions
  for other scenarios remain evidence only.
partial_scenario_evidence:
  - scenario: ATS-PFM-TNL-005-01
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is served a
        tenant-scoped route in an active tenant (the premise every refusal below is read against)
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant whose customer has been cut off
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant that is still being provisioned
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant whose destruction has begun
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is told only that the
        tenant is not available
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-005-03
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#may not write to a
        tenant being deleted, which the same caller being served above is the premise for
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-005-04
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant whose initial data import is open
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is past the gate in a
        tenant whose initial data import is open, which is what lets the import run at all
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-005-08
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant that is still being provisioned
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-005-09
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/tenant-availability-gate.e2e.spec.js#is refused 403 in a
        tenant whose initial data import is open
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
---
# Platform workspace access dispatcher

## Verification Boundary

The suite sends request-shaped events through the local production dispatcher with signed caller contexts and a test database. Its API boundary is real inside the process; it does not call a deployed endpoint or drive a browser.

## What This Suite Proves

Workspace access dispatcher is the inspected subject. The implements links identify scenarios whose cited checks occur in this file. The original test-title references delimit those checks; partial contributions to other combined scenarios remain evidence only.

## What It Does Not Prove

Source inspection supplies no passing run. The suite does not establish console behavior, deployment configuration, complete removal in every application or recovery from a provider failure beyond its declared seams. A local zero inventory covers declared and seeded resources only.

## Real Dependencies and Test Doubles

The suite retains its database and production functions as shown by the cited source. Fixture clocks, contexts, seeded Platform facts or callback dependencies remain test inputs. The imported support is recorded as evidence; no external provider result is inferred from a local fixture.

## Must Not Be Doubled

Keep the production service or persistence function and the database constraints, row policies and guarded removal functions under test real. For dispatcher cases, keep route selection and authorization real as well. Provider and remote-application seams must remain explicit and cannot stand in for deployed cross-application qualification.
