Add operator rerun controls - #22
Conversation
There was a problem hiding this comment.
Bottom line
REQUEST CHANGES — the client can start a normal full run when the user asked for a rerun, without warning the user.
What needs to change
-
High — stop safely when the server does not support rerun.
GrpcStateProvider.start_run()adds rerun options to the existingStartRunrequest and accepts the returned run ID (src/runtime/operator/client.py:171-187,src/runtime/operator/proto/operator.proto:20-30). An older server does not know about those extra options, ignores them, and starts a normal full run. That can repeat work and side effects while the CLI or TUI says the rerun succeeded. Please either make the server say whether it supports reruns or use a separate rerun RPC. An unsupported server must return an error before it starts any work. Add a test with a new client and an old server that proves the request is rejected. -
Medium — rerun the run shown in the dialog.
action_rerun()captures the run to show inRerunScreen, but_on_rerun_configured()then callsrerun_selected_async(), which reads the currently selected run again (src/tui/app.py:568-586,src/tui/ui_store.py:451-465). If the history refreshes while the dialog is open, that selection can change. The dialog can name one source run while the request uses another. Pass the captured source run ID through the dialog result or callback, and give that ID directly tostart_run_async().
What I checked
- A local operator rerun starts a new invocation with the new input, context, files, and current live source code. That matches Issue #9's direct-API scope, but it should be documented plainly: TUI reruns use defaults rather than replaying the source run's original payload.
- Avalanche checks passed: 169 operator tests passed, 2 skipped; 142 TUI tests passed; 66 CLI/rerun tests passed, including real Ray.
- Scoped Ruff and
git diff --checkpassed. - Reviewed clean head
0c8553b9b1ceb48aa3b8a393b9f50160b482e80d, diff SHA-2567a2c2f8519b627610067580537c9e187f8fdf7ce45317aea687e5e1e10eccd2a. - The PR conflicts with
main; CI checked the submitted branch head, not a resolved merge withmain.
Summary
Verification
Closes #9