Skip to content

Preserve update logs in precheck update info - #535

Merged
JusterZhu merged 2 commits into
masterfrom
copilot/fix-update-log-retrieval
Sep 19, 2026
Merged

JusterZhu merged 2 commits into
masterfrom
copilot/fix-update-log-retrieval

Conversation

Copilot AI commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

AddListenerUpdatePrecheck received update version metadata without UpdateLog, even when the server response included updateLog. The field was lost while converting VersionEntry into DownloadAsset, then reconstructing VersionEntry for event dispatch.

  • Carry release notes through the download model

    • Added DownloadAsset.UpdateLog as an init-only property.
    • Preserves existing DownloadAsset constructor compatibility.
  • Preserve mappings across the update pipeline

    • HttpDownloadSource.MapVersionEntry now copies VersionEntry.UpdateLog.
    • ClientStrategy now copies DownloadAsset.UpdateLog when building UpdateInfoEventArgs.
  • Regression coverage

    • Covers VersionEntry → DownloadAsset mapping.
    • Covers ClientStrategy.ExecuteAsync precheck callback receiving UpdateLog.
var versionInfos = downloadPlan.Assets.Select(a => new VersionEntry
{
    Version = a.Version,
    UpdateLog = a.UpdateLog,
    // existing fields...
}).ToList();

Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with updating logs in AddListenerUpdatePrecheck Preserve update logs in precheck update info Sep 6, 2026
Copilot AI requested a review from JusterZhu September 6, 2026 14:22
@JusterZhu
JusterZhu marked this pull request as ready for review September 19, 2026 13:08
Copilot AI lite review requested due to automatic review settings September 19, 2026 13:08
@JusterZhu JusterZhu added the bug Something isn't working label Sep 19, 2026

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.

Copilot review overview

🟢 Approval recommended

All reviewed changes are covered and no unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Preserves server-provided UpdateLog metadata through download mapping and precheck callbacks.

Changes:

  • Adds DownloadAsset.UpdateLog.
  • Propagates logs through HTTP mapping and ClientStrategy.
  • Adds regression coverage.
File Description
tests/​CoreTest/​Strategy/​ClientStrategyUpdateLogTests.cs Tests precheck log delivery.
tests/​CoreTest/​Download/​Sources/​HttpDownloadSourceTests.cs Tests mapping preservation.
tests/​CoreTest/​Download/​DownloadModelsTests.cs Tests property defaults and assignment.
src/​GeneralUpdate.Core/​Strategy/​ClientStrategy.cs Includes logs in update events.
src/​GeneralUpdate.Core/​Download/​Sources/​HttpDownloadSource.cs Maps VersionEntry.UpdateLog.
src/​GeneralUpdate.Core/​Download/​Models/​DownloadAsset.cs Adds release-note metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JusterZhu
JusterZhu merged commit f123f03 into master Sep 19, 2026
4 checks passed
@JusterZhu
JusterZhu deleted the copilot/fix-update-log-retrieval branch September 19, 2026 13:30
@JusterZhu
JusterZhu restored the copilot/fix-update-log-retrieval branch September 19, 2026 13:30
@JusterZhu
JusterZhu deleted the copilot/fix-update-log-retrieval branch September 19, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ERROR] AddListenerUpdatePrecheck中updateInfo拿不到UpdateLog,UpdateLog为空

3 participants