Skip to content

fix: match Walmart aggregate ledger charges#64

Merged
eshaffer321 merged 2 commits into
mainfrom
codex/fix-walmart-ledger-aggregate-matching
Jul 11, 2026
Merged

fix: match Walmart aggregate ledger charges#64
eshaffer321 merged 2 commits into
mainfrom
codex/fix-walmart-ledger-aggregate-matching

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

Summary

  • Fall back to matching multi-delivery Walmart orders by their total final ledger charges.
  • Consolidate exact aggregate transaction subsets when Monarch posts charges in a different grouping.
  • Deduplicate repeated Walmart purchase-history summaries before fetching details.
  • Prefer exact subset totals over tolerated one-cent near-matches.

Verification

  • go test ./...
  • go test ./... -race
  • Pre-commit formatting, golangci-lint, and go vet ./...
  • Live isolated dry-runs for Walmart orders 200015335172701 and 200015072601480
  • Targeted production syncs completed successfully: the first applied 2 splits; the second consolidated $75.60 + $0.01 to $75.61 and applied 3 splits.

No -force was used.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.53608% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.23%. Comparing base (b986777) to head (52d1b72).

Files with missing lines Patch % Lines
internal/application/sync/handlers/walmart.go 86.66% 4 Missing and 4 partials ⚠️
internal/adapters/providers/walmart/provider.go 61.11% 6 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   60.53%   61.23%   +0.69%     
==========================================
  Files          46       46              
  Lines        5757     5837      +80     
==========================================
+ Hits         3485     3574      +89     
+ Misses       2042     2027      -15     
- Partials      230      236       +6     
Flag Coverage Δ
unittests 61.23% <84.53%> (+0.69%) ⬆️

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

Files with missing lines Coverage Δ
internal/domain/matcher/subset.go 58.82% <100.00%> (+58.82%) ⬆️
internal/adapters/providers/walmart/provider.go 33.66% <61.11%> (+6.28%) ⬆️
internal/application/sync/handlers/walmart.go 61.33% <86.66%> (+5.59%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshaffer321 eshaffer321 merged commit 2ea9f71 into main Jul 11, 2026
14 checks passed
@eshaffer321 eshaffer321 deleted the codex/fix-walmart-ledger-aggregate-matching branch July 11, 2026 04:12
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