Skip to content

Determine JsonReporter file extension per report - #1984

Open
waldekmastykarz wants to merge 1 commit into
dotnet:mainfrom
waldekmastykarz:fix-1965-jsonreporter-extension
Open

waldekmastykarz wants to merge 1 commit into
dotnet:mainfrom
waldekmastykarz:fix-1965-jsonreporter-extension

Conversation

@waldekmastykarz

Copy link
Copy Markdown
Collaborator

JsonReporter stored the report file extension in a field that was set to .jsonc by the UrlDiscovery report and never reset, so JSON reports written after it also got the .jsonc extension. The extension is now reset to .json for each report.

Adds a test verifying the extension is determined per report.

Closes #1965

Reset the file extension to .json for each report so that the .jsonc
extension of the UrlDiscovery report doesn't leak into subsequent reports.

Closes dotnet#1965

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 54b42df4-1c9b-48e8-b160-86954c55ede8
@waldekmastykarz
waldekmastykarz requested a review from a team as a code owner October 21, 2026 13:55
Copilot AI balanced review requested due to automatic review settings October 21, 2026 13:55

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.

🟢 Approval recommended

The focused fix addresses the reported defect with targeted regression coverage and no identified blocking issues.

No open issues 🎉

What changed in this PR

Fixes #1965 by determining JsonReporter’s file extension independently for each report.

Changes:

  • Resets the extension to .json before processing each report.
  • Adds regression coverage for a JSON report following a UrlDiscovery report.
File Description
DevProxy.Plugins/​Reporters/​JsonReporter.cs Resets the default extension per report.
DevProxy.Integration.Tests/​JsonReporterTests.cs Verifies .jsonc does not carry over to subsequent JSON reports.

Review effort: Balanced

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.

🟢 Approval recommended

The targeted reset fixes the extension leak, and the regression test covers the reported failure sequence.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

JsonReporter writes .jsonc for reports after a UrlDiscovery report

2 participants