Skip to content

Conversation

@tukwila
Copy link
Contributor

@tukwila tukwila commented Nov 6, 2025

Summary

Details

  • [ ]

To fix: #446

test cmd:
tox -e test -- --runxfail tests/unit/utils/test_encoding.py::TestMessageEncoding::test_encode_decode_generative

Test Plan

Related Issues

  • Resolves #

  • "I certify that all code in this PR is my own, except as noted below."

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes ## WRITTEN BY AI ##)

Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
@tukwila
Copy link
Contributor Author

tukwila commented Nov 7, 2025

@markurtz please help to check this fix, i'm not sure if @computed_field can be remove from total_token to let xfail case: test_encode_decode_generative pass.

@sjmonson
Copy link
Collaborator

sjmonson commented Nov 7, 2025

No this is not a valid solution, total_tokens is a computed field. If the test is failing due to that decorator then its something wrong with the test. I think @jaredoconnell ran into a similar issue somewhere.

@jaredoconnell
Copy link
Collaborator

Yeah. I believe that this is a bug or something where the cached value AND the processed value are both present. I didn't find a good solution previously.

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.

serializer.deserialize(serialized) duplicate the last dict data

3 participants