chore(redteam): added strategies round-trips#269
Merged
poshinchen merged 1 commit intoJun 15, 2026
Conversation
|
Assessment: Approve Clean, focused change. I verified that every new Review notes
Nicely scoped PR with thorough docstrings explaining the design intent. |
jjbuck
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
to_dict/from_dictround-trip support for the four built-in attack strategies that were previously only persisted withstrategy_type+label:BadLikertJudgeStrategy,GoatStrategy,PairStrategy, andSequentialBreakStrategy.max_turns,success_threshold, strategy-specific params) and itsmodelso a saved experiment reloads with the same configuration._serialize_modelto_put_model_field. Behavior is unchanged.Notes
AttackStrategy.from_dictalready centralized the registry lookup; the four classes are added there alongsideCrescendoStrategy/PromptStrategyso reload resolves them withoutcustom_strategies=.Related Issues
N/A
Documentation PR
N/A
Type of Change
New feature
Testing
to_dictassertions for BLJ / Goat / Pair / SequentialBreak.test_round_trip_preserves_all_builtin_strategies: builds an experiment with all six built-ins, writes viato_file, reloads viafrom_file, and asserts type and label preservation.test_from_dict_round_trip_runs_after_setting_agentcontinues to pass.tests/strands_evals/experimental/redteam/— 312 passed.hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.