Repository navigation
docs: explain version calculation and enforce source review - #5299
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Added in e6111ee9f: executable worked examples on the version-calculation page. Ten new test cases generate nine Mermaid histories covering competing configured/tag candidates, inherited Patch/Minor increments, equal-version ties, separate semantic and counting sources, and all three deployment modes. The examples assert full versions and source metadata. The tie case supplies controlled strategy candidates in both enumeration orders to isolate the timestamp selection rule; the other histories use normal strategy discovery. The generator now includes this sample family, and the maintenance guide and source-to-section map point to the new evidence. Validation:
These are representative checkpoints. The algorithm flowcharts remain manually authored and still require review when calculation rules change. CodeRabbit review was attempted but remains blocked by its organization-membership service error. |
|
@coderabbitai full review Please review the full current PR, including the documentation source-review guard and generated calculation examples. This draft is awaiting your review before it is marked ready. |
✅ Action performedFull review finished. |
|
Addressed the 18 Sonar annotations in All 13 checker tests pass, the existing source hashes still validate for all seven sections, and the diff check passes. The preceding running build is canceled before this push; CI and reviews will be checked again on the new head. |
There was a problem hiding this comment.
🔵 Needs a closer look
The extensive manually authored algorithm semantics require final domain-expert verification despite the strong automated safeguards.
0 open findings
What changed in this PR
Documents GitVersion’s version-calculation pipeline and adds safeguards that require algorithm documentation review when mapped implementation sources change.
Changes:
- Adds authored Mermaid flowcharts and test-generated examples.
- Adds source-to-section review manifests, validation, tests, and CI enforcement.
- Improves Mermaid validation, dark-theme rendering, navigation, and worktree detection.
| File | Description |
|---|---|
src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForVersionCalculation.cs |
Adds executable documentation scenarios. |
package.json |
Adds checker commands and JSDOM. |
package-lock.json |
Locks JSDOM dependencies. |
docs/version-calculation-map.json |
Maps documentation sections to sources. |
docs/scripts/validate-mermaid.mjs |
Initializes Mermaid with a DOM. |
docs/scripts/check-version-calculation.test.mjs |
Tests review enforcement. |
docs/scripts/check-version-calculation.mjs |
Implements source-review validation. |
docs/maintaining-version-calculation.md |
Documents the review workflow. |
docs/input/Shared/Sidebar/_ChildPages.cshtml |
Adds sidebar navigation. |
docs/input/docs/reference/version-sources.md |
Links the algorithm guide. |
docs/input/docs/learn/version-calculation.md |
Adds the algorithm documentation. |
docs/input/docs/learn/index.cshtml |
Adds the learning-page link. |
docs/input/docs/learn/how-it-works.md |
Links detailed calculation guidance. |
docs/input/assets/css/redesign.css |
Improves dark-theme Mermaid contrast. |
docs/diagrams/VersionCalculation_Strategies.mmd |
Diagrams strategy discovery. |
docs/diagrams/VersionCalculation_Selection.mmd |
Diagrams candidate selection. |
docs/diagrams/VersionCalculation_Overview.mmd |
Diagrams the overall pipeline. |
docs/diagrams/VersionCalculation_Mainline.mmd |
Diagrams Mainline traversal. |
docs/diagrams/VersionCalculation_Inheritance.mmd |
Diagrams branch inheritance. |
docs/diagrams/VersionCalculation_DeploymentModes.mmd |
Diagrams deployment modes. |
docs/diagrams/version-calculation.mmd |
Removes the legacy diagram. |
docs/diagrams/DocumentationSamplesForVersionCalculation_MergeMessageAndCountingSourceDiffer.mmd |
Adds merge-source example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_FeatureInheritsSourceIncrement_Patch.mmd |
Adds patch inheritance example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_FeatureInheritsSourceIncrement_Minor.mmd |
Adds minor inheritance example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_EqualCandidatesUseLatestSource.mmd |
Adds candidate tie example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_DeploymentModesProcessSameHistory_ManualDeployment.mmd |
Adds manual-mode example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_DeploymentModesProcessSameHistory_ContinuousDeployment.mmd |
Adds continuous-deployment example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_DeploymentModesProcessSameHistory_ContinuousDelivery.mmd |
Adds continuous-delivery example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_CompetingConfiguredAndTaggedVersions_TagWins.mmd |
Adds tag-winner example. |
docs/diagrams/DocumentationSamplesForVersionCalculation_CompetingConfiguredAndTaggedVersions_ConfigurationWins.mmd |
Adds configuration-winner example. |
build/docs/Utilities/Mermaid.cs |
Generates the new examples. |
build/common/Utilities/Extensions.cs |
Supports linked-worktree roots. |
.github/workflows/docs.yml |
Enforces review records in CI. |
.github/PULL_REQUEST_TEMPLATE.md |
Adds the review checklist item. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@coderabbitai full review Please review current head |
✅ Action performedFull review finished. |
|
@coderabbitai review Please review current head |
✅ Action performedReview finished.
|
|
Marked ready for review after validating current head
Copilot's request for domain-owner validation of the authored algorithm descriptions remains part of the normal human review. The PR closes #5300, assigned to milestone 7.0.x. |
83a9764 to
ce9f9e4
Compare
|
Rebased onto latest The four logical PR commits are preserved. Range-diff shows unchanged patches except removal of one extra blank line at EOF in the checker test file. Ancestry, whitespace, and worktree checks pass. Validation: 13 checker tests passed; seven algorithm review records verified; CI and hosted review are running on the rebased head; the previous green results apply to the pre-rebase head. |
|
Rebased head
No additional source changes, CI cancellations, or pushes were needed. The existing workflow/platform warnings and dependency scorecard advisories are non-blocking; CodeRabbit's generic docstring coverage advisory remains outside the repository's required gates. Copilot's request for human verification of the authored algorithm semantics remains part of normal review. The PR remains ready for review, closes #5300 in milestone 7.0.x, and has not been merged. Pausing the follow-up monitor now that the current-head checks and requested bot reviews are complete. |
906f850 to
53a35ba
Compare
5d7b52e to
ead8f75
Compare
|
Rebased onto latest Range-diff confirms all five PR commits are unchanged. All seven source-review records remain valid. Local checks passed: 13 checker tests, 58 documentation cases (0 failed, 0 skipped), 26 matching generated sources, and 32 valid Mermaid diagrams. Local CodeRabbit review of the committed diff against No old-head runs were active before the push. Fresh main CI and documentation CI are running; I am following their results on this exact head. |
|
Fixed the eight Mermaid CSS specificity findings in Mermaid embeds color rules scoped to generated SVG IDs, so class-only selectors previously needed Validation: full Verified superseded run 38715050331 completed as cancelled before pushing. Fresh CI is running on the new head. Copilot could not perform its requested rebased-head review because the requesting account has reached its quota. |
|
|
Rebase and CI follow-up complete at
Fresh Copilot review remains unavailable due to the requesting account's quota; hosted CodeRabbit is paused. These are not represented as completed current-head hosted reviews. The worktree is clean, the PR remains ready for review, and #5295 was not incorporated. Pausing the CI follow-up monitor. No merge performed. |
|
Thank you @arturcic for your contribution! |




















Updated by Codex on behalf of @arturcic.
Description
Closes #5300.
Explain the v7 version-calculation pipeline with six authored Mermaid flowcharts covering strategy discovery, inherited configuration, candidate selection and counting sources, Mainline traversal, and deployment modes. Add navigation and eleven test-generated histories, including nine new worked examples backed by ten test cases asserting versions and source metadata.
Require an explicit section review when mapped calculation sources change. Add a seven-section source manifest, a read-only checker, explicit review acknowledgements, contributor guidance, and CI enforcement. Fix Mermaid DOM initialization, linked-worktree root detection, and dark-theme diagram contrast; remove the unused legacy calculation diagram.
The source checker enforces review rather than proving prose or diagram semantics. Generated histories are representative executable checkpoints; broader algorithm tests remain the executable catalogue.
Validation and remaining work
Current PR head:
31a5d9c40a653b2067a6a3bf55be4d1a33106deb, rebased onto upstream main at5153cb1735862081ad0fdf10b51184f581d7cdc2.The conflict-free rebase preserved all five prior commits unchanged, verified with range-diff. The algorithm source-review guard still verifies all seven records. Follow-up commit
31a5d9c40resolves eight Mermaidcss:S9423findings by adding a stable content-wrapper ID and increasing selector specificity, removing the flagged!importantdeclarations while preserving both themes. This PR remains independent of #5295.Fresh validation for this exact head:
BuildDocspassed; 58 documentation cases passed, 0 failed, 0 skipped; all 26 generated Mermaid sources matched and all 32 diagrams validated. Checker tests: 13 passed, 0 failed, 0 skipped; all seven review records verified.#b1bac4and message text retains#f0f6fc; light-theme colors remain unchanged.git diff --check, upstream ancestry, and clean-worktree checks passed. Superseded run 38715050331 was fully cancelled before pushing the follow-up fix.Human approval and semantic review of the authored algorithm descriptions remain required. The PR is ready for review and has not been merged.