Repository navigation
Fix order confirmation and delivery serviceability - #76
Merged
Merged
Conversation
Reserve inventory under row locks before automatic confirmation. Reject nonpositive quantities and out-of-zone delivery destinations before committing orders.
lordlabakdas
marked this pull request as ready for review
October 3, 2026 23:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New orders currently wait for manual store acceptance even after stock is available, and delivery quotes ignore the configured store radius. This change confirms orders after inventory is locked and reserved, rejects nonpositive quantities and invalid coordinates, and returns Location Unserviceable for destinations outside the store delivery zone.
Source: Orders module comments. The comment-by-comment disposition is in SPEC_ORDERS_MODULE_COMMENTS.md.
Frontend companion: lordlabakdas/groceror-fe#56. Merge this backend change before its frontend companion.
Validation: 165 focused backend tests passed initially; the final order/delivery run passed 62 tests, including two additional transaction regressions. SQLite tests do not exercise PostgreSQL row-lock contention. Live courier integration was not exercised.
No schema change. Existing order history and exceptional cancellations remain supported. The frontend comments out pickup for the MVP; historical pickup data is preserved.