---
id: TST-PFM-SEC-253
title: Workspaces database and service checks
kind: integration
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js
implements:
  - ATS-PFM-SEC-002-03
  - ATS-PFM-SEC-002-05
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: Use the prepared test database and suite-owned fixture rows; retain shared seed records.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: createTenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      the tenant under its customer with the fields it was given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#fills
      the schema's defaults for the closed lists the write left out
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stamps
      version 1 with the caller as creator
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#persists
      exactly the record it answered
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#links
      a sandbox to the customer tenant it is a sandbox of
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#accepts
      a body carrying the server-owned system properties and ignores their values
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#writes
      the two client-settable system columns the body names
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a tenant whose customer does not exist as a ForeignKeyViolation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#inserts
      nothing when it refuses a tenant whose customer does not exist
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a sandbox whose parent does not exist as a ForeignKeyViolation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id that already exists as an IllegalOperation, the 409 tenant_id_taken
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the existing tenant untouched when it refuses the duplicate id
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: getTenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      a seeded well-known tenant with its customer, parent and status
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      the seeded FAA tenant as an association under implementation with acronym FAA
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      a seeded tenant's system properties
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      undefined for an unknown id
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: listTenants
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#lists
      every seeded well-known tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#lists
      them in id order
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: listTenantsByCustomer
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#lists
      the tests customer's five seeded tenants
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#does
      not list another customer's tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      an empty list for a customer with no tenants
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: listTenantsByParent
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#lists
      the parent's children: tests has tests_live and tests_balance_due
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#does
      not list the parent itself
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      an empty list for a tenant without children
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: updateTenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#replacing
      a tenant at the version it was read at
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      the replaced fields
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#bumps
      the version and stamps the updater
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#persists
      exactly the record it answered
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#makes
      a tenant the sandbox of another, which is what naming a parent now means
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#clears
      the fields the replacement omits
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#clears
      them from the row, not only from the answer
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a stale version as StaleObject
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the row at the version it reached when it refuses a stale version
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an unknown id as RecordNotFound
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      moving a tenant to a customer that does not exist as a ForeignKeyViolation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the tenant under its own customer when it refuses the move
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a record locked against updates as IllegalOperation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      a record locked against updates unchanged
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: setTenantHubspotCompany
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#moving
      the link to another company
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      the tenant with the company it was given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#bumps
      the version and stamps the updater, as every write of this table does
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      every other field of the tenant where it was
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#persists
      exactly the record it answered
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#links
      a tenant that had no company at all
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#clears
      the link when it is given null
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#clears
      it from the row, not only from the answer
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a stale version as StaleObject
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the link where the first write put it when it refuses a stale version
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an unknown id as RecordNotFound
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a record locked against updates as IllegalOperation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      a record locked against updates unchanged
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: deleteTenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      the id of the tenant it deleted
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      no row behind
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an unknown id as RecordNotFound
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a record locked against deletes as IllegalOperation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      a locked record in place
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a parent that still has children as a ForeignKeyViolation
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      a parent that still has children in place
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: persistence rules
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#the
      acronym suffix
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#suffixes
      the acronym to the name it answers on create
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#suffixes
      it in the row, not only in the answer
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#suffixes
      it on update
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#does
      not double an existing suffix on a later update
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#the
      reserved ids
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a tenant called system, whose id a route path already means something else by
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a tenant called provision, the console’s literal beside /hq/tenants/:tenantId
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#writes
      no such tenant when it refuses the reserved id
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#the
      disposable flag
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#creates
      a tenant no test made as not disposable, which is what every ordinary tenant is
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      the flag a development test asks for, which is what shortens its deletion
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a disposable tenant in Production, where no such tenant exists
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#writes
      no tenant at all when Production refuses the flag
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an update that makes an existing tenant disposable in Production
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#the
      portal request
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#creates
      a tenant that asked for no portal with neither the flag nor an instant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stamps
      the instant a create asks for a portal
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stamps
      it when a later update asks for one
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the instant where it is through an edit that does not move the flag
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#clears
      the instant when the request is withdrawn
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#going
      live
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#lets
      a sandbox tenant go live, the data-import check being recorded as debt
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#disabling
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#disables
      a tenant, stamping nothing (the tenant has no disabling date)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#persists
      the disabled status
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#the
      lifecycle axis, which no ordinary write touches
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#creates
      every tenant active, which is what a tenant that needs no provisioning job is
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the lifecycle state where it is through an ordinary update
  - provenance: test
    source: >-
      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
  - provenance: test
    source: >-
      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
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the tenant unchanged when it refuses that status change
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: the lifecycle state
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#a
      permitted move
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      the tenant in its new state
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#persists
      it
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#bumps
      the version, as every write does
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stamps
      the caller as the last modifier
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#changes
      nothing when the tenant is already in that state
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#a
      move the table forbids
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#is
      refused, naming both states
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the tenant exactly as it was, version included
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      404 for a tenant that does not exist
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#activated_at
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#is
      set on a tenant created ready to use (the premise)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#is
      stamped when provisioning finishes
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#is
      NOT stamped when a cancelled deletion returns a never-provisioned tenant to active
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#keeps
      the instant it was first given when provisioning is somehow finished twice
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: the tenant time zone
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      the IANA zone the tenant is created with
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      the stored zone back through readTenantTimeZone
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#answers
      no zone for a tenant that does not exist
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#gives
      a tenant created without a zone the system default, Eastern
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      the system default for a tenant created without a zone, not merely answers it
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#gives
      a tenant replaced without a zone the system default, Eastern
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a create naming an abbreviation as InvalidRequest
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a create naming a fixed offset as InvalidRequest
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a create naming an Etc zone as InvalidRequest
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a create naming an IANA zone in another case as InvalidRequest
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a create naming a place that does not exist as InvalidRequest
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an update to an abbreviation, leaving the row unchanged
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#resolves
      a tenant execution's calendar from the column
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      an execution acting in the tenant in the tenant's zone
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reaches
      the next execution at once when the zone changes
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      the new zone as an offset of the Pacific coast
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#does
      not touch stored instants when the zone changes
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#tenants
      persistence: the tenant id
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a created tenant that names no id as tenant_id_required, naming the property
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      a created tenant whose id is blank as tenant_id_required
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      an id normalized, so a padded id in capitals is stored trimmed and lowercase
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#reads
      FAA.Org as faa.org, and so finds it taken by the well-known tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      a sandbox under an id with dots, beside its parent
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#stores
      an id with underscores and hyphens
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      the shape of a generated UUID as tenant_id_invalid, naming the property
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id with two dots together as tenant_id_invalid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id with a leading dot as tenant_id_invalid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id with an inner space as tenant_id_invalid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id with 65 characters as tenant_id_invalid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#writes
      no tenant when it refuses an id as tenant_id_invalid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#refuses
      an id another tenant has as 409 tenant_id_taken
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js#leaves
      the tenant that has the id unchanged when it refuses the second
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The file declares no substituted collaborators.
evidence:
  - >-
    services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: >-
    services-platform:modules/tenants/tests/integration/services/persistence/tenants.integration.spec.js
  explicit_no_doubles: true
  identified_double_boundaries: []
---
# Workspaces database and service checks

## Verification Boundary

The file exercises database or service behavior through the local integration harness. The assertion references identify the source checks for workspaces.

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here. The file declares no substituted collaborators.

## Must Not Be Doubled

Keep the queried database, applicable constraints and transaction boundaries real. Provider substitutes cannot establish delivery, cloud execution or cross-service recovery.
