---
id: TST-COM-FUL-057
title: Inventory
kind: api-lifecycle
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/inventory/tests/e2e/inventory.e2e.spec.js
implements:
  - ATS-COM-FUL-016-02
  - ATS-COM-FUL-016-03
  - ATS-COM-FUL-016-05
  - ATS-COM-FUL-017-01
  - ATS-COM-FUL-017-02
  - ATS-COM-FUL-017-03
  - ATS-COM-FUL-017-06
  - ATS-COM-FUL-018-06
  - ATS-COM-FUL-019-01
  - ATS-COM-FUL-019-02
  - ATS-COM-FUL-019-06
  - FAS-COM-FUL-04-04
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
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/inventory/tests/e2e/inventory.e2e.spec.js
    test_titles:
      - >-
        reads the warehouse made with the shelf, lists it, replaces it at the version read (a stale
        one 409) and refuses its delete while locations belong to it (409)
      - >-
        creates a location (a code twice in one warehouse 400), lists the bins in pick order,
        replaces one (its warehouse stays, 409), and deletes a free one (404 after)
      - >-
        records the receipt once, the item made at A1 with the five on hand, the retry answering the
        same movement unrecorded and no backorder filled
      - >-
        moves quarantined beside on_hand and a scrap off it; refuses what the shelf cannot bear (400
        naming the rule), a wrong sign (400) and a type staff do not record (400)
      - >-
        lists the movements (by type) and reads one; lists the items with their balances and reads
        one
      - >-
        answers the availability in the storefront’s words: limited with what is left, unavailable
        for more than the shelf has, backorder for the shirt, available for a product it does not
        track
      - 'changes an item’s settings (and nothing of its balances), 404 for an item the tenant has not'
      - >-
        opens a count, records what was counted, completes it with one correction, and cancels
        another; lines on a completed count 409
      - >-
        is listed and read, acknowledged, then resolved with its resolution (a second resolve 409; a
        resolution missing 400)
      - >-
        moves the three in one transfer: the transfer_out and transfer_in naming each other, A1 five
        to two, A2 none to three, the layers moved with them
      - >-
        answers the retry under its key with the same transfer, unrecorded, and lists the one
        transfer
      - >-
        refuses more than A1 has available 409 insufficient_available, the same location 400
        same_location, a quantity of zero 400, and an unknown destination 400
      - >-
        lets a reader list the transfers and refuses it a transfer 403 permission_missing; a denied
        principal 403 app_not_permitted; no context 401; tenant B none
      - 'lets a reader list and read everything, and refuses it every write 403 permission_missing'
      - >-
        refuses a principal denied the application 403 app_not_permitted, no context 401, and
        answers 404 in tenant B for tenant A’s warehouse
    scenario_anchors:
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#reads the warehouse made
        with the shelf, lists it, replaces it at the version read (a stale one 409) and refuses its
        delete while locations belong to it (409)
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#creates a location (a
        code twice in one warehouse 400), lists the bins in pick order, replaces one (its warehouse
        stays, 409), and deletes a free one (404 after)
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list and
        read everything, and refuses it every write 403 permission_missing
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#refuses a principal
        denied the application 403 app_not_permitted, no context 401, and answers 404 in tenant B
        for tenant A’s warehouse
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#moves quarantined beside
        on_hand and a scrap off it; refuses what the shelf cannot bear (400 naming the rule), a
        wrong sign (400) and a type staff do not record (400)
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#changes an item’s
        settings (and nothing of its balances), 404 for an item the tenant has not
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#records the receipt
        once, the item made at A1 with the five on hand, the retry answering the same movement
        unrecorded and no backorder filled
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list the
        transfers and refuses it a transfer 403 permission_missing; a denied principal 403
        app_not_permitted; no context 401; tenant B none
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#answers the availability
        in the storefront’s words: limited with what is left, unavailable for more than the shelf
        has, backorder for the shirt, available for a product it does not track
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#opens a count, records
        what was counted, completes it with one correction, and cancels another; lines on a
        completed count 409
      - >-
        services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#is listed and read,
        acknowledged, then resolved with its resolution (a second resolve 409; a resolution missing
        400)
      - 'services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js'
---

# Inventory

## Verification Boundary

This suite calls the composed local HTTP handler over the prepared database. It checks inventory through request contracts and the enforcing security boundary.

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

Local handler execution does not establish deployed routing, queue delivery or browser behavior. It also supplies no latest result until a qualification run records one.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Signed local security contexts and the composed handler exercise the request boundary. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the composed handler, permission enforcement, request validation and database writes real when claiming this local API coverage. Scripted financial, queue or carrier outcomes must remain visibly separate from deployed integration evidence.
