---
id: TST-COM-FUL-053
title: Policy resolution
kind: unit
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/fulfillment/tests/unit/policies/policy-resolution.spec.js
implements:
  - ATS-COM-FUL-001-03
  - ATS-COM-FUL-001-04
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: 'In-memory inputs, recorded calls and test-owned doubles; no shared customer records.'
evidence:
  - repository: services-commerce
    path: modules/fulfillment/tests/unit/policies/policy-resolution.spec.js
    test_titles:
      - takes the product’s policy over the ordering profile’s and the tenant default’s
      - >-
        takes the ordering profile’s when the product has none, and the tenant default’s when
        neither has one
      - >-
        falls back to the built-in default (paid in full, terms satisfy, reversal to review) with no
        version
      - passes over an inactive policy as if it were not configured
      - freezes the picked policy with its version and source
      - >-
        ORs the participant’s approval and prerequisite onto the policy, and never waives what the
        policy asks
      - is true for the same policy at the same version from the same source
      - 'is false when the version, the source or the policy differs'
    scenario_anchors:
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#takes
        the product’s policy over the ordering profile’s and the tenant default’s
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#takes
        the ordering profile’s when the product has none, and the tenant default’s when neither has
        one
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#falls
        back to the built-in default (paid in full, terms satisfy, reversal to review) with no
        version
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#passes
        over an inactive policy as if it were not configured
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#freezes
        the picked policy with its version and source
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/policy-resolution.spec.js#ORs the
        participant’s approval and prerequisite onto the policy, and never waives what the policy
        asks
---

# Policy resolution

## Verification Boundary

This suite checks policy resolution with controlled inputs and recorded dependencies. Its entry points remain within the process.

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

Controlled inputs do not establish database enforcement, deployed integration or browser behavior. A recorded call is evidence about the adapter contract rather than a remote operation.

## Real Dependencies and Test Doubles

The imported logic is real; test inputs and dependency responses are controlled.

## Must Not Be Doubled

Keep the imported production logic and its request construction real. Record dependency calls and refusals rather than replacing the behavior being asserted.
