---
id: TST-ACC-PRD-066
title: Deterministic product configuration rules
kind: unit
product_area: accounting
module: products
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/products/tests/unit/rules/product-rules.spec.js
implements:
  - ATS-ACC-PRD-004-05
  - ATS-ACC-PRD-005-05
  - ATS-ACC-PRD-006-05
  - ATS-ACC-PRD-007-01
  - ATS-ACC-PRD-007-02
  - ATS-ACC-PRD-008-01
  - ATS-ACC-PRD-008-02
  - ATS-ACC-PRD-008-04
  - ATS-ACC-PRD-008-05
  - ATS-ACC-PRD-008-06
  - ATS-ACC-PRD-008-07
  - ATS-ACC-PRD-010-01
  - ATS-ACC-PRD-010-02
  - ATS-ACC-PRD-011-03
  - ATS-ACC-PRD-011-04
  - ATS-ACC-PRD-011-05
  - ATS-ACC-PRD-011-06
  - ATS-ACC-PRD-015-04
  - ATS-ACC-PRD-016-04
  - ATS-ACC-PRD-016-05
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
estimation_note: Planning estimate; no runtime measurement is claimed.
isolation: In-memory fixture inputs; no external records.
evidence:
  - 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
assertion_bindings:
  - scenario: ATS-ACC-PRD-004-05
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a replacement that
        omits sys_locked or resends the lock, naming the lock
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-005-05
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a retire of a
        record locked against updates, naming the lock
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-006-05
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a delete of a
        record under either lock, naming it
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-007-01
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses another service,
        naming the owner, the type and the caller
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-007-02
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#lets a console caller
        write any type (the console calls Accounting first and the domain second)
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-01
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses any price on a
        variable-priced type
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-02
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a supported
        currency when the unit has Enable Multicurrency off (1.0: off is a single-currency unit)
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a currency that is
        neither the business unit’s base nor one of its supported currencies
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-04
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses prohibiting the
        base currency
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a standard price
        in the base currency and a prohibited supported currency
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-05
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a percentage cell
        backed by the standard price of its currency, in its period or always (A12)
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a percentage cell
        whose period has no standard price and no always row to inherit
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-06
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a calculated cell
        backed by its audience’s base-currency price, and refuses one in the base currency (A13)
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-008-07
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#judges overlap per period:
        the same window in two periods never meets
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-010-01
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a percentage above
        100
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a range that ends
        before it starts, naming the row
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a flat amount
        above 100, which is minor units
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-010-02
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses two rules that
        overlap, naming both rows and their ranges
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#compares every pair, not
        only neighbours
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#finds no overlap between
        ranges that only touch, the ends inclusive
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-011-03
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#keeps a retired component
        the bundle already holds
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-011-04
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#finds a bundle reached
        again through its components
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-011-05
    assertions:
      - 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a price of 0'
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-011-06
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#multiplies each price and
        member price by its quantity
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-015-04
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses revenue booked to
        an asset account, naming the slot and the types it takes
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-016-04
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a fixed amount
        split that states a percentage
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
  - scenario: ATS-ACC-PRD-016-05
    assertions:
      - >-
        services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses fixed amounts
        above the product’s price, which Rhythm 1.0 summed as NaN and passed
    provenance: test
    source: 'services-accounting:modules/products/tests/unit/rules/product-rules.spec.js'
coverage_note: Scenario references name existing assertion evidence; broader unexecuted variants remain findings.
---

# Deterministic product configuration rules

## Verification Boundary

The assertions call deterministic mapping and rule functions with supplied inputs. No live persistence or HTTP boundary is exercised.

## What This Suite Proves

Rule assertions cover price backing, audience modes, bundles, selling settings, financial recognition and allocation checks without an executing database.

## What It Does Not Prove

These assertions do not prove workspace enforcement, transactional rollback, concurrent writes or deployed behavior.

## Real Dependencies and Test Doubles

The functions under test are real JavaScript or compiled service code. Inputs and surrounding contexts are fixtures; PostgreSQL and external applications are absent.

## Must Not Be Doubled

Keep the function under test and its actual return or refusal behavior real. Do not treat a fixture assertion as database, permission or lifecycle proof.
