Repository navigation
Resolve a Root Holding Several .NET Entries as a Unit Before Any Nested Solution - #4042
Conversation
…ed Solution Where the repository root tracked more than one solution or project and the style job asked for solutions, the dotnet-workspaces action named every nested solution and never the root's projects. A root holding two projects beside a nested solution therefore passed dotnet format style while skipping both root projects. The action now names only the root's own solutions there, and the projects where the root holds none, keeping nested solutions for a root that holds nothing. The exactly-one bare-call rule is unchanged. Adds two such layouts to the per-workspace test, both failing on the previous action. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ring The input description now limits the rule to a root holding more than one entry, and the docstring names the projects fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Caution Review failedThe pull request is closed.
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. |
There was a problem hiding this comment.
🟢 Approval recommended
The resolver now prioritizes complete root-level solution or project sets, preserves bare-call and nested-discovery behavior, and adds regression coverage for mixed workspace layouts.
No open issues 🎉
What changed in this PR
Updates the shared .NET workspace resolver so roots containing multiple solutions or projects are handled as a unit before nested workspaces are considered.
Changes:
- Select root-level solutions when
solutions: 'true'is enabled, falling back to the project pathspec when none exist. - Preserve exactly-one bare-call behavior and nested discovery only when the root has no entries.
- Add regression coverage for mixed root and nested workspace layouts.
- Clarify the test documentation to accurately describe root-level selection.
| File | Description |
|---|---|
| tests/test_release_guards.py | Adds regression layouts for multiple root projects or solutions alongside nested workspaces and documents the selection behavior. |
| .github/actions/dotnet-workspaces/action.yml | Updates workspace resolution to prioritize multiple root-level entries and documents the corresponding selection rule. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4042 +/- ##
========================================
Coverage 79.03% 79.03%
========================================
Files 37 37
Lines 12676 12676
========================================
Hits 10019 10019
Misses 2657 2657
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
Summary
Fixes the finding raised on promotion #4039 against
.github/actions/dotnet-workspaces/action.yml:40-46.Where the repository root tracked more than one
.sln,.slnxor.csprojand the caller asked for solutions, the action named every nested solution and never the root's own entries. A tree holdingApp.csproj,AppTests.csproj,sub/Tool.slnandsub/Tool.csprojresolved tosub/Tool.slnalone. So the lint job'sdotnet format stylepassed while skipping both root projects, a fail-open style check..github/actions/dotnet-workspaces/action.yml: a root holding more than one entry is now resolved as a unit. Withsolutions: 'true', it names only the root's own solutions. Where the root holds none, it falls back to theprojectspathspec, as before. Nested solutions are named only where the root holds nothing. Thesolutionsinput's description states the rule.solutions, is unchanged too, soWORKFLOW.mdD1.6, which describes only that step, still matches and is not edited.tests/test_release_guards.py: the per-workspace test gains two layouts, two root projects beside a nested solution and two root solutions beside a nested solution. Both fail on develop's action and pass on this one. The existing cases are kept.Closes on promotion: none
Verification
python -m unittest discover -s tests: all 3784 pass (11 skipped), run withtests/requirements.txtinstalled as CI does.action.ymlrestored, the two new layouts fail the style step's case and every other case passes.scripts/repo_gate.py: exit 0.scripts/docker_lint.py: success, 7 linters.introducedwording findings, the input description and the test docstring each stating the rule for every root rather than one holding more than one entry. Both are fixed in 5cc9352, and the second pass raised nothing.🤖 Generated with Claude Code