MDBX Implementation Completion Plan
Version: MDBX-1-DRAFT
Execution plan aligning the original spec set, current Rust mdbx/ implementation, and Monica Android integration path.
1. Non-negotiable principles
- local-first operation
- long-term readable, self-describing format
- project as first-class container
- first-class attachments from v1
- Git-like commit history and conflict model
- causal conflict detection (not timestamp-only)
- secure-by-default behavior
- incremental write behavior for routine edits
2. Current baseline (summary)
Current implementation already includes substantial foundations in Rust workspace modules (mdbx-core, mdbx-crypto, mdbx-storage, mdbx-sync, mdbx-cli) with schema/history/conflict/snapshot primitives.
3. Main gaps (summary)
- full format-compatibility test matrix
- complete project/attachment field-level merge behavior
- benchmark report publication
- attachment external hash-ref mode
- broader memory-hardening and auth-boundary coverage
- Android integration completeness and UX around conflict resolution
4. Phase roadmap
- P0 format trust + recovery loop
- P1 all user-visible mutations tracked in commit history
- P2 sync apply + conflict lifecycle closure
- P3 attachments + performance completion
- P4 migration + long-term compatibility
- P5 Monica Android end-to-end integration
5. Working rules
- test/health checks first, implementation second
- no write paths that bypass MDBX repositories for convenience
- auth failures must fail closed
- each merge slice must declare acceptance commands
