Skip to content

fix: Restore inventory for cancelled and refunded orders - #31

Merged
codejagaban merged 2 commits into
mainfrom
codex/verify-inventory-lifecycle
Sep 27, 2026
Merged

codejagaban merged 2 commits into
mainfrom
codex/verify-inventory-lifecycle

Conversation

@codejagaban

Copy link
Copy Markdown
Owner

Summary

  • restore full-order product and variant inventory when a paid order is cancelled or refunded
  • atomically claim the restock so concurrent status updates cannot restore stock twice
  • add migration tracking and unit/integration coverage

Verification

  • typecheck
  • unit tests: 13 passed
  • integration tests: 21 passed
  • production build
  • full migration chain applied from an empty disposable database

Scope

This covers full-order cancellation and refund. Partial returns require a returned-quantity ledger and remain a separate workflow.

@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nextjs-ecomstore Ready Ready Preview Sep 27, 2026 11:32am UTC

@codejagaban
codejagaban merged commit 06faa8a into main Sep 27, 2026
3 checks passed
@codejagaban
codejagaban deleted the codex/verify-inventory-lifecycle branch September 27, 2026 11:34

This branch was successfully deployed

2 active deployments
Production — 06faa8aa Deployed Sep 27, 2026 by vercel[bot]
Preview — 06faa8aa Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant