vishnuprakaz opened a new pull request, #835:
URL: https://github.com/apache/flink-agents/pull/835

   <!--
     * Thank you very much for contributing to Flink Agents.
     * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
     -->
     
     <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need 
this. -->
     Linked issue: #834  
   
     ### Purpose of change
   
     Actions communicate by sending events via `ctx.send_event(...)`; any value 
an
     action returns is silently discarded by the framework. Previously this 
failed
     quietly, so writing `return result` in an action did nothing with no error 
or
     warning a confusing trap. 
     
     This implements the existing TODO in
     `plan/actions/action.py` by emitting a warning when an agent plan is built 
for
     any `@action`-decorated method that declares a non-`None` return type, 
pointing
     the user to `ctx.send_event(...)`. Warning only no change to execution 
behavior.
   
     ### Tests 
   
     Added two unit tests in `plan/tests/test_agent_plan.py`:
     - an action declaring a return type (`-> str`) logs the warning, and
     - a normal `-> None` action logs no warning.
   
     Verified locally with `pytest` and `ruff check`.
     
     ### API
   
     No public API changes.
   
     ### Documentation
   
     - [ ] `doc-needed`
     - [x] `doc-not-needed`
     - [ ] `doc-included`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to