---
id: TST-COM-FUL-072
title: Reconciler
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js
implements:
  - ATS-COM-FUL-007-08
  - ATS-COM-FUL-009-01
  - ATS-COM-FUL-009-02
  - ATS-COM-FUL-009-03
  - ATS-COM-FUL-009-04
  - ATS-COM-FUL-009-06
  - FAS-COM-FUL-02-02
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
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/operations/tests/integration/services/reconciler/reconciler.integration.spec.js
    test_titles:
      - runs every check (none not due) and writes a findings metric for each
      - >-
        raises placed_without_invoice for the hour-old unbilled order and billing_blocked for the
        blocked one, and counts the eleven-minute one without raising
      - >-
        raises tender_uncertain, the window’s tender_window_expired once,
        accepted_without_invoice_line, hold_stranded and migrated_unfulfilled, each in its tenant
      - >-
        raises refund_without_cancellation once for the reversal the handler never saw, and resumes
        the stale adjustment to completion
      - >-
        measures the dead-letter queue through the port, records the sweeper’s two passes as its,
        and the waiting checks with their reason
      - 'skips the five-minute, hourly and daily checks as not due at minute two'
      - counts the still-stuck order on its one open row and raises the window’s void nothing more
      - reads each cadence off the clock
      - >-
        runs the named check alone with `only`, whatever the minute, and counts a check that throws
        while the others run
      - runs both promotion checks at the daily hour and neither at another minute
      - >-
        raises promotion_discount_drift for the order of the window whose discount its allocations
        do not add up to, with the figures
      - >-
        reads the two days before the run alone: the order drifted four days before is not raised
        (premise: the read finds it)
      - >-
        raises promotion_counter_drift for the promotion whose counter was moved, with the two
        numbers and its limit
      - 'raises nothing for the code whose counter agrees (premise: it counts three uses)'
      - >-
        raises neither check’s exception in the clean tenant (premise: its order was placed in the
        window with its redemption)
      - 'finds the order again and raises it nothing more: the resolved finding stands (D-P5-08)'
      - counts the counter’s finding on its one open row
    scenario_anchors:
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        refund_without_cancellation once for the reversal the handler never saw, and resumes the
        stale adjustment to completion
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#runs
        every check (none not due) and writes a findings metric for each
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#skips
        the five-minute, hourly and daily checks as not due at minute two
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#runs
        the named check alone with `only`, whatever the minute, and counts a check that throws while
        the others run
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        placed_without_invoice for the hour-old unbilled order and billing_blocked for the blocked
        one, and counts the eleven-minute one without raising
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        tender_uncertain, the window’s tender_window_expired once, accepted_without_invoice_line,
        hold_stranded and migrated_unfulfilled, each in its tenant
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#counts
        the still-stuck order on its one open row and raises the window’s void nothing more
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        promotion_discount_drift for the order of the window whose discount its allocations do not
        add up to, with the figures
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        promotion_counter_drift for the promotion whose counter was moved, with the two numbers and
        its limit
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#raises
        neither check’s exception in the clean tenant (premise: its order was placed in the window
        with its redemption)
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js#counts
        the counter’s finding on its one open row
      - >-
        services-commerce:modules/operations/tests/integration/services/reconciler/reconciler.integration.spec.js
---

# Reconciler

## Verification Boundary

This suite checks reconciler against the prepared PostgreSQL database. Its entry points are the persistence and service functions used by the tests.

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

Direct service and persistence calls do not establish the full HTTP permission contract, deployed scheduling or browser behavior. No execution result is claimed by this register.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Financial facts are supplied by a local fixture provider. Queue publication uses the suite’s recording or scripted publisher. Accounting command responses use the suite’s fixture port. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the database constraints, row visibility and persistence writes real when claiming this integration coverage. A canned repository response cannot replace the boundary being checked.
