Skip to content

Add copyright headers to all source files and move misplaced headers before imports#976

Open
Copilot wants to merge 6 commits intomasterfrom
copilot/ensure-copyright-headers
Open

Add copyright headers to all source files and move misplaced headers before imports#976
Copilot wants to merge 6 commits intomasterfrom
copilot/ensure-copyright-headers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Plan: Ensure Copyright Headers are Present Before Imports in All Source Files

  • Identify all files with missing or misplaced copyright headers (567 files total)
    • 32 files with misplaced headers (copyright after imports)
    • 535 files with missing headers
  • Create automated script to fix copyright header placement
  • Fix the 32 files with misplaced copyright headers (move copyright before imports)
  • Add copyright headers to the 535 files with missing headers
  • Run tests to verify changes don't break functionality
    • Unit tests passed: 79 tests executed, all successful
    • Build completed successfully
  • Verify a sample of files to ensure proper formatting
  • Code review completed - no issues found
  • Security scan completed - no vulnerabilities found
  • Cherry-picked race condition fix commit from master
  • Merged latest master branch and resolved conflicts

Summary

Successfully added/fixed copyright headers in 567 TypeScript and JavaScript files across the repository. All source files now have the Microsoft copyright header as the first lines before any import statements, ensuring compliance with licensing and attribution requirements.

Merged the latest changes from master branch (commit 2ca191a), which included 6 new commits with code changes for repair tasks, infrastructure jobs, and type safety improvements. Resolved merge conflicts by accepting the incoming code changes and re-applying copyright headers to ensure they remain at the top of all modified files.

Cherry-picked commit 2ca191a "Fix race condition in selfreconfiguring partition reconfiguration test" from master branch, which fixes a flaky Cypress test by adding explicit waits for route intercepts and increasing timeout. This ensures the test suite remains stable with the copyright header changes.

Security Summary

No security vulnerabilities were introduced or discovered during this change. The CodeQL security scan found 0 alerts.

Original prompt

This section details on the original issue you should resolve

<issue_title>Ensure Copyright headers are present before imports in all source files</issue_title>
<issue_description>### Bug Description
Some source files in the repository have missing or misplaced copyright headers. In a few cases, the copyright comment block appears below import statements instead of at the very top of the file. This causes compliance and legal visibility issues.

Reproduction Steps

  • Open various TypeScript, JavaScript, or other code files in the repo.
  • Observe that in some files, the copyright header appears after one or more import statements (or is missing altogether).
  • Files should have the copyright header as the first top-level item, preceding any import statements.

Expected Behavior

  • Every .ts, .js, and relevant source file should have the copyright header (e.g., // Copyright (c) Microsoft Corporation. All rights reserved.) as the very first lines in the file.
  • No import (or require) statement should come before the header.

Impact

  • Affects license compliance and appropriate attribution in downstream/redistributed code.
    </issue_description>

<agent_instructions>run tests after changes</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@sridmad sridmad marked this pull request as ready for review January 12, 2026 21:23
Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure copyright headers are present before imports Add copyright headers to all source files and move misplaced headers before imports Jan 12, 2026
Copilot AI requested a review from sridmad January 12, 2026 21:38
@sridmad
Copy link
Copy Markdown
Member

sridmad commented Jan 23, 2026

@copilot pickup the latest master changes (use rebase)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot pickup the latest master changes (use rebase)

I've successfully rebased the branch onto the latest master (commit 2ca191a). However, the rebase rewrote the commit history which requires a force push to update the remote branch. The automated tooling doesn't support force pushing directly.

Could you please force push the rebased branch, or would you like me to use a different approach (such as merge instead of rebase)?

@sridmad
Copy link
Copy Markdown
Member

sridmad commented Jan 23, 2026

@copilot , can you try cherry picking the commit that addresses race in reconfig tests into base branch

#988)

* Initial plan

* Fix flaky Cypress test: add explicit waits for route intercepts and increase timeout

Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>

* Add refresh trigger to stabilize reconfiguration test

Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>

* Fix route alias names to properly override intercepts

Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>

* Fix formatting: add spaces after commas

Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot , can you try cherry picking the commit that addresses race in reconfig tests into base branch

Cherry-picked commit 2ca191a (Fix race condition in selfreconfiguring partition reconfiguration test) from master into this branch at commit d028ba1.

@sridmad
Copy link
Copy Markdown
Member

sridmad commented Jan 23, 2026

@copilot resolve conflicts

Copilot AI and others added 2 commits January 23, 2026 22:31
Co-authored-by: sridmad <7445097+sridmad@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot resolve conflicts

Resolved conflicts by merging latest master branch and re-applying copyright headers to all affected files. Fixed 9 files that were modified or added in the merge (commit 778b623).

Copy link
Copy Markdown
Member

@sridmad sridmad left a comment

Choose a reason for hiding this comment

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

looks good

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.

Ensure Copyright headers are present before imports in all source files

3 participants