konveyor / konveyor/agentic-controller

Cancel semantics for AgentRun and AgentWorkflowRun

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
2
Forks
12
Avg merge
2d 5h
Merged PRs (30d)
41

Description

Add cancellation support for AgentRun and AgentWorkflowRun.

## Design (per ADR 0006)

- Add `spec.cancel` field to AgentRun and AgentWorkflowRun
- Add `Cancelled` phase to AgentRunPhase
- Controller behavior on `spec.cancel: true`:
- **Running**: delete the Sandbox, set phase to `Cancelled`
- **Pending** (queued behind `maxConcurrentRuns`): no Sandbox exists; set phase to `Cancelled` immediately, preventing Sandbox creation
- Token and Secret cleanup is idempotent in both cases

## Hub side

- Hub cancel handler (`POST /hub/agent/runs/:name/cancel`): revokes the Hub API token, then sets `spec.cancel: true` on the CR
- The UI cancels runs (never deletes them)

## References

- ADR 0006: Hub addon pattern for agent resources
- Enhancement: [konveyor/enhancements#295](https://github.com/konveyor/enhancements/pull/295) — Hub integration section

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading ADR 0006, then locate the AgentRun and AgentWorkflowRun resource definitions and their controllers. Trace the Hub cancel handler and the pending and running controller paths. Done means cancel requests revoke the Hub API token, set spec.cancel, produce the Cancelled phase, avoid creating pending Sandboxes, delete running Sandboxes, and clean up tokens and Secrets idempotently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
api, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.