Skip to content

feat(api): cancel analysis runs via loopback CLI - #378

Closed
seonghobae wants to merge 1 commit into
feat/analysis-run-collection-cli-gap-003afrom
feat/analysis-run-cancel-cli-gap-003a
Closed

feat(api): cancel analysis runs via loopback CLI#378
seonghobae wants to merge 1 commit into
feat/analysis-run-collection-cli-gap-003afrom
feat/analysis-run-cancel-cli-gap-003a

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

GAP-003A / issue #166 still required operators to write raw HTTP/1.1 after cancel HTTP. Operators cannot withdraw accepted or running runs from a client without guessing framing. Cancel CLI stdout stays metric-free. tepp.scientific_acceptance.v1 never appears.

Live slices that this PR does not duplicate:

What

Ninth GAP-003A slice stacked on #371 over collection GET #368 / cancel HTTP #361 / protected main 1bc02f580cf48e1d39da239f0e818453437c31c3:

  • tepp-analysis-runs cancel client of POST /v1/analysis-runs/{run_id}/cancel
  • metric-free cancelled status: run_id, run_state, idempotency_key, terminal_result: null
  • accepted cancel and idempotent replay; another consumer cannot cancel the first consumer's run
  • tepp.scientific_acceptance.v1 never prints
  • empty stdin is admitted; typed cancel JSON must match --run-id / --idempotency-key
  • loopback-only; unpublished consumers, credential flags, collection pagination flags, metric stdin, and unknown verbs fail closed
  • ADR 0033 (0026–0032 live on other GAP-003A PRs)

Not an ADR 0014 scientific claim. Not persistence. Not GET-by-id. Not lifecycle POST. Not cancel HTTP. Not scientific-acceptance CLI. Not collection list.

Verification

  • cargo clippy -p tepp_api --all-targets -- -D warnings
  • cargo test -p tepp_api --lib
  • cargo test -p tepp_api --test analysis_run_cancel_cli_contract
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-deps
  • python3 scripts/validate_documentation.py
  • python3 scripts/check_docstrings.py

Do not merge without two independent APPROVE reviews on this exact head and current Checks. Author COMMENTED is not independent APPROVE.

GAP-003A / issue #166: operators can cancel accepted and running runs
through `tepp-analysis-runs cancel` without writing raw HTTP. Stdout stays
metric-free; tepp.scientific_acceptance.v1 never appears. Stacked on
collection CLI (#371). Does not duplicate GET-by-id, lifecycle POST,
cancel HTTP, scientific-acceptance CLI, or collection list.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Hour-21 exact-head review request.

Current head c891d46a57c03e71f1ca44150a00a9d71aa2f2a9.
Devin/CodeRabbit/author COMMENTED is not independent APPROVE. Copilot review requests are not APPROVE. Ruleset 18156473 needs two independent approvals. Do not self-approve. Do not merge without two independent APPROVE reviews on this exact head.

@opencode-agent review

This was referenced Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Closing with replacement mapping to #174. The CLI is a client of the unauthenticated #361 destructive mutation and cannot make that boundary safe. Preserve its typed request/framing/stdout/refusal tests for the future authenticated Analysis Run operations CLI, but do not ship a credential-less loopback cancel command.

@seonghobae seonghobae closed this Sep 1, 2026
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