Skip to content

Conversation

@samtrion
Copy link
Member

@samtrion samtrion commented Nov 28, 2025

Summary by CodeRabbit

  • Chores

    • Updated library to support .NET 10.0 and discontinued support for .NET 6.0
  • Tests

    • Expanded unit test coverage for type conversion and transformation functionality, including edge cases for value types, reference types, nullable handling, and cross-framework compatibility

✏️ Tip: You can customize this high-level summary in your review settings.

@samtrion samtrion self-assigned this Nov 28, 2025
@samtrion samtrion requested a review from a team as a code owner November 28, 2025 14:59
@samtrion samtrion added the state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai label Nov 28, 2025
@samtrion samtrion requested review from Spacemonkay and removed request for a team November 28, 2025 14:59
@samtrion samtrion added the type:feature Indicates a new feature or enhancement to be added. label Nov 28, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

Walkthrough

Updates project target frameworks to net8.0, net9.0, and net10.0 (removing net6.0), adds a GitHub Actions workflow for NuGet package publishing, removes GitVersion build configuration, and adds unit tests for Ensure context conversions.

Changes

Cohort / File(s) Change Summary
NuGet Publishing Automation
.github/workflows/publish-nuget.yml
New GitHub Actions workflow that publishes NuGet packages by invoking a reusable workflow from dailydevops/pipelines. Triggers on CI completion for the main branch, excludes dependabot and renovate actors, and configures permissions and concurrency settings.
Target Framework Updates
src/NetEvolve.Guard/NetEvolve.Guard.csproj, tests/NetEvolve.Guard.Tests.Unit/NetEvolve.Guard.Tests.Unit.csproj
Updated TargetFrameworks in both project files from net6.0;net8.0;net9.0 to net8.0;net9.0;net10.0, removing net6.0 support and adding net10.0 support.
Build Configuration
Directory.Build.props
Removed GitVersion workaround property group that set GitVersionTargetFramework to net8.0, resulting in an empty MSBuild project props file with only the root <Project> element.
Unit Tests
tests/NetEvolve.Guard.Tests.Unit/EnsureContextTests.cs
Added comprehensive unit tests for Ensure.That(...).ToT() and implicit conversions covering value types (int, decimal, double, bool, DateTime, Guid), reference types (string, object), nullable types, and complex object equality scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • .github/workflows/publish-nuget.yml – Review trigger conditions, permission model, and input parameter mapping to ensure secure artifact publishing
  • EnsureContextTests.cs – Verify test coverage completeness across all type scenarios and validate implicit conversion logic

Poem

🐰 The frameworks march forward to ten,
While six hops away to the past,
Our secrets now published with zen,
Tests sprouting to make the code last,
From net to the future, so vast! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main changes: adding .NET 10 support and dropping .NET 6 support, which aligns with the primary objectives of updating target frameworks across the codebase.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/dotnet-10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (880be7a) to head (51e3136).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #497      +/-   ##
===========================================
+ Coverage   99.77%   100.00%   +0.22%     
===========================================
  Files         162        57     -105     
  Lines         437       178     -259     
  Branches       82        33      -49     
===========================================
- Hits          436       178     -258     
+ Misses          1         0       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/NetEvolve.Guard.Tests.Unit/EnsureContextTests.cs (1)

1-160: New EnsureContext tests give strong coverage for ToT() and implicit conversions.

The suite hits value types, nullable value types (both null and non-null), reference types (including null and a simple complex object), plus the implicit conversion operator, which is exactly what tends to regress here. The structure is clear and easy to extend; if you ever want to reduce repetition you could consolidate some of the scalar cases into parameterized tests, but that’s purely optional.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 880be7a and 51e3136.

📒 Files selected for processing (5)
  • .github/workflows/publish-nuget.yml (1 hunks)
  • Directory.Build.props (1 hunks)
  • src/NetEvolve.Guard/NetEvolve.Guard.csproj (1 hunks)
  • tests/NetEvolve.Guard.Tests.Unit/EnsureContextTests.cs (1 hunks)
  • tests/NetEvolve.Guard.Tests.Unit/NetEvolve.Guard.Tests.Unit.csproj (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/NetEvolve.Guard.Tests.Unit/EnsureContextTests.cs (1)
src/NetEvolve.Guard/Ensure.cs (1)
  • Ensure (11-78)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build & Tests / Build Solution / Build .NET solution
🔇 Additional comments (3)
.github/workflows/publish-nuget.yml (1)

1-27: Workflow-based NuGet publish wiring looks solid; please verify artifact/input assumptions.

Triggering on workflow_run of the CI workflow and gating on conclusion == 'success' with bot exclusions is a good pattern, and the permissions/concurrency setup looks reasonable for a publish workflow.

The only things I’d suggest double‑checking are:

  • That the CI workflow actually uploads artifacts named release-packages-* so the artifactPattern matches.
  • That publish-nuget.yml@1.2.27 in dailydevops/pipelines still expects the same input names (workflowName, artifactPattern, environment, runId) and doesn’t require additional permissions (for example id-token: write).
tests/NetEvolve.Guard.Tests.Unit/NetEvolve.Guard.Tests.Unit.csproj (1)

1-12: Test project TFMs are aligned with the library; change looks good.

Targeting net8.0;net9.0;net10.0 here matches the main NetEvolve.Guard project’s TFMs and the PR’s goal of dropping net6.0. Just make sure your CI/build agents have the corresponding SDKs installed so all target frameworks are actually exercised.

src/NetEvolve.Guard/NetEvolve.Guard.csproj (1)

3-15: TFM update (drop net6, add net10) matches the intended breaking change.

Having netstandard2.0;net8.0;net9.0;net10.0 here is consistent with the tests and with the “feat!: .NET 10 Support, Dropped .NET 6” intent. From a project file perspective this looks good; just ensure your release notes and NuGet package documentation clearly advertise the new supported frameworks and the dropped net6.0 target.

@samtrion samtrion merged commit f03dd83 into main Nov 28, 2025
12 checks passed
@samtrion samtrion deleted the feature/dotnet-10 branch November 28, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:feature Indicates a new feature or enhancement to be added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants