hardening and polish sweep #4

Merged
cheapnud merged 6 commits from d/hd1-hardening into master 2026-08-13 15:21:45 +00:00
Owner

Closes the pricing engine audit stack and the module polish backlog: code validation, resolve guards, rounding coverage, a default-address backstop index, and assorted small fixes across purchasing, planning, addresses, export and materials.

Closes the pricing engine audit stack and the module polish backlog: code validation, resolve guards, rounding coverage, a default-address backstop index, and assorted small fixes across purchasing, planning, addresses, export and materials.

🤖 Claude AI Code Review

  1. Summary
    Well-scoped hardening sweep adding validation guards, warning surfacing, a filtered unique index backstop, and extensive test coverage across pricing, purchasing, planning, and addresses.

  2. Code Quality
    Exceptionally thorough — every change is backed by tests and reasoned comments, and the SetDefaultDeliveryAddressAsync ordering fix shows real care against the new index.

  3. Issues

🟢 MaterialResolution.csEnum.IsDefined(priceGroup.Kind) uses the object overload, which boxes on every call. Minor allocation in a pricing hot path; use the generic Enum.IsDefined<FabricMaterialKind>(...) if targeting .NET 5+.

🟢 PartyService.SetDefaultDeliveryAddressAsync — the two-save-within-a-transaction workaround relies on EF change-tracker flush order being "load order," which is not a documented contract. It works and is now transactional, but a cleaner approach would be a single ExecuteUpdate to clear siblings. Not blocking.

  1. Verdict: APPROVE

Solid, test-backed sweep with no correctness or safety concerns. The migration correctly reconfigures the existing index, and the address-default ordering bug fix is a genuine catch.


📊 Tokens: 81382 input + 473 output | 💰 Cost: ~$0.4187
Generated by Claude Opus 4.8 via Gitea Actions

## 🤖 Claude AI Code Review 1. **Summary** Well-scoped hardening sweep adding validation guards, warning surfacing, a filtered unique index backstop, and extensive test coverage across pricing, purchasing, planning, and addresses. 2. **Code Quality** ⭐⭐⭐⭐⭐ Exceptionally thorough — every change is backed by tests and reasoned comments, and the `SetDefaultDeliveryAddressAsync` ordering fix shows real care against the new index. 3. **Issues** 🟢 `MaterialResolution.cs` — `Enum.IsDefined(priceGroup.Kind)` uses the object overload, which boxes on every call. Minor allocation in a pricing hot path; use the generic `Enum.IsDefined<FabricMaterialKind>(...)` if targeting .NET 5+. 🟢 `PartyService.SetDefaultDeliveryAddressAsync` — the two-save-within-a-transaction workaround relies on EF change-tracker flush order being "load order," which is not a documented contract. It works and is now transactional, but a cleaner approach would be a single `ExecuteUpdate` to clear siblings. Not blocking. 4. **Verdict**: **APPROVE** Solid, test-backed sweep with no correctness or safety concerns. The migration correctly reconfigures the existing index, and the address-default ordering bug fix is a genuine catch. --- 📊 **Tokens**: 81382 input + 473 output | 💰 **Cost**: ~$0.4187 *Generated by Claude Opus 4.8 via Gitea Actions*
cheapnud merged commit c80f5e1a4b into master 2026-08-13 15:21:45 +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!4
No description provided.