record: add --record mcap alongside sqlite - #3719
Conversation
McapWriteStore writes recordings/<run-id>/memory.mcap so a run can be opened directly in Foxglove without a conversion step.
❌ 2 Tests Failed:
View the top 1 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Greptile SummaryThis change adds MCAP recording and replay support for DIMOS streams. Two verified failures prevent recordings from meeting the intended interoperability and data-preservation behavior: Foxglove cannot directly decode the emitted LCM payloads, and distinct MCAP topics such as Confidence Score: 3/5Unsafe to merge because recordings can be unusable in the advertised viewer and can silently lose access to a stream after reopening. Two independent non-security correctness failures were reproduced through the MCAP write and reopen paths. Files Needing Attention: dimos/memory/store/mcap.py needs interoperable schema and message encoding output plus collision-safe stream identity handling.
What T-Rex did
|
| schema_id = self._writer.register_schema(name=qual(payload_type), encoding="", data=b"") | ||
| channel_id = self._writer.register_channel( | ||
| topic=name, message_encoding=LCM_MESSAGE_ENCODING, schema_id=schema_id | ||
| ) |
There was a problem hiding this comment.
Foxglove decoding is unavailable
McapWriteStore writes opaque DIMOS LCM payloads with the custom lcm message encoding while registering an empty schema encoding and zero schema bytes. Foxglove cannot decode this MCAP encoding pair or infer payload fields from the DIMOS-only schema name, so users need conversion or a custom extension instead of opening and visualizing the recording directly. Emit a Foxglove-supported self-describing representation and schema, such as JSON plus JSON Schema, Protobuf plus a descriptor set, or CDR plus IDL data; otherwise document the required conversion workflow.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
Focused DIMOS MCAP compatibility harness source
- This authored harness executes the changed DIMOS writer, parses its MCAP summary with mcap 1.4.0, and compares the emitted pair against Foxglove's documented decoder pairs, confirming the unsupported LCM metadata.
Observed DIMOS-generated MCAP output
- This executed runtime capture shows the actual DIMOS writer emitted `lcm` with empty schema encoding and zero schema bytes, confirming direct Foxglove visualization is unsupported.
Observed Foxglove-compatible MCAP contrast output
- This executed contrast capture shows the same harness recognizes the documented JSON plus JSON Schema encoding pair as supported, confirming the required interoperable alternative.
The `--record mcap` round-trip test importorskipped everywhere except the self-hosted runner, so every line it covers was reported as untested.
|
I have a PR for mcap support that i will merge on top |
add
--record mcap