Skip to content

[Sprint 3] Add PRD-required build properties to Directory.Build.props#63

Merged
mpaulosky merged 2 commits into
sprint/3-mongodb-persistencefrom
squad/32-directory-build-props-prd-properties
Apr 20, 2026
Merged

[Sprint 3] Add PRD-required build properties to Directory.Build.props#63
mpaulosky merged 2 commits into
sprint/3-mongodb-persistencefrom
squad/32-directory-build-props-prd-properties

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Closes #32

Working as Sam (Backend Developer)

Adds the remaining PRD-required shared build properties to Directory.Build.props.

Changes

Property Value Reason
LangVersion latest Always use newest C# features
EnableNETAnalyzers true Enable .NET platform analyzers
AnalysisMode All Full analyzer rule coverage
EnforceCodeStyleInBuild true Enforce .editorconfig style at build time
CodeAnalysisTreatWarningsAsErrors false Analyzer diagnostics remain warnings; compiler errors still fail via TreatWarningsAsErrors=true

ManagePackageVersionsCentrally=true (PR #37) is not duplicated.

Acceptance Criteria

  • Directory.Build.props contains all PRD-required shared build properties
  • CodeAnalysisTreatWarningsAsErrors=false prevents analyzer rules from breaking CI
  • No individual .csproj overrides conflict with the new properties
  • dotnet build MyBlog.slnx --configuration Release passes (CI validates)

Closes #32

Add missing shared build properties per PRD requirements:
- LangVersion=latest — always use the latest C# language version
- EnableNETAnalyzers=true — enable .NET platform analyzers
- AnalysisMode=All — enable all analyzer rules
- EnforceCodeStyleInBuild=true — enforce .editorconfig code style at build time
- CodeAnalysisTreatWarningsAsErrors=false — allow analyzer diagnostics
  as warnings without failing CI (TreatWarningsAsErrors remains true for
  compiler errors)

ManagePackageVersionsCentrally=true was already added by PR #37 and lives
in Directory.Build.props; not duplicated here.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 19, 2026 20:59

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds the remaining PRD-required shared .NET build/analyzer properties to the repo-wide Directory.Build.props to standardize compiler/analyzer behavior across projects.

Changes:

  • Set LangVersion to latest
  • Enable .NET analyzers + full analysis mode (EnableNETAnalyzers=true, AnalysisMode=All)
  • Enforce code style at build time while keeping analyzer diagnostics as warnings (EnforceCodeStyleInBuild=true, CodeAnalysisTreatWarningsAsErrors=false)

Comment thread Directory.Build.props
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

LangVersion=latest can make builds non-reproducible across machines/CI agents because the effective language version changes when the .NET SDK updates. To keep the intent ('newest features') while reducing churn, consider pinning to latestMajor (or an explicit version) and/or ensuring the repo pins the SDK version (e.g., via global.json) so CI and dev boxes compile with the same compiler.

Copilot uses AI. Check for mistakes.
Comment thread Directory.Build.props
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Keep analyzer diagnostics as warnings so TreatWarningsAsErrors doesn't fail CI -->

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

This comment is slightly misleading: with TreatWarningsAsErrors=true, compiler warnings still fail the build, while CodeAnalysisTreatWarningsAsErrors=false is specifically about analyzer diagnostics. Consider rewording to make that distinction explicit (e.g., 'Keep analyzer diagnostics as warnings so analyzer warnings don't become errors under TreatWarningsAsErrors').

Copilot uses AI. Check for mistakes.
@mpaulosky

Copy link
Copy Markdown
Owner Author

🏛️ Aragorn — Architecture Review

Verdict: 🟡 CONDITIONAL APPROVE (needs build confirmation, then merge)


Gate Checklist

Gate Status Notes
Branch naming squad/* squad/32-directory-build-props-prd-properties
Closes #N link Closes #32
Conventional commit format Commit message is detailed and well-structured
CI green ⚠️ Only Copilot-agent checks ran; squad-test.yml does not trigger on sprint/** base branches — no build/test validation. Acceptance criterion dotnet build MyBlog.slnx --configuration Release is unchecked in the PR body.
No merge conflicts mergeable_state: clean
Tests authored N/A Build-properties-only change; no logic to test

Code Quality

The diff is minimal and correct (6 lines added to Directory.Build.props):

  • LangVersion=latest — correct placement, no conflicts
  • EnableNETAnalyzers=true + AnalysisMode=All — enables the full .NET analyzer suite
  • EnforceCodeStyleInBuild=true — will enforce .editorconfig rules at build time
  • CodeAnalysisTreatWarningsAsErrors=false — correctly decouples analyzer diagnostics from the TreatWarningsAsErrors=true compiler setting; CI will not fail on analyzer warnings
  • ManagePackageVersionsCentrally=true is NOT duplicated — noted correctly in the PR body

The comment <!-- Keep analyzer diagnostics as warnings so TreatWarningsAsErrors doesn't fail CI --> is well-placed and useful.

Risk: AnalysisMode=All activates a very broad set of rules. Depending on how clean the existing code is against all analyzer categories, this could surface a wave of new warnings. CodeAnalysisTreatWarningsAsErrors=false prevents CI failure, but the warnings will appear in every developer's build output going forward. Consider whether AnalysisMode=Recommended is a more measured starting point, or confirm the current codebase has zero new warnings under All.


⚠️ Blocking: Unverified Build

The acceptance criterion dotnet build MyBlog.slnx --configuration Release is unchecked. Since CI did not run (sprint/* base), this must be confirmed locally before merge. Please run the build and reply with pass/fail output (or check the box once confirmed locally).


Action: Run dotnet build MyBlog.slnx --configuration Release locally and confirm 0 errors. Once confirmed, this is approved for merge.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@mpaulosky

Copy link
Copy Markdown
Owner Author

Aragorn — PR Gate Review: CONDITIONAL APPROVE ✅

This PR is ready to merge pending ONE local verification step:

dotnet build MyBlog.slnx --configuration Release

Please confirm the build completes with 0 errors (warnings OK). Once verified locally, this can be merged.

Systemic note: squad-test.yml does not currently trigger on sprint/** base branches, so remote CI validation was skipped. A follow-up issue will add sprint branches to the CI trigger list. This does not block your merge.

@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Apr 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Summary
Generated on: 04/20/2026 - 16:10:16
Coverage date: 04/20/2026 - 16:09:40 - 04/20/2026 - 16:10:00
Parser: MultiReport (4x Cobertura)
Assemblies: 4
Classes: 51
Files: 50
Line coverage: 66.4% (556 of 837)
Covered lines: 556
Uncovered lines: 281
Coverable lines: 837
Total lines: 2525
Branch coverage: 66.5% (189 of 284)
Covered branches: 189
Total branches: 284
Method coverage: Feature is only available for sponsors
Tag: 70_24677114656

Coverage

AppHost - 0%
Name Line Branch
AppHost 0% ****
Program 0%
Domain - 87.2%
Name Line Branch
Domain 87.2% 91.6%
Domain.Abstractions.Result 95% 50%
Domain.Abstractions.Result`1 75% 50%
MyBlog.Domain.Behaviors.ValidationBehavior`2 100% 100%
MyBlog.Domain.Entities.BlogPost 100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
andHandler
100%
MyBlog.Domain.Features.BlogPosts.Commands.CreateBlogPost.CreateBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
andHandler
100%
MyBlog.Domain.Features.BlogPosts.Commands.DeleteBlogPost.DeleteBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
and
100%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
andHandler
100% 100%
MyBlog.Domain.Features.BlogPosts.Commands.UpdateBlogPost.UpdateBlogPostComm
andValidator
0%
MyBlog.Domain.Features.BlogPosts.Queries.GetAllBlogPosts.GetAllBlogPostsQue
ryHandler
100%
MyBlog.Domain.Features.BlogPosts.Queries.GetBlogPostById.GetBlogPostByIdQue
ry
100%
MyBlog.Domain.Features.BlogPosts.Queries.GetBlogPostById.GetBlogPostByIdQue
ryHandler
100% 100%
ServiceDefaults - 0%
Name Line Branch
ServiceDefaults 0% 0%
Microsoft.Extensions.Hosting.Extensions 0% 0%
Web - 68.7%
Name Line Branch
Web 68.7% 69%
MyBlog.Web.Components.Layout.MainLayout 100%
MyBlog.Web.Components.Layout.NavMenu 82.8% 71.4%
MyBlog.Web.Components.Pages.Error 100% 75%
MyBlog.Web.Components.Routes 0% 0%
MyBlog.Web.Components.Shared.RedirectToLogin 100%
MyBlog.Web.Data.BlogDbContext 100%
MyBlog.Web.Data.BlogPostDto 100%
MyBlog.Web.Data.BlogPostMappings 100%
MyBlog.Web.Data.MongoDbBlogPostRepository 100% 100%
MyBlog.Web.Features.BlogPosts.Create.Create 75% 50%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Delete.ConfirmDeleteDialog 100% 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Edit.Edit 88% 75%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostCommandValidator 100%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostHandler 84% 90%
MyBlog.Web.Features.BlogPosts.Edit.GetBlogPostByIdQuery 100%
MyBlog.Web.Features.BlogPosts.List.GetBlogPostsHandler 100% 100%
MyBlog.Web.Features.BlogPosts.List.Index 86.8% 84.6%
MyBlog.Web.Features.UserManagement.AssignRoleCommand 100%
MyBlog.Web.Features.UserManagement.ManageRoles 90.4% 75%
MyBlog.Web.Features.UserManagement.Profile 97.2% 82%
MyBlog.Web.Features.UserManagement.RemoveRoleCommand 100%
MyBlog.Web.Features.UserManagement.RoleDto 100%
MyBlog.Web.Features.UserManagement.UserManagementHandler 0% 0%
MyBlog.Web.Features.UserManagement.UserWithRolesDto 100%
MyBlog.Web.Security.RoleClaimsHelper 91.8% 91.1%
Program 0% 0%

@mpaulosky
mpaulosky merged commit c40bbb9 into sprint/3-mongodb-persistence Apr 20, 2026
7 checks passed
@mpaulosky
mpaulosky deleted the squad/32-directory-build-props-prd-properties branch April 20, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants