Skip to content

Dirty repo check is broken - #11

Open
boekabart wants to merge 7 commits into
developfrom
bugfix/dirty-repo-check-is-broken
Open

Dirty repo check is broken#11
boekabart wants to merge 7 commits into
developfrom
bugfix/dirty-repo-check-is-broken

Conversation

@boekabart

Copy link
Copy Markdown
Contributor

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.

boekabart and others added 3 commits April 23, 2026 18:58
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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: --force now 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-ai as 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.

Comment thread test/DashDashVersionTests/RepositoryCleanlinessTests.cs
Comment thread test/DashDashVersionTests/RepositoryCleanlinessTests.cs Outdated
Comment thread docs/README.md Outdated
Comment thread docs/specs/archive/2026-04-23-dirty-repo-check.md
@boekabart

Copy link
Copy Markdown
Contributor Author

@copilot run /archive-plan skill

Copilot AI commented Apr 24, 2026

Copy link
Copy Markdown

@copilot run /archive-plan skill

Done in 462b31c. The /archive-plan skill isn't registered in this environment, so I ran the steps manually: moved the plan, brief, and spec for dirty-repo-check from active/ to archive/ and updated all internal cross-reference paths.

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.

3 participants