Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Stage diagnostics misclassify custom-pipeline failures and cancellation, while an exception reporting the original failure can suppress the separate rollback-failure report.
3 open issues
What changed in this PR
This PR adds stage-specific failure diagnostics to the update flow, building on #541’s per-record routing. It preserves original exceptions locally while sending sanitized diagnostic fields through the existing JSON reporting contract.
Changes:
- Track failure stages and record identity across downloads, package processing, fallback, and rollback.
- Add optional diagnostic fields and suppress generic reports when per-record failures were produced.
- Document reporting limitations and add failure-flow and serialization compatibility tests.
| File | Description |
|---|---|
| tests/CoreTest/Strategy/FailureReportingTests.cs | Tests failure routing, fallback, rollback, and JSON compatibility. |
| src/GeneralUpdate.Core/Strategy/UpdateStrategy.cs | Suppresses generic reports after per-record package failures. |
| src/GeneralUpdate.Core/Strategy/ClientStrategy.cs | Emits original download errors and reports failures per record. |
| src/GeneralUpdate.Core/Strategy/AbstractStrategy.cs | Tracks package diagnostics and separate rollback failures. |
| src/GeneralUpdate.Core/Pipeline/PipelineContext.cs | Stores the pipeline failure category. |
| src/GeneralUpdate.Core/Pipeline/PipelineBuilder.cs | Classifies failures at built-in middleware boundaries. |
| src/GeneralUpdate.Core/Event/ExceptionEventArgs.cs | Adds record identity and category to local events. |
| src/GeneralUpdate.Core/Download/Reporting/IUpdateReporter.cs | Adds optional diagnostics and sanitized report construction. |
| src/GeneralUpdate.Core/Download/Orchestrators/DefaultDownloadOrchestrator.cs | Preserves verification errors and categorizes semaphore timeouts. |
| src/GeneralUpdate.Core/Download/Models/DownloadProgress.cs | Adds original exceptions and categories to download results. |
| src/GeneralUpdate.Core/Download/Executors/OssDownloadExecutor.cs | Preserves original OSS download exceptions. |
| src/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs | Preserves original HTTP download exceptions. |
| docs/core-execution-flow.md | Documents diagnostics, sanitization, and reporting limitations. |
Review effort: Balanced
| downloadResult.RetryCount, false, $"SHA256 verification failed: {ex.Message}") | ||
| { | ||
| Error = ex, | ||
| FailureCategory = Reporting.FailureCategory.Verify |
| { | ||
| await middleware.InvokeAsync(context); | ||
| } | ||
| catch |
Comment on lines
+315
to
+317
| await Reporter.ReportAsync(record.Value).ConfigureAwait(false); | ||
| if (rollbackFailures.Contains(record.Key)) | ||
| await Reporter.ReportAsync(FailureReports.Create(record.Key, _configinfo.ReportType, FailureCategory.Rollback)).ConfigureAwait(false); |
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Dependencies and limitations
Validation