Skip to content

ATS-ACC-REC-008Prepare a payout explanation from matching evidence: Capability Test Specification

Markdown

ATS-ACC-REC-008

Prepare a payout explanation from matching evidence: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleReconciliationRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge covered
  • Boundary covered
  • Concurrency covered
  • Interaction covered
  • Failure gap: FND-ACC-REC-053
  • Invariant gap: FND-ACC-REC-053

Test Scenarios

14 scenarios proving CAP-ACC-REC-008; 11 bound to an existing test.

01 Opening validates payouts and replayvalidationapinegativetest
Proves
BR-CAP-ACC-REC-008-01
Preconditions
Test sets contain mixed merchants, voided payouts and too many payouts.
Steps
Open invalid sets, repeat a valid keyed request and change its payout set.
Expected
Bad sets and changed keyed bodies fail; unchanged creation replays one draft.
Data
Provide workspace fixture for this case.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#refuses a voided payout with 409 payout-voided naming it
02 Concurrent payout ownershipconcurrencyapinegativetest
Proves
BR-CAP-ACC-REC-008-02
Preconditions
Two preparers select one unheld payout.
Steps
Open reconciliations simultaneously.
Expected
One succeeds and the other receives the winning holder and preparer.
Data
Provide Two preparers for this case.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/reconciliation-batches/claim-concurrency.integration.spec.js#lets the first create succeed
03 Initial draft identity and totalstransitionapitest
Proves
BR-CAP-ACC-REC-008-03
Preconditions
An unheld payout is ready for reconciliation.
Steps
Create drafts and inspect their numbers, preparer and linked amounts.
Expected
New drafts are open, numbered and carry the negative payout total as initial difference.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes an open draft batch numbered 10001, prepared by the caller, with the payouts’ total
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#records batch.created with its number, payouts, total and version and the idempotency key
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#creates a draft batch over the payout, its difference minus the payout
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes an open draft batch numbered 10001, prepared by the caller, with the payouts’ total
04 Candidate context and conflicting evidenceruleapitest
Proves
BR-CAP-ACC-REC-008-04
Preconditions
Items include another merchant, another holder and another processor payout reference.
Steps
Read suggested and all views and search for the conflicting reference.
Expected
Compatible candidates remain, other holdings are separate and a conflict appears only when searched.
Data
Provide candidates fixture for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-candidates.queries.integration.spec.js#never answers another merchant account’s or another unit’s items, though each names the payout
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#answers the captures RB-10001 holds apart, with their holder
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-candidates.queries.integration.spec.js#answers the item another open batch claims only in held, with its holder
05 Matching ranks depend on evidenceboundaryunittest
Proves
BR-CAP-ACC-REC-008-05 BR-CAP-ACC-REC-008-06
Preconditions
Candidates differ in references and expected dates around a previous deposit.
Steps
Rank each candidate and vary amounts without changing evidence.
Expected
Evidence determines ranks and explanations; changing the amount does not improve a match.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate the processor reports paid in this payout
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate settled in a processor batch with an item claimed by payout reference
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate expected after the previous deposit and before this one
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate expected 4 business days before the deposit, with no previous payout
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate expected on the sixth business day before the deposit, with no previous payout
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate the same whatever amount it carries
services-accounting:modules/reconciliation/tests/e2e/reconciliation-scenario.e2e.spec.js#step 4: suggests by date alone, never a combination of amounts that adds up to the deposit
Source
services-accounting:modules/reconciliation/tests/unit/rules/match-ranking.spec.js#ranks a candidate the processor reports paid in this payout
06 Suggested, all and widened windowsboundaryapitest
Proves
BR-CAP-ACC-REC-008-07
Preconditions
Candidates lie inside and outside the default window, with one dismissed.
Steps
Compare views and widen the date range.
Expected
Suggested excludes weak and dismissed items; all flags them, and widening exposes later dates.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-candidates.queries.integration.spec.js#answers tiers 1 to 4 not dismissed, each candidate whole, the held item apart, with the default window
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#answers the default window, 14 days before the payout to 3 days after
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-candidates.queries.integration.spec.js#answers tiers 1 to 4 not dismissed, each candidate whole, the held item apart, with the default window
07 Dismissal and undo without draft mutationedgeapinegativetest
Proves
BR-CAP-ACC-REC-008-08
Preconditions
An open draft has a suggested item.
Steps
Dismiss twice, undo twice and try dismissal against sealed or incompatible records.
Expected
Version and totals stay fixed, repeat dismissal adds no event, and invalid dismissal or second undo fails.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-dismissals.integration.spec.js#answers the dismissal as written
08 Notes use version and open statevalidationapinegativetest
Proves
BR-CAP-ACC-REC-008-09
Preconditions
Open and finalized reconciliations are available.
Steps
Save notes, retry at a stale version, clear notes and try editing the finalized record.
Expected
Current open edits advance version and audit, while stale and sealed edits fail.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.integration.spec.js#writes the notes one version on, by the caller
09 Source-batch grouping and ordered historyruleapitest
Proves
BR-CAP-ACC-REC-008-10
Preconditions
Claims span two operational batches alongside a manual item.
Steps
Read grouped sources and activity pages.
Expected
Groups include counts and amounts, unbatched entries appear last and activity is chronological.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.queries.integration.spec.js#groups the active claims by operational batch with their count and amount, the claims without one last
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.queries.integration.spec.js#answers every event oldest first with every mapped property, and no cursor after the last
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-workspaces.queries.integration.spec.js#groups the active claims by operational batch with their count and amount, the claims without one last
10 Opening and inspection grantspermissionapinegativetest
Proves
BR-CAP-ACC-REC-008-11
Preconditions
A read-only caller and two workspaces are available.
Steps
Create and inspect as the reader and request another workspace’s record.
Expected
Inspection is allowed without write actions, creation is forbidden and foreign records are absent.
Data
Assign callers through the relevant role policies.
Bound to
services-accounting:tests/unit/reconciliation-matching-routes.spec.ts#serves the create under accounting.reconciliation-batches.create
services-accounting:tests/unit/reconciliation-matching-routes.spec.ts#serves every command on an open batch under accounting.reconciliation-batches.update
services-accounting:tests/unit/reconciliation-matching-routes.spec.ts#serves the candidates, the source batches and the history under accounting.reconciliation-batches.read
Source
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#lets a principal with the read key alone read the batch
11 Evidence-led matching journeyinteractionapinegativetest
Proves
BR-CAP-ACC-REC-008-05 BR-CAP-ACC-REC-008-06 BR-CAP-ACC-REC-008-08
Preconditions
Captures surround a deposit and another draft holds one item.
Steps
Compare views, dismiss and undo, then submit a claim with multiple invalid items.
Expected
Explanations and holdings remain visible, dismissal preserves version and claim errors identify each invalid item.
Data
Use the isolated reconciliation fixture unit.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0595.spec.ts#ACT-ACC-0595
12 Candidate evidence survives allocationinteractionapiproposed
Proves
BR-CAP-ACC-REC-008-04 BR-CAP-ACC-REC-009-04
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Inspect ranked candidates, claim one and inspect grouped sources and activity.", "expect": "The claim carries the displayed evidence and changes draft totals and the source group.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md" ] } ]
Expected
The claim carries the displayed evidence and changes draft totals and the source group.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md
13 Deductions join matching preparationinteractionapiproposed
Proves
BR-CAP-ACC-REC-008-10 BR-CAP-ACC-REC-010-04 BR-CAP-ACC-REC-010-06
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Open an explanation, claim captures and add a documented processor fee.", "expect": "The manual entry appears separately from captures and contributes to the same draft difference.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-010-enter-the-fees-reserves-and-corrections-the-processor-took.md" ] } ]
Expected
The manual entry appears separately from captures and contributes to the same draft difference.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-010-enter-the-fees-reserves-and-corrections-the-processor-took.md
14 Abandoned preparation releases its payoutinteractionapiproposed
Proves
BR-CAP-ACC-REC-008-08 BR-CAP-ACC-REC-012-02 BR-CAP-ACC-REC-012-03 BR-CAP-ACC-REC-012-04 BR-CAP-ACC-REC-012-07
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Open a workspace, dismiss a candidate and abandon the draft before opening a replacement.", "expect": "The old workspace retains history and the replacement can hold the released payout.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-012-abandon-a-draft-reconciliation-and-free-what-it-held.md" ] } ]
Expected
The old workspace retains history and the replacement can hold the released payout.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-012-abandon-a-draft-reconciliation-and-free-what-it-held.md

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.