---
id: TST-PFM-SEC-246
title: Workspace deletion requests.queries 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/tenant-deletion-requests.queries.integration.spec.js
implements: []
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/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: reading one request
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      every field of the request, each with its own value
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      each instant in the wire form, milliseconds and a Z
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#carries
      no property for a column that holds nothing: an unheld request has no hold reason
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for an id nobody holds
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      the same record through the locking read, inside a transaction
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#refuses
      the locking read outside a transaction, because a lock no transaction holds is no lock
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing through the locking read for an id nobody holds
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: the open request of a tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      a scheduled request
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      a held request: a hold does not close a request
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      an executing request: destruction under way is very much open
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing once the request is cancelled
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for a tenant nobody has asked to delete
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#does
      not answer another tenant request, however alike (the collision control)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: a tenant's history
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      every request ever made about the tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      them newest first
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      the cancelled ones too: a history that forgot them would hide why the tenant is still here
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      none of the other tenant requests (the collision control)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for a tenant nobody has asked to delete
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: the operators' listing
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#finds
      the eleven requests the suite made (the premise)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#orders
      by eligibility, with the id as the tie-breaker of the two that come due together
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#filters
      to one state
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#filters
      to one tenant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#filters
      to what is already eligible, by the instant it is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      an empty page, and no cursor, when nothing matches
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      at most the limit it is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      a cursor when another page may exist
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#resumes
      after the cursor, repeating nothing
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#walks
      every one of the suite requests across its pages, skipping none
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      no cursor on the last page
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      no cursor when the page is exactly full and nothing follows
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#defaults
      to a page of fifty when no limit is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#caps
      the page at two hundred however large a limit is asked for
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: a request's notices
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      them in schedule order, whatever order they were written in
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      every field of a notice, each with its own value
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      none of another request notices (the collision control)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for a request that has none
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: every request beside the tenant it is about
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      the five requests the suite made (the premise)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      a request whole beside the lifecycle state of the tenant it is about
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      the tenant’s own lifecycle state and never a state of the request’s
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#carries
      no lifecycle state at all for a request whose tenant row is gone, which is what a completed
      deletion leaves
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      them newest first, with the id as the tie-breaker of two requested at one instant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      one entry per request and never repeats a request because of the join
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reads
      at most the number of requests it is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reads
      one request however small a limit it is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reads
      five hundred requests when no limit is given
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#caps
      the read at five thousand requests however large a limit is asked for
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#tenant
      deletion requests queries: reopening a request after a restore
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reopens
      a scheduled request under the purge job that will finish what the backup undid
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#persists
      exactly the record it answered, so the row and the answer never disagree
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reopens
      a held request: a hold pauses a decision, and the deletion has already happened
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reopens
      an executing request under the new purge job, replacing the one it named
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#reopens
      a failed request, and leaves the summary of what went wrong last time on the row
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for a cancelled request, which no restore reopens
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#leaves
      a cancelled request exactly as it was
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for a completed request, whose deletion the ledger already records
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#leaves
      a completed request exactly as it was
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js#answers
      nothing for an id nobody holds
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/tenant-deletion-requests.queries.integration.spec.js
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: >-
    services-platform:modules/tenants/tests/integration/services/persistence/tenant-deletion-requests.queries.integration.spec.js
  explicit_no_doubles: true
  identified_double_boundaries: []
---
# Workspace deletion requests.queries 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 workspace deletion requests.queries.

## What This Suite Proves

The file supplies executable engineering checks for the named subject. No complete acceptance scenario is inferred from the file’s existence.

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