Skip to content

fix: forward step response to action criteria evaluation context#144

Open
HimethW wants to merge 2 commits into
jentic:mainfrom
HimethW:action-criteria-patch
Open

fix: forward step response to action criteria evaluation context#144
HimethW wants to merge 2 commits into
jentic:mainfrom
HimethW:action-criteria-patch

Conversation

@HimethW
Copy link
Copy Markdown

@HimethW HimethW commented Apr 29, 2026

Summary

This PR fixes an issue where conditional actions (goto, end, retry) silently fail when their nested criteria block tries to evaluate $statusCode or $response. It updates the execution chain to forward the HTTP response object into the evaluation context.

Testing

  • Tested locally against Arazzo workflows containing nested action criteria.
  • Ran the existing pytest suite.
    • Results: 2 failed, 309 passed, 8 skipped, 2 warnings in 4.36s
    • Note: The 2 test failures also occur on the clean v0.9.6 / main branch on Windows, confirming they are baseline environment discrepancies and completely unrelated to this change.

Fixes #143

Copilot AI review requested due to automatic review settings April 29, 2026 07:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes conditional flow-control actions (goto, end, retry) being skipped when their criteria expressions reference $statusCode / $response, by forwarding the step HTTP response down into the action-criteria evaluation context.

Changes:

  • Forward the current step’s response from ArazzoRunner.execute_next_step into StepExecutor.determine_next_action.
  • Thread the response through ActionHandler.determine_next_action into _check_action_criteria.
  • Populate the action-criteria evaluation context with statusCode and response derived from the step response.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
runner/arazzo_runner/runner.py Passes step_result["response"] into next-action determination.
runner/arazzo_runner/executor/step_executor.py Extends determine_next_action to accept/forward the step response.
runner/arazzo_runner/executor/action_handler.py Extends action evaluation APIs and builds criteria evaluation context from the response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread runner/arazzo_runner/executor/action_handler.py
Comment thread runner/arazzo_runner/runner.py
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.

Bug: Action criteria cannot access $statusCode or $response in evaluation context

2 participants