Skip to content

FIX: give adaptive technique selection the run id on fresh runs - #3094

Open
Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/adaptive-run-id
Open

Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/adaptive-run-id

Conversation

@u7k4rs6

Copy link
Copy Markdown
Contributor

Fixes #3093.

  • ScenarioContext gets scenario_result_id: the stored id on resume, or the id the new result will use on a fresh run.
  • initialize_async picks that id with uuid4() before building attacks and creates the ScenarioResult with it, so the id the attacks saw is the one that gets saved.
  • AdaptiveScenario hands context.scenario_result_id to the dispatcher instead of self._scenario_result_id, which is still None at that point on a fresh run.

Same repro on this branch:

fresh run ids passed to selector: {'bd4cd586-...'}
two fresh runs picked identically: False
resume picks match original: True | resume error: None

Test: a seeded TextAdaptive run passes its own result id to the selector, and resuming it makes the same picks. It fails on main. tests/unit/scenario and backend: 3814 passed.

This branch has not been deployed

No deployments
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.

BUG: adaptive scenarios select techniques without the run id on fresh runs

1 participant