---
id: TST-MBR-STR-095
title: Configuration and structure database refusals
kind: api-lifecycle
product_area: membership
module: structure
revision: 1
status: draft
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-membership
files:
  - tests/e2e/database-refusals.e2e.spec.ts
implements:
  - ATS-MBR-STR-001-08
  - ATS-MBR-STR-004-04
  - ATS-MBR-STR-009-01
  - ATS-MBR-STR-009-03
  - ATS-MBR-STR-011-01
  - ATS-MBR-STR-011-03
  - ATS-MBR-STR-012-05
  - ATS-MBR-STR-012-06
  - ATS-MBR-STR-012-07
  - ATS-MBR-STR-013-02
  - ATS-MBR-STR-018-07
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: A uniquely named local workspace and its seeded records; the suite owns its fixture data and cleanup.
evidence:
  - 'services-membership:tests/e2e/database-refusals.e2e.spec.ts'
bindings:
  - scenario: ATS-MBR-STR-001-08
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting
      a unit type a program lists 409 unit_type_in_use, and keeps it
    provenance: test
  - scenario: ATS-MBR-STR-004-04
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0084: a structure delete a program’s reference blocks › refuses deleting
      a unit a program is owned by 409 unit_in_use, and keeps it
    provenance: test
  - scenario: ATS-MBR-STR-004-04
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0012: a structure delete an identity-bound membership blocks › refuses
      deleting a unit a membership is identified by 409 unit_in_use naming the reference, and keeps it
    provenance: test
  - scenario: ATS-MBR-STR-009-01
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses an identity-bound program without its identity unit type 400 naming
      identity_unit_type_id
    provenance: test
  - scenario: ATS-MBR-STR-009-03
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a grace period of 2^31 days 400 naming grace_days, beyond what the column stores
    provenance: test
  - scenario: ATS-MBR-STR-011-01
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a type of a program that does not exist 400 naming program_id
    provenance: test
  - scenario: ATS-MBR-STR-011-01
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses moving a type a package names to another program 400 naming program_id, and
      leaves it where it was
    provenance: test
  - scenario: ATS-MBR-STR-011-03
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses flow-down enabled without a target type 400 naming flowdown_type_id, and writes
      no type
    provenance: test
  - scenario: ATS-MBR-STR-011-03
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0264: a flow-down type that does not exist › refuses an unknown
      flowdown_type_id 400 naming the field and the type, and writes no type
    provenance: test
  - scenario: ATS-MBR-STR-012-05
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a package of a type of another program 400 naming membership_type_id, and writes
      no package nor unit rule
    provenance: test
  - scenario: ATS-MBR-STR-012-06
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a package renewing into itself 400 naming renews_into_package_id
    provenance: test
  - scenario: ATS-MBR-STR-012-06
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a package renewing into another program’s package 400 naming
      renews_into_package_id
    provenance: test
  - scenario: ATS-MBR-STR-012-07
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a change policy set that does not exist 400 naming change_policy_set_id
    provenance: test
  - scenario: ATS-MBR-STR-013-02
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a grant whose type is not of the granted program 400 naming grants:
      membership_type_id, and writes no package
    provenance: test
  - scenario: ATS-MBR-STR-018-07
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a type of a program that does not exist 400 naming program_id
    provenance: test
  - scenario: ATS-MBR-STR-018-07
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
      through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
      refuses › refuses a package renewing into itself 400 naming renews_into_package_id
    provenance: test
invocation: 'npm run test:e2e'
coverage_limit: >-
  Bindings identify the concrete cases executed in this file. A compound specification may also depend on
  other registered suites or remain partly proposed; registration is not a passing execution result.
provenance: test
source:
  - 'services-membership:tests/e2e/database-refusals.e2e.spec.ts'
---

# Configuration and structure database refusals

## Verification Boundary

This suite runs public API operations through the local dispatcher and checks the resulting records and responses. Configuration and structure database refusals defines the scope of its examples.

## What This Suite Proves

The suite executes the concrete examples named by its binding ledger. Those examples contribute to the linked capability or feature scenarios within the boundary of the test assertions.

## What It Does Not Prove

Registration supplies no fresh execution result or deployed conformance verdict. Browser behavior, deployed infrastructure and unasserted variants require separate evidence.

## Real Dependencies and Test Doubles

PostgreSQL, local Membership services and the suite’s persistence path are real. The business clock and caller fixtures are controlled by the harness. API requests enter the real dispatcher with contexts signed by a test key rather than Platform’s production signer. Accounting tables or product functions are local stand-ins; this suite does not certify the deployed Accounting service.

## Must Not Be Doubled

The Membership path under examination, transaction behavior and database constraints stay real. Replacing those boundaries would remove the persisted proof the suite is intended to supply.
