Dirty repo check is broken - #11
Open
boekabart wants to merge 7 commits into
Open
Conversation
Program.cs passed optionForce.HasValue() directly as checkIfRepoIsClean, so --force enabled the check and omitting it silently skipped it. Fix negates the value so --force correctly bypasses the check. Adds RepositoryCleanlinessTests with three integration tests against real git repositories covering unstaged changes, staged changes, and the --force override. Includes brief, spec, and plan for the investigation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add two process-level tests that invoke git-flow-version directly, ensuring the --force flag mapping in Program.cs is covered. Add ProjectReference to git-flow-version so dotnet test keeps the CLI binary current without a separate build step. Also resolves review change requests: correct the Phase 2 plan checkbox that recorded a false TDD failure, tick rule-compliance checkboxes, remove class summary comment, eliminate redundant GenerateVersionNumber call in force test, and drop what-comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes the git-flow-version CLI’s dirty-repo enforcement by correcting how --force is translated into the library’s checkIfRepoIsClean flag, and adds integration/e2e coverage to prevent regression. Also introduces the repo’s .ai documentation/rules scaffolding and related planning/spec docs.
Changes:
- Fix CLI boolean inversion:
--forcenow correctly disables the “repo must be clean” check. - Add integration tests that create real temporary git repositories (staged/unstaged) and validate both library and CLI behavior.
- Add docs (brief/spec/plan + index) and include
dot-aias a submodule for agent/rules tooling.
Reviewed changes
Copilot reviewed 35 out of 44 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/DashDashVersionTests/RepositoryCleanlinessTests.cs | Adds real-repo integration tests for cleanliness enforcement (library + CLI). |
| test/DashDashVersionTests/DashDashVersionTests.csproj | References the CLI project so it can be exercised by tests. |
| src/git-flow-version/Program.cs | Fixes --force inversion when calling GenerateVersionNumber. |
| docs/specs/archive/.gitkeep | Adds archive placeholder for specs. |
| docs/specs/active/2026-04-23-dirty-repo-check.md | Adds spec documenting the dirty-repo fix and testing strategy. |
| docs/specs/active/.gitkeep | Adds active placeholder for specs. |
| docs/plans/archive/.gitkeep | Adds archive placeholder for plans. |
| docs/plans/active/2026-04-23-dirty-repo-check.md | Adds implementation plan and notes for the fix. |
| docs/plans/active/.gitkeep | Adds active placeholder for plans. |
| docs/decisions/.gitkeep | Adds placeholder for ADRs/decisions. |
| docs/briefs/archive/.gitkeep | Adds archive placeholder for briefs. |
| docs/briefs/active/2026-04-23-dirty-repo-check.md | Adds brief describing the problem, scope, and acceptance criteria. |
| docs/briefs/active/.gitkeep | Adds active placeholder for briefs. |
| docs/README.md | Adds generated docs dashboard/index. |
| .gitmodules | Adds dot-ai submodule at .ai. |
| .ai-local/rules/.gitkeep | Adds placeholder for project-local rules. |
| .ai-local/project.yaml | Adds agent manifest to load global + dotnet stack rules and local overrides. |
| .ai-local/overrides/.gitkeep | Adds placeholder for local overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/HighTech-Innovators/DashDashVersion/sessions/a6b364d5-a49c-4038-aa95-398d3c6f40d6 Co-authored-by: boekabart <3244401+boekabart@users.noreply.github.com>
…hard-coding Debug/net8 Agent-Logs-Url: https://github.com/HighTech-Innovators/DashDashVersion/sessions/667d05b0-0d7f-4634-9c00-00bddb23618e Co-authored-by: boekabart <3244401+boekabart@users.noreply.github.com>
… in assertion messages Agent-Logs-Url: https://github.com/HighTech-Innovators/DashDashVersion/sessions/b24b1626-7548-45f0-ac01-4d98240e1d5b Co-authored-by: boekabart <3244401+boekabart@users.noreply.github.com>
Contributor
Author
|
@copilot run /archive-plan skill |
Agent-Logs-Url: https://github.com/HighTech-Innovators/DashDashVersion/sessions/be876cff-cc47-4a9d-bef9-d8553e37b563 Co-authored-by: boekabart <3244401+boekabart@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We passed the --force flag 'inverted' to the actual logic. Fixed and added e2e cli tests.
Collateral damage: we added dot-ai to the project.