Skip to content

fix: preserve sync audit history#60

Open
eshaffer321 wants to merge 1 commit into
mainfrom
codex/audit-costco-reconciliation
Open

fix: preserve sync audit history#60
eshaffer321 wants to merge 1 commit into
mainfrom
codex/audit-costco-reconciliation

Conversation

@eshaffer321

Copy link
Copy Markdown
Owner

Summary

  • add append-only processing attempts and order transaction audit tables
  • prevent failed/pending retries from overwriting successful processing summaries
  • log normal Monarch update/split mutations with order and transaction metadata
  • reconcile already-split Costco/simple transactions before recording no-match failures

Verification

  • go test ./...
  • go build -o itemize ./cmd/itemize/

Notes

This addresses the Costco case where Monarch showed split transactions for an order while SQLite only retained a later failed no-match record.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.09442% with 158 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.42%. Comparing base (8705650) to head (10500c2).

Files with missing lines Patch % Lines
internal/application/sync/recording.go 1.96% 50 Missing ⚠️
internal/infrastructure/storage/sqlite.go 81.78% 27 Missing and 20 partials ⚠️
internal/application/sync/types.go 47.16% 24 Missing and 4 partials ⚠️
internal/infrastructure/storage/mock.go 28.00% 17 Missing and 1 partial ⚠️
internal/application/sync/handlers/simple.go 83.78% 7 Missing and 5 partials ⚠️
internal/application/sync/orchestrator.go 40.00% 3 Missing ⚠️

❌ Your patch check has failed because the patch coverage (66.09%) 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      #60      +/-   ##
==========================================
+ Coverage   59.87%   60.42%   +0.54%     
==========================================
  Files          46       46              
  Lines        5142     5582     +440     
==========================================
+ Hits         3079     3373     +294     
- Misses       1871     1987     +116     
- Partials      192      222      +30     
Flag Coverage Δ
unittests 60.42% <66.09%> (+0.54%) ⬆️

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/infrastructure/storage/models.go 0.00% <ø> (ø)
internal/application/sync/orchestrator.go 34.65% <40.00%> (-0.05%) ⬇️
internal/application/sync/handlers/simple.go 78.03% <83.78%> (+4.29%) ⬆️
internal/infrastructure/storage/mock.go 53.57% <28.00%> (-1.89%) ⬇️
internal/application/sync/types.go 30.06% <47.16%> (+10.06%) ⬆️
internal/infrastructure/storage/sqlite.go 75.59% <81.78%> (+1.35%) ⬆️
internal/application/sync/recording.go 1.29% <1.96%> (-0.54%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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