Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back all_rulesets in favor of rulesets property cleverness #1536

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

collindutter
Copy link
Member

Problem:

RuleMixin._rulesets is marked as serializable, but it has an alias, rulesets. When serializing RuleMixin the property ,rulesets, gets serialized rather than the field.

This leads to some unintended behavior where the serialized rulesets field contains the "Default Ruleset" added by the ruleset property.

Solution:

Remove the cleverness of having rulesets be both a field and property by re-introducing all_rulesets. all_rulesets is only used at runtime and is not serialized.

Issue ticket number and link

Closes #1465

@collindutter collindutter added this to the 2.0 milestone Jan 10, 2025
@collindutter
Copy link
Member Author

I think this is breaking enough to hold off until 2.0, but what do reviewers think?

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

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.

Adding a ruleset to an Agent shouldn't also add it to the Agent's Task.
1 participant