Prefix Shell V2 Output with Truncated Input#1841
Conversation
Updates the Shell V2 output handling in `tavern/internal/http/shell/handler.go` to prefix the output and error messages with the input command that caused them. - Prefixes standard output with `[+] <truncated_input>\n`. - Prefixes error output with `[!] <truncated_input>\n`. - Truncates input strings to 64 characters to avoid cluttering the terminal. - Updates integration tests in `tavern/internal/http/shell/integration_test.go` to verify the new prefix format and truncation logic. - Adds `TestTruncation` to explicitly test the input truncation behavior. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary
Previous Results
Insights
Slowest Tests
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 |
This change updates the
tavernbackend shell handler to include the input command as a prefix in the websocket output messages sent to the frontend. This provides context in the Shell V2 terminal, allowing users to associate output with specific commands. The input is truncated to 64 characters to maintain readability. The implementation handles both interactive (real-time streaming via portals) and non-interactive (polled from database) modes, ensuring consistent behavior. Existing integration tests were updated, and a new test case for truncation was added.PR created automatically by Jules for task 5341438117760528229 started by @KCarretto