Skip to content

Supervisor prompt gives a cancel command that is missing the required --from #117

Description

@vjovanov

Filed by an agent triaging a local report.

Reproduction

With rhei-cli 0.3.1 (rhei version), using the rhei/main checkout at
commit 12a431c907fb4a85a8feb5f9160b506197cedd04, instantiate the committed
supervised-delivery template:

/home/vjovanov/f/rhei/main/target/debug/rhei instantiate \
  /home/vjovanov/f/rhei/main/crates/rhei-cli/templates/supervised-delivery \
  --values /home/vjovanov/f/rhei/main/crates/rhei-cli/templates/supervised-delivery/.example-values.yaml \
  --output /tmp/rhei2-repro-20260830/ws

The instantiation validates successfully and produces 11 tasks, including
ws.deliver in supervising and ws.deliver.review-2 in review. Render the
supervisor prompt without claiming or changing it:

/home/vjovanov/f/rhei/main/target/debug/rhei next \
  /tmp/rhei2-repro-20260830/ws --task deliver --peek

The prompt says:

- Every cancel carries a reason:
  `rhei transition <task-id> --to cancelled --result "<why>"`.

Using the plan-qualified form described by that guidance fails:

/home/vjovanov/f/rhei/main/target/debug/rhei transition \
  /tmp/rhei2-repro-20260830/ws --task ws.deliver.review-2 \
  --to cancelled --result 'not needed'

It exits 2 and prints:

error: the following required arguments were not provided:
  --from <FROM>

Usage: rhei transition --from <FROM> --to <TO> --task <TASK> --result <RESULT> <TICKET_OR_PLAN>

The same cancellation succeeds when the child's current state is supplied:

/home/vjovanov/f/rhei/main/target/debug/rhei transition \
  /tmp/rhei2-repro-20260830/ws --task ws.deliver.review-2 \
  --from review --to cancelled --result 'not needed'

It exits 0 and prints:

Task ws.deliver.review-2 transitioned: 'review' → 'cancelled'

Expected behavior

The supervisor guidance should either include --from review (or otherwise
show that --from <current-state> is required), or rhei transition should
infer --from from the current state when --task names the task. The current
prompt presents a command that is guaranteed to fail because --from is a
required CLI argument; rhei transition --help independently marks it as
required.

Impact

In a supervised template run, each cancellation takes a failed command before
the operator discovers the missing argument, then requires reading the child's
task file to determine its current state. This caused one wasted round of
three failed commands and a second task-file read on every visit that cancels.

The template instruction is at
crates/rhei-cli/templates/supervised-delivery/states.yaml:163 in the tested
commit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions