---
id: TST-COM-FUL-052
title: Evaluate gate
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/evaluate-gate.spec.js
implements:
  - ATS-COM-FUL-002-01
  - ATS-COM-FUL-002-02
  - ATS-COM-FUL-002-03
  - ATS-COM-FUL-002-04
  - ATS-COM-FUL-002-05
  - ATS-COM-FUL-002-06
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/evaluate-gate.spec.js
    test_titles:
      - >-
        enumerates the whole model: six conditions, the flags, the ACH rule, the terms rule, and
        every fact that moves a verdict (premise)
      - 'agrees with the oracle on every case, and names a closed reason of the list when shut'
      - >-
        blocks for a person exactly when the reason is a hold, a migrated line, a missing approval
        or a prerequisite that failed, and never otherwise
      - >-
        carries the facts it used on every verdict: the condition, the money read and the invoice
        named
      - >-
        a write-off never fulfils: a line written off in full stays closed with the balance due (08
        row 19, B37)
      - a credit application counts as paid
      - a refund uncounts what was paid
      - nothing may be pending capture for paid in full
      - 'ACH counts when accepted by default, and only once settled when the policy says so'
      - 'approved terms satisfy paid in full when the policy allows it, and not otherwise'
      - 'a minimum amount and a minimum percent are met by what was paid, never by the balance'
      - 'immediate waits for the order to be billed, and none waits for nothing but acceptance'
      - 'the order must be accepted whatever the policy, even none'
      - >-
        an approval is asked before the money is looked at, and an approved obligation goes on to
        the money
      - >-
        a prerequisite the register learnt failed blocks for a person, and one met after all opens
        the gate again (member pricing 05 §4, M5)
      - >-
        the participant’s prerequisite is waited for, and a child line follows its parent unless the
        policy says not
    scenario_anchors:
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#the order
        must be accepted whatever the policy, even none
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#blocks for a
        person exactly when the reason is a hold, a migrated line, a missing approval or a
        prerequisite that failed, and never otherwise
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#an approval
        is asked before the money is looked at, and an approved obligation goes on to the money
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#a write-off
        never fulfils: a line written off in full stays closed with the balance due (08 row 19, B37)
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#a credit
        application counts as paid
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#a refund
        uncounts what was paid
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#nothing may
        be pending capture for paid in full
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#ACH counts
        when accepted by default, and only once settled when the policy says so
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#a minimum
        amount and a minimum percent are met by what was paid, never by the balance
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#immediate
        waits for the order to be billed, and none waits for nothing but acceptance
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#approved
        terms satisfy paid in full when the policy allows it, and not otherwise
      - >-
        services-commerce:modules/fulfillment/tests/unit/policies/evaluate-gate.spec.js#the
        participant’s prerequisite is waited for, and a child line follows its parent unless the
        policy says not
---

# Evaluate gate

## Verification Boundary

This suite checks evaluate gate 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.
