Skip to content

fix: categorize Walmart refund items#65

Merged
eshaffer321 merged 6 commits into
mainfrom
codex/walmart-refund-item-categorization
Jul 11, 2026
Merged

fix: categorize Walmart refund items#65
eshaffer321 merged 6 commits into
mainfrom
codex/walmart-refund-item-categorization

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

Summary

  • match Walmart ledger refunds to positive Monarch credits
  • extract Walmart item-level returnId metadata and categorize only the refunded item
  • leave ambiguous or multi-refund cases untouched rather than splitting a refund across the full cart
  • retain refund transaction audit records

Verification

  • go test ./...
  • go test ./... -race
  • ./itemize walmart -dry-run -force -days 14 -order-id 200014872726122 -verbose
    • matched the $5.58 credit for order 200014872726122
    • identified the Chobani Coffee Creamer refund item
    • dry-ran a single-category update with no Monarch writes

Comment thread internal/adapters/providers/walmart/refunds.go Fixed
Comment thread internal/adapters/providers/walmart/refunds.go Fixed
Comment thread internal/adapters/providers/walmart/refunds.go Fixed
Comment thread internal/adapters/providers/walmart/refunds.go Fixed
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.71770% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.09%. Comparing base (2ea9f71) to head (00f6d58).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/application/sync/handlers/walmart.go 51.57% 63 Missing and 14 partials ⚠️
internal/application/sync/recording.go 0.00% 14 Missing ⚠️
internal/adapters/providers/walmart/order.go 66.66% 10 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (50.71%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
- Coverage   61.23%   61.09%   -0.14%     
==========================================
  Files          46       46              
  Lines        5837     6022     +185     
==========================================
+ Hits         3574     3679     +105     
- Misses       2027     2092      +65     
- Partials      236      251      +15     
Flag Coverage Δ
unittests 61.09% <50.71%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/application/sync/handlers/amazon.go 65.28% <ø> (ø)
internal/adapters/providers/walmart/order.go 70.00% <66.66%> (+6.58%) ⬆️
internal/application/sync/recording.go 1.19% <0.00%> (-0.11%) ⬇️
internal/application/sync/handlers/walmart.go 59.25% <51.57%> (-2.09%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshaffer321 eshaffer321 merged commit 8b06a92 into main Jul 11, 2026
13 of 14 checks passed
@eshaffer321 eshaffer321 deleted the codex/walmart-refund-item-categorization branch July 11, 2026 04:34
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.

2 participants