FEAT: Violent Durien Refactor and Scenario Factory Update#1949
Open
rlundeen2 wants to merge 8 commits into
Open
FEAT: Violent Durien Refactor and Scenario Factory Update#1949rlundeen2 wants to merge 8 commits into
rlundeen2 wants to merge 8 commits into
Conversation
Convert the standalone Violent Durian doc notebook into a reusable, opt-in attack technique. It is a configured RedTeamingAttack (criminal-persona adversarial system prompt + distinctive durian opener + persona-adoption scorer), so it is registered as an AttackTechniqueFactory via a dedicated ViolentDurianInitializer rather than living as documentation. - Move scorer yaml into datasets (criminal_persona.yaml) + add enum entry - Add durian seed prompt dataset file parametrized on objective - Extend AttackTechniqueFactory with adversarial_system_prompt_path / adversarial_seed_prompt, keeping adversarial target resolution lazy - Add opt-in ViolentDurianInitializer (not in default scenario catalog) - Delete the violent_durian_attack doc notebook + myst.yml entry - Add unit tests for the new factory params and the initializer Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the violent_durian technique from a heavyweight opt-in initializer into the default scenario technique catalog (build_scenario_technique_factories) using inline dataset paths. Tagged 'multi_turn' only, so it is selectable as an option but excluded from all core/default scenario aggregates (never run by default). Also fix a latent test-suite hygiene bug: _scenario_factories() in test_attack_technique_registry.py registered a mock 'adversarial_chat' into the global TargetRegistry at collection time without resetting it, leaking into every xdist worker and intermittently failing scam/psychosocial default-target tests. Reset the registry after building the cached factories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the eager adversarial_config param and its mutual-exclusivity rules in favor of an optional adversarial_chat target that is always lazily composed into AttackAdversarialConfig at create() time, alongside the existing custom system_prompt_path/seed_prompt params. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restores the adversarial_config parameter for backward compatibility. When supplied it emits a DeprecationWarning and is unpacked into adversarial_chat / adversarial_system_prompt_path / adversarial_seed_prompt, and raises ValueError if combined with any of those newer params. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
create() now takes a flat adversarial_chat (mirroring __init__) and keeps attack_adversarial_config_override as a deprecated alias. Supplying a create-time adversarial_chat when the factory already baked one raises instead of silently overwriting it. The adversarial benchmark passes adversarial_chat directly and excludes factories that bake their own target from the sweep. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the misleading line suggesting a scenario can supply the adversarial target at create() time. Supplying a create-time adversarial_chat when the technique already bakes one is a conflict and already raises. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
romanlutz
approved these changes
Jun 8, 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.
"Violent Durian" lived under docs as a notebook, but it isn't really a standalone attack — it's a criminal-persona
RedTeamingAttackconfiguration. This PR repackages it as a first-class, opt-in attack technique in the canonical catalog and moves its data files into the proper dataset folders. Along the way it refactors theAttackTechniqueFactoryadversarial-config API.Previously, we used AdversarialConfig for technique factories. But in many cases (violent durien being the first) ONLY the adversarial system prompt is part of the technique, not the rest of the adversarial config. So I deprecated the adversarial config and made the overwrites more targeted to better support this. The old parameters were deprecated.