Skip to content

Python: evaluate autoSend expressions before emitting output - #5

Closed
jpalvarezl wants to merge 1 commit into
mainfrom
jpalvarezl-icm-autosend-evaluation
Closed

jpalvarezl wants to merge 1 commit into
mainfrom
jpalvarezl-icm-autosend-evaluation

Conversation

@jpalvarezl

Copy link
Copy Markdown
Owner

Motivation & Context

Declarative function-tool and agent actions should evaluate configured output.autoSend expressions before deciding whether to emit output. Converting an unevaluated expression string directly to bool treats every nonempty expression as true, including expressions whose result is false.

Description & Review Guide

  • What are the major changes? Evaluate autoSend through the existing workflow-state expression evaluator in both output parsers, including the tool approval-resume path. Add regression coverage for literals, state references, defaults, expression failures and continuation, and document the setting.
  • What is the impact of these changes? False-valued expressions suppress automatic output. Existing default/literal coercion, output bindings, result storage, explicit downstream output and agent-loop settings are preserved. The selected executor, approval and evaluator suite passes 460 tests on Python 3.11 with PowerFx 0.0.34. Changed-file Ruff, source Pyright, test mypy and repository pre-commit hooks pass. The full repository unit suite was not run.
  • What do you want reviewers to focus on? Expression evaluation before Boolean conversion, preservation of defaults and stored results, and direct versus resumed execution behavior.

Focused test command, from python:

uv run --no-sync --package agent-framework-declarative pytest packages\declarative\tests\test_function_tool_executor.py packages\declarative\tests\test_graph_coverage.py packages\declarative\tests\test_graph_executors.py packages\declarative\tests\test_declarative_approval_binding.py packages\declarative\tests\test_declarative_state_path_safety.py -o addopts= -q --tb=short

Related Issue

N/A. No linked public issue.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Evaluate configured autoSend values against workflow state in function-tool and agent actions. Preserve output bindings, defaults, and resume behavior, and cover automatic output with local regression tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jpalvarezl jpalvarezl closed this Sep 18, 2026
@jpalvarezl
jpalvarezl deleted the jpalvarezl-icm-autosend-evaluation branch September 18, 2026 11:06

This branch had an error being deployed

1 failed deployment
github-app-auth — d0145bba Deployed Sep 18, 2026 by jpalvarezl via team_check #6
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