[PERF]: execute XPIA injection handle activation concurrently - #165
Open
prudhvi (apocalypse9949) wants to merge 4 commits into
Open
[PERF]: execute XPIA injection handle activation concurrently#165prudhvi (apocalypse9949) wants to merge 4 commits into
prudhvi (apocalypse9949) wants to merge 4 commits into
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. |
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>
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 introduces two improvements to RAMPART:
trial_groupsmetadata in test run reports and JSON output.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.TaskGroupto initialize the handles concurrently, allowing independent setup operations such as remote file uploads to proceed in parallel.Impact
Local testing showed approximately 45% lower activation time for multi-surface scenarios compared with the sequential implementation.
Exception and cancellation behavior is preserved.
ExceptionGrouphandling is explicitly unwrapped so framework-levelInfrastructureErrorbehavior remains consistent with the existing execution model.Reporting: Preserve
trial_groups@pytest.mark.trialalready produces trial-level statistical information for terminal reporting, but this metadata was not preserved when generating JSON reports.As a result, downstream consumers received the individual test results but had to independently reconstruct trial-level statistics.
This PR adds
trial_groupstoTestRunReportand propagates the metadata throughRampartSessiontoJsonFileReportSink.JSON consumers can now access the same trial-group information directly from the generated report.
Testing
The following validation was performed:
uv run pytest tests -v— passeduv run pre-commit run --all-files— passedtrial_groupspropagation and JSON serializationFiles Changed
rampart/attacks/_xpia.pyasyncio.TaskGroup.rampart/reporting/sink.pytrial_groupstoTestRunReport.rampart/pytest_plugin/_session.pyrampart/reporting/json_file.pytrial_groupsin JSON serialization.tests/unit/reporting/test_json_file.pytrial_groupsJSON output.tests/unit/reporting/test_report.py