---
id: TST-PFM-ELG-495
title: Responsibility assignments 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/services/persistence/assignments.integration.spec.js
implements:
  - ATS-PFM-ELG-013-04
  - ATS-PFM-ELG-013-05
  - ATS-PFM-ELG-013-06
  - ATS-PFM-ELG-013-07
  - ATS-PFM-ELG-013-08
  - ATS-PFM-ELG-013-09
  - ATS-PFM-ELG-013-16
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/services/persistence/assignments.integration.spec.js
    cases:
      - 'writes a user’s direct, active row, stamped with the caller'
      - >-
        audits the create as a responsibility_assignment, naming the fields
        given
      - >-
        writes a role subject as a role default, how a tenant narrows a default
        to a resource
      - 'allows a future-dated assignment, read by nothing until it starts'
      - 'refuses a team, saying teams do not exist yet, and writes nothing'
      - refuses two subjects
      - 'refuses a retired definition, naming definition_key'
      - 'refuses a scope kind the definition is not held at, naming resource_type'
      - 'refuses a user of another customer, naming user_id, through the wall'
      - 'refuses a window that ends before it starts, naming valid_until'
      - 'ends a direct row at the version read, stamping who and when'
      - ends the assignment’s open delegations in the same transaction
      - refuses a stale version and leaves the row as it was
      - >-
        refuses to end a derived row, 409 derived_assignment, and leaves it
        active
      - >-
        refuses to end a role default, 409 role_default_assignment, pointing to
        remove
      - 'removes a role default, which stays as history with status removed'
      - 'refuses to remove a direct row, and leaves it active'
      - 'refuses a second identical active assignment, 409 already_assigned'
      - leaves exactly the first row after the refusal
      - >-
        refuses the same person as backup where they are primary, one holder
        once
      - allows the same person at a different scope
      - allows the same person in a different window
      - allows another person at the same scope
      - allows a new assignment once the first has ended
      - >-
        answers the first assignment to a replay of the same key and body,
        writing nothing
      - >-
        answers the same assignment, as it now stands, to a replay after it has
        ended, creating nothing
      - >-
        refuses the same key with another body, 422 idempotency_key_reused, and
        writes nothing
      - does not put the key or its digest on the wire
      - records the key and a digest on the row
      - answers one assignment to two simultaneous creates under one key
      - >-
        refuses the second of two simultaneous creates without a key, and writes
        one row
      - creates two rows for two different keys only when the holder differs
  - provenance: documented
    source: >-
      services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.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 assignments 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 uses local integration fixtures. Signing, caches, provider responses or outbound delivery may be supplied by fixtures where the source declares a substitution. The source imports and suite header identify the exact dependencies.

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