---
id: TST-COM-FUL-041
title: Obligations
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/fulfillment/tests/integration/services/persistence/obligations.integration.spec.js
implements:
  - ATS-COM-FUL-004-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: >-
  Run-created workspace identifiers and fixture records in the prepared test database; concurrency
  cases own their extra connections.
evidence:
  - repository: services-commerce
    path: modules/fulfillment/tests/integration/services/persistence/obligations.integration.spec.js
    test_titles:
      - 'answers each pending, the gate frozen, nothing authorized, with its system properties'
      - 'answers the rows that exist to a retry, creating nothing twice'
      - 'refuses a line the tenant does not have, naming the property'
      - 'refuses a quantity of zero, naming the rule'
      - opens the gate with its facts
      - 'authorizes with the id, the next sequence, the deadline and a fresh attempt count'
      - 'counts the attempt that moved it in progress, and the progress recorded after'
      - 'completes with the whole quantity when none is stated, the result kept'
      - 'refuses every move out of completed but superseded, 409'
      - blocks a pending obligation with its reason and releases it to eligible
      - >-
        fails an authorized obligation, re-authorizes it at the next sequence, then resolves a
        failure
      - 'cancels a pending or eligible obligation, never an authorized one'
      - >-
        refuses an authorization without its id, a taken authorization id, and progress on anything
        but in_progress
      - 'answers 404 for an obligation the tenant does not have, and leaves another tenant’s alone'
    scenario_anchors:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/persistence/obligations.integration.spec.js#answers
        the rows that exist to a retry, creating nothing twice
---

# Obligations

## Verification Boundary

This suite checks obligations against the prepared PostgreSQL database. Its entry points are the persistence and service functions used by the tests.

## What This Suite Proves

The bound scenarios identify the assertions this suite contributes. Source anchors retain the exact test cases; where a capability scenario has several contributing suites, a single binding does not imply that every branch runs here.

## What It Does Not Prove

Direct service and persistence calls do not establish the full HTTP permission contract, deployed scheduling or browser behavior. No execution result is claimed by this register.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the database constraints, row visibility and persistence writes real when claiming this integration coverage. A canned repository response cannot replace the boundary being checked.
