Skip to content

FEAT Add paired outcome analytics and Scenario GUI comparison - #3337

Merged
Roman Lutz (romanlutz) merged 9 commits into
microsoft:mainfrom
shashank03-dev:feat/paired-outcome-analytics
Oct 20, 2026
Merged

Roman Lutz (romanlutz) merged 9 commits into
microsoft:mainfrom
shashank03-dev:feat/paired-outcome-analytics

Conversation

@shashank03-dev

@shashank03-dev Dev3 ^~^ (shashank03-dev) commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Refs #3330.

Aggregate baseline and attack success rates do not show which of the same logical objectives changed outcome. This PR adds compute_paired_outcome_statistics() and a Paired outcomes panel on the Scenario run page.

For a completed run, select the saved baseline and attack groups and choose Compare outcomes. The panel reports all four transitions, both success rates, the paired difference in percentage points, and exclusions. For example, four pairs with one of each transition leave both rates at 50% while showing one failure becoming a success and one success becoming a failure.

The SDK matches logical seed-group IDs within one saved run plan and uses the latest top-level completion per execution unit. Child attempts and superseded retries do not add observations. Rates share the same decided denominator; unmatched seeds and missing, errored, undetermined, or unattributed results are reported separately. Ambiguous attribution and incompatible persisted target/scoring evidence fail explicitly.

The GUI calls a read-only endpoint that reuses the SDK computation in a worker thread. Selection changes clear the comparison and cancel stale requests. Loading, retryable errors, unavailable rates, unsupported legacy plans, and incomplete runs have explicit states. Controls use the existing Fluent UI components and support narrow layouts and keyboard focus.

No additional runtime dependencies or migrations. Comparisons remain descriptive, not causal. Separately executed/unplanned runs are unsupported, and missing persisted scoring metadata limits compatibility validation.

UI proof

Screenshots from the disposable offline SQLite acceptance fixture, using the real backend and built frontend. No external model calls were made. The example has eight planned shared pairs: four decided (one of each transition) and four excluded. Both success rates are 50%, so the paired difference is 0 percentage points; unmatched seeds are reported separately.

Desktop

Desktop paired-outcome comparison showing the group selectors, all four transitions, paired rates, and exclusion details

Mobile (390 px viewport)

Full panel capture showing stacked controls, readable transition counts, and exclusion details.

Mobile paired-outcome comparison at a 390 pixel viewport

Tests and Documentation

  • Full Python unit suite (make unit-test): 29,769 passed, 12 skipped.
  • Full frontend suite (npm test -- --runInBand --watch=false): 3,293 passed across 138 suites.
  • Real SQLite/API browser acceptance: 3 passed, covering persisted retries/child attempts and exclusions, mobile layout and keyboard focus/activation, and unsupported legacy/failed runs.
  • Focused Python API/Scenario/paired analytics checks: 86 passed.
  • Focused frontend component/page tests: 72 passed.
  • Project-wide Python type checking, frontend TypeScript checks, ESLint, and applicable pre-commit hooks: passed.
  • Frontend production build and strict HTML/RSS documentation build: passed.
  • Desktop and mobile screenshots inspected.
  • Added an isolated browser fixture and a dedicated CI shard, included in the existing required Frontend E2E Tests aggregation.
  • SDK usage and denominator/retry caveats are documented in doc/code/analytics/0_attack_results.md; GUI usage is documented in doc/gui/0_gui.md.
  • Notebook/JupyText execution and external model calls were not run; browser tests use disposable offline SQLite data.

@shashank03-dev
Dev3 ^~^ (shashank03-dev) marked this pull request as ready for review October 19, 2026 11:16
@shashank03-dev Dev3 ^~^ (shashank03-dev) changed the title [DRAFT] FEAT Add paired outcome analytics for Scenario runs FEAT Add paired outcome analytics for Scenario runs Oct 19, 2026
@shashank03-dev Dev3 ^~^ (shashank03-dev) changed the title FEAT Add paired outcome analytics for Scenario runs FEAT Add paired outcome analytics and Scenario GUI comparison Oct 19, 2026
Follow linked compound descendants with iterative cycle-safe traversal, preserving pair counts and rejecting missing evidence. Cover live and saved nested results, shared descendants, cycles, and deep chains.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee8e4280-d749-4ee1-b8c2-84e4ff7df48f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee8e4280-d749-4ee1-b8c2-84e4ff7df48f
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ee8e4280-d749-4ee1-b8c2-84e4ff7df48f
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