Repository navigation
FEAT: Full evaluation metrics in the Scorer Registry (part 4) - #4248
Closed
Richard Lundeen (richlundeen) wants to merge 28 commits into
Closed
Richard Lundeen (richlundeen) wants to merge 28 commits into
Richard Lundeen (richlundeen) wants to merge 28 commits into
Conversation
- GET /api/attacks/{id}/findings lists findings linked to an attack across Operations,
backed by a new FindingEvidenceEntries.attack_result_id index (Alembic b5d7f9a1c3e6).
- Attack read APIs (summary, metadata, conversations, messages) resolve scan attacks that
are still running through a read-only LiveAttackLookup provided by ScenarioRunService.
Saved results always win; summaries/metadata expose in_progress and scenario_result_id.
- ScenarioActiveConversation.conversation_ids lists every objective conversation so far.
- ScenarioProgressScore carries score_category for progress results and hierarchy nodes.
- Frontend types and attacksApi.getAttackFindings for later layers.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Split ScenarioRunPage into section components and hooks, and add the shared blocks the scan results redesign builds on: OperationParentLink, ScanStatusBadge, OutcomeBadge progress labels and score popover, ScoreDetails over a narrow ScoreSummary, DetailFacts, IdentityDisclosure, AttackActivity, formatAttemptTiming, useAttackFindings, and AttachToFindingsButton. Existing pages adopt them only where output is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Run page: Operation as parent context above the title, no summary grid, explicit notices with a single attack's own error not repeated as a run error, and a progress area (elapsed, ETA, "View live attacks") that collapses in place. - A run of one atomic attack shows that attack as one framed card from preparing through completion; other runs keep groups, objectives and configuration. - One attack details component (inline card and dialog): Objective and Outcome with score, technique/scorer/dataset identities, findings when present, conversation link and Attach to findings. Result rows open these details. - Chat is the single conversation view for running and finished scan attacks: in-progress bar, polling of metadata, transcript and conversations, and an in-place reload when the attack finishes. Old scan conversation URLs redirect. - MessageList follows new messages only while the reader is near the end. - Remove ScenarioConversationPage, ScenarioRunOverview and ObjectiveScorerDetails. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate main 25417ff without rewriting the existing stack history. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Limit running-state guarantees to attack summary and metadata reads without expanding conversation/message schemas or removing score details. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry forward the verified running-state documentation correction and the predecessor main-integration lockfile state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the visible verdict in score-trigger accessible names, cover saved and pending outcomes plus custom labels, and prove populated findings survive refresh before replacement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate confirmed CI base c979a97 without rewriting either Alembic branch. The reproduced dual-head conflict is repaired in the following commit before publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve both published revision histories and restore singular-head backend startup. Cover fresh, common-parent, either-branch and dual-head upgrades with preserved data, idempotency, downgrade/re-upgrade and SQLite/SQL Server merge semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry forward the reviewed no-DDL Alembic merge revision and pinned upstream integration while preserving the foundations repairs and published visual walkthrough. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate microsoft/PyRIT main at 8253694. Preserve live attack reads, findings, score provenance and both migration histories while adopting canonical public imports. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the scenario page component layout and saved transcript behavior while integrating paired outcomes, generation details, live-read coverage, and migration history coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve portal score interactions, single-run topology and live retries, scan return navigation, bounded hierarchy acceptance, and honest ETA and wire types. Consolidate the live scorer metric presenter and keep its consumer tests current. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Import SequentialAttack and SequentialChildAttack from the existing public pyrit.executor.attack block to satisfy the publisher import gate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the shared pieces this PR already uses and add the rest with their callers in the redesign: AttachToFindingsButton, OperationParentLink, DetailFacts, AttackActivity, useAttackFindings, attempt timing helpers, the FindingEvidenceDialog onAttached callback, OutcomeBadge pending states and score popover, scoreSummaryFromProgressScore, and the standalone IdentityDisclosure. Scenario technique identities now render the shared IdentityJson region.
The redesign keeps the building blocks part 2 no longer adds: their callers live here. Bring in part 2's main merge and the shared technique identity JSON.
The scan redesign needs evaluation metrics only for a run's recorded objective scorer. Keep that popover here and drop the Registry entry point, its behavioral evaluation identity, and their README text; a follow-up PR adds them on top of this one.
Each Scorer Registry row gets the evaluation-metrics popover that scan attack details use, showing every supplied metric (standard errors, sample counts, extra fields) plus the scorer's behavioral evaluation identity, kept separate from its runtime identity.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Opening attack details during rerun configuration loading aborts the request without clearing rerunPending, leaving the rerun control disabled until the page is reloaded.
1 open issue
What changed in this PR
Extends PyRIT’s Scorer Registry with the full evaluation popover shared by scan attack details, keeping behavioral evaluation identity separate from runtime identity. The supplied changes also include supporting scan-results and live-Chat updates from the stacked work.
Changes:
- Adds complete scorer metrics, unavailable states, documentation links, and behavioral identity disclosure.
- Shares attack details, score displays, findings actions, and live conversation navigation.
- Records compound-attack capability and updates related tests and documentation.
| File | Description |
|---|---|
tests/unit/scenario/core/test_scenario_retry.py |
Marks mock attacks as non-compound. |
tests/unit/scenario/core/test_scenario_partial_results.py |
Updates mock compound capability. |
tests/unit/scenario/benchmark/test_adversarial.py |
Updates benchmark mock capabilities. |
tests/unit/models/test_scenario_progress.py |
Tests compound-capability serialization. |
pyrit/scenario/core/scenario.py |
Records compound capability in run plans. |
pyrit/models/scenario_progress.py |
Adds optional compound-plan metadata. |
pyrit/executor/attack/core/attack_strategy.py |
Defines the compound-capability flag. |
pyrit/executor/attack/compound/sequential_attack.py |
Declares sequential attacks compound. |
pyrit/backend/README.md |
Documents revised result-row navigation. |
frontend/src/utils/scoreSummary.ts |
Normalizes scores for shared displays. |
frontend/src/utils/scoreSummary.test.ts |
Tests score normalization and fallbacks. |
frontend/src/utils/scenarioRunProgress.ts |
Exports shared attempt ordering. |
frontend/src/utils/routeParams.ts |
Removes the legacy conversation-route helper. |
frontend/src/types/index.ts |
Adds shared score and conversation types. |
frontend/src/services/recordedScanConversations.ts |
Verifies recorded conversation ownership. |
frontend/src/services/recordedScanConversations.test.ts |
Tests ownership checks and read failures. |
frontend/src/hooks/useScenarioRunControls.ts |
Centralizes rerun, cancel, and resume controls. |
frontend/src/hooks/useScenarioRunAttackDetails.ts |
Manages routed attack-detail selection. |
frontend/src/hooks/useLiveAttackMetadata.ts |
Polls metadata for running attacks. |
frontend/src/hooks/useLiveAttackMetadata.test.tsx |
Tests polling, retries, and cleanup. |
frontend/src/hooks/useConversationMessages.ts |
Preserves live transcripts through saved paging. |
frontend/src/hooks/useConversationMessages.test.ts |
Tests live-to-saved transcript continuity. |
frontend/src/hooks/useAttackFindings.ts |
Loads and refreshes linked findings. |
frontend/src/hooks/useAttackFindings.test.tsx |
Tests findings loading and isolation. |
frontend/src/components/Scorers/ScorerMetricsDetails.tsx |
Renders metrics independently of identity cards. |
frontend/src/components/Scorers/ScorerMetricsDetails.test.tsx |
Tests standalone metric formatting. |
frontend/src/components/Scorers/ScorerMetricsDetails.styles.ts |
Adds standalone metric styles. |
frontend/src/components/Scorers/ScorerEvaluationDetails.tsx |
Adds the shared evaluation popover. |
frontend/src/components/Scorers/ScorerEvaluationDetails.test.tsx |
Tests metrics, identities, and keyboard access. |
frontend/src/components/Scorers/ScorerEvaluationDetails.styles.ts |
Styles the bounded evaluation popover. |
frontend/src/components/ScenarioSuites/ScenarioSuiteExecutionPage.tsx |
Reuses shared scan-status badges. |
frontend/src/components/Scenarios/ScenarioTechniqueSection.tsx |
Reuses shared identity JSON disclosure. |
frontend/src/components/Scenarios/ScenarioRunTiming.tsx |
Adds explicit remaining-time fallback text. |
frontend/src/components/Scenarios/ScenarioRunSavedConversations.tsx |
Links interrupted attacks’ saved conversations. |
frontend/src/components/Scenarios/ScenarioRunProgress.tsx |
Combines progress, timing, and live attacks. |
frontend/src/components/Scenarios/ScenarioRunPage.styles.ts |
Updates progress and detail layouts. |
frontend/src/components/Scenarios/ScenarioRunObjectivesSection.tsx |
Shows datasets, objectives, and completion. |
frontend/src/components/Scenarios/ScenarioRunNotices.tsx |
Consolidates run errors and notices. |
frontend/src/components/Scenarios/scenarioRunNavigation.ts |
Resolves contextual back links. |
frontend/src/components/Scenarios/scenarioRunNavigation.test.ts |
Tests suite and history navigation. |
frontend/src/components/Scenarios/scenarioRunLayout.ts |
Adds single-attack and conversation-selection helpers. |
frontend/src/components/Scenarios/ScenarioRunHeader.tsx |
Combines Operation context and run controls. |
frontend/src/components/Scenarios/ScenarioRunDialogs.tsx |
Updates objective details and cancellation confirmation. |
frontend/src/components/Scenarios/ScenarioRunConfigurationSection.tsx |
Discloses saved scenario configuration. |
frontend/src/components/Scenarios/ScenarioResultHierarchy.tsx |
Removes outdated interaction guidance. |
frontend/src/components/Scenarios/ScenarioResultHierarchy.test.tsx |
Updates row interaction and column assertions. |
frontend/src/components/Scenarios/scenarioHierarchy.ts |
Adds server-based execution totals. |
frontend/src/components/Scenarios/ScenarioDetail.test.tsx |
Tests shared technique-identity disclosure. |
frontend/src/components/Scenarios/ScenarioConversationPage.test.tsx |
Removes legacy conversation-page tests. |
frontend/src/components/Scenarios/ScenarioAttackDetails.tsx |
Resolves shared attack-detail context. |
frontend/src/components/Scenarios/ScanConversationRedirect.tsx |
Redirects legacy conversation links to Chat. |
frontend/src/components/Scenarios/ScanConversationRedirect.test.tsx |
Tests redirects and unavailable conversations. |
frontend/src/components/Scenarios/LiveAttacksPopover.tsx |
Lists live attacks and conversation links. |
frontend/src/components/Scenarios/AttackExecutionTable.styles.ts |
Visually hides semantic table headers. |
frontend/src/components/Scenarios/AttackDetailsDialog.tsx |
Adds the shared attack-details dialog. |
frontend/src/components/Scenarios/AttackActivity.tsx |
Adds a reusable activity indicator. |
frontend/src/components/Scenarios/AttackActivity.test.tsx |
Tests activity labels. |
frontend/src/components/Scenarios/AttackActivity.styles.ts |
Styles activity with reduced-motion support. |
frontend/src/components/ScanStatusBadge.tsx |
Centralizes scan and suite status badges. |
frontend/src/components/ScanStatusBadge.test.tsx |
Tests status labels and icons. |
frontend/src/components/Registry/ScorerRegistry.tsx |
Adds evaluation disclosure to scorer rows. |
frontend/src/components/Registry/ScorerRegistry.test.tsx |
Tests complete metrics and distinct identities. |
frontend/src/components/Registry/RegistryIdentityRow.tsx |
Reuses shared identity controls. |
frontend/src/components/Registry/RegistryIdentityRow.styles.ts |
Removes extracted disclosure styles. |
frontend/src/components/Registry/IdentityDisclosure.tsx |
Adds reusable identity disclosure components. |
frontend/src/components/Registry/IdentityDisclosure.test.tsx |
Tests disclosure behavior and event isolation. |
frontend/src/components/Registry/IdentityDisclosure.styles.ts |
Centralizes identity disclosure styling. |
frontend/src/components/OutcomeBadge.tsx |
Adds pending states and score popovers. |
frontend/src/components/OutcomeBadge.test.tsx |
Tests outcome labels and score interactions. |
frontend/src/components/OutcomeBadge.styles.ts |
Styles pending states and score triggers. |
frontend/src/components/Operations/OperationParentLink.tsx |
Adds reusable Operation-context navigation. |
frontend/src/components/Operations/OperationParentLink.test.tsx |
Tests Operation links and fallbacks. |
frontend/src/components/Operations/OperationParentLink.styles.ts |
Styles accessible Operation links. |
frontend/src/components/Home/Home.tsx |
Reuses shared scan-status badges. |
frontend/src/components/DetailFacts.tsx |
Adds reusable label/value details. |
frontend/src/components/DetailFacts.test.tsx |
Tests semantic description-list rendering. |
frontend/src/components/DetailFacts.styles.ts |
Adds responsive detail-list styling. |
frontend/src/components/Chat/ScoreDetails.tsx |
Adds shared score-detail presentation. |
frontend/src/components/Chat/ScoreDetails.test.tsx |
Tests score fields and missing values. |
frontend/src/components/Chat/ScoreDetails.styles.ts |
Centralizes score-detail styles. |
frontend/src/components/Chat/MessageList.test.tsx |
Tests scrolling and live announcements. |
frontend/src/components/Chat/MessageList.styles.ts |
Removes extracted score-detail styles. |
frontend/src/components/Chat/FindingEvidenceDialog.tsx |
Reports successful finding attachments. |
frontend/src/components/Chat/ConversationPanel.test.tsx |
Tests recorded references and live polling. |
frontend/src/components/Chat/AttackInProgressBar.tsx |
Adds live-attack status and scan navigation. |
frontend/src/components/Chat/AttackInProgressBar.test.tsx |
Tests return navigation behavior. |
frontend/src/components/Chat/AttackInProgressBar.styles.ts |
Styles the responsive live-attack bar. |
frontend/src/components/Chat/AttachToFindingsButton.tsx |
Wraps finding attachment and focus restoration. |
frontend/src/components/Chat/AttachToFindingsButton.test.tsx |
Tests attachment, cancellation, and disabled states. |
frontend/src/components/Chat/AttachToFindingsButton.styles.ts |
Adds touch-friendly attachment-button sizing. |
frontend/src/components/AttackResults/ObjectiveScorerDetails.tsx |
Removes the superseded scorer-details card. |
frontend/src/components/AttackResults/ObjectiveScorerDetails.styles.ts |
Removes obsolete scorer-card styles. |
frontend/src/components/AttackResults/ComponentIdentityDetails.tsx |
Removes the superseded identity renderer. |
frontend/src/components/AttackResults/ComponentIdentityDetails.styles.ts |
Removes obsolete identity-renderer styles. |
frontend/src/components/AttackResults/attackAttemptFormatting.ts |
Adds retry and combined timing formatting. |
frontend/src/components/AttackResults/attackAttemptFormatting.test.ts |
Tests retry and timing labels. |
frontend/src/components/AttackResults/AttackAttemptDetails.test.tsx |
Tests recorded metrics and findings recovery. |
frontend/src/components/AttackResults/AttackAttemptDetails.styles.ts |
Restyles shared attack details. |
frontend/src/App.labels.test.tsx |
Checks saved Operation attribution. |
frontend/README.md |
Documents metrics and scan/Chat workflows. |
frontend/e2e/scenario-hierarchy.spec.ts |
Updates details, conversation, and focus interactions. |
doc/gui/0_gui.md |
Updates live Chat and rerun guidance. |
Review effort: Balanced
| // Leaving the run, or opening an attempt on it, abandons a rerun still loading its configuration. | ||
| useEffect(() => () => { | ||
| rerunRequest.current?.abort() | ||
| rerunRequest.current = null |
Integrate 4f6f4a0, retaining the Registry metrics disclosure and current main simplifications. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep complete scorer metrics and behavioral identity reachable when the shared popover grows. Cover viewport bounds, scrolling and focus restoration with a browser regression. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
left a comment
Contributor
Author
There was a problem hiding this comment.
Automated review completed. No blocking concerns remain. This review records source coverage; merging is handled separately.
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.

Description
Split out of #4032 at review: the redesign only needs evaluation metrics for a scan's recorded objective scorer, so the Registry entry point is its own change.
The Scorer Registry keeps its compact comparison columns. Each scorer row adds Evaluation metrics, the same popover scan attack details use (
ScorerEvaluationDetails), so the Registry can show the complete supplied evaluation:evaluation_identifier, already returned by the scorer API), kept separate from its canonical runtime identity.ScorerEvaluationDetailsgains the optionalevaluationIdentityprop and therecordedflag (scan details passrecorded). The frontend README documents the Registry entry point.Registry: compare the main metrics, then open the full evaluation
The compact comparison columns stay visible. Evaluation metrics reveals all supplied fields, including standard errors, sample counts, documentation, and the separate behavioral evaluation identity. Canonical runtime identity remains a separate disclosure. All metric values are synthetic illustrations, NOT MEASURED scorer performance.