---
id: TST-PFM-OPS-057
title: Audit events table
kind: integration
product_area: platform
module: operations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/audit/tests/integration/db/audit-events.table.integration.spec.js
implements:
  - ATS-PFM-OPS-010-01
  - ATS-PFM-OPS-010-02
  - ATS-PFM-OPS-010-03
  - ATS-PFM-OPS-010-04
  - ATS-PFM-OPS-010-05
  - ATS-PFM-OPS-010-09
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
estimate_basis: Scheduling estimate only; no duration is measured during this documentation pass.
isolation: >-
  The prepared local test database and suite-owned identifiers; existing hooks control rollback or
  cleanup.
evidence:
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js at
    ad3f6a6582843008ed0f5a17b131878d15829af1: existing suite body, setup, assertions and cleanup.
binding_note: Bindings apply only to the listed specification scenarios.
assertion_sources:
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#gives the
    event an id the database generated, so no client chooses one
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#records
    the tenant, the actor and the record the event is about
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#stamps
    the instant the event happened, so a writer that gives none still has one
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#starts
    the metadata as an empty object rather than null
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#answers a
    UUID of version 7 every time
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#answers a
    different id every time, so two events in one millisecond are two rows
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#answers
    ids whose first six bytes are the millisecond, so an id made later never sorts before one made
    earlier
  - >-
    services-platform:modules/audit/tests/integration/db/audit-events.table.integration.spec.js#accepts
    the event type the store holds (the negative control)
---

# Audit events table

## Verification Boundary

This suite exercises record activity through production operations against the local database. Its implementation is present at the pinned source revision, and this register records no execution result.

## What This Suite Proves

The checks exercise the activity table’s event vocabulary, metadata constraints, timestamp precision, workspace policies and database-role privileges. The scenario bindings name the attributed outcomes.

## What It Does Not Prove

Local execution does not establish deployed infrastructure, live commercial-provider configuration or authorization-cache completion. Registration and an implemented suite do not establish a passing result.

## Real Dependencies and Test Doubles

The prepared PostgreSQL database and production operations under test are real.

## Must Not Be Doubled

The persistence operations, database constraints and reads under assertion remain real.
