Skip to content

CAP-COM-FUL-019Reconcile shelf counts and stock findings

Markdown

CAP-COM-FUL-019

Reconcile shelf counts and stock findings

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision1

Read atservices-commerce c8b66a98

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Counts provide accountable shelf-balance corrections.Replenishment findings identify stock at its configured threshold.
Surfaces
apijob
Intent sources
services-commerce:docs/migrations/inventory/README.md#D-P8I-24 (Q08, Andrew 2026-10-19)

Controls

27 controls apply, from the corpus control catalogue.

TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-CRY-001 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-004 TC-LOG-005 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
commerce.inventory.readapitenant
commerce.inventory.createapitenant
commerce.inventory.updateapitenant

Business Rules

12 rules, 11 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
A warehouse or location count starts without lines, records each item's on-hand expectation when counted, rejects items outside its scope and replaces a line's earlier count on recount.
no proof recorded yet
lifecycleservicetest
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
02must prove
Proposed
Count completion writes keyed corrections for differences from on-hand at completion and stamps counted items, while rejecting later line edits and repeated completion; cancellation writes no corrections.
no proof recorded yet
calculationservicetest
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
03must prove
Proposed
Each subject has one open stock finding per kind, repeats increase occurrences, resolution requires its result and cannot repeat, and later recurrence can open a new finding.
no proof recorded yet
lifecycleservice, databasetest
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
04must prove
Proposed
The daily check releases expired holds with an expiry reason and raises an expired-hold finding for each, without automatically correcting other discrepancies.
no proof recorded yet
lifecycleservicetest
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
05must prove
Proposed
Balance reconciliation compares stored balances with ledger derivation and reports both sets of figures without silently replacing them.
no proof recorded yet
invariantservicetest
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
06must prove
Proposed
A committed or picked allocation linked to a terminal delivery obligation produces a stale-allocation finding.
no proof recorded yet
policyservicetest
07must prove
Proposed
Tracked SKUs at or below their variant or fallback product reorder point produce low-stock findings carrying the applicable reorder quantity.
no proof recorded yet
calculationservicetest
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
08must prove
Proposed
Inventory and tracked-product scans follow all pages when time permits, report incomplete work on early stopping and restart from the beginning on the next run.
origin: Q08, Andrew 2026-10-19: services-commerce:docs/migrations/inventory/README.md#D-P8I-24
no proof recorded yet
policyservicetest
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
09
Proposed
The cost reconciliation pass reports on-hand versus open-layer disagreement and recent outgoing shipment or transfer movements lacking relief.
policyservicetest
services-commerce:modules/inventory/tests/integration/services/reconciliation/nightly-inventory.integration.spec.js#raises valuation_mismatch on each item whose on-hand is not Σ its layers (the bare receipts made none), the cost stream’s finding
10must prove
Proposed
Repeated nightly checks increment existing open findings rather than creating duplicates.
no proof recorded yet
invariantservicetest
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
11must prove
Proposed
Stock-workspace discovery requires sweep authority and rejects an existing transaction, while all resulting findings are stored within the relevant workspace.
no proof recorded yet
invariantservice, databasetest
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
12must prove
Proposed
Count creation, recording and completion and finding acknowledgement or resolution require administrator inventory permissions.
no proof recorded yet
permissionapiobserved

Scenarios

IdGivenWhenThenProvenance
01The shelf contains nine units but on-hand records show ten.Record and complete the shelf count.One negative count correction aligns the balance and stamps the count time.test
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

Edge Cases

IdGivenWhenThenProvenance
02Tracked merchandise spans several pages.Run the full nightly scan.Low-stock evaluation reaches qualifying SKUs on the final page as well.test
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

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.