---
id: ATS-COM-FUL-007
scope: CAP-COM-FUL-007
product_area: commerce
module: fulfillment
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-COM-FUL-007-01
    title: Repeated document requests share one adjustment
    level: api
    proves:
      - BR-CAP-COM-FUL-007-01
      - INV-DOM-COM-FUL-003-05
    preconditions: A cancellation document needs financial execution.
    steps: Ask twice for financial execution of the same cancellation.
    expected: Both requests identify the same adjustment and pending plan.
    negative: false
    data_needs: Fixtures for repeated document requests share one adjustment.
    bound_to:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#creates
        the adjustment once (the second request answers the first) with its
        steps pending
      - >-
        services-commerce:modules/fulfillment/tests/integration/db/register-tables.table.integration.spec.js#hold
        an enforcement once per obligation and cause (enforcements_cause_uq) and
        an adjustment once per document (financial_adjustments_document_uq)
      - TST-COM-FUL-026
      - TST-COM-FUL-025
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#creates
      the adjustment once (the second request answers the first) with its steps
      pending
    category: invariant
  - id: ATS-COM-FUL-007-02
    title: Planning preserves financial-step order
    level: unit
    proves:
      - BR-CAP-COM-FUL-007-02
      - BR-CAP-COM-FUL-007-03
      - INV-DOM-COM-FUL-003-06
    preconditions: 'Documents vary payment, fees and amendment replacement invoices.'
    steps: Build the adjustment plan for each fixture.
    expected: >-
      Steps retain their fixed order and keys, unpaid work uses only the memo
      and amendments apply freed funds to the replacement invoice first.
    negative: false
    data_needs: Fixtures for planning preserves financial-step order.
    bound_to:
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo, the fee, the credit from the freed money, its application to
        the fee and the refund of the remainder, in that order, each under its
        key
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo alone for a line never paid, the fee invoice beside it when the
        terms charge one, and nothing without an invoice
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#treats
        a zero fee as no fee
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#applies
        the freed money to an amendment’s new invoice before the remainder (11
        §7.1, P7): a credit and its application by invoice id, then the credit
        of what is left
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#spells
        every key commerce:{document_kind}:{document_id}:{step}
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#plans
        the five steps of 04 §6 in order with their keys: the memo, the fee, the
        credit from the freed money, its application, the refund of the
        remainder
      - TST-COM-FUL-050
      - TST-COM-FUL-026
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
      the memo, the fee, the credit from the freed money, its application to the
      fee and the refund of the remainder, in that order, each under its key
    category: rule
  - id: ATS-COM-FUL-007-03
    title: Interrupted financial commands retain their retry keys
    level: api
    proves:
      - BR-CAP-COM-FUL-007-04
      - BR-CAP-COM-FUL-007-05
      - INV-DOM-COM-FUL-003-08
    preconditions: An adjustment command throws and later gives a temporary refusal.
    steps: 'Execute, interrupt, resume and exercise retryable refusal.'
    expected: >-
      Recovery resends the same command key and temporary refusal leaves pending
      work without an exception.
    negative: false
    data_needs: Fixtures for interrupted financial commands retain their retry keys.
    bound_to:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
        the step submitted when the command throws, and the resume re-sends the
        same key
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
        a retryable refusal pending for the next run, with the attempt counted
        and no exception
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#stops
        at the refund: the four steps before it succeeded, the refund failed,
        the adjustment failed with adjustment_failed raised
      - TST-COM-FUL-026
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
      the step submitted when the command throws, and the resume re-sends the
      same key
    category: failure
  - id: ATS-COM-FUL-007-04
    title: Processor-pending refunds wait for the final event
    level: api
    proves:
      - BR-CAP-COM-FUL-007-06
    preconditions: A refund remains pending at its processor.
    steps: 'Resume repeatedly, then exercise successful and failed refund events.'
    expected: >-
      Pending processing consumes no failure attempts; the final event completes
      or fails the work appropriately.
    negative: false
    data_needs: Fixtures for processor-pending refunds wait for the final event.
    bound_to:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#is
        held pending at the processor, never failed, however many times it is
        asked again, with no exception
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#completes
        with the refund’s reference when the refund has settled
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#fails
        for Finance, with its exception, when the refund then fails at the
        processor
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/facts/financial-facts-handler.integration.spec.js#holds
        the refund pending at the processor, not failed, and counts no failed
        attempt (COMM-M1 R7-2)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-pending-at-processor.spec.js#is
        true when the books are done and only the refund is pending at the
        processor
      - TST-COM-FUL-026
      - TST-COM-FUL-028
      - TST-COM-FUL-049
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#is
      held pending at the processor, never failed, however many times it is
      asked again, with no exception
    category: transition
  - id: ATS-COM-FUL-007-05
    title: Staff can retry failure or record external settlement
    level: api
    proves:
      - BR-CAP-COM-FUL-007-08
      - BR-CAP-COM-FUL-007-09
      - BR-CAP-COM-FUL-007-10
    preconditions: Two adjustments have failed and a reader identity is available.
    steps: >-
      List with and without scope, retry one, resolve another, repeat and try
      reader actions.
    expected: >-
      Unscoped reads and unauthorized actions fail; retry sends only failed work
      and external resolution closes its finding without repetition.
    negative: true
    data_needs: Fixtures for staff can retry failure or record external settlement.
    bound_to:
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists
        the order’s adjustments and the failed ones, answers one with its steps,
        and refuses a query naming neither an order nor a state
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#retries
        the failed adjustment on its route: the refund alone re-sent, completed;
        a reader is refused
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#resolves
        the other failed adjustment offline on its route, with its exception,
        and refuses a repeat
      - >-
        services-commerce:modules/operations/tests/integration/services/interventions/operations-interventions.integration.spec.js#retries
        the failed adjustment: resumed from the refund alone, completed, its
        exception resolved; a completed one is refused
      - >-
        services-commerce:modules/operations/tests/integration/services/interventions/operations-interventions.integration.spec.js#resolves
        the other failed adjustment offline, with its exception; a resolved one
        is refused
      - TST-COM-FUL-069
      - TST-COM-FUL-070
    provenance: test
    source: >-
      services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists
      the order’s adjustments and the failed ones, answers one with its steps,
      and refuses a query naming neither an order nor a state
    category: permission
  - id: ATS-COM-FUL-007-06
    title: Accounting commands preserve their required request shapes
    level: unit
    proves:
      - BR-CAP-COM-FUL-007-11
    preconditions: Fixtures represent every financial step.
    steps: 'Send commands against successful, refusal and server-error answers.'
    expected: >-
      Requests retain the expected keys and quantities, refusals are classified
      and interrupted work remains recoverable.
    negative: false
    data_needs: Fixtures for accounting commands preserve their required request shapes.
    bound_to:
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the credit memo to POST /credit_memos/{tenantId} with the key twice, the
        lines as money, and answers the memo’s id
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        every memo line’s quantity as Accounting’s contract has it, a decimal
        string (0230: a number was refused 400)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the fee invoice issued at once under the commerce source, the credit
        from the payment, its application and the refund executed, each to its
        route
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#answers
        a refusal as failed with Accounting’s code, retryable for the refusals a
        later attempt may change and permanent for a decline
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#throws
        when Accounting answers a server error or a document without an id, so
        the step stays submitted for the resume
      - TST-COM-FUL-048
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
      the credit memo to POST /credit_memos/{tenantId} with the key twice, the
      lines as money, and answers the memo’s id
    category: validation
  - id: ATS-COM-FUL-007-07
    title: Adjustment retry closes the retained Finance finding
    category: interaction
    level: api
    proves:
      - BR-CAP-COM-FUL-007-08
      - BR-CAP-COM-FUL-008-03
    exercises:
      - CAP-COM-FUL-007
      - CAP-COM-FUL-008
    relies_on:
      - ATS-COM-FUL-007-05
      - ATS-COM-FUL-008-03
    preconditions: >-
      A cancellation adjustment failed only at its refund step and has an open
      finding.
    steps: >-
      Retry with authorized staff credentials, then inspect the adjustment,
      steps and exception.
    expected: >-
      Only the refund is sent again; the adjustment completes and its failure
      finding closes.
    negative: false
    data_needs: >-
      An isolated workspace with the products, records, authority and quantities
      described in the preconditions.
    bound_to:
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists
        the order’s adjustments and the failed ones, answers one with its steps,
        and refuses a query naming neither an order nor a state
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#retries
        the failed adjustment on its route: the refund alone re-sent, completed;
        a reader is refused
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#resolves
        the other failed adjustment offline on its route, with its exception,
        and refuses a repeat
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#acknowledges
        then resolves the finding, with the interventions logged, the order’s
        history and the audit events recorded
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#refuses
        the queue to a portal member and the interventions to a reader (403),
        and a body without a reason (400)
      - TST-COM-FUL-069
    provenance: test
    source:
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists
        the order’s adjustments and the failed ones, answers one with its steps,
        and refuses a query naming neither an order nor a state
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#acknowledges
        then resolves the finding, with the interventions logged, the order’s
        history and the audit events recorded
  - id: ATS-COM-FUL-007-08
    title: Scheduled recovery resumes the keyed money process
    category: interaction
    level: api
    proves:
      - BR-CAP-COM-FUL-007-04
      - BR-CAP-COM-FUL-009-04
    exercises:
      - CAP-COM-FUL-007
      - CAP-COM-FUL-009
    relies_on:
      - ATS-COM-FUL-007-03
      - ATS-COM-FUL-009-03
    preconditions: >-
      An active adjustment is older than fifteen minutes and its Accounting
      command can succeed.
    steps: 'Run the due adjustment check and inspect its steps, keys and final state.'
    expected: The owning worker completes the adjustment under its retained keys.
    negative: false
    data_needs: >-
      An isolated workspace with the products, records, authority and quantities
      described in the preconditions.
    bound_to:
      - >-
        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
      - TST-COM-FUL-072
    provenance: test
    source:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
        the step submitted when the command throws, and the resume re-sends the
        same key
      - >-
        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
  - id: ATS-COM-FUL-007-09
    title: Physical return disposition permits the requested money work
    category: interaction
    level: api
    proves:
      - BR-CAP-COM-FUL-007-06
      - BR-CAP-COM-FUL-015-08
    exercises:
      - CAP-COM-FUL-007
      - CAP-COM-FUL-015
    relies_on:
      - ATS-COM-FUL-007-04
      - ATS-COM-FUL-015-04
    preconditions: A return authorizes two shipped shirts and refunds after disposition.
    steps: >-
      Receive and inspect both shirts, restock them, then process the requested
      refund confirmation.
    expected: >-
      Stock restoration precedes financial completion; processor-pending money
      remains unfinished until confirmation.
    negative: false
    data_needs: >-
      An isolated workspace with the products, records, authority and quantities
      described in the preconditions.
    bound_to: []
    provenance: proposed
    source:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#is
        held pending at the processor, never failed, however many times it is
        asked again, with no exception
      - >-
        services-commerce:modules/shipping/tests/integration/services/returns/return-receiving.integration.spec.js#restocks
        the two units at the bin they shipped from: the return_restock movement
        naming the disposition, on hand up two, the two reliefs reversed at 1500
        with the restore_cogs fact of 3000
evidence:
  - repository: services-commerce
    tests:
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#creates
        the adjustment once (the second request answers the first) with its
        steps pending
      - >-
        services-commerce:modules/fulfillment/tests/integration/db/register-tables.table.integration.spec.js#hold
        an enforcement once per obligation and cause (enforcements_cause_uq) and
        an adjustment once per document (financial_adjustments_document_uq)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo, the fee, the credit from the freed money, its application to
        the fee and the refund of the remainder, in that order, each under its
        key
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#plans
        the memo alone for a line never paid, the fee invoice beside it when the
        terms charge one, and nothing without an invoice
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#treats
        a zero fee as no fee
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#applies
        the freed money to an amendment’s new invoice before the remainder (11
        §7.1, P7): a credit and its application by invoice id, then the credit
        of what is left
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-planning.spec.js#spells
        every key commerce:{document_kind}:{document_id}:{step}
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#plans
        the five steps of 04 §6 in order with their keys: the memo, the fee, the
        credit from the freed money, its application, the refund of the
        remainder
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
        the step submitted when the command throws, and the resume re-sends the
        same key
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#leaves
        a retryable refusal pending for the next run, with the attempt counted
        and no exception
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#stops
        at the refund: the four steps before it succeeded, the refund failed,
        the adjustment failed with adjustment_failed raised
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#is
        held pending at the processor, never failed, however many times it is
        asked again, with no exception
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#completes
        with the refund’s reference when the refund has settled
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/adjustments/adjustment-worker.integration.spec.js#fails
        for Finance, with its exception, when the refund then fails at the
        processor
      - >-
        services-commerce:modules/fulfillment/tests/integration/services/facts/financial-facts-handler.integration.spec.js#holds
        the refund pending at the processor, not failed, and counts no failed
        attempt (COMM-M1 R7-2)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/adjustment-pending-at-processor.spec.js#is
        true when the books are done and only the refund is pending at the
        processor
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists
        the order’s adjustments and the failed ones, answers one with its steps,
        and refuses a query naming neither an order nor a state
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#retries
        the failed adjustment on its route: the refund alone re-sent, completed;
        a reader is refused
      - >-
        services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#resolves
        the other failed adjustment offline on its route, with its exception,
        and refuses a repeat
      - >-
        services-commerce:modules/operations/tests/integration/services/interventions/operations-interventions.integration.spec.js#retries
        the failed adjustment: resumed from the refund alone, completed, its
        exception resolved; a completed one is refused
      - >-
        services-commerce:modules/operations/tests/integration/services/interventions/operations-interventions.integration.spec.js#resolves
        the other failed adjustment offline, with its exception; a resolved one
        is refused
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the credit memo to POST /credit_memos/{tenantId} with the key twice, the
        lines as money, and answers the memo’s id
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        every memo line’s quantity as Accounting’s contract has it, a decimal
        string (0230: a number was refused 400)
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#sends
        the fee invoice issued at once under the commerce source, the credit
        from the payment, its application and the refund executed, each to its
        route
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#answers
        a refusal as failed with Accounting’s code, retryable for the refusals a
        later attempt may change and permanent for a decline
      - >-
        services-commerce:modules/fulfillment/tests/unit/adjustments/accounting-adjustment-commands.spec.js#throws
        when Accounting answers a server error or a document without an id, so
        the step stays submitted for the resume
  - repository: react-console
    tests: []
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: covered
  edge: 'gap: FND-COM-FUL-062'
  failure: covered
  boundary: 'gap: FND-COM-FUL-062'
  concurrency: 'gap: FND-COM-FUL-062'
  invariant: covered
  interaction: covered
coverage_notes:
  edge: >-
    No scenario specifically isolates this dimension; the coverage finding
    retains the missing proof.
  boundary: >-
    No scenario specifically isolates this dimension; the coverage finding
    retains the missing proof.
  concurrency: >-
    No scenario specifically isolates this dimension; the coverage finding
    retains the missing proof.
transition_audit:
  - model: STATE-COM-FUL-003
    from: pending
    to: in_progress
    source: >-
      services-commerce:modules/fulfillment/services/adjustments/adjustment-worker.ts:executeAdjustment
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: pending
    to: completed
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:ADJUSTMENT_TRANSITIONS
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: in_progress
    to: completed
    source: 'services-commerce:docs/milestones/COMM-M1-repairs-6-report.md#R6-2'
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: in_progress
    to: failed
    source: >-
      services-commerce:modules/fulfillment/services/adjustments/adjustment-worker.ts
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: pending
    to: failed
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:ADJUSTMENT_TRANSITIONS
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: failed
    to: pending
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:retryFinancialAdjustment
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: failed
    to: resolved
    source: >-
      services-commerce:modules/operations/services/interventions/operations-interventions.ts
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: pending
    to: resolved
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:ADJUSTMENT_TRANSITIONS
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
  - model: STATE-COM-FUL-003
    from: in_progress
    to: resolved
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:ADJUSTMENT_TRANSITIONS
    coverage: 'gap: FND-COM-FUL-062'
    scenarios: []
permission_audit:
  - key: commerce.adjustments.read
    where_checked: api
    coverage: 'gap: FND-COM-FUL-062'
    note: >-
      Per-key positive and negative coverage is not separately mapped;
      permission scenarios retain the observed aggregate tests.
  - key: commerce.adjustments.retry
    where_checked: api
    coverage: 'gap: FND-COM-FUL-062'
    note: >-
      Per-key positive and negative coverage is not separately mapped;
      permission scenarios retain the observed aggregate tests.
  - key: commerce.adjustments.resolve
    where_checked: api
    coverage: 'gap: FND-COM-FUL-062'
    note: >-
      Per-key positive and negative coverage is not separately mapped;
      permission scenarios retain the observed aggregate tests.
related_audit:
  - capability: CAP-COM-FUL-008
    scenarios:
      - ATS-COM-FUL-007-07
  - capability: CAP-COM-FUL-009
    scenarios:
      - ATS-COM-FUL-007-08
  - capability: CAP-COM-FUL-015
    scenarios:
      - ATS-COM-FUL-007-09
invariant_audit:
  - invariant: INV-DOM-COM-FUL-003-01
    scenarios:
      - ATS-COM-FUL-008-02
    coverage: covered
    provenance: observed
    source: >-
      services-commerce:modules/fulfillment/db/operational-exceptions.table.ts:operational_exceptions_open_uidx
  - invariant: INV-DOM-COM-FUL-003-02
    scenarios:
      - ATS-COM-FUL-009-04
    coverage: covered
    provenance: documented
    source: 'services-commerce:docs/migrations/operations/README.md#D-P5-08'
  - invariant: INV-DOM-COM-FUL-003-03
    scenarios:
      - ATS-COM-FUL-008-03
    coverage: covered
    provenance: observed
    source: >-
      services-commerce:modules/operations/services/interventions/operations-interventions.ts
  - invariant: INV-DOM-COM-FUL-003-04
    scenarios:
      - ATS-COM-FUL-009-02
    coverage: covered
    provenance: observed
    source: >-
      services-commerce:modules/operations/services/persistence/reconciler-candidates.ts
  - invariant: INV-DOM-COM-FUL-003-05
    scenarios:
      - ATS-COM-FUL-007-01
    coverage: covered
    provenance: observed
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:requestFinancialAdjustment
  - invariant: INV-DOM-COM-FUL-003-06
    scenarios:
      - ATS-COM-FUL-007-02
    coverage: covered
    provenance: observed
    source: >-
      services-commerce:modules/fulfillment/services/adjustments/adjustment-worker.ts:planAdjustmentSteps
  - invariant: INV-DOM-COM-FUL-003-07
    scenarios: []
    coverage: 'gap: FND-COM-FUL-062'
    provenance: observed
    source: >-
      services-commerce:modules/fulfillment/services/persistence/financial-adjustments.ts:ADJUSTMENT_TRANSITIONS
  - invariant: INV-DOM-COM-FUL-003-08
    scenarios:
      - ATS-COM-FUL-007-03
    coverage: covered
    provenance: documented
    source: 'services-commerce:docs/migrations/operations/README.md#D-P5-06'
---

# Complete the financial work requested by a post-sale document: Capability Test Specification

## Coverage

The category map distinguishes available cases from missing proof. A covered category has a scenario; the lifecycle and permission audits retain gaps in exhaustive coverage. Proposed cases describe the intended verification and carry no execution result.

| Rule | Scenarios |
|---|---|
| `BR-CAP-COM-FUL-007-01` | `ATS-COM-FUL-007-01` |
| `BR-CAP-COM-FUL-007-02` | `ATS-COM-FUL-007-02` |
| `BR-CAP-COM-FUL-007-03` | `ATS-COM-FUL-007-02` |
| `BR-CAP-COM-FUL-007-04` | `ATS-COM-FUL-007-03`, `ATS-COM-FUL-007-08` |
| `BR-CAP-COM-FUL-007-05` | `ATS-COM-FUL-007-03`, `ATS-COM-FUL-007-08` |
| `BR-CAP-COM-FUL-007-06` | `ATS-COM-FUL-007-04`, `ATS-COM-FUL-007-09` |
| `BR-CAP-COM-FUL-007-08` | `ATS-COM-FUL-007-05`, `ATS-COM-FUL-007-07` |
| `BR-CAP-COM-FUL-007-09` | `ATS-COM-FUL-007-05`, `ATS-COM-FUL-007-07` |
| `BR-CAP-COM-FUL-007-10` | `ATS-COM-FUL-007-05`, `ATS-COM-FUL-007-07` |
| `BR-CAP-COM-FUL-007-11` | `ATS-COM-FUL-007-06` |

## Interactions With Related Capabilities

The interaction cases exercise review and resolve operations findings; detect stalled and inconsistent order work; process returned goods through inspection and disposition. They vary the upstream record or outcome and inspect the resulting work across the capability boundary. Workflow crossings also include stock, financial or application records when the flow depends on them. Existing test bindings retain their source anchors so a reviewer can distinguish supporting assertions from a complete workflow run.
