Add runtime recording#2573
Open
YuchengZhou821 wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional runtime recorder that writes tick-level runtime data to JSONL files for later debugging and analysis.
Changes:
- Adds
RuntimeRecorderfor daily JSONL recording. - Integrates recorder setup, tick recording, and shutdown cleanup into the runtime.
- Adds config passthrough, Docker volume mounting, and recorder-focused tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/runtime/recorder.py |
Adds JSONL runtime tick recorder with daily file rotation. |
src/runtime/cortex.py |
Wires recorder lifecycle and per-tick recording into the runtime loop. |
src/runtime/config.py |
Adds recorder field to runtime configuration loading/serialization. |
src/runtime/converter.py |
Preserves recorder setting when converting single-mode configs. |
tests/runtime/test_recorder.py |
Adds unit tests for recorder creation, writing, rotation, stopping, and restart append behavior. |
tests/runtime/test_convert.py |
Adds converter tests for recorder passthrough/default behavior. |
docker-compose.yml |
Mounts a host recordings directory into the container. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
This pull request introduces a new runtime data recording feature for OM1, enabling the system to log tick-level data to daily JSONL files. The main changes include the implementation of the
RuntimeRecorderclass, integration of recording logic into the runtime, configuration support for enabling/disabling the recorder, and comprehensive tests to ensure correct behavior.Runtime Data Recording Feature
Implementation and Integration:
RuntimeRecorderclass (src/runtime/recorder.py) to record runtime tick data (including timestamps, ASR input, LLM input/output, and actions) to daily JSONL files, with automatic file rotation and robust error handling.src/runtime/cortex.py: initializes the recorder when enabled, records tick data in_tick, and ensures proper cleanup on shutdown. [1] [2] [3] [4] [5]Configuration and Data Management:
recorderfield to the runtime config (src/runtime/config.py,src/runtime/converter.py), allowing the feature to be enabled/disabled via configuration, and ensured correct propagation through config loading and serialization. [1] [2] [3] [4]docker-compose.ymlto mount a host directory for storing recordings.Testing:
RuntimeRecorder(tests/runtime/test_recorder.py), covering directory creation, tick recording, file rotation, error handling, and persistence.These changes provide a robust and configurable mechanism to record and persist runtime activity, supporting future analysis and debugging.