reorder point mrp #5

Merged
cheapnud merged 10 commits from d/sp3-mrp into master 2026-08-17 01:50:35 +00:00
Owner

Adds material planning profiles and supplier terms with prices, a movement log feeding computed usage, reorder suggestions with moq and package rounding that fire with or without demand, order-by dates, and per-preferred-supplier draft creation with price snapshots.

Adds material planning profiles and supplier terms with prices, a movement log feeding computed usage, reorder suggestions with moq and package rounding that fire with or without demand, order-by dates, and per-preferred-supplier draft creation with price snapshots.

🤖 Claude AI Code Review

  1. Summary
    Adds MRP reorder-point planning (profiles, supplier terms, movement log, priced drafts) with extensive tests. Cohesive, well-documented, and correctly batched.

  2. Code Quality
    Excellent atomicity discipline (single-SaveChanges batching, movement rows written in the same transaction as stock mutations) and thorough test coverage of edge cases.

  3. Issues

🟢 MaterialNeedsService.csconsumptionMovements loads the entire Backflush/BackflushUndo history unwindowed into memory before filtering by windowStart. This is already acknowledged in TODO.md as an upgrade path; fine for now but will grow unbounded over time.

🟢 MaterialsPage.razor — In CreateOrderAsync, when the fallback dialog is canceled, stillUnassigned stays >0 and the snackbar reports remaining rows correctly, but a batch that created some grouped drafts plus a canceled fallback still shows a Warning. Minor UX nit, not a bug.

  1. Verdict: APPROVE

Movement-write atomicity, price snapshotting, the preferred-term invariant, and the supplier delete-guard extension are all handled correctly and well-tested. The one known scaling concern is already tracked.


📊 Tokens: 114392 input + 465 output | 💰 Cost: ~$0.5836
Generated by Claude Opus 4.8 via Gitea Actions

## 🤖 Claude AI Code Review 1. **Summary** Adds MRP reorder-point planning (profiles, supplier terms, movement log, priced drafts) with extensive tests. Cohesive, well-documented, and correctly batched. 2. **Code Quality** ⭐⭐⭐⭐⭐ Excellent atomicity discipline (single-SaveChanges batching, movement rows written in the same transaction as stock mutations) and thorough test coverage of edge cases. 3. **Issues** 🟢 `MaterialNeedsService.cs` — `consumptionMovements` loads the entire Backflush/BackflushUndo history unwindowed into memory before filtering by `windowStart`. This is already acknowledged in TODO.md as an upgrade path; fine for now but will grow unbounded over time. 🟢 `MaterialsPage.razor` — In `CreateOrderAsync`, when the fallback dialog is canceled, `stillUnassigned` stays >0 and the snackbar reports remaining rows correctly, but a batch that created some grouped drafts plus a canceled fallback still shows a Warning. Minor UX nit, not a bug. 4. **Verdict**: **APPROVE** Movement-write atomicity, price snapshotting, the preferred-term invariant, and the supplier delete-guard extension are all handled correctly and well-tested. The one known scaling concern is already tracked. --- 📊 **Tokens**: 114392 input + 465 output | 💰 **Cost**: ~$0.5836 *Generated by Claude Opus 4.8 via Gitea Actions*
cheapnud merged commit bc6f4561fc into master 2026-08-17 01:50:35 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cheapnud/CheapFurniturePlanner!5
No description provided.