rdmbair15m5-changelog-20260822-1704-rddb-native-connectors-dedup-daemon
rdmbair15m5-changelog-20260822-1704-rddb-native-connectors-dedup-daemon
Native macOS system suite maturity for rdDB.app
featuring multi-source store connectors, atomic APFS clonefile block
deduplication, background daemon pacing, and comprehensive automated
test suites.
Scope
- Host:
rdmbair15m5 - Application:
rdDB.app(~/dev/apps/rdDB) - Subsystems:
RDDBCore,RDDBDedup,RDDBDaemon,rddb-cli,rdDB.app,RDDBCoreTests
Key Implementations & Enhancements
Multi-Source macOS Store & Document Connectors (
RDDBCore):- Apple Notes (
AppleNotesConnector.swift): CoreData SQLite ingestion with zero-dependency protobuf wire parsing (ProtobufReader) and zlib decompression ofZICNOTEDATAnote bodies, OCR attachment mapping, and read-only WAL opening. - Apple Mail (
AppleMailConnector.swift): Byte-framed RFC 822/2822 & MIME parser extracting headers (Subject, From, To, Date) and streaming multipart text/HTML bodies without reading or loading attachments into memory. - Browsers (
BrowserConnector.swift): Safari binary/XMLBookmarks.plistand Reading List parser; Google ChromeHistorySQLite ingestion (WebKit 1601 epoch timestamp conversion) andBookmarksJSON tree parser. - Rich Documents (
DocumentParser.swift): Streaming in-memory PKZip engine for.docx,.pptx,.xlsx, CSV/TSV, JSON, YAML, Markdown, and PDF text extraction. - Cloud Stub Guard (
CloudStubGuard.swift): 4-layer inspection (getattrlistSF_DATALESS,statUF_DATALESS, extended attributes) preventing dataless iCloud / Google Drive downloads.
- Apple Notes (
Active APFS Clonefile Deduplication Engine (
RDDBDedup,rddb-cli,rdDB):AtomicAPFSDeduplicator.swift: Cryptographic SHA-256 / BLAKE3 duplicate clustering,clonefile(2)Copy-on-Write replacement via temporary file swap, permission/size pre-validation, and exact physical block space reclaim tracking (st_blocks * 512).APFSVolumeProbe.swift: Validates APFS filesystem support andVOL_CAP_INT_CLONEcapability.- CLI & GUI:
rddb-cli dedup [--apply|--dry-run]and SwiftUIDuplicatesViewwith one-click deduplication.
Background Daemon & Resource Pacing (
RDDBDaemon):LaunchdManager.swift:SMAppService.agentintegration with fallback standalone launchd plist descriptor for background launch on login.ThermalGovernor.swift: Reactive monitoring ofProcessInfo.processInfo.thermalStatevia notifications, with dynamic throttling on.seriousand.criticalstates.PowerGovernor.swift: Dynamic battery vs AC power throttling viaIOKit.ps.FSEventsMonitor.swift: Native CoreServicesFSEventStreamCreatemonitor with 5.0s debouncing window for incremental directory indexing.
Automated Testing & Verification Harness (
Tests/RDDBCoreTests/):- 5 synthetic fixture generators (
NotesFixtureGenerator,MailFixtureGenerator,SafariFixtureGenerator,ChromeFixtureGenerator,DocumentFixtureGenerator). - 6 test suites:
ConnectorTests,DedupSafetyTests,ConcurrencyWALTests,AdversarialConnectorTests,EmpiricalStressTests,RDDBCoreTests. - 68 tests passing (100% pass rate) with zero compiler warnings.
- 5 synthetic fixture generators (
Verification Evidence
swift build -Xswiftc -warnings-as-errors: 0 warnings, 0 errors.swift test: 68 passed, 0 failed in 1.28s.- Independent Post-Victory Audit:
VICTORY CONFIRMED(Auditor:teamwork_preview_victory_auditor).