make sure only single command starts with "ros2".#68
Merged
fujitatomoya merged 3 commits intorollingfrom Nov 7, 2025
Merged
Conversation
Owner
Author
|
@Mergifyio rebase |
✅ Branch has been successfully rebased |
0b801b7 to
1125708
Compare
fujitatomoya
commented
Nov 7, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR enhances command safety and updates default AI model configurations. It adds protection against executing multiple shell commands by introducing a validation function that extracts only the first ros2 command, and updates the default model from 'gpt-4o' to 'gpt-5' along with adding test cases for newer AI models.
Key changes:
- Adds
ros2_single_command()function to prevent execution of chained shell commands - Updates default OpenAI model to 'gpt-5' and refines system role prompt
- Expands test coverage with additional model versions (o3, o4-mini, gemini-2.5-pro)
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/verification.sh | Adds test cases for newer AI models (o3, o4-mini, gpt-5, gemini-2.5-pro) and increases timeout parameter |
| ros2ai/verb/exec.py | Integrates the new command validation function into the exec workflow |
| ros2ai/api/utils.py | Implements ros2_single_command() to validate and sanitize command strings |
| ros2ai/api/constants.py | Updates default model to 'gpt-5' and refines system role prompt to emphasize single command execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
1125708 to
fd71a9d
Compare
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
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.
closes #62