Skip to content

fix: fetch targeted Amazon orders directly#75

Merged
eshaffer321 merged 2 commits into
mainfrom
codex/fix-amazon-order-id-fetch
Jul 18, 2026
Merged

fix: fetch targeted Amazon orders directly#75
eshaffer321 merged 2 commits into
mainfrom
codex/fix-amazon-order-id-fetch

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

What changed

  • use the provider's direct order lookup when -order-id is supplied
  • preserve provider-fetch audit logging for targeted requests
  • add a regression test and bug-fix documentation

Why

Amazon -order-id recovery runs were filtering only after a full order-history scan. That made a one-order run fetch every order and its payment details, often taking long enough for Amazon to reject the session before the requested order was processed.

Impact

Targeted Amazon recovery runs now fetch only the requested order. Normal date-range syncs keep the existing bulk-fetch behavior.

Validation

  • go test ./...
  • pre-commit golangci-lint run --timeout=5m
  • pre-commit go vet ./...
  • production-verified against two exact Amazon orders on the wife account
  • rebased onto latest origin/main before opening this PR

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.34%. Comparing base (b7a2788) to head (860cbfc).

Files with missing lines Patch % Lines
internal/application/sync/fetch.go 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   64.29%   64.34%   +0.05%     
==========================================
  Files          49       49              
  Lines        6560     6575      +15     
==========================================
+ Hits         4218     4231      +13     
- Misses       2036     2037       +1     
- Partials      306      307       +1     
Flag Coverage Δ
unittests 64.34% <86.66%> (+0.05%) ⬆️

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

Files with missing lines Coverage Δ
internal/application/sync/fetch.go 48.95% <86.66%> (+4.41%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eshaffer321
eshaffer321 marked this pull request as ready for review July 18, 2026 04:15
@eshaffer321
eshaffer321 merged commit 8cb5ee9 into main Jul 18, 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