Skip to content

Clear Analysis Cache leaves editor diagnostics and can restore cleared findings #36

In review

Description

@sh00kapic

Run a scan with a finding, clear the analysis cache, then change the ignore list. The command clears the sidebar, persisted snapshot and stack data, but leaves the Problems collection and lastSarifByFile populated. The ignore-list listener can rebuild and save the cleared results.

Expected behavior and verification

Clear the in-memory findings and editor diagnostics together with the stored scan. Coordinate clearing with startup cache loading and active scans so an outstanding write cannot restore the cleared results. Verify the Problems panel, sidebar and a fresh session.

extension.ts line 638 · extension.ts line 85

Activity

  1. added
    bug
    on Nov 20, 2026
  2. Arthurvroum commented on Nov 25, 2026

    @Arthurvroum
    Collaborator

    Fixed on branch 36-clear-cache-everywhere (842298e), pull request #51.

    • Clear Analysis Cache now also clears the Problems diagnostics and the in-memory results (lastSarifByFile). The ignore-list listener therefore has nothing to republish.
    • Clearing is refused while an analysis is running, because that run would write its results back.
    • clearCache() waits for the startup cache load and for writes still in flight, and cache writes are queued. An outstanding write cannot restore the cleared results.

    Tests: the Problems panel is empty after clearing and stays empty after an ignore-list change, and clearing during a run is refused. Unit and workspace suites pass locally (Linux).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions