Skip to content

Harden tunnel cleanup and legacy migration#113

Merged
wiresock merged 3 commits into
mainfrom
codex/fix-production-review-issues-3
Jul 5, 2026
Merged

Harden tunnel cleanup and legacy migration#113
wiresock merged 3 commits into
mainfrom
codex/fix-production-review-issues-3

Conversation

@wiresock

@wiresock wiresock commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary:

  • keep activation disabled while timed-out native connects finish and observe late cleanup failures
  • reset/query network lock after shutdown or timed-out cleanup failures
  • harden legacy profile migration with bounded temp copies and handle-based reparse rejection
  • isolate process enumeration failures per process
  • extract editor scalar validation into a shared config validator and document migration limits

Verification:

  • dotnet run --project WireSockUI.Tests\WireSockUI.Tests.csproj --configuration Release --framework net472-windows
  • dotnet build WireSockUI.sln --configuration Release -p:Platform=x64 -p:UseSharedCompilation=false -m:1
  • dotnet list WireSockUI\WireSockUI.csproj package --vulnerable --include-transitive

Copilot AI review requested due to automatic review settings July 5, 2026 11:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors configuration validation into a dedicated ConfigValueValidator class, enhances the legacy profile migration process with size limits and reparse-point checks, improves process list inspection robustness, and refactors timed-out connection cleanup handling in the main form. The review feedback suggests optimizing string trimming in ConfigValueValidator.IsBool and ConfigValueValidator.IsOneOf to avoid redundant allocations during frequent syntax highlighting updates.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread WireSockUI/Config/ConfigValueValidator.cs
Comment thread WireSockUI/Config/ConfigValueValidator.cs

Copilot AI left a comment

Copy link
Copy Markdown

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 hardens tunnel shutdown/timeout cleanup paths and legacy profile migration, while improving reliability of process enumeration and factoring editor config validation into a shared helper.

Changes:

  • Harden legacy profile migration by copying into a bounded temporary file, rejecting reparse-point sources via handle inspection, and enforcing a 1 MiB migration limit.
  • Prevent re-activation during timed-out connect cleanup; add late-cleanup network-lock reset logic for shutdown/cleanup failures.
  • Isolate per-process inspection failures during process enumeration and extract editor scalar validation into ConfigValueValidator with updated tests/docs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
WireSockUI/Program.cs Adds secure, size-bounded legacy profile migration using handle-based reparse checks and temp-file staging.
WireSockUI/Native/ProcessList.cs Catches per-process inspection failures so one bad process doesn’t break enumeration.
WireSockUI/Forms/frmMain.cs Disables activation during timed-out connect cleanup; improves shutdown timeout handling and network-lock reset behavior.
WireSockUI/Forms/frmEdit.cs Switches editor validation to shared ConfigValueValidator helpers.
WireSockUI/Config/ConfigValueValidator.cs New shared validator for numeric/bool/enum-like config values.
WireSockUI.Tests/Program.cs Adds migration hardening tests (oversize + reparse-point), and updates editor validation tests to target the new validator.
README.md Documents legacy migration limits and reparse-point rejection behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread WireSockUI/Program.cs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread WireSockUI/Program.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@wiresock wiresock merged commit 1862da2 into main Jul 5, 2026
3 checks passed
@wiresock wiresock deleted the codex/fix-production-review-issues-3 branch July 5, 2026 17:25
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