Skip to content

Fix review feedback: MemoryPack test names, BoundingBox.Union version, CI internal PRs, nullable deserialization, per-arg quaternion exceptions#46

Merged
mrdav30 merged 3 commits intodevelopfrom
copilot/sub-pr-44-again
Mar 4, 2026
Merged

Fix review feedback: MemoryPack test names, BoundingBox.Union version, CI internal PRs, nullable deserialization, per-arg quaternion exceptions#46
mrdav30 merged 3 commits intodevelopfrom
copilot/sub-pr-44-again

Conversation

Copy link

Copilot AI commented Mar 4, 2026

Addresses a batch of review comments on the FixedMathSharp modernization PR.

Changes

  • Test method renames — All 12 serialization test methods still named *_MsgPack* renamed to *_MemoryPack* to match the actual serializer in use
  • BoundingBox.Union version fieldVersion was left as 0 in the object initializer; now set to Math.Max(a.Version, b.Version) to keep instances consistent with constructor-initialized boxes
  • FixedQuaternion.FromEulerAngles validation — Replaced single combined check (always blaming pitch) with three separate ArgumentOutOfRangeException throws, each with the correct paramName and actualValue:
    if (pitch < -FixedMath.PI || pitch > FixedMath.PI)
        throw new ArgumentOutOfRangeException(nameof(pitch), pitch, $"...");
    if (yaw < -FixedMath.PI || yaw > FixedMath.PI)
        throw new ArgumentOutOfRangeException(nameof(yaw), yaw, $"...");
    if (roll < -FixedMath.PI || roll > FixedMath.PI)
        throw new ArgumentOutOfRangeException(nameof(roll), roll, $"...");
  • FixedCurveTests null safety — Added Assert.NotNull after JsonSerializer.Deserialize<FixedCurve>() to handle the nullable return and give a clearer failure message
  • CI workflow — Removed the if guard that was skipping pull_request runs for branches within the same repo, restoring CI coverage on internal PRs

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…rkflow, null check, separate exceptions

Co-authored-by: mrdav30 <11547347+mrdav30@users.noreply.github.com>
Copilot AI changed the title [WIP] Update FixedMathSharp to support netstandard2.1 and MemoryPack Fix review feedback: MemoryPack test names, BoundingBox.Union version, CI internal PRs, nullable deserialization, per-arg quaternion exceptions Mar 4, 2026
@mrdav30 mrdav30 marked this pull request as ready for review March 4, 2026 05:15
Copilot AI review requested due to automatic review settings March 4, 2026 05:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses accumulated review feedback from the FixedMathSharp modernization work by aligning test naming with the active serializer, tightening validation error reporting, fixing a BoundingBox.Union initialization inconsistency, and restoring CI coverage for internal PRs.

Changes:

  • Renamed serialization tests from *_MsgPack* to *_MemoryPack* across the test suite.
  • Updated BoundingBox.Union to carry forward a non-zero Version consistent with constructor-initialized instances.
  • Improved FixedQuaternion.FromEulerAngles validation by throwing per-argument ArgumentOutOfRangeException with correct paramName/actualValue, and added a null assertion after JSON deserialization in FixedCurveTests.
  • Removed a workflow guard that prevented CI from running on non-fork internal PRs.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/FixedMathSharp.Tests/Vector3d.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Vector2d.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/FixedRange.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/FixedQuanternion.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/FixedCurveTests.cs Adds Assert.NotNull after JSON deserialize; renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Fixed64.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Fixed4x4.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Fixed3x3.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Bounds/BoundingSphere.Tests.cs Renames MemoryPack serialization test method.
tests/FixedMathSharp.Tests/Bounds/BoundingBox.Tests.cs Renames MemoryPack serialization tests (including mutability test).
tests/FixedMathSharp.Tests/Bounds/BoundingArea.Tests.cs Renames MemoryPack serialization test method.
src/FixedMathSharp/Numerics/FixedQuaternion.cs Splits Euler angle range validation into per-argument ArgumentOutOfRangeExceptions.
src/FixedMathSharp/Bounds/BoundingBox.cs Sets Version in Union result initializer.
.github/workflows/dotnet.yml Restores CI runs for internal PRs by removing the job if guard.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mrdav30 mrdav30 merged commit 9bcb1c6 into develop Mar 4, 2026
2 checks passed
@mrdav30 mrdav30 deleted the copilot/sub-pr-44-again branch March 4, 2026 05:43
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.

3 participants