Skip to content

feat: separate semantic version and commit count sources - #5199

Draft
arturcic wants to merge 1 commit into
GitTools:mainfrom
arturcic:codex/separate-version-sources
Draft

feat: separate semantic version and commit count sources#5199
arturcic wants to merge 1 commit into
GitTools:mainfrom
arturcic:codex/separate-version-sources

Conversation

@arturcic

@arturcic arturcic commented Sep 9, 2026

Copy link
Copy Markdown
Member

Description

Separate the semantic-version source from the commit used to count history. For example, configured next-version 5.0.0 can supply the semantic baseline while an older 1.0.0 tag remains the counting anchor. The new semantic SHA is null for configuration and branch-name sources.

Add SemVerSourceSemVer, SemVerSourceSha, SemVerSourceIncrement, CommitCountSourceSha, and CommitCountSourceDistance across JSON, custom formatting, generated version files, build-server output, and MSBuild. Preserve provenance through mainline reductions, merge messages, and alternative tag floors. Invalidate older caches and update documentation, snapshots, and the output schema.

Related Issue

Resolves #3041

Motivation and Context

The existing VersionSource* fields combine semantic provenance with counting metadata. Their values and the current version/count selection remain compatible; the five additive fields expose the two concepts explicitly.

How Has This Been Tested?

  • Local solution build: zero warnings and errors; formatting and diff checks passed.
  • Rebased onto main and preserved semantic tag provenance in the newly added release-tag fallback. Installed SDK 10.0.401 in a temporary directory: all 57 source and release-tracking tests passed, including a regression that failed before the fix. Focused formatting verification passed.
  • Final focused runs before rebase: 75 core tests, 128 output tests, and 16 MSBuild tests passed. A separate Release source run passed 25 cases.
  • Physical CLI checks confirm unchanged configured and branch-name versions, null external semantic SHA, independent counting anchor, dotenv outputs, and byte-identical fresh/cached JSON.
  • Output schema regenerated twice with identical results. The schema generator was invoked directly because PowerShell is unavailable and the Cake root detector does not support this worktree's .git file.
  • Initial full solution run: 37,455 of 37,475 passed. Snapshot/documentation expectations and one source-test expectation were corrected; a timing test passed in the final focused Debug rerun. All affected scopes subsequently passed. The full suite has not been repeated after those corrections.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed in a final full-suite run.

@arturcic
arturcic requested a lite review from Copilot September 9, 2026 20:31

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

🟡 Changes recommended

One or more issues must be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 68/68 changed files
  • Comments generated: 1
  • Review effort level: Lite

@arturcic
arturcic force-pushed the codex/separate-version-sources branch from b6c624b to d6f286a Compare September 9, 2026 21:07
@arturcic
arturcic requested a lite review from Copilot September 9, 2026 21:07

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

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.

[Improvement] Separate SemVerSource from CommitCountSource

2 participants