Observed Behavior
Commit 21941c3 added GitCLI.list_worktrees(), GitCLI.delete_branch(), and GitCLI.get_branch_head(). While get_branch_head was provided with a unit test in tests/test_git.py, neither list_worktrees nor delete_branch have any unit tests. The porcelain parsing logic in list_worktrees (parsing worktree , branch , bare) is completely untested by direct unit tests.
Expected Behavior
All public methods on GitCLI should have comprehensive unit tests covering regular operation, flags, and edge cases in accordance with the project testing standards.
Steps to Reproduce
- Inspect
tests/test_git.py:124-136.
- Notice
test_get_branch_head exists, but there are no tests for list_worktrees or delete_branch.
Minimal Reproduction Environment / Conditions
- Version / Branch / Commit:
release-v0.5.x@6d07c0c
- Component:
tests/test_git.py
Deliverables & Testing Requirements
- Add
test_list_worktrees in tests/test_git.py testing:
- Standard linked worktrees with branch refs (
refs/heads/...)
- Detached HEAD worktrees (
branch is None)
- Bare repository entries (
is_bare is True)
- Add
test_delete_branch in tests/test_git.py testing:
force=False passes -d
force=True passes -D
- Regression Safety: All tests must execute cleanly under
pytest.
Technical Pointers & Root Cause Clues
- Suspected Components:
src/treefort/git.py:73-90, tests/test_git.py
- Related Commits:
21941c3 (Add list_worktrees, delete_branch, and get_branch_head GIT helpers)
Notes & Edge Cases
- Test naming and structure should adhere to
.aiassistant/rules/tests.md.
Metadata
Severity / Priority: P2 (Medium)
Area: testing, git
AI Usage
Drafted with Gemini following the DEEP framework based on code review findings against release-v0.5.x. Reproduction conditions and code references were verified in the codebase.
Observed Behavior
Commit
21941c3addedGitCLI.list_worktrees(),GitCLI.delete_branch(), andGitCLI.get_branch_head(). Whileget_branch_headwas provided with a unit test intests/test_git.py, neitherlist_worktreesnordelete_branchhave any unit tests. The porcelain parsing logic inlist_worktrees(parsingworktree,branch,bare) is completely untested by direct unit tests.Expected Behavior
All public methods on
GitCLIshould have comprehensive unit tests covering regular operation, flags, and edge cases in accordance with the project testing standards.Steps to Reproduce
tests/test_git.py:124-136.test_get_branch_headexists, but there are no tests forlist_worktreesordelete_branch.Minimal Reproduction Environment / Conditions
release-v0.5.x@6d07c0ctests/test_git.pyDeliverables & Testing Requirements
test_list_worktreesintests/test_git.pytesting:refs/heads/...)branchisNone)is_bareisTrue)test_delete_branchintests/test_git.pytesting:force=Falsepasses-dforce=Truepasses-Dpytest.Technical Pointers & Root Cause Clues
src/treefort/git.py:73-90,tests/test_git.py21941c3(Add list_worktrees, delete_branch, and get_branch_head GIT helpers)Notes & Edge Cases
.aiassistant/rules/tests.md.Metadata
Severity / Priority: P2 (Medium)
Area:
testing,gitAI Usage
Drafted with Gemini following the DEEP framework based on code review findings against
release-v0.5.x. Reproduction conditions and code references were verified in the codebase.