Uh oh!
There was an error while loading. Please reload this page.
Handle report merge directory creation failures - #10734
Conversation
Return no merged artifact when Trx or Ctrf cannot create the fixed output directory. Cover portable file collisions and dangling directory links while verifying input artifacts remain intact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 86687a11-fb1e-4b64-933a-7fbd6f5bcba3
🧵 Parallel-safety audit — PR #10734Parallelization — assemblies touched by this PR:
Findings: A (global-state) This PR adds four new Each new test:
No under-declaration, no near-miss keys, no over-serialization, and no config/opt-in change in this PR. Nothing to flag for parallel-safety. Advisory only — heuristic, non-blocking. Re-run with
|
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.
✅ 22/22 dimensions clean — no findings.
Summary: The PR correctly hardens Directory.CreateDirectory against IOException and UnauthorizedAccessException (e.g., when the "merged" path already exists as a file or as a dangling symlink). Returning null aligns with the existing never-fail-the-run invariant already documented in the TRX post-processor. Tests cover both the "path is a file" case (cross-platform) and the "dangling reparse point" case (NETCOREAPP-only, with appropriate Assert.Inconclusive guard). No threading, API surface, security, or flakiness concerns.
🧪 Expert test review — PR #10734
All four new tests properly wrap their This advisory comment was generated automatically. Grades are heuristic
|
There was a problem hiding this comment.
Pull request overview
Prevents TRX and CTRF report merging failures from failing test runs.
Changes:
- Handles directory creation failures by returning no merged artifact.
- Adds file-collision and dangling-symlink regression tests.
Show a summary per file
| File | Description |
|---|---|
TrxArtifactPostProcessor.cs | Handles expected filesystem exceptions. |
CtrfArtifactPostProcessor.cs | Handles expected filesystem exceptions. |
TrxArtifactPostProcessorTests.cs | Adds collision and dangling-link coverage. |
CtrfArtifactPostProcessorTests.cs | Adds collision and dangling-link coverage. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
Uh oh!
There was an error while loading. Please reload this page.
Trx and Ctrf artifact post-processors could throw when their fixed
mergedoutput directory could not be created, allowing a filesystem condition during post-processing to fail the test run contrary to RFC 018.This change handles
IOExceptionandUnauthorizedAccessExceptionconsistently with the HTML and JUnit processors by returning no merged artifact and preserving the inputs. It adds portable file-collision coverage plus dangling directory symlink regressions for both processors.The targeted project builds for net462, net472, net8.0, and net9.0, and all 21 Trx/Ctrf processor tests pass on net9.0.
Fixes#10733