Skip to content

Attack history accepts a previous-runtime response after RuntimeProvider reports a replacement generation #3745

Closed

Description

@romanlutz

Describe the bug

AttackHistory does not bind list/metadata requests to RuntimeProvider's generation, so a response from the previous runtime may populate history after the provider reports a replacement.

Steps/Code to Reproduce

Hold an AttackHistory request pending, report a new runtime generation through RuntimeProvider, then release the old response and inspect the visible history.

Expected Results

Invalidate previous-generation data, cursors, option caches, and in-flight responses; fetch the current first page when the new runtime is ready.

Actual Results

AttackHistory has no useRuntime dependency or generation-bound request identity; its guard only covers filters/fetchToken/unmount. The previous request remains active and its result is accepted. Dataset/analytics hooks already use generation ownership. This demonstrates stale frontend response acceptance, not a live backend restart/database replacement.

Verified source reference: AttackHistory request lifecycle.

Proposed fix/regression: bind list and metadata requests to ready generation, reset cursor/page/data together, and test pending-response generation change and loaded-page reconnect.

Screenshots

Not applicable; deterministic component test evidence is inline.

Versions

Tested commit d3446e0, PyRIT 1.2.0.dev0, offline real React components/deterministic mocks. Evidence: files/evidence/round8/regressions.txt and round8.qa.test.tsx; local paths are not attachments.

Activity

  1. itsrayeedscodespace commented on Nov 2, 2026

    @itsrayeedscodespace
    Contributor

    I would like to take this.

    Plan: have AttackHistory read useRuntime() and make runtime.generation part of its request identity, the same way useAttackAnalytics and useAnalyticsOperationLabels already do. A generation change will cancel in-flight list and option requests, drop the old cursor and page, and fetch page 1 again once the runtime is ready. I will add tests for (1) a pending list response released after a generation change being ignored, and (2) a loaded later page going back to page 1 with fresh options after a reconnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions