FenjuFu commented on issue #400: URL: https://github.com/apache/burr/issues/400#issuecomment-5099377636
I reproduced this on current main after the previous assignment was released. For a class-based Action that exposes a PydanticActionSchema, both un() and update() still receive Burr State objects; Action.schema is currently consulted only for intermediate-result validation. That explains why attribute access such as state.initial_prompt fails even when application-level typing is configured. I am picking this up. My proposed minimal, backward-compatible direction is: 1. add default identity conversion hooks to ActionSchema for the state passed to un() / update() and for the state returned by update(); 2. implement those hooks in PydanticActionSchema using its existing subset input/output models and merge helpers; 3. invoke them in the synchronous and asynchronous class-based Action lifecycle, leaving DEFAULT_SCHEMA and existing dict-based actions unchanged; 4. add end-to-end regression tests covering class-based Pydantic state across two actions, including the original write-then-read failure. I will keep streaming actions out of the first patch unless the same hooks can be applied without widening the change, and will call that out explicitly in the PR. I’m contributing as a member of the iFLYTEK Astron community. -- 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]
