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
|
|
@ -36,7 +36,7 @@ build_implementations() {
|
|||
# Build Go implementation
|
||||
echo -e "${BLUE} Building Go implementation...${NC}"
|
||||
cd go
|
||||
go build -o mail2couch .
|
||||
go build -o mail2couch-go .
|
||||
cd ..
|
||||
echo -e "${GREEN} ✅ Go implementation built${NC}"
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ run_go() {
|
|||
echo -e "${BLUE}🦬 Running Go implementation...${NC}"
|
||||
cd go
|
||||
echo -e "${BLUE} Using config: config-test-go.json${NC}"
|
||||
./mail2couch -c config-test-go.json
|
||||
./mail2couch-go -c config-test-go.json
|
||||
cd ..
|
||||
echo -e "${GREEN}✅ Go implementation completed${NC}"
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ run_rust() {
|
|||
echo -e "${BLUE}🦀 Running Rust implementation...${NC}"
|
||||
cd rust
|
||||
echo -e "${BLUE} Using config: config-test-rust.json${NC}"
|
||||
./target/release/mail2couch -c config-test-rust.json
|
||||
./target/release/mail2couch-rs -c config-test-rust.json
|
||||
cd ..
|
||||
echo -e "${GREEN}✅ Rust implementation completed${NC}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue