---
id: TST-COM-ORD-001
title: 'Commerce-contracts claims: function names'
kind: unit
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
repository: macroservice-libraries
files:
  - packages/commerce-contracts/src/claims.spec.ts
implements:
  - ATS-COM-ORD-012-08
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'The suite owns its in-memory inputs, scripted responses and rendered component state.'
evidence:
  - provenance: test
    source: 'macroservice-libraries:packages/commerce-contracts/src/claims.spec.ts'
    test_cases:
      - derives the four names from a schema
      - derives one name
      - refuses a schema name that is not a lower-case identifier
      - parses a name back to its schema and function
      - recognises every derived name and rejects a foreign one
      - is a Zod schema too
      - accepts each mode
      - defaults allow_backorder to false
      - refuses an at-commit claim with no claims
      - refuses a hold without a reservation
      - refuses none as something to commit
      - accepts the documented commit arguments and refuses a claim of mode none
      - 'accepts a committed result and a conflict, and refuses ok without committed claims'
      - accepts the documented release arguments and refuses an unknown reason
      - >-
        accepts a hold released before placement, the checkout and its item standing where the order and its
        lines would
      - accepts a release result with nothing released
      - accepts the cancellation fence arguments and refuses a quantity of zero
      - accepts the change fence arguments and refuses an extra argument
      - 'accepts a fence placed and a fence refused, and refuses ok without fence refs'
      - 'orders by participant, then resource key, then line'
      - compares two equal invocations as equal and leaves the input alone
      - takes a hold by its reservation ref and an at-commit claim by each resource key
scenario_coverage:
  - scenario: ATS-COM-ORD-012-08
    test_cases:
      - 'orders by participant, then resource key, then line'
      - compares two equal invocations as equal and leaves the input alone
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'macroservice-libraries:packages/commerce-contracts/src/claims.spec.ts'
  declared_by_test: 'the name derivation, the Zod schemas and the comparator. Doubled: nothing.'
---

# Commerce-contracts claims: function names

## Verification Boundary

The unit suite checks the named contract or helper with controlled inputs.

## What This Suite Proves

The registered cases check commerce-contracts claims: function names 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

Inputs and external responses are controlled in process; this suite establishes no deployed service behavior.

## Must Not Be Doubled

The named contract validation or component behavior under assertion must use its actual implementation.
