---
id: TST-PFM-SEC-251
title: Workspace resources 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-resources.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-resources.integration.spec.js#tenant
      resources persistence: recording what a participant made
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      every field of the resource, each with its own value
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#mints
      a `trs_` id
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.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-resources.integration.spec.js#carries
      no deletion instant for a resource that is still there
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#takes
      the creation instant from the execution clock when the participant gives none
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#persists
      it, so the participant that comes back finds it
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#tenant
      resources persistence: a retried run adopts what it finds
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      the row that was already there rather than refusing the uniqueness rule
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#leaves
      the tenant with exactly one row for that resource
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#records
      the run that adopted it
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#records
      the state the second call asked for
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#never
      overwrites when the resource itself came into being
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#counts
      the adoption as a write, so the version moves
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#tenant
      resources persistence: reading a tenant's resources
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      them by participant, then type, then key
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      none of another tenant resources, alike though the key is
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#filters
      to one participant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#filters
      to the states the purge cares about
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      nothing for a tenant that has recorded none
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#finds
      one resource by its key
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#finds
      nothing for a key nobody recorded
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#finds
      nothing for the right key under the wrong participant
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#finds
      another tenant resource only in that tenant (the isolation premise)
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#never
      finds another tenant resource from this tenant, though the key is the same
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#tenant
      resources persistence: moving a resource through its own life
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#marks
      a resource being removed
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#stamps
      no deletion instant while it is only being removed
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#stamps
      when it was removed once it is
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#counts
      the move as a write, so the version moves
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      nothing for a resource that does not exist
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#answers
      nothing for a resource of another tenant, which is the isolation that matters here
  - provenance: test
    source: >-
      services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.integration.spec.js#leaves
      that other tenant resource exactly as it was
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The suite controls message delivery, the clock at the declared seams; those collaborators remain
  outside its live proof.
evidence:
  - >-
    services-platform:modules/tenants/tests/integration/services/persistence/tenant-resources.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-resources.integration.spec.js
  explicit_no_doubles: false
  identified_double_boundaries:
    - message delivery
    - the clock
---
# Workspace resources 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 resources.

## 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 suite controls message delivery, the clock at the declared seams; those collaborators remain outside its live proof.

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