[PERF]: execute XPIA injection handle activation concurrently - #165
Merged
Conversation
Also includes feature addition for exposing trial group aggregation metadata to json reports.
Also includes feature addition for exposing trial group aggregation metadata to json reports.
Also includes feature addition for exposing trial group aggregation metadata to json reports.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
Author
|
@microsoft-github-policy-service agree |
Spencer Schoenberg (spencrr)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the suggestions, prudhvi (@apocalypse9949). I will still leave this open for comment from others 😄
…t#121/microsoft#123 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Please update the PR description to match the scoped implementation :-) |
Nina Chikanov (nina-msft)
requested changes
Aug 19, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Nina Chikanov (nina-msft)
approved these changes
Aug 21, 2026
Nina Chikanov (nina-msft)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your contribution prudhvi (@apocalypse9949)!
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.
This PR improves XPIA attack setup performance by initializing injection handles concurrently.
Performance: Concurrent XPIA Handle Initialization
XPIAExecution._activate_handles_asyncpreviously initialized injection handles sequentially. For attacks involving multiple injection surfaces, this caused independent asynchronous setup operations to execute serially.This change uses
asyncio.gather(..., return_exceptions=True)so independent setup operations such as remote file uploads proceed in parallel. A failing handle does not cancel siblings, which lets successful activations finishenter_async_contextand register__aexit__cleanup before the first error is re-raised.The existing readiness wait remains concurrent via
asyncio.TaskGroup.Impact
Local testing showed approximately 45% lower activation time for multi-surface scenarios compared with the sequential implementation.
Testing
uv run pytest tests/unit/attacks/test_xpia.py -v— passedFiles Changed
rampart/attacks/_xpia.py— concurrent handle activation via non-cancellingasyncio.gathertests/unit/attacks/test_xpia.py— partial-failure cleanup coverage