Skip to content

ATS-ACC-REC-009Allocate settlement money to one explanation: Capability Test Specification

Markdown

ATS-ACC-REC-009

Allocate settlement money to one explanation: 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-054
  • Invariant gap: FND-ACC-REC-054

Test Scenarios

12 scenarios proving CAP-ACC-REC-009; 10 bound to an existing test.

01 All invalid claim items reportedvalidationapinegativetest
Proves
BR-CAP-ACC-REC-009-01
Preconditions
Items are ineligible, resolved, incompatible and already claimed here.
Steps
Claim them together and separately try five hundred and one references.
Expected
One response lists all item problems; oversized input fails and nothing is claimed.
Data
Provide allocation fixture for this case.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#refuses every problem at once with 400, naming each item
02 One active claim under competitionconcurrencyapinegativetest
Proves
BR-CAP-ACC-REC-009-02
Preconditions
Items are held by draft or finalized reconciliations and two drafts compete for a free one.
Steps
Try held claims and simultaneous claims of the free item.
Expected
Existing holdings prevent another claim, and concurrency leaves one winning active claim.
Data
Provide Two preparers for this case.
Bound to
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#refuses a claim of an item another batch holds with 409 item_held, naming that batch and its preparer
Source
services-accounting:modules/reconciliation/tests/integration/services/reconciliation-batches/claim-concurrency.integration.spec.js#lets the first claim succeed
03 Calculated status and differenceruleapitest
Proves
BR-CAP-ACC-REC-009-03
Preconditions
Drafts have zero claims, partial claims and balancing claims.
Steps
Derive display status and inspect stored generated differences.
Expected
Draft, In Progress and Balanced follow claim count and exact claimed-minus-payout money.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is a draft with nothing claimed, whatever its difference
services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is in progress with a claim and a difference short of zero
services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is balanced with a claim and a difference of exactly zero
services-accounting:modules/reconciliation/tests/integration/db/reconciliation-batches.table.integration.spec.js#generates the difference as claimed items less payouts, the brief’s sign
services-accounting:modules/reconciliation/tests/integration/services/reconciliation-batches/brief-example.integration.spec.js#is in progress once the 42 captures and the refund are claimed, 27500 over the payout
Source
services-accounting:modules/reconciliation/tests/unit/rules/batch-status.spec.js#is a draft with nothing claimed, whatever its difference
04 Claims retain why and whotransitionapitest
Proves
BR-CAP-ACC-REC-009-04
Preconditions
An open draft has two candidates.
Steps
Claim both and inspect allocation and audit data.
Expected
Ranks, explanations, original batch and claimant persist, with totals and version advancing once.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#stores the tier and the reasons the ranking gives each claim, and its operational batch
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#stores each claim with its tier, its explanation, its operational batch and who claimed it
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#balances the batch with the two claims, one version on
05 Release history and reclaimtransitionapitest
Proves
BR-CAP-ACC-REC-009-05
Preconditions
The draft holds a matched item and a manual entry.
Steps
Release with a reason, reclaim the matched item and try releasing the manual entry.
Expected
Release preserves history and frees the matched item; manual entries require removal instead.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#takes the released claim out of the totals, one version on
06 Authoritative acceptance is repeat-safeedgeapitest
Proves
BR-CAP-ACC-REC-009-06
Preconditions
Candidates span authoritative and correlation or weak ranks.
Steps
Accept authoritative matches twice.
Expected
Only eligible authoritative candidates are claimed; the repeat adds nothing or changes no version.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#claims the tier 1 and tier 3 candidates and nothing else
07 Open state and current version guard claimsvalidationapinegativetest
Proves
BR-CAP-ACC-REC-009-07
Preconditions
Open and finalized examples exist.
Steps
Claim with a stale version, claim into finalized state and release a finalized claim.
Expected
All guarded changes are refused.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-allocations.integration.spec.js#refuses a claim at a version that is not the batch’s with 409 StaleObject
08 Whole-item context and capacityboundaryapinegativetest
Proves
BR-CAP-ACC-REC-009-08 BR-CAP-ACC-REC-009-09
Preconditions
Incompatible items and a draft at its claim limit are available.
Steps
Try cross-context, partial and over-limit claims.
Expected
Database enforcement rejects every incompatible or excessive allocation.
Data
No additional fixture beyond the case setup.
Bound to
Source
services-accounting:modules/reconciliation/tests/integration/db/reconciliation-allocations.table.integration.spec.js#refuses an item of another merchant account and currency
09 Claiming requires updatepermissionapinegativetest
Proves
BR-CAP-ACC-REC-009-10
Preconditions
A caller can read but cannot update.
Steps
Submit a claim as that caller.
Expected
The command is forbidden.
Data
Use a caller whose role grants inspection only.
Bound to
Source
services-accounting:modules/reconciliation/tests/e2e/reconciliation-matching.e2e.spec.js#refuses the reader a claim with 403
10 Competing edits on one draftconcurrencyapinegativetest
Proves
AS-JNY-ACC-REC-001-02
Preconditions
Two preparers hold the same draft version.
Steps
Submit competing claims at one draft version, then race a payout amount replacement with release of a claim.
Expected
One competing claim is stale; the payout edit succeeds and the release either succeeds first or is stale, with totals agreeing with retained holdings.
Data
Use the isolated reconciliation fixture unit.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/reconciliation-close/ACT-ACC-0598.spec.ts#ACT-ACC-0598
11 Manual removal changes allocation totalsinteractionapiproposed
Proves
BR-CAP-ACC-REC-009-03 BR-CAP-ACC-REC-010-07
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Claim captures, add a fee and remove that fee at the current draft version.", "expect": "The fee is withdrawn, matched claims remain and the difference changes by the removed amount.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-010-enter-the-fees-reserves-and-corrections-the-processor-took.md" ] } ]
Expected
The fee is withdrawn, matched claims remain and the difference changes by the removed amount.
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-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-010-enter-the-fees-reserves-and-corrections-the-processor-took.md
12 Allocation balance gates approvalinteractionapiproposed
Proves
BR-CAP-ACC-REC-009-03 BR-CAP-ACC-REC-011-03 BR-CAP-ACC-REC-011-06 AS-JNY-ACC-REC-001-03
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Claim a partial explanation, try approval, claim the remaining money and approve independently.", "expect": "The incomplete attempt remains open; the completed explanation finalizes with holdings sealed.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.md" ] } ]
Expected
The incomplete attempt remains open; the completed explanation finalizes with holdings sealed.
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-009-claim-what-a-deposit-paid-out-without-two-people-claiming.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-011-approve-a-balanced-reconciliation-and-move-the-deposit-to.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.