Skip to content

Fix e2e test failure by updating REPL prompt to match expectation#1870

Merged
KCarretto merged 1 commit intoshellv2-grpc-refactorfrom
fix-repl-e2e-test-prompt-mismatch-5406049458582450840
Feb 23, 2026
Merged

Fix e2e test failure by updating REPL prompt to match expectation#1870
KCarretto merged 1 commit intoshellv2-grpc-refactorfrom
fix-repl-e2e-test-prompt-mismatch-5406049458582450840

Conversation

@KCarretto
Copy link
Collaborator

The end-to-end test tests/repl.spec.ts was failing because it expected the shell prompt to be >>> but received > .
This PR updates the imix agent's REPL implementation in implants/imix/src/shell/repl.rs to use >>> as the prompt.
This ensures consistency with the test expectation and likely with the intended UI design (since ShellV2 also defaults to >>> ).
Verified by compiling the imix crate successfully.


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

The end-to-end test `tests/repl.spec.ts` expects the reverse shell REPL prompt to be `>>> `.
However, the `imix` agent was outputting `> `.
This change updates `implants/imix/src/shell/repl.rs` to use `>>> ` as the prompt,
aligning the agent behavior with the test expectation and standard Python/Eldritch REPL prompts.

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.

@KCarretto KCarretto marked this pull request as ready for review February 23, 2026 03:29
@KCarretto KCarretto merged commit 1fef10a into shellv2-grpc-refactor Feb 23, 2026
@KCarretto KCarretto deleted the fix-repl-e2e-test-prompt-mismatch-5406049458582450840 branch February 23, 2026 03:29
github-merge-queue bot pushed a commit that referenced this pull request Feb 23, 2026
* proto changes

* Update C2 and Agent to support ShellTaskContext (#1863)

- Updated `c2.proto` logic in Go backend to support `oneof` context field (TaskContext or ShellTaskContext).
- Renamed `ReportTaskOutput` to `ReportOutput` in Go backend and Rust agent to reflect generic reporting.
- Updated `ImixAgent` and `Eldritch` interpreter in Rust to use `Context` enum for handling task vs shell task execution.
- Refactored `api_reverse_shell.go` to use line-of-sight coding for context resolution.
- Updated Go tests, including fixing `TestReverseShell_E2E` by adding JWT generation.
- Added `ReportFileKind` support to file reporting.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* cargo fmt

* fix tests

* fix most go tests

* feat: Support creating portals from ShellTask context (#1866)

- Modifies `Portal` ent schema to add optional `shell_task` edge and make `task` edge optional.
- Updates `CreatePortal` in `mux` to accept `taskID` and `shellTaskID`, allowing creation from either context.
- Updates C2 `CreatePortal` handler to pass `shellTaskID` directly instead of resolving `Task` from `ShellTask`.
- Updates tests to verify new functionality.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* small test fixes

* Fix portal tests by adding JWT to TaskContext (#1867)

The `CreatePortal` API now requires a valid JWT in the `TaskContext` or `ShellTaskContext`.
This commit updates the integration and benchmark tests in `tavern/internal/portals` to:
1.  Store the generated `ed25519` private key in `TestEnv`.
2.  Use a helper `generateJWT` to sign a valid JWT.
3.  Include the JWT in `CreatePortalRequest` calls in `TestPortalIntegration`, `TestPortalClose`, and `BenchmarkPortalThroughput`.

This resolves the test failures where the server was rejecting the requests due to missing or invalid JWTs.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

* Fix e2e test failure by updating REPL prompt to match expectation (#1870)

The end-to-end test `tests/repl.spec.ts` expects the reverse shell REPL prompt to be `>>> `.
However, the `imix` agent was outputting `> `.
This change updates `implants/imix/src/shell/repl.rs` to use `>>> ` as the prompt,
aligning the agent behavior with the test expectation and standard Python/Eldritch REPL prompts.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
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.

1 participant