---
id: TST-PFM-INT-617
title: Declarative customization evaluation
kind: unit
product_area: platform
module: integrations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: macroservice-libraries
files:
  - packages/extensions/src/rule-evaluator.spec.ts
implements: []
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 test process owns its inputs, fake clocks and any replaced runtime ports.'
test_cases:
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#answers -1_500 minor on
      49_500 for a Northeast chapter member, 30+ days out, audience member
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#FALSE when ${condition}: the
      neutral output when the point declares one
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#FALSE when ${condition}:
      rule_not_applicable otherwise, under the failure policy
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#asks no record fact when the
      input group is FALSE, nor for a null id
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#UNKNOWN when the record fact
      source answers it: rule_fact_unavailable naming the fact
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#UNKNOWN when the in-memory
      record does not hold the collection, when the port throws, and for an undeclared fact
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#a known FALSE decides over an
      UNKNOWN record fact
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#asks once for twenty lines of
      one cart
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#asks again for another record
      or other criteria, and every time without a memo
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#${percent} percent of
      ${price} is ${amount}
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#rounds half away from zero'
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#a percent of a field that
      holds no number is invalid_output
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#resolve from the invocation
      instant (the clock) in UTC by default
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#resolve from the tenant's
      zone when the host passes it
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#the default today is the
      UUIDv7 execution id’s instant
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#a then outside the contract
      is invalid_output
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#an exists criterion in the
      input group is UNKNOWN at run time
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#an input field the schema has
      no scalar at is UNKNOWN at run time
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#nested groups and negation
      are carried over
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#answers transport failures
      for an unknown contract version or a definition that is not version 1
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#finds none in scenario G, nor
      in a percent rule
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#definition_invalid: not an
      object, or when not one
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#rule_version_unsupported'
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#record_fact_unknown'
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#criteria_invalid'
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#input_exists_unsupported'
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#input_field_unknown: no such
      field, an array, an object
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#operator_not_allowed, by the
      field type as the Queries screen offers them
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#value_invalid: a value the
      operator cannot take
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#percent_value_invalid and
      percent_of_invalid
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#then_invalid: outside the
      output contract once expanded
  - provenance: test
    source: 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#covers every code it declares'
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#types Commerce's input by
      dotted path, nullable objects flattened, arrays not offered
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#answers exists per member,
      OR-ed, FALSE over none, UNKNOWN without the collection
  - provenance: test
    source: >-
      macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts#answers fields as facts, a
      record it does not hold FALSE, a field the record does not hold UNKNOWN
evidence:
  - 'macroservice-libraries:packages/extensions/src/rule-evaluator.spec.ts'
---
# Declarative customization evaluation

## Verification Boundary

This unit suite exercises declarative customization evaluation within the shared package. It records engineering coverage at the pinned revision without claiming a deployed run.

## What This Suite Proves

The source assertions cover the package behavior under controlled inputs. No detailed capability or feature scenario binding is verified in this registration.

## What It Does Not Prove

The suite does not establish deployed authorization, database behavior, provider effects or a complete customer workflow.

## Real Dependencies and Test Doubles

Imported package functions execute against the source-defined fixtures. Runtime ports, clocks and external transport responses remain controlled wherever the suite replaces them.

## Must Not Be Doubled

The shared function under test and its result assertions must execute. Returning an expected answer from a substitute does not prove the package behavior.
