feat: categorize Amazon refund items#74
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
==========================================
+ Coverage 62.10% 64.29% +2.19%
==========================================
Files 46 49 +3
Lines 6040 6560 +520
==========================================
+ Hits 3751 4218 +467
- Misses 2035 2036 +1
- Partials 254 306 +52
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
eshaffer321
force-pushed
the
codex/amazon-return-ledger
branch
from
July 17, 2026 13:11
97c3df3 to
d1aae63
Compare
eshaffer321
marked this pull request as ready for review
July 17, 2026 13:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
itemize amazon returns -account <name>for read-only JSON inspection without initializing Monarch, SQLite, or an LLM.Safety behavior
[TEMP] Amazonare eligible.Root cause
Amazon's normal order-payment transaction endpoint did not expose usable refund entries. The authoritative return/item mapping lives in Return Center, while the refund-issued date lives on each return status page. The issued-date sentence spans multiple HTML elements, and Monarch stored the temporary category with repeated whitespace, so both sources needed structured normalization.
Verification
golangci-lint,go vet ./..., andgo test ./...pass.go test ./... -racepasses.go build -o itemize ./cmd/itemizepasses.Amazon refunds: Categorized=4 Left untouched=0.Related: #72 improves Amazon setup cookie persistence. This branch is independently rebased directly onto
origin/mainv0.2.2 as requested.