Skip to content

MAINT: Simplifying Rapid Response and Cyber#2117

Merged
rlundeen2 merged 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-phase-c-simple-scenarios
Jul 2, 2026
Merged

MAINT: Simplifying Rapid Response and Cyber#2117
rlundeen2 merged 1 commit into
microsoft:mainfrom
rlundeen2:rlundeen2-phase-c-simple-scenarios

Conversation

@rlundeen2

Copy link
Copy Markdown
Contributor

This is Phase C of the scenario simplification effort (design gist): it migrates the two simple scenarios, Cyber and RapidResponse, off the inherited base-class default cross-product and onto composition. Both now override _build_atomic_attacks_async with a single call to a new shared helper, build_matrix_atomic_attacks, backed by resolve_technique_factories (which AdversarialBenchmark also reuses to drop its inline factory-resolution block). These free, opt-in helpers keep the base Scenario uncoupled from the matrix shape while avoiding per-scenario boilerplate, and unblock the base-default deletions planned for Phase D. Includes unit tests for both helpers and removes the now-obsolete RapidResponse display-group test.

@rlundeen2 rlundeen2 force-pushed the rlundeen2-phase-c-simple-scenarios branch from 1bebf45 to 54e54c2 Compare July 2, 2026 01:31
@varunj-msft varunj-msft self-assigned this Jul 2, 2026
Comment thread pyrit/scenario/core/matrix_atomic_attack_builder.py
Phase C: migrate the two simple scenarios (Cyber, RapidResponse) off the
base-class default cross-product and onto composition via new shared
helpers in matrix_atomic_attack_builder.py:

- resolve_technique_factories(*, context): resolve selected strategies to
  registry factories, preserving order and dropping missing.
- build_matrix_atomic_attacks(*, context, objective_scorer, display_group_fn):
  one-line technique x dataset matrix construction.

Cyber and RapidResponse now override _build_atomic_attacks_async with a
single call to the helper. AdversarialBenchmark reuses
resolve_technique_factories to drop its inline factory-resolution block.
Adds unit tests for both helpers; removes obsolete RapidResponse
TestBuildDisplayGroup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rlundeen2 rlundeen2 force-pushed the rlundeen2-phase-c-simple-scenarios branch from 54e54c2 to f8f4f43 Compare July 2, 2026 21:33
@rlundeen2 rlundeen2 added this pull request to the merge queue Jul 2, 2026
Merged via the queue into microsoft:main with commit 2a0b1bb Jul 2, 2026
53 checks passed
@rlundeen2 rlundeen2 deleted the rlundeen2-phase-c-simple-scenarios branch July 2, 2026 23:37
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.

2 participants