fix: correct duplicate message reporting in Go implementation
- Add DocumentSkippedError custom error type to distinguish between skipped and stored documents - Fix counter bug where skipped messages were incorrectly reported as "stored" - Enhance status reporting to show "X skipped as duplicates" for better visibility - Fix Rust implementation binary attachment handling to support all file types (images, PDFs, etc.) - Update test scripts to use correct binary names (mail2couch-go, mail2couch-rs) - Add comprehensive test configurations for implementation comparison Before: "Summary: Processed 30 messages, stored 30 new messages" (misleading when all were duplicates) After: "Summary: Processed 30 messages, stored 0 new messages" with detailed "Stored 0/30 messages from INBOX (30 skipped as duplicates)" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e6ab28bc9e
commit
436276f0ef
9 changed files with 127 additions and 18 deletions
24
test-config-go.json
Normal file
24
test-config-go.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"couchDb": {
|
||||
"url": "http://localhost:5984",
|
||||
"user": "admin",
|
||||
"password": "password"
|
||||
},
|
||||
"mailSources": [
|
||||
{
|
||||
"name": "go_test_account",
|
||||
"enabled": true,
|
||||
"protocol": "imap",
|
||||
"host": "localhost",
|
||||
"port": 3143,
|
||||
"user": "testuser1",
|
||||
"password": "password123",
|
||||
"mode": "archive",
|
||||
"folderFilter": {
|
||||
"include": ["INBOX"],
|
||||
"exclude": []
|
||||
},
|
||||
"messageFilter": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue