MAINT: Refactor Cyber scenario to use technique registry pattern#1654
Merged
rlundeen2 merged 3 commits intoApr 28, 2026
Merged
Conversation
- Add red_teaming technique to SCENARIO_TECHNIQUES catalog with multi_turn tag (no core tag, so RapidResponse is unaffected) - Rewrite Cyber to use dynamic strategy class via AttackTechniqueRegistry.build_strategy_class_from_specs - Remove manual _get_atomic_attacks_async override; use base class factory/registry pattern instead - Simplify constructor: remove adversarial_chat, scorer_config, adversarial_config, seed_groups params (resolved via registry) - Preserve _get_default_objective_scorer (malware-specific scorer) - Update airt __init__.py with lazy CyberStrategy resolution - Rewrite test_cyber.py to mirror test_rapid_response.py pattern - Update test_rapid_response.py assertions for 5-technique catalog - Bump Cyber VERSION to 2 (breaking strategy enum change) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rlundeen2
commented
Apr 24, 2026
RapidResponse now includes red_teaming alongside the existing 4 core techniques. Update RapidResponse strategy tests for 5 techniques and Cyber registry test to verify core tag presence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract duplicate TestCyberStrategy and TestRapidResponseStrategy classes into test_scenario_strategy_invariants.py with parametrized tests that validate structural properties for any ScenarioStrategy: values unique, ALL expands to all techniques, aggregates expand to non-empty subsets, etc. Per-scenario tests now use subset checks instead of exact equality, so adding new techniques to the catalog won't break existing tests. Also fix RapidResponse reset fixture (_strategy_class -> _cached_strategy_class). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rlundeen2
marked this pull request as ready for review
April 24, 2026 21:31
ValbuenaVC
self-requested a review
April 24, 2026 21:38
hannahwestra25
approved these changes
Apr 28, 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.
No description provided.