Skip to content

ATS-COM-FUL-019Reconcile shelf counts and stock findings: Capability Test Specification

Markdown

ATS-COM-FUL-019

Reconcile shelf counts and stock findings: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

  • Rule gap: FND-COM-FUL-074
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge gap: FND-COM-FUL-074
  • Failure gap: FND-COM-FUL-074
  • Boundary covered
  • Concurrency gap: FND-COM-FUL-074
  • Invariant covered
  • Interaction covered

Test Scenarios

9 scenarios proving CAP-COM-FUL-019; 7 bound to an existing test.

01 Completed counts retain corrections and refuse reopeningtransitionapinegativetest
Proves
BR-CAP-COM-FUL-019-01 BR-CAP-COM-FUL-019-02 INV-DOM-COM-FUL-005-10
Preconditions
Two count items include one discrepancy.
Steps
Record and complete a count, then edit or complete again and cancel another count.
Expected
One correction and count timestamps remain, repeated changes fail and cancellation adds no correction.
Data
Fixtures for completed counts retain corrections and refuse reopening.
Bound to
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#opens the count open with no lines, records the lines with what the shelf expected, and completes it with one correction for the variance
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#refuses lines on a completed count and a second completion (409), and the cancelled count wrote nothing
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#opens a count, records what was counted, completes it with one correction, and cancels another; lines on a completed count 409
Source
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#opens the count open with no lines, records the lines with what the shelf expected, and completes it with one correction for the variance
02 Finding resolution requires a result and allows later recurrencevalidationapinegativetest
Proves
BR-CAP-COM-FUL-019-03 INV-DOM-COM-FUL-005-11
Preconditions
A stock finding is open.
Steps
Acknowledge, try reasonless result, resolve properly, repeat and raise again.
Expected
Missing resolution and repeated closure fail, while later recurrence opens a fresh finding.
Data
Fixtures for finding resolution requires a result and allows later recurrence.
Bound to
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#is raised open, acknowledged, resolved with its resolution, and raised again as a new row once resolved
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#is listed and read, acknowledged, then resolved with its resolution (a second resolve 409; a resolution missing 400)
services-commerce:modules/inventory/tests/integration/db/inventory-tables.table.integration.spec.js#refuses two open findings of one kind about one subject, by inventory_exceptions_open_uidx, and a kind outside the six
Source
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#is raised open, acknowledged, resolved with its resolution, and raised again as a new row once resolved
03 Nightly reconciliation reports discrepancies and expires holdsinvariantapitest
Proves
BR-CAP-COM-FUL-019-04 BR-CAP-COM-FUL-019-05 BR-CAP-COM-FUL-019-06 BR-CAP-COM-FUL-019-07 BR-CAP-COM-FUL-019-10
Preconditions
Fixtures include expired hold, balance mismatch, terminal allocation and low stock.
Steps
Run reconciliation twice.
Expected
Only expiry releases stock automatically and repeated discrepancies increment their open findings.
Data
Fixtures for nightly reconciliation reports discrepancies and expires holds.
Bound to
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#counts what it did: the tenant, one hold expired, three items checked, one mismatch, one stale unit, one low-stock SKU of two with a point, and the cost pass: three items whose stock no layer costs (the fixture’s bare receipts), no handoff without a relief
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#releases the expired hold (reason expiry) and raises expired_hold on it, giving the unit back
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#raises balance_mismatch on the item knocked out of line, with what was kept and what the ledgers say, and corrects nothing
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#raises low_stock on shirt L at its own reorder point with the product’s reorder quantity, and nothing on the cap above its point
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#finds the same on a second run and adds an occurrence to each open finding rather than another row
Source
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#counts what it did: the tenant, one hold expired, three items checked, one mismatch, one stale unit, one low-stock SKU of two with a point, and the cost pass: three items whose stock no layer costs (the fixture’s bare receipts), no handoff without a relief
04 Paged reconciliation reports a time-limited run honestlyboundaryapitest
Proves
BR-CAP-COM-FUL-019-08
Preconditions
Items and tracked products exceed one page.
Steps
Run with sufficient time and then with an exhausted time budget.
Expected
The full scan reaches later pages and the exhausted scan stops with incomplete coverage.
Data
Fixtures for paged reconciliation reports a time-limited run honestly.
Bound to
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory-paging.integration.spec.js#checks every tracked SKU with a reorder point and raises each one at or below it, the last page’s included
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory-paging.integration.spec.js#stops before it reads anything when the run has no time left, and answers that it is incomplete
Source
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory-paging.integration.spec.js#checks every tracked SKU with a reorder point and raises each one at or below it, the last page’s included
05 Stock discovery rejects an existing transactionboundaryapinegativetest
Proves
BR-CAP-COM-FUL-019-11
Preconditions
A caller owns an open transaction.
Steps
Discover workspaces with stock within that transaction.
Expected
The sweep read fails rather than joining the caller's transaction.
Data
Fixtures for stock discovery rejects an existing transaction.
Bound to
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#finds the tenants that hold stock across tenants, under the sweep policy, this one among them, and refuses that read inside another transaction
Source
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#finds the tenants that hold stock across tenants, under the sweep policy, this one among them, and refuses that read inside another transaction
06 Counts and findings require mutation authoritypermissionapinegativetest
Proves
BR-CAP-COM-FUL-019-12
Preconditions
A read-only inventory identity is available.
Steps
Try count creation and finding resolution, then read the records.
Expected
Mutations fail while authorized inspection succeeds.
Data
Fixtures for counts and findings require mutation authority.
Bound to
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list and read everything, and refuses it every write 403 permission_missing
Source
services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#lets a reader list and read everything, and refuses it every write 403 permission_missing
07 A shelf count corrects the ledger and changes availabilityinteractionapiproposed
Proves
BR-CAP-COM-FUL-019-02 BR-CAP-COM-FUL-017-03 BR-CAP-COM-FUL-018-06
Preconditions
A sellable item holds ten units and a scoped count observes eight.
Steps
Complete the count, inspect its correction movement and read availability.
Expected
The count retains one correction and buyers see the corrected stock; repeated completion changes nothing.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Source
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#opens the count open with no lines, records the lines with what the shelf expected, and completes it with one correction for the variance,services-commerce:modules/inventory/tests/integration/db/inventory-tables.table.integration.spec.js#refuses the application role a balance: UPDATE on on_hand is 42501 (the column grant), while its settings are its to change,services-commerce:modules/inventory/tests/e2e/inventory.e2e.spec.js#answers the availability in the storefront’s words: limited with what is left, unavailable for more than the shelf has, backorder for the shirt, available for a product it does not track
08 Nightly expiry gives held stock back to buyersinteractionapitest
Proves
BR-CAP-COM-FUL-019-04 BR-CAP-COM-FUL-018-04
Preconditions
An expired checkout hold consumes one unit of tracked sellable stock.
Steps
Run nightly reconciliation, inspect the expiry finding and read the allocation and availability.
Expected
The hold releases with an expiry reason and its unit becomes available.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Bound to
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#counts what it did: the tenant, one hold expired, three items checked, one mismatch, one stale unit, one low-stock SKU of two with a point, and the cost pass: three items whose stock no layer costs (the fixture’s bare receipts), no handoff without a relief
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#releases the expired hold (reason expiry) and raises expired_hold on it, giving the unit back
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#raises balance_mismatch on the item knocked out of line, with what was kept and what the ledgers say, and corrects nothing
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#raises low_stock on shirt L at its own reorder point with the product’s reorder quantity, and nothing on the cap above its point
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#finds the same on a second run and adds an occurrence to each open finding rather than another row
Source
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#counts what it did: the tenant, one hold expired, three items checked, one mismatch, one stale unit, one low-stock SKU of two with a point, and the cost pass: three items whose stock no layer costs (the fixture’s bare receipts), no handoff without a relief,services-commerce:modules/inventory/tests/e2e/merchandise-placement.e2e.spec.js#holds the two caps for the item under hold:<item> (the units held with the product’s expiry), and the shelf shows one left
09 Stock diagnoses remain inspectable through their owning listinteractionapiproposed
Proves
BR-CAP-COM-FUL-019-03 BR-CAP-COM-FUL-008-01
Preconditions
One stock mismatch and one order delivery failure are recorded in the same workspace.
Steps
Inspect the stock finding and the order queue, acknowledge each using its own authority, then resolve the stock finding.
Expected
Each retained diagnosis uses its owning list and permission; resolving the stock finding leaves the delivery failure open.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Source
services-commerce:modules/inventory/tests/integration/services/stock/staff-movements.integration.spec.js#is raised open, acknowledged, resolved with its resolution, and raised again as a new row once resolved,services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#lists the finding the reconciler raised about the unbilled order, filtered by kind, state and order, and never another tenant’s

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.