Skip to content

Monitor Git branch changes to keep trust sharing consistent; - #17

Merged
Hefaistos68 merged 3 commits into
masterfrom
feature/improve-gitignore-handing
Jun 18, 2026
Merged

Hefaistos68 merged 3 commits into
masterfrom
feature/improve-gitignore-handing

Conversation

@Hefaistos68

Copy link
Copy Markdown
Owner

Refactored BuildBlockDialogViewModel to allow an optional user trust store path override and updated related tests for isolation. Enhanced SolutionMonitorService to watch for Git HEAD changes, handling submodules and worktrees, and re-apply trust sharing preferences on HEAD updates. Git watcher is now started and stopped with solution lifecycle events.

Note: only for the Visual Studio extension.

…ore path override for tests

Refactored BuildBlockDialogViewModel to allow an optional user trust store path override and updated related tests for isolation. Enhanced SolutionMonitorService to watch for Git HEAD changes, handling submodules and worktrees, and re-apply trust sharing preferences on HEAD updates. Git watcher is now started and stopped with solution lifecycle events.
Note: only for the Visual Studio extension.
Copilot AI review requested due to automatic review settings June 18, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Visual Studio extension to keep “trust sharing” behavior consistent across Git branch switches by (1) allowing the build-block dialog view model to use an optional user trust store path override (improving test isolation) and (2) adding a Git HEAD file watcher that re-applies trust-sharing preferences when HEAD changes.

Changes:

  • Added an optional userTrustPath override to BuildBlockDialogViewModel to control which user trust store is used.
  • Updated BuildBlockDialogViewModel unit tests to use a temp, per-test trust store file instead of the host’s default user trust store.
  • Enhanced SolutionMonitorService to start/stop a Git HEAD watcher with the solution lifecycle and re-apply trust-sharing preferences on HEAD updates (including worktrees/submodules via .git resolution).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialogViewModel.cs Adds a constructor overload to allow overriding the user trust store path used for merged trust evaluation.
MSBuildGuard.VisualStudio/Services/SolutionMonitorService.cs Introduces a FileSystemWatcher on Git HEAD and ties it to solution open/close lifecycle events.
MSBuildGuard.VisualStudio.Tests/ToolWindows/BuildBlockDialogViewModelTests.cs Refactors tests to use an isolated trust store path and validate trust impact on risk score.

Comment thread MSBuildGuard.VisualStudio/Services/SolutionMonitorService.cs
Comment thread MSBuildGuard.VisualStudio/ToolWindows/BuildBlockDialogViewModel.cs
Comment thread MSBuildGuard.VisualStudio/Services/SolutionMonitorService.cs
Comment thread MSBuildGuard.VisualStudio/Services/SolutionMonitorService.cs
Comment thread MSBuildGuard.VisualStudio.Tests/ToolWindows/BuildBlockDialogViewModelTests.cs Outdated
@Hefaistos68
Hefaistos68 merged commit 6a43bd1 into master Jun 18, 2026
1 check passed
@Hefaistos68
Hefaistos68 deleted the feature/improve-gitignore-handing branch June 22, 2026 13:32
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