---
id: TST-PFM-TNL-049
title: 'Platform initial load, reset and activation routes'
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/hq-tenant-loading.e2e.spec.js
implements:
  - ATS-PFM-TNL-011-01
  - ATS-PFM-TNL-011-04
  - ATS-PFM-TNL-011-06
  - ATS-PFM-TNL-012-01
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/hq-tenant-loading.e2e.spec.js'
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../../../aws/api/platform-api-handler
  - 'services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports ../../../../db/config'
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../../../db/seeds/integration/seed
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../../../tests/e2e/staff-context
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../../../aws/platform.service
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../services/access/tenant-availability
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../services/persistence/tenants
  - >-
    services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports
    ../../aws/api/tenants.routes
  - 'services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js imports ../local-deletion'
  - 'services-platform:modules/tenants/tests/e2e/hq-tenant-loading.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-011-02
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a live tenant, an
        initial import going only into an implementation tenant
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#names the status rule in
        that refusal, so an operator knows which half stopped it
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#left the live tenant exactly
        as it was, so the refusal did not half-happen
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-011-03
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#is served to a staff member
        holding hq.data-runs.manage, answering the loading state
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#records who opened the load
        and why, which is what the row is evidence of
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-011-05
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#is served to a staff member
        holding hq.tenants.activate, returning the tenant to active
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#leaves the status where it
        was, going live being the separate decision
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#keeps the record of the
        load, which is the evidence of what was done to the tenant
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-02
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a tenant that is in
        implementation mode and not loading
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-03
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a confirmation that
        is not the tenant’s own id, without saying what to type
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-04
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses the second 409,
        naming the reset that is running
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-05
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#refuses a tenant it may
        otherwise reset, the services holding its records not being in the live plan
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-08
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#is accepted for a staff
        member holding hq.data-runs.manage: 202, naming the tenant and the job that empties it
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#answers the totals by
        resource the reset removed, the other macroservice’s among them
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#leaves the tenant loading
        and in implementation, so the package can be loaded again at once
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
  - scenario: ATS-PFM-TNL-012-10
    references:
      - >-
        services-platform:modules/tenants/tests/e2e/hq-tenant-loading.e2e.spec.js#leaves the tenant loading
        and in implementation, so the package can be loaded again at once
    provenance: test
    scope: partial assertions; no complete scenario implementation claimed
---
# Platform initial load, reset and activation routes

## 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

Initial load, reset and activation routes 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 local deletion harness runs the production workflow definition, task handler, job engine and Platform persistence. It advances a controlled clock and supplies recording mail, in-memory storage and ledger, remote-application, search and portal-provider seams. These doubles establish orchestration behavior rather than provider removal.

## 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.
