Repository navigation
Consolidate artifact reparse point checks - #10632
Merged
Merged
Conversation
Move the fail-closed reparse-point detection used by report artifact post-processors into a shared linked helper so all report formats retain consistent safety behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ea064b28-6c4a-433f-9d0d-f5740d69d933
Contributor
There was a problem hiding this comment.
Pull request overview
Consolidates identical fail-closed reparse-point checks across the four artifact report processors.
Changes:
- Adds a shared
ArtifactPostProcessingHelper. - Source-links and adopts the helper in JUnit, CTRF, HTML, and TRX.
- Updates each assembly’s internal API baseline.
Show a summary per file
| File | Description |
|---|---|
SharedExtensionHelpers/ArtifactPostProcessingHelper.cs |
Defines the shared safety check. |
TrxReport/TrxArtifactPostProcessor.cs |
Uses the shared helper. |
TrxReport/Microsoft.Testing.Extensions.TrxReport.csproj |
Links the helper source. |
TrxReport/InternalAPI/InternalAPI.Unshipped.txt |
Records the internal API. |
JUnitReport/JUnitArtifactPostProcessor.cs |
Uses the shared helper. |
JUnitReport/Microsoft.Testing.Extensions.JUnitReport.csproj |
Links the helper source. |
JUnitReport/InternalAPI/InternalAPI.Unshipped.txt |
Records the internal API. |
HtmlReport/HtmlArtifactPostProcessor.cs |
Uses the shared helper. |
HtmlReport/Microsoft.Testing.Extensions.HtmlReport.csproj |
Links the helper source. |
HtmlReport/InternalAPI/InternalAPI.Unshipped.txt |
Records the internal API. |
CtrfReport/CtrfArtifactPostProcessor.cs |
Uses the shared helper. |
CtrfReport/Microsoft.Testing.Extensions.CtrfReport.csproj |
Links the helper source. |
CtrfReport/InternalAPI/InternalAPI.Unshipped.txt |
Records the internal API. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 13/13 changed files
- Comments generated: 0
- Review effort level: Balanced
Amaury Levé (Evangelink)
enabled auto-merge (squash)
August 18, 2026 10:24
Petr Pokorny (0101)
approved these changes
Aug 18, 2026
Contributor
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
Review Summary
Clean deduplication refactor — extracts an identical IsReparsePoint helper from 4 artifact post-processors into a shared ArtifactPostProcessingHelper class. No behavioral change, no public API impact.
| # | Dimension | Verdict |
|---|---|---|
| 1 | Algorithmic Correctness | ✅ N/A — logic unchanged |
| 2 | Performance | ✅ N/A |
| 3 | Thread Safety | ✅ N/A — stateless static |
| 4 | Resource Management | ✅ N/A |
| 5 | Error Handling | ✅ Preserved |
| 6 | API Design | ✅ Internal only, correct |
| 7 | Backward Compatibility | ✅ No breaking change |
| 8 | Cross-TFM | ✅ File.GetAttributes available on all targets |
| 9 | Security | ✅ Reparse-point guard preserved |
| 10 | Localization | ✅ N/A |
| 11 | Testing | ✅ N/A — no new behavior |
| 12 | Naming & Style | ✅ Consistent |
| 13 | Documentation | ✅ XML doc retained |
| 14 | Public API Surface | ✅ Internal only; InternalAPI.Unshipped.txt updated |
| 15 | Build Integration | ✅ Compile includes added correctly |
| 16 | IPC Contracts | ✅ N/A |
| 17 | Observability | ✅ N/A |
| 18 | Disposal & Lifetime | ✅ N/A |
| 19 | Configuration | ✅ N/A |
| 20 | Extensibility | ✅ N/A |
| 21 | Scope Discipline | ✅ Single concern |
| 22 | Follow-up Tracking | ✅ N/A |
Verdict: No issues found. This is a straightforward DRY refactor with no risk. LGTM.
3 tasks
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.
The JUnit, CTRF, HTML, and TRX artifact post-processors duplicated the same fail-closed reparse-point safety check, making future fixes prone to diverging across report formats.
This extracts the check into
ArtifactPostProcessingHelperunderSharedExtensionHelpersand source-links it into each report extension. The existing format-specific input ordering remains unchanged, and each assembly's internal API baseline now includes the shared helper.Tests:
Microsoft.Testing.Extensions.UnitTests(4,200 passed, 24 skipped)Closes #10601