Ivan/record replay wrap#1976
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 SummaryThis PR introduces a
Confidence Score: 3/5Not ready to merge: the module-level docstring advertises two broken API calls that raise TypeError, and the RecordReplay object created in replay() leaks its SQLite connection and background task. The primary usage docstring shows rec.start_recording([LCM()]) missing the required topics argument and rec.play(pubsub=LCM(), ...) with a nonexistent parameter — both raise TypeError immediately. The RecordReplay instance in ModuleCoordinator.replay() is a local variable never stored on the coordinator, so close() is never called on shutdown and the SQLite handle and playback task both leak. dimos/record/record_replay.py (broken docstring examples), dimos/core/coordination/module_coordinator.py (leaked RecordReplay instance, no LCM publish during playback) Important Files Changed
|
| 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.
# Conflicts: # dimos/core/global_config.py # dimos/robot/cli/dimos.py # dimos/robot/unitree/type/lidar.py # pyproject.toml
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Problem
Closes DIM-XXX
Solution
Breaking Changes
How to Test
Contributor License Agreement