Skip to content

fix: match Costco mixed-tender card charges#25

Merged
eshaffer321 merged 1 commit into
mainfrom
codex/costco-mixed-tender-match
May 31, 2026
Merged

fix: match Costco mixed-tender card charges#25
eshaffer321 merged 1 commit into
mainfrom
codex/costco-mixed-tender-match

Conversation

@eshaffer321
Copy link
Copy Markdown
Owner

Summary

  • match Costco warehouse receipts against bank-card tender totals when a receipt is paid with mixed tenders
  • proportionally allocate item prices, subtotal, and tax to the card-paid amount for accurate split creation
  • add a regression test and document the production bug in docs/bug-fixes.md

Verification

  • golangci-lint run --timeout=5m
  • go mod verify
  • go mod tidy && git diff --exit-code go.mod go.sum
  • go run golang.org/x/vuln/cmd/govulncheck@v1.3.0 ./...
  • go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
  • go build -v -o /tmp/itemize-ci-check ./cmd/itemize/
  • temporary-db dry-run for receipt 21134300601232605091211 matched Monarch transaction 243571290918193554 at $209.65

Notes

  • The May 28 $168.81 receipt still depends on Monarch receiving that transaction; it was not present when checked.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

❌ Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.54%. Comparing base (710f851) to head (db31604).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/adapters/providers/costco/provider.go 90.24% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   56.29%   56.54%   +0.24%     
==========================================
  Files          43       43              
  Lines        4794     4830      +36     
==========================================
+ Hits         2699     2731      +32     
- Misses       1931     1933       +2     
- Partials      164      166       +2     
Flag Coverage Δ
unittests 56.54% <90.24%> (+0.24%) ⬆️

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

Files with missing lines Coverage Δ
internal/adapters/providers/costco/provider.go 48.05% <90.24%> (+8.64%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eshaffer321 eshaffer321 merged commit a2817a6 into main May 31, 2026
14 checks passed
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