feature/add-dry-run-mode #2

Merged
olemd merged 2 commits from feature/add-dry-run-mode into main 2025-08-03 18:31:16 +02:00
Owner
No description provided.
Add comprehensive dry-run functionality that allows users to test their
configuration without making any changes to CouchDB. The feature includes:

- New --dry-run/-n command line flag with help and completion support
- Skips all CouchDB write operations while preserving IMAP operations
- Provides detailed logging of what would be done in normal mode
- Shows sample message data and metadata updates that would occur
- Maintains all existing functionality when dry-run is disabled

This addresses the critical usability need identified in ANALYSIS.md for
safe configuration testing before making database changes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive dry-run functionality to the Rust implementation that allows
users to test their configuration without making any changes to CouchDB:

- Added --dry-run/-n command line flag with clap argument parsing
- Extended CommandLineArgs struct with dry_run field
- Updated bash completion script to include new flag
- Comprehensive dry-run logic throughout sync coordinator:
  - Skip database creation with informative logging
  - Skip sync metadata retrieval and use config fallback
  - Skip deleted message handling in sync mode
  - Skip message and attachment storage with detailed simulation
  - Skip sync metadata updates with summary information
- Enhanced summary output to clearly indicate dry-run vs normal mode
- Updated all tests to include new dry_run field
- Maintains all IMAP operations for realistic mail discovery testing

This brings the Rust implementation to feature parity with the Go version
for safe configuration testing as identified in ANALYSIS.md.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
olemd merged commit 506511a870 into main 2025-08-03 18:31:16 +02:00
olemd deleted branch feature/add-dry-run-mode 2025-08-03 18:31:16 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: olemd/mail2couch#2
No description provided.