---
id: TST-PFM-ELG-493
title: Responsibility responsibility assignments table checks
kind: integration
product_area: platform
module: eligibility
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/responsibilities/tests/integration/db/responsibility-assignments.table.integration.spec.js
implements:
  - ATS-PFM-ELG-013-04
environment: local
implementation_state: implemented
latest_result: not-run
conformance: not-verified
estimated_minutes: 5
isolation: Prepared local test database with suite-owned fixture keys and cleanup.
evidence:
  - provenance: test
    source: >-
      services-platform:modules/responsibilities/tests/integration/db/responsibility-assignments.table.integration.spec.js
    cases:
      - >-
        accepts a user’s direct row at the tenant (the premise every refusal
        below varies)
      - refuses a row with two subjects
      - refuses a row with no subject
      - refuses a tenant scope that names a resource
      - refuses a resource scope without its id
      - accepts a resource scope of one of the definition’s scope kinds
      - >-
        refuses, by the wall, a resource scope of a kind the definition is not
        held at
      - 'refuses, by the wall, a user of another customer'
      - refuses a derived row that names no derivation
      - refuses a derivation on a row that is not derived
      - refuses a derivation source without its key
      - refuses a role on a row that is not a role default
      - refuses a window that ends before it starts
      - refuses an ended row without its end
      - refuses an end on a row that is not ended
      - >-
        keeps one live derived row per derivation key, definition and tenant
        scope (NULLS NOT DISTINCT)
      - leaves room for a key derived again once its row ended
      - >-
        keeps one role default per definition, role and tenant scope, a removed
        one included
      - >-
        keeps one active direct row per person, definition, scope and window
        (NULLS NOT DISTINCT), the kind aside
      - >-
        refuses a second active tenant-scoped direct row of the same person and
        window, both NULL
      - leaves room for a direct row once the one before it ended
      - keeps one row per tenant and idempotency key
      - refuses an idempotency key without its request digest
      - >-
        refuses, with no tenant in the session, to read or write a row through
        the application role
      - accepts a delegation of an assignment of its tenant (the premise)
      - refuses a window that ends before it starts
      - >-
        refuses a delegation of an assignment of another tenant, by the
        composite key
      - refuses an ended delegation without its end
      - refuses a key outside application.snake_case
      - refuses a key whose first word is not its application
      - refuses an expect_holder outside its closed list
      - accepts a well-formed definition (the premise of the three refusals)
      - '--> statement-breakpoint'
      - keeps the earliest of the identical active assignments active
      - 'ends the later identical ones with the reason duplicate, who and when'
      - keeps a note of its own and adds the migration’s
      - ends the open delegations of an ended duplicate
      - >-
        leaves the same person at another scope, and another person at the same
        scope, active
      - >-
        builds the index with NULLS NOT DISTINCT over the active direct and
        template rows
      - 'refuses, afterwards, another identical active assignment'
  - provenance: documented
    source: >-
      services-platform:modules/responsibilities/tests/integration/db/responsibility-assignments.table.integration.spec.js:suite
      header
    note: >-
      The source header describes the verification boundary and declared
      substitutions.
proof_limit: >-
  Only the named scenario checkpoints have a verified source binding; execution
  has not been attempted.
---

# Responsibility responsibility assignments table checks

## Verification Boundary

This suite checks the module through real local service and database code at the entry points used by its test cases.

## What This Suite Proves

The mapped scenarios identify the capability and feature checkpoints this file exercises. The source test titles preserve the assertion-level evidence.

## What It Does Not Prove

Registration supplies no execution result or conformance decision. Checks beyond the file’s reachable assertions remain unverified, including production configuration.

## Real Dependencies and Test Doubles

The suite exercises its real module dependencies and declares no test doubles. Its source header and imports identify the database, transaction and service boundaries it uses.

## Must Not Be Doubled

The module behavior under assertion, transaction boundary and database constraint being checked remain real. Fixture setup cannot stand in for the asserted write or refusal.
