---
id: TST-COM-ORD-029
title: 'Holds and claims, the participant contract'
kind: api-lifecycle
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/checkout/tests/e2e/holds-and-claims.e2e.spec.js
implements:
  - ATS-COM-ORD-001-08
  - ATS-COM-ORD-001-09
  - ATS-COM-ORD-001-11
  - ATS-COM-ORD-005-06
  - ATS-COM-ORD-005-13
  - ATS-COM-ORD-008-03
  - ATS-COM-ORD-012-10
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 2
isolation: The suite creates its own test workspace records and removes them using the fixture cleanup.
evidence:
  - provenance: test
    source: 'services-commerce:modules/checkout/tests/e2e/holds-and-claims.e2e.spec.js'
    test_cases:
      - >-
        acquires the hold: 200 with the reservation held, the item prepared with it, the participant’s row
        held, hold_acquired on the trail
      - >-
        refuses another buyer the booth: 409 hold_unavailable with the participant’s reason, and their preview
        marks the item unavailable
      - 're-affirms the holder’s hold on a second request, the same reservation'
      - >-
        places the checkout: the hold re-affirmed and converted in TX-P, the ledger committed on the line, the
        claim frozen on the purchase
      - >-
        grants an extension within the participant’s policy, moving the ledger’s expiry, with hold_extended on
        the trail
      - 'refuses an extension past the policy’s ceiling, 409 hold_not_extendable with the participant’s problem'
      - >-
        refuses an extension of an item holding nothing, 409 hold_expired, and a hold on a product that takes
        none, 409 operation_not_supported
      - 'refuses a member another member’s hold, 403 not_your_party, and a reader the hold route, 403'
      - 'expires the ledger’s row, marks the item stale with hold_expired on the trail, and counts it'
      - lets the next buyer hold the booth
      - leaves a live hold alone on a second run
      - 'advises both carts ok: nothing is held just in time'
      - >-
        lets exactly one placement win and refuses the other 409 claim_conflict naming the item and the
        resource
      - 'placed nothing for the loser: the checkout open, the refusal on its trail; one claim on the resource'
      - 'advises a cart opened after the race unavailable: the preview still tells the shortfall it reads'
      - >-
        refuses a placement made after the T-shirt was gone with the same 409 claim_conflict, never a
        preparation refusal
      - >-
        places one order with four lines, each purchase freezing its claims: the converted hold, the capacity
        claim, none, the lease
      - >-
        commits the ledger: the hold converted, the capacity recorded, nothing for the unlimited one, the
        lease confirmed after commit
      - 'reads the order whole with its five pending obligations, the seat’s two at unit grain'
      - refuses 409 claim_conflict for the item whose claim found the seats gone
      - >-
        rolled the first seat claim back with the transaction, and left the booth held for the buyer to retry
        with
      - >-
        releases an item’s hold through the participant when the item is removed, with holds_released on the
        trail
      - releases every hold when the checkout is abandoned
      - >-
        releases a placed order’s committed claims on void, cancels its pending obligations and leaves
        claims_released on its history
      - 'placed the order with the lease held, not confirmed'
      - >-
        confirms it on the sweep: the ledger committed, the participant’s claim committed, claim_confirmed on
        the order
      - >-
        lists the sellable product types with the participant that sells each, to a reader; not the unsellable
        one
      - 'refuses the catalog without a context, 401'
scenario_coverage:
  - scenario: ATS-COM-ORD-001-08
    test_cases:
      - releases every hold when the checkout is abandoned
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-001-09
    test_cases:
      - >-
        acquires the hold: 200 with the reservation held, the item prepared with it, the participant’s row
        held, hold_acquired on the trail
      - >-
        refuses another buyer the booth: 409 hold_unavailable with the participant’s reason, and their preview
        marks the item unavailable
      - 'refuses an extension past the policy’s ceiling, 409 hold_not_extendable with the participant’s problem'
      - >-
        releases an item’s hold through the participant when the item is removed, with holds_released on the
        trail
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-001-11
    test_cases:
      - 'expires the ledger’s row, marks the item stale with hold_expired on the trail, and counts it'
      - lets the next buyer hold the booth
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-005-06
    test_cases:
      - >-
        lets exactly one placement win and refuses the other 409 claim_conflict naming the item and the
        resource
      - 'placed nothing for the loser: the checkout open, the refusal on its trail; one claim on the resource'
      - >-
        rolled the first seat claim back with the transaction, and left the booth held for the buyer to retry
        with
      - >-
        places the checkout: the hold re-affirmed and converted in TX-P, the ledger committed on the line, the
        claim frozen on the purchase
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-005-13
    test_cases:
      - >-
        confirms it on the sweep: the ledger committed, the participant’s claim committed, claim_confirmed on
        the order
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-008-03
    test_cases:
      - >-
        releases a placed order’s committed claims on void, cancels its pending obligations and leaves
        claims_released on its history
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-012-10
    test_cases:
      - >-
        lists the sellable product types with the participant that sells each, to a reader; not the unsellable
        one
      - 'refuses the catalog without a context, 401'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/checkout/tests/e2e/holds-and-claims.e2e.spec.js'
  declared_by_test: >-
    the composed handler, the routes, the workflows, TX-P, the table-backed registry, the fake participant
    over its own schema, the claim functions through the claimer grant, the sweep, PostgreSQL. Doubled: the
    signing key pair and the other services' tables (local stand-ins).
---

# Holds and claims, the participant contract

## Verification Boundary

The suite drives the composed local API dispatcher and its registered routes.

## What This Suite Proves

The registered cases check holds and claims, the participant contract with their fixture records and assertions. Scenario bindings name only the examples those cases exercise.

## What It Does Not Prove

A registered file supplies no run result or verified conformance by itself. Local fixtures do not establish deployed cross-service behavior or complete browser journeys.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised Commerce persistence or workflow code are real. Remote service records, clocks and transports follow the suite’s fixtures.

## Must Not Be Doubled

The database constraints, role restrictions, locks and transactions exercised by this suite must use PostgreSQL.
