Skip to content

fix: use .message field instead of Message repr in MockInput output#2415

Open
0xbyt4 wants to merge 1 commit intoOpenMind:mainfrom
0xbyt4:fix/mock-input-message-repr
Open

fix: use .message field instead of Message repr in MockInput output#2415
0xbyt4 wants to merge 1 commit intoOpenMind:mainfrom
0xbyt4:fix/mock-input-message-repr

Conversation

@0xbyt4
Copy link
Collaborator

@0xbyt4 0xbyt4 commented Feb 23, 2026

formatted_latest_buffer was embedding the full Message dataclass repr in the f-string ({self.messages[-1]}) instead of the .message text field ({self.messages[-1].message}). This caused the LLM to receive Message(timestamp=1708700000.0, message='Hello...') instead of just Hello....

Line 263 already uses .message correctly for add_input() — the f-string on line 259 was the only place that missed it.

formatted_latest_buffer was embedding the full Message dataclass repr
(Message(timestamp=..., message='...')) in the f-string instead of just
the .message text field. This sent garbage to the LLM prompt.
@0xbyt4 0xbyt4 requested review from a team as code owners February 23, 2026 13:59
@github-actions github-actions bot added robotics Robotics code changes python Python code labels Feb 23, 2026
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant