Skip to content

Fix all Copilot review suggestions from Batches 4/7/10#387

Merged
JusterZhu merged 1 commit into
masterfrom
batch-14-copilot-fixes
May 24, 2026
Merged

Fix all Copilot review suggestions from Batches 4/7/10#387
JusterZhu merged 1 commit into
masterfrom
batch-14-copilot-fixes

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

Summary

Fixes all 10 actionable Copilot review comments from PRs #368, #374, #380.

Fixes

#1 UpdateInfoEventArgs — Make VersionRespDTO nullable

#2 ProcessInfo empty list — Build VersionInfo list from DownloadAssets instead of passing empty list

#3 Injected orchestrator — Use _orchestrator if available, fall back to new HttpClient+DefaultDownloadOrchestrator

#5 destDir + SemaphoreSlim — Directory.CreateDirectory + using var sem

#6 Null version guard — DownloadPlanBuilder returns DownloadPlan.Empty for invalid currentVersion

#8 OSS filename — Set zip filename to match Decompress() expectations

#9 OSS URL validation — Throw clear exception when URL is null/empty

#10 OSS timeout — Set HttpClient.Timeout to 60s to match old DownloadManager behavior

Build + Tests

  • dotnet build src/c#/GeneralUpdate.slnx — 0 errors
  • 11/11 existing tests pass

Closes #386

Fixes from PR #368 (Batch 4):
1. UpdateInfoEventArgs: make VersionRespDTO nullable to avoid null ref
2. ClientUpdateStrategy: build VersionInfo list from DownloadAssets
   instead of passing empty list to ProcessInfo constructor
3. ClientUpdateStrategy: use injected _orchestrator if available,
   fall back to creating one with HttpClient
5. DefaultDownloadOrchestrator: ensure destDir exists (Directory.CreateDirectory)
   and dispose SemaphoreSlim (using)
6. DownloadPlanBuilder: guard against invalid currentVersion string

Fixes from PR #380 (Batch 10):
8. OSSUpdateStrategy: set zip filename to match Decompress() expectations
9. OSSUpdateStrategy: throw clear exception when URL is null/empty
10. OSSUpdateStrategy: set HttpClient.Timeout to 60s to match old behavior

Closes #386
Copilot AI review requested due to automatic review settings May 24, 2026 11:56
@JusterZhu JusterZhu merged commit c55348b into master May 24, 2026
1 check failed
@JusterZhu JusterZhu deleted the batch-14-copilot-fixes branch May 24, 2026 11:56
@JusterZhu JusterZhu review requested due to automatic review settings May 24, 2026 12:20
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.

Fix all Copilot review suggestions from Batches 4/7/10

1 participant