Skip to content

fix(headers): preserve original year when normalizing headers#285

Merged
mpaulosky merged 1 commit into
devfrom
squad/284-normalize-copyright-header-updates
May 10, 2026
Merged

fix(headers): preserve original year when normalizing headers#285
mpaulosky merged 1 commit into
devfrom
squad/284-normalize-copyright-header-updates

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

  • preserve the original copyright year when normalizing an existing header block
  • collapse duplicate top-of-file copyright headers into one canonical header
  • document the year-preservation rule in the header update prompt

Validation

  • dotnet build MyBlog.slnx --configuration Release --no-restore
  • dotnet test tests/Architecture.Tests/Architecture.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Domain.Tests/Domain.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Web.Tests/Web.Tests.csproj --configuration Release --no-build
  • dotnet test tests/Web.Tests.Bunit/Web.Tests.Bunit.csproj --configuration Release --no-build
  • dotnet test tests/Web.Tests.Integration/Web.Tests.Integration.csproj --configuration Release --no-build
  • dotnet test tests/AppHost.Tests/AppHost.Tests.csproj --configuration Release --no-build

Closes #284

Copilot AI review requested due to automatic review settings May 10, 2026 21:03
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label May 10, 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.

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

This PR updates the copyright-header normalization workflow to preserve the original/earliest year when an existing top-of-file header is present, and removes duplicate header blocks so each file ends up with exactly one canonical header.

Changes:

  • Preserved the original (earliest) copyright year when normalizing an existing header.
  • Collapsed duplicate top-of-file header blocks down to one canonical header.
  • Updated the header-update agent prompt to document the year-preservation and de-duplication rules.

Reviewed changes

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

File Description
src/Domain/Abstractions/Result.cs Collapses duplicate header blocks and keeps the earliest year (2025) in the canonical header.
.github/prompts/copyright-header-update-prompt.md Documents the updated normalization rules (preserve earliest year, collapse duplicates).

5. Validate that the header is present, correctly formatted, and at the top of each file after editing.
2. For each file, check for one or more existing header-like comment blocks at the very first line.
3. If one or more header blocks exist, treat the entire leading header region as a single unit: preserve the original/earliest copyright year already present, normalize the metadata to the canonical format, and replace the region with exactly one header block.
4. If no header exists, insert the new header at the very first line of the file, with every line C# line commented (start with `//`). When there is no existing year to preserve, use the file's creation year.
## Plan

This plan details how to review and update copyright headers in C# files, supporting both single-file and solution-wide operations. It ensures every file has the correct header, updating or inserting as needed.
This plan details how to review and update copyright headers in C# files, supporting both single-file and solution-wide operations. It ensures every file has the correct header, preserves the original/earliest existing copyright year when normalizing an existing header, and collapses duplicate header blocks into one canonical header.
@github-actions

github-actions Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

Test Results Summary

341 tests  ±0   340 ✅ ±0   19s ⏱️ ±0s
  6 suites ±0     1 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit d3beb06. ± Comparison against base commit 7c1fea2.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.21%. Comparing base (80a2ef1) to head (b17768e).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #285   +/-   ##
=======================================
  Coverage   86.21%   86.21%           
=======================================
  Files          44       44           
  Lines        1103     1103           
  Branches      132      132           
=======================================
  Hits          951      951           
  Misses        100      100           
  Partials       52       52           
Files with missing lines Coverage Δ
src/Domain/Abstractions/Result.cs 80.55% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mpaulosky

Copy link
Copy Markdown
Owner Author

Tracking this shared blocker in #286. Both #283 and #285 are red on AppHost.Tests (Aspire + Playwright E2E) due to SeedMyBlogData Concurrent Invocations Allow Only One Run, and current triage treats it as shared AppHost/test instability rather than a PR-local regression.

@mpaulosky
mpaulosky force-pushed the squad/284-normalize-copyright-header-updates branch from d3beb06 to b17768e Compare May 10, 2026 22:49
@mpaulosky
mpaulosky enabled auto-merge (squash) May 10, 2026 22:50
@mpaulosky
mpaulosky merged commit f680a57 into dev May 10, 2026
12 checks passed
@mpaulosky
mpaulosky deleted the squad/284-normalize-copyright-header-updates branch May 10, 2026 22:51
mpaulosky pushed a commit that referenced this pull request May 11, 2026
- Issue #286 (ci-failure) resolved: PRs #283, #285 merged with AppHost.Tests fix
- Issue #287 triaged to squad:boromir; PR #288 awaiting CI re-run
- Issues #289 (PR #290) and #276 (PR #277) ready for review; all tests passing
- Board state: 3 open issues, 5 open PRs; final state documented

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

[Sprint 19] normalize copyright header updates to preserve original year

2 participants