Skip to content

Add operator rerun controls - #22

Open
magix022 wants to merge 1 commit into
mainfrom
issue-9-rerun-controls
Open

Add operator rerun controls#22
magix022 wants to merge 1 commit into
mainfrom
issue-9-rerun-controls

Conversation

@magix022

Copy link
Copy Markdown
Contributor

Summary

  • thread partial rerun controls through Operator, gRPC, and the Python client
  • add CLI history/rerun commands and a TUI rerun configuration dialog
  • expose rerun ancestry in RunState, CLI output, and the TUI status bar
  • preserve the existing in-memory Operator._runs store

Verification

  • uv run pytest test/operator_tests
  • uv run pytest test/cli_test.py test/tui_test.py
  • uv run pytest test/rerun_test.py
  • uv run ruff check src/ test/
  • smoke: ava operator, ava run, ava runs, partial lazy rerun, ancestry listing

Closes #9

@glesperance glesperance left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. High — stop safely when the server does not support rerun. GrpcStateProvider.start_run() adds rerun options to the existing StartRun request 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.

  2. Medium — rerun the run shown in the dialog. action_rerun() captures the run to show in RerunScreen, but _on_rerun_configured() then calls rerun_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 to start_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 --check passed.
  • Reviewed clean head 0c8553b9b1ceb48aa3b8a393b9f50160b482e80d, diff SHA-256 7a2c2f8519b627610067580537c9e187f8fdf7ce45317aea687e5e1e10eccd2a.
  • The PR conflicts with main; CI checked the submitted branch head, not a resolved merge with main.

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.

Add rerun controls to the operator, CLI, and TUI

2 participants