Skip to content

Update shellv2 other-stream output format with blue username tag#1896

Merged
KCarretto merged 4 commits intomainfrom
shell-output-format-1952170298998639824
Feb 25, 2026
Merged

Update shellv2 other-stream output format with blue username tag#1896
KCarretto merged 4 commits intomainfrom
shell-output-format-1952170298998639824

Conversation

@KCarretto
Copy link
Collaborator

This change updates the shellv2 output format when displaying commands executed by other users in the same shell session.

Previously, the output was formatted as [+] [<USER_NAME>] Task Output for <TRUNCATED_COMMAND>.

The new format is [@<USER_NAME>][+] <COMMAND>, where [@<USER_NAME>] is colored blue using ANSI escape codes (\x1b[34m). This improves visibility and distinguishes commands run by others. The command is also no longer truncated in the header, ensuring the full context is visible.

Verification:

  • Ran go test -v tavern/internal/http/shell/integration_test.go -run TestOtherStreamOutput which passed.

PR created automatically by Jules for task 1952170298998639824 started by @KCarretto

…red username and full command.

- Modified `tavern/internal/http/shell/handler.go` to format "other stream" output as `\x1b[34m[@<USER_NAME>]\x1b[0m[+] <COMMAND>`.
- Removed truncation of the input command in the "other stream" output header.
- Updated `tavern/internal/http/shell/integration_test.go` to verify the new output format and ANSI color codes.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2659    ±0 2659    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#1230 2659 2659 0 0 0 0 37.2s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2659 0 0 6.1s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
TestDockerExecutor_Build_ContextCancellation 1 6.1s 6.1s
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.1s 5.1s
TestInteractiveShell 1 5.0s 5.0s
TestOtherStreamOutput 1 5.0s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.6s 4.6s
imix::bin/imix: install::tests::test_install_execution 3 1.6s 4.6s
imix::bin/imix: install::tests::test_install_execution 3 1.6s 4.6s
TestDockerExecutor_Build_SimpleEcho 1 4.3s 4.3s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.1s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.1s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

google-labs-jules bot and others added 2 commits February 25, 2026 00:32
- Modified `tavern/internal/http/shell/handler.go` to format "other stream" output as `\x1b[34m[@<USER_NAME>]\x1b[0m[+] <TRUNCATED_INPUT>\n`.
- Updated `pollForShellTasks` to correctly identify and format tasks from other streams, ensuring historical/polled data is displayed correctly.
- Added `TestOtherStreamOutput_Polling` and updated `TestOtherStreamOutput` in `tavern/internal/http/shell/integration_test.go` to verify formatting, truncation, and polling behavior.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Modified `tavern/internal/portals/integration_test.go` to generate a unique SQLite database name based on the test name for each test run.
- This resolves the "database table is locked: portals" error caused by concurrent tests attempting to access the same shared "ent" in-memory database.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@KCarretto
Copy link
Collaborator Author

image Will need to push to a multi-user env to do further testing but it still works

@KCarretto KCarretto marked this pull request as ready for review February 25, 2026 01:21
@google-labs-jules
Copy link
Contributor

image Will need to push to a multi-user env to do further testing but it still works

Acknowledged. The screenshot confirms that basic functionality for the current user is preserved (Task Queued -> Output). The changes I made specifically target the format of other users' tasks, which you mentioned will require a multi-user environment to test further. I have verified this behavior with the TestOtherStreamOutput and TestOtherStreamOutput_Polling integration tests.

- Fixed `TestPortalClose` flake in `tavern/internal/portals/integration_test.go` by using unique in-memory DB names per test.
- Confirmed basic functionality preserved via user screenshot.
- Changes for `shellv2` output format (blue user tag + truncation) remain validated by `TestOtherStreamOutput` tests.

Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
@KCarretto KCarretto enabled auto-merge February 25, 2026 01:25
@KCarretto KCarretto added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 4456fb9 Feb 25, 2026
8 checks passed
@KCarretto KCarretto deleted the shell-output-format-1952170298998639824 branch February 25, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants