Skip to content

ENG-8503: add --yes to prime train stop - #1207

Merged
JannikSt merged 2 commits into
mainfrom
feature/eng-8503-train-stop-yes-6223
Nov 19, 2026
Merged

JannikSt merged 2 commits into
mainfrom
feature/eng-8503-train-stop-yes-6223

Conversation

@JannikSt

@JannikSt JannikSt commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds -y/--yes to prime train stop to skip the confirmation prompt, so scripts no longer need printf 'y\n' |. It follows prime inference deployments delete: same option (--yes, -y), same help text (Skip confirmation), and the same confirm_or_skip helper.

  • stop already had -f/--force with the same effect. It's kept, so existing scripts keep working.
  • Without either flag nothing changes: same Are you sure you want to stop run <id>? [y/N] prompt, defaulting to No.
$ prime train stop --help
 Usage: prime train stop [OPTIONS] RUN_ID

 Stop a run.

 Example:
 prime train stop <run_id> --yes

╭─ Arguments ─────────────────────────────────────────────────────╮
│ *    run_id      TEXT  Run ID to stop [required]                │
╰─────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────╮
│ --yes    -y        Skip confirmation                            │
│ --force  -f        Skip confirmation                            │
│ --plain            Use plain, terse outputs. USE THIS IF YOU ARE AI. │
│ --help   -h        Show this message and exit.                  │
╰─────────────────────────────────────────────────────────────────╯

Other prime train commands that confirm

These were left unchanged in this PR:

Command Skip flag today
prime train <config> (run) --yes/-y
prime train resume --yes/-y
prime train delete --force/-f only
prime train pause --force/-f only
prime train restart --force/-f only

delete, pause and restart use the same --force-plus-typer.confirm pattern stop had, so each could get --yes the same way in a follow-up.

Tests

New tests in tests/test_train_cli.py:

  • With --yes, -y, --force or -f, no prompt is shown and PUT /rft/runs/run-1/stop is called.
  • With no flag, the [y/N] prompt is shown. Answering y stops the run; n or a bare Enter prints Cancelled. and makes no API call.
  • --help lists --yes -y Skip confirmation.

Checks run: ruff check, ruff format --check, ty check src/, and the full packages/prime suite (1970 passed).

Open in Web Open in Cursor 

Note

Low Risk
CLI-only confirmation UX change with no API or auth impact; existing --force behavior is preserved.

Reviewed by Cursor Bugbot for commit 56c39cf. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: JannikSt <JannikSt@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T04:54:29.016000Z 391cabb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-authored-by: JannikSt <JannikSt@users.noreply.github.com>
@JannikSt
JannikSt merged commit 709b45c into main Nov 19, 2026
33 checks passed
@JannikSt
JannikSt deleted the feature/eng-8503-train-stop-yes-6223 branch November 19, 2026 07:30
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