feat(memory): add native SQLite and MCAP recorder stores - #3615
Draft
TomCC7 wants to merge 9 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #3615 +/- ##
==========================================
+ Coverage 77.19% 77.28% +0.09%
==========================================
Files 1260 1265 +5
Lines 119881 120598 +717
Branches 10581 10667 +86
==========================================
+ Hits 92539 93202 +663
- Misses 24276 24323 +47
- Partials 3066 3073 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution path
Problem
The Python recorder performs encoding and durable writes in its module process. High-throughput image and point-cloud streams need a native record path with configurable encoding concurrency, while recorded artifacts must remain readable through the existing Python memory and replay APIs.
Solution
Add
RustRecorder, aNativeModulewrapper backed bydimos-memory-recorder, and put native persistence behind a record-only RustRecordingStoretrait.lcm,jpeg, andlz4+lcmstorage codecs, splits TF batches, writes JSONB tags, and remains directly replayable throughSqliteStore.McapStoreto discover and decode native artifacts without a caller-supplied codec registry.encoding_threads; one writer restores arrival order, batches writes, and finalizes the selected artifact during graceful shutdown.RustSqliteStoreConfigorRustMcapStoreConfig. Native launch configuration is sent only as stdin JSON; the obsolete generated config CLI-argument exclusion list is removed.MCAP deliberately rejects storage-codec overrides and append mode because it represents a transport capture. This PR remains record-only: no Rust replayer, Python binding, or standalone user-facing recorder CLI is added.
How to test
uv run pytest dimos/memory -q # 470 passed, 1 optional-MCAP test skipped when the Python mcap package is absentThe optional Python MCAP test passes in an environment with
mcapinstalled. A release-binary LCM interoperability check recorded 30 typed IMU messages to each store and replayed 30/30 from both artifacts through Python with exact LCM payload equality and source timestamps. A fresh reliable-Zenoh harness run captured and replayed 1,500/1,500 observations at roughly 65 MiB/s offered input. Ruff, mypy, the optimized release build, and all 17 tests indim-recorder-perfalso pass.AI assistance
OpenAI Codex with GPT-5 implemented the Rust recorder stores, Python integration, tests, documentation, performance-harness migration, PR draft, and verification under user direction.
Checklist