Skip to content

test: update CommitHash length assertion for SHA-256 support#4348

Closed
yaananth wants to merge 1 commit into
actions:mainfrom
yaananth:sha256/p2-build-constant-assertion
Closed

test: update CommitHash length assertion for SHA-256 support#4348
yaananth wants to merge 1 commit into
actions:mainfrom
yaananth:sha256/p2-build-constant-assertion

Conversation

@yaananth

Copy link
Copy Markdown
Contributor

Update ConstantGenerationL0 test to accept both 40-char (SHA-1) and 64-char (SHA-256) commit hashes. Add hex format validation.


Automated by project-board-agents-plugin via /project-board-agents:lead
Board: https://github.com/orgs/github/projects/24272/views/1
Item: [P2] Update runner build constant SHA length assertion

Allow CommitHash to be either 40 chars (SHA-1) or 64 chars (SHA-256).
Add hex format validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yaananth yaananth marked this pull request as ready for review April 28, 2026 17:37
@yaananth yaananth requested a review from a team as a code owner April 28, 2026 17:37
Copilot AI review requested due to automatic review settings April 28, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the ConstantGenerationL0 test to accommodate repositories using SHA-256 object IDs by accepting both SHA-1 and SHA-256 commit hash lengths, while also validating that the value is hex.

Changes:

  • Update the commit hash length assertion to allow 40 (SHA-1) or 64 (SHA-256) characters.
  • Add a regex assertion to ensure the commit hash is a hex string.
Show a summary per file
File Description
src/Test/L0/ConstantGenerationL0.cs Adjusts CommitHash assertions to support SHA-256 and validates hex format.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@yaananth

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #4347. The single ConstantGenerationL0 SHA-256 assertion change from this PR has been cherry-picked into #4347.

@yaananth yaananth closed this Apr 28, 2026
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.

2 participants