Skip to content

An added job step can carry a condition - #2293

Merged
santoshkumarradha merged 12 commits into
app/v3from
c52/step-condition
Nov 3, 2026
Merged

santoshkumarradha merged 12 commits into
app/v3from
c52/step-condition

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What changes

A step added to a job can now carry a condition, such as when: touches auth. It runs only on jobs in that area, and it is skipped on the others.

  • It works for added conversation, check and approval steps, on both the app wire and the HTTP door.
  • An unknown condition such as when: banana is refused, and the answer lists the words allowed. Before this, an unknown word on an added step was dropped, so the step ran on every job.
  • New hello word factory.job_step_edit_when. Apps send a condition only to engines that announce it.

Limits

  • Fanout steps cannot carry a condition.
  • A condition on an existing step cannot be changed through this door.
  • Not pressed in the real app yet.

Validation

  • Red before the fix: unknown condition ... <nil>, response: status=422, json: unknown field "when".
  • Tests cover the three step kinds with when: touches auth, the skip on a job without that area, the refusal of when: banana, and the hello word.
  • internal/appwire, internal/factory/..., internal/manual and the job step tests in cmd/codeaf pass.

🤖 Generated with Claude Code

@santoshkumarradha
santoshkumarradha marked this pull request as ready for review November 3, 2026 11:41
@santoshkumarradha
santoshkumarradha merged commit 3f9d4cb into app/v3 Nov 3, 2026
@santoshkumarradha
santoshkumarradha deleted the c52/step-condition branch November 3, 2026 11:41
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