Conversation
Co-authored-by: leshy <681516+leshy@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dimensionalOS/dimos/sessions/44dd2709-d3ba-4138-b140-56e76fd15eb9 Co-authored-by: leshy <681516+leshy@users.noreply.github.com>
| _SANITIZE_RE = re.compile(r"[^A-Za-z0-9_]") | ||
|
|
||
|
|
||
| def topic_to_stream_name(channel: str) -> str: |
There was a problem hiding this comment.
there is no need for update_stream_meta and store metadata interventions to save the type of a stream and full stream name, given this function is reversible? streams know their type in their metadata, so they can reconstruct full topics?
There was a problem hiding this comment.
I don't think the function is reversible. /color/image and /color_image both get transformed to _color_image, no?
Greptile Summary
Confidence Score: 3/5Not safe to merge until the open concerns from previous review rounds are resolved — particularly the leaked RecordReplay resource in replay() and playback not republishing messages onto the LCM bus. New findings in this pass are P2 only (format string cosmetic). However, prior review threads documented P1 issues that remain present in the diff: the RecordReplay instance created in ModuleCoordinator.replay() is a local variable never stored on the coordinator and never closed (resource/task leak), and _playback_loop only logs to Rerun rather than republishing decoded messages onto the LCM bus, so downstream live modules receive no data during replay. Multiple P1s that are unaddressed pull the score below the 4/5 ceiling. dimos/core/coordination/module_coordinator.py (replay lifecycle / resource management) and dimos/record/record_replay.py (_playback_loop republish path) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["dimos run / dimos recorder"] -->|asyncio.run| RunCmd["_run async"]
RunCmd -->|build| Build["ModuleCoordinator.build"]
Build --> AutoReplay{replay_file set?}
AutoReplay -->|yes| Replay["ModuleCoordinator.replay"]
AutoReplay -->|no| NormalBuild["Build + start modules"]
NormalBuild --> AutoRecord{record_path set?}
AutoRecord -->|yes| RecordOut["instance.start_recording_outputs\nper record_module"]
AutoRecord -->|no| Done["Return coordinator"]
RecordOut --> Done
Replay --> RR["RecordReplay instance"]
RR --> Disable["blueprint.disabled_modules"]
Disable -->|cls.build patched| Build
RR --> PlayTask["asyncio.create_task\n_playback_loop"]
PlayTask --> Loop["Merge-sort observations\nby timestamp"]
Loop --> RerunLog["rec.log to Rerun viewer"]
ModuleBase["ModuleBase"] --> SQLite["SqliteStore per module"]
SQLite --> DB[(SQLite DB)]
TUI["RecorderApp TUI"] --> LCMSub["LCM subscribe"]
LCMSub --> DB
TUI --> PlayTask
Reviews (4): Last reviewed commit: "sql transaction fix" | Re-trigger Greptile |
| result.append(info) | ||
| return tuple(result) | ||
|
|
||
| def play(self, speed: float = 1.0) -> None: |
There was a problem hiding this comment.
The comment at the start of the file says rec.play(pubsub=LCM(), speed=1.0). Where is this play actually publishing?
| rec.stop_recording() | ||
|
|
||
| # Replay into LCM (viewable via rerun-bridge) | ||
| rec.play(pubsub=LCM(), speed=1.0) |
There was a problem hiding this comment.
I think we should have docs for replay in docs. Note, BTW, that rec.play doesn't take pubsub currently.
| stream_name = topic_to_stream_name(topic.pattern) | ||
| self._store.stream(stream_name, type(msg)).append(msg) |
There was a problem hiding this comment.
You're not storing the topic. How does the stream know where the message should be replayed to?
The previous PR stored the topic. This tries to guess that the topic is.
| else: | ||
| from typing import TypeGuard as TypeIs | ||
|
|
||
| RERUN_GRPC_PORT = 9876 |
There was a problem hiding this comment.
Is 9877 to 9876 intentional? There are hardcoded places where the 9877 is still used:
dimos/core/test_daemon.py:47: grpc_port: int = 9877,
dimos/core/test_daemon.py:143: entry = _make_entry(pid=os.getpid(), grpc_port=9877)
dimos/core/test_daemon.py:146: conflict = check_port_conflicts(grpc_port=9877)
dimos/core/test_daemon.py:154: conflict = check_port_conflicts(grpc_port=9877)
dimos/core/run_registry.py:47: grpc_port: int = 9877
dimos/core/run_registry.py:144:def check_port_conflicts(grpc_port: int = 9877) -> RunEntry | None:
dimos/visualization/rerun/bridge.py:196: connect_url: str = "rerun+http://127.0.0.1:9877/proxy"
|
|
||
| @rpc | ||
| def start(self) -> None: | ||
| # Delay import to reduce import time (~2.4s) |
There was a problem hiding this comment.
You removed from dimos.msgs.sensor_msgs.PointCloud2 import register_colormap_annotation but left the comment.
Problem
Closes DIM-XXX
Solution
Breaking Changes
How to Test
Contributor License Agreement