Skip to content

#174 fix: detect parent git repositories for nova bump#176

Merged
stiwicourage merged 1 commit into
developfrom
bug/174-bug-nova-bump-should-detect-parent-git-repositories-for-version-inference
May 8, 2026
Merged

#174 fix: detect parent git repositories for nova bump#176
stiwicourage merged 1 commit into
developfrom
bug/174-bug-nova-bump-should-detect-parent-git-repositories-for-version-inference

Conversation

@stiwicourage
Copy link
Copy Markdown
Owner

Summary

  • nova bump and Update-NovaModuleVersion now resolve Git history through parent repositories instead of requiring .git directly inside the project root.
  • This fixes nested project folders that previously fell back to Patch | Commits: 0 even when reachable Git history contained commits such as feat!: that should drive a different semantic version bump.
  • Added regression coverage for both internal Git-history resolution and real standalone nova bump --what-if behavior from a nested project under a parent Git repository.
  • Updated CHANGELOG.md.
  • Closes [Bug]: nova bump should detect parent Git repositories for version inference #174

Affected area

  • nova CLI or command routing
  • Public PowerShell cmdlet behavior
  • Scaffolding or project.json handling
  • Build, test, analyzer, coverage, or CI helper flow
  • Package, raw upload, or package metadata workflow
  • Publish, release, or GitHub Actions automation
  • Self-update or notification preference behavior
  • Contributor documentation (README.md, CONTRIBUTING.md, repository workflow docs)
  • End-user docs (docs/*.html)
  • Command help (docs/NovaModuleTools/en-US/*.md)
  • src/resources/example/
  • Dependency or manifest changes (project.json, workflow dependencies, release tooling)
  • Security-sensitive change
  • Documentation-only change
  • Other

Review guidance

  • Start with src/private/release/GetGitCommitMessagesForVersionBump.ps1 and src/private/release/GetNovaVersionLabelForBump.ps1.
  • The key change is that bump inference now uses the shared Git adapter to test repository availability instead of checking only for ./.git.
  • Then review the regression coverage in:
    • tests/CoverageGaps.ReleaseInternals.Tests.ps1
    • tests/NovaCommandModel.StandaloneCli.Tests.ps1
  • Main files changed:
    • src/private/release/
    • tests/
    • CHANGELOG.md
  • Trade-off: this makes Nova align with Git’s own repository resolution model, which is more intuitive for nested project layouts. No public API shape changed.

Validation

  • Invoke-NovaBuild
  • Test-NovaBuild
  • ./scripts/build/Invoke-ScriptAnalyzerCI.ps1
  • ./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1
  • Targeted Nova workflow validated (% nova build, % nova test, % nova merge, % nova deploy, % nova publish, % nova release, % nova update, % nova notification, or % nova init as relevant)
  • Docs/example only; executable validation not needed

Validation notes:

Ran:
- ./run.ps1
- Invoke-NovaBuild
- Invoke-Pester ./tests/CoverageGaps.ReleaseInternals.Tests.ps1 -Output Detailed
- Invoke-Pester ./tests/NovaCommandModel.StandaloneCli.Tests.ps1 -Output Detailed
- git diff --check

Result:
- PSScriptAnalyzer: no findings
- Full test suite passed through ./run.ps1
- Targeted nested-project bump tests passed
- git diff --check passed
- CodeScene pre-commit safeguard passed

Scenario exercised:
- nested project without local .git under a parent Git repository
- nova bump --what-if now infers the bump from parent-repo commit history instead of falling back to Patch

Documentation and release follow-up

  • README.md reviewed and updated if contributor workflow, architecture, CI, release, or automation changed
  • CONTRIBUTING.md reviewed and updated if contribution expectations or review guidance changed
  • CHANGELOG.md reviewed and updated if the change matters to users, maintainers, or contributors
  • docs/NovaModuleTools/en-US/ help updated if a public command or CLI behavior changed
  • docs/*.html updated if end-user workflows or examples changed
  • src/resources/example/ reviewed and updated if the real-world project layout, package model, or upload workflow changed
  • No documentation, changelog, or example updates were needed

Maintainability, compatibility, and risk

  • Code Health / maintainability impact considered
  • No breaking change
  • Breaking change
  • Security-sensitive change
  • CI, workflow, or release-pipeline impact
  • Dependency-review impact

Risk, rollout, or rollback notes:

 Low risk.
 
 The change narrows incorrect fallback behavior and aligns Nova with Git's normal repository resolution model.
 Nested project folders now behave the way users already expect from git status / git log.
 
 Rollback is straightforward because the change is isolated to bump-time Git detection and test coverage.
 No dependency, packaging, or public parameter changes were introduced.

[!IMPORTANT] Do not use a public pull request to disclose a vulnerability before coordinated handling. Use the private reporting path in SECURITY.md for new security issues.

 Make nova bump and Update-NovaModuleVersion resolve Git history from
 parent repositories, so nested project folders infer the correct
 semantic version instead of falling back to Patch with Commits: 0.

 Add regression coverage for nested project bump inference and update the
 changelog.

 Closes #174
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

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

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

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

Code Coverage Gates Passed
Overall Coverage: 100.0% (required = 95%)
New & Changed Code Coverage: 100% (required = 99%)

Review details by gate
  • Overall Coverage

    • Pass/Fail Reason:
      The overall coverage gate was checked for all code and meets the goal: 100.0% covered >= threshold = 95%
    • Action:
      You have 281 files with a sum of 2850 covered and 1 uncovered lines of code.
  • New & Changed Code Coverage

    • Pass/Fail Reason:
      New or changed code meets coverage goal: 100% covered >= threshold = 99%
    • Action:
      You modified 2 files, and covered 1 added/modified lines of code.

@stiwicourage stiwicourage merged commit 353a3b4 into develop May 8, 2026
15 checks passed
stiwicourage added a commit that referenced this pull request May 8, 2026
…178)

* chore: prepare develop for next prerelease

* fix: Nova's CI/CD test flow installed.

* fix: package.json is no longer used.

* Add changelog link and badge to README

Added a link to the 'Keep a Changelog' website and its badge.

* Add 'Keep a Changelog' badge to CONTRIBUTING.md

Added a badge for 'Keep a Changelog' to the contributing guidelines.

* Update CONTRIBUTING.md with additional badges

Added badges for changelog and code health to CONTRIBUTING.md

* Rearrange badges in CONTRIBUTING.md

Moved CodeScene Average Code Health badge to a new position.

* Update CONTRIBUTING.md with consolidated badges

Consolidate badge links into the contributing section.

* Refactor contributing section with badges

Updated the formatting of the contributing section and added badges for changelog, code coverage, and code health.

* Update README.md badge formatting

Reformatted README.md to improve badge layout.

* #174 fix: detect parent git repositories for nova bump (#176)

Make nova bump and Update-NovaModuleVersion resolve Git history from
 parent repositories, so nested project folders infer the correct
 semantic version instead of falling back to Patch with Commits: 0.

 Add regression coverage for nested project bump inference and update the
 changelog.

 Closes #174

* chore: prepare next prerelease version

* #175 fix: require explicit override for no-git bump fallback (#177)

Stop `nova bump` and `Update-NovaModuleVersion` from silently presenting
 `Patch | Commits: 0` when Git-based bump inference is unavailable.

 Add `-OverrideWarning` / `--override-warning` / `-o` as the explicit opt-in
 for intentional non-git Patch fallback flows, add regression coverage, and
 update bump docs and changelog.

 Closes #175

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@stiwicourage stiwicourage deleted the bug/174-bug-nova-bump-should-detect-parent-git-repositories-for-version-inference branch May 12, 2026 05:48
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.

[Bug]: nova bump should detect parent Git repositories for version inference

1 participant