Skip to content

🥅 validate LocalResponse.ToString() - #438

Merged
ianardee merged 1 commit into
mainfrom
minor-fix
Sep 4, 2026
Merged

ianardee merged 1 commit into
mainfrom
minor-fix

Conversation

@ianardee

@ianardee ianardee commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The added test assertion matches the current BaseLocalResponse behavior (newline stripping via ReadLine()), and the remaining changes are non-functional refactors/documentation tweaks.

Pull request overview

This PR strengthens the LocalResponse test suite by explicitly validating the ToString() output normalization (line endings removal), and does a small documentation wording tweak in BaseLocalResponse.

Changes:

  • Add an assertion that LocalResponse.ToString() matches the original JSON with \r/\n removed (reflecting the canonicalization performed by BaseLocalResponse).
  • Refactor the V2 test to reuse a shared JSON path constant and reintroduce/relocate the buffer-based constructor test.
  • Minor XML-doc wording update for ReadToCleanUtf8Bytes.
File summaries
File Description
tests/Mindee.UnitTests/V2/Parsing/LocalResponseTest.cs Adds ToString() normalization assertion and refactors/reorders constructor-coverage tests.
src/Mindee/Parsing/BaseLocalResponse.cs Updates method summary wording (no behavioral change).
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The added assertions and minor refactors align with the current BaseLocalResponse behavior (line-ending removal + leaveOpen: true stream handling) and should be low-risk.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ianardee
ianardee merged commit e91fbe4 into main Sep 4, 2026
29 checks passed
@ianardee
ianardee deleted the minor-fix branch September 4, 2026 17:17
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.

2 participants