Skip to content

MUFM: Basti's branch#1193

Draft
rrama wants to merge 8 commits intotmp/76380d0from
refactor/IDE-1786_folder-config-refactoring_mufm
Draft

MUFM: Basti's branch#1193
rrama wants to merge 8 commits intotmp/76380d0from
refactor/IDE-1786_folder-config-refactoring_mufm

Conversation

@rrama
Copy link
Copy Markdown
Contributor

@rrama rrama commented Apr 2, 2026

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

  • Tests added and all succeed
  • Regenerated mocks, etc. (make generate)
  • Linted (make lint-fix)
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

rrama and others added 5 commits March 27, 2026 16:55
* fix: send diagnostics for all products

This is because if both Secrets and Code have diagnostics for a file they would wipe the diagnostics for the other with their notification.

* test: new product diag combine logic

* fix: only send diags for files product touched

* refactor: map more efficiently

* chore: better Folder mutexing

Remove useless mutexing around sync maps.
Add seperate mutexing for the status and diagnostics manipulation/publishing to prevent races.

* fix: clear secrets issue cache properly

* fix: err if secrets FF is disabled

* fix: revert mutexes

* fix: revert extra publish call

* chore: format

* fix: post scan handler

* fix: test expectation

* fix: affectedFilePath for secrets

* fix: issue caching

* chore: refactor interface

* fix: tests

* chore: renames

* refactor: postAction func

---------

Co-authored-by: Abdelrahman Shawki Hassan <shawki.hassan@snyk.io>
* fix: Update alignment of html settings page. Update section titles

* fix: tooltips now have info icons

* fix: hide pre/post scan commands, improve tooltips

* fix: update settings fallback to match style of main settings page

* fix: remove tests for disabled pre/post scan commands

* fix: code review feedback - fix tests and tooltip alignment
* fix: less FC gets for scan agg

Plus only get an immutable folder config.
This will help increase performance.
Removed internal helpers from the interface and test `StateSnapshot()`.

* fix: get FCs less for scan aggregator

Also don't enrich from git when getting feature flags, which is a hot path.

* fix: ensure scan summary always is updated at end of scans

* fix: don't enrich from Git when immutable FC

Shawky told me to do it!
Plus remove `CreateMinimalFCOnErr` and just rely on `CreateIfNotExist` to be simpler.

* fix: don't reset scan agg back to 0 anymore

It was breaking single file scans and failing tests.

* fix: less enriching from Git

Make more immutable folder configs.

* refactor: just use immutable FC for FFs

* refactor: use immutable FC for scan agg again

* fix: always use global fallback for configs

* fix: html setting for issueviewoption

---------

Co-authored-by: Abdelrahman Shawki Hassan <shawki.hassan@snyk.io>
…#1188)

* fix: eliminate redundant delta recomputations in diagnostics hot path

Move delta computation (disk I/O + fuzzy matching) from the diagnostics
publishing hot path to post-scan time. Previously, every config change
triggered ~64 GetDelta calls (4 products × 4 FilterAndPublishDiagnostics
× 4 filterIssuesWithConfig), each doing full baseline disk reads and
fuzzy matching under an exclusive mutex.

Now, enrichCachedIssuesWithDelta runs once in postScanAction after all
scans complete (baselines available), stamping IsNew on cached issue
pointers in-place. The hot path (filterIssuesWithConfig) and summary
HTML just filter by the pre-computed IsNew flag.

- Add enrichCachedIssuesWithDelta: runs delta once, mutates cached issues
- Add filterByIsNew: cheap boolean filter replacing GetDeltaForAllProducts
- Simplify GetDelta/GetDeltaForAllProducts to filter by IsNew flag
- Remove exclusive mutex from GetDelta (no longer does expensive work)
- Summary HTML derives delta issues from cached IsNew flags
@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Apr 2, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@rrama rrama changed the base branch from refactor/IDE-1786_folder-config-refactoring to tmp/76380d0 April 2, 2026 16:37
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.

3 participants