[PR #507] Expand unit test coverage across 10 task areas #523

Closed
opened 2026-03-02 04:13:52 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/507

State: closed
Merged: Yes


Summary

  • Added ~82 new unit tests across 7 source files, bringing the library test count from ~478 to 560
  • All 10 TaskMaster task areas completed: search helpers, LineRange::shift regressions, overlap/Ord, apply_filters, parse_time_spec, rebase args, accepted_lines, Codex TOML config, continue_session formatting, and post_commit edge cases
  • 1,297 lines of new test code (877 + 420)

Changes by file

File Tests Coverage
src/commands/search.rs +21 Search helpers, apply_filters, parse_time_spec, date math
src/commands/continue_session.rs +18 format_context_block, format_context_json, message handling, commit info, project context, git status, JSON output, diff truncation
src/commands/hooks/rebase_hooks.rs +10 summarize_rebase_args (new test module)
src/authorship/stats.rs +10 line_range_overlap_len, accepted_lines_from_attestations
src/authorship/authorship_log.rs +8 LineRange::shift regressions, PromptRecord::Ord
src/authorship/post_commit.rs +7 count_line_ranges, threshold logic
src/mdm/agents/codex.rs +4 TOML parsing edge cases, dry-run, idempotency

Test plan

  • cargo test --lib passes (560 tests, 0 failures)
  • No production code modified — tests only
  • All tests are deterministic (no network, no real git repos for unit tests)

🤖 Generated with Claude Code


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/507 **State:** closed **Merged:** Yes --- ## Summary - Added ~82 new unit tests across 7 source files, bringing the library test count from ~478 to 560 - All 10 TaskMaster task areas completed: search helpers, LineRange::shift regressions, overlap/Ord, apply_filters, parse_time_spec, rebase args, accepted_lines, Codex TOML config, continue_session formatting, and post_commit edge cases - 1,297 lines of new test code (877 + 420) ## Changes by file | File | Tests | Coverage | |------|-------|----------| | `src/commands/search.rs` | +21 | Search helpers, apply_filters, parse_time_spec, date math | | `src/commands/continue_session.rs` | +18 | format_context_block, format_context_json, message handling, commit info, project context, git status, JSON output, diff truncation | | `src/commands/hooks/rebase_hooks.rs` | +10 | summarize_rebase_args (new test module) | | `src/authorship/stats.rs` | +10 | line_range_overlap_len, accepted_lines_from_attestations | | `src/authorship/authorship_log.rs` | +8 | LineRange::shift regressions, PromptRecord::Ord | | `src/authorship/post_commit.rs` | +7 | count_line_ranges, threshold logic | | `src/mdm/agents/codex.rs` | +4 | TOML parsing edge cases, dry-run, idempotency | ## Test plan - [x] `cargo test --lib` passes (560 tests, 0 failures) - [x] No production code modified — tests only - [x] All tests are deterministic (no network, no real git repos for unit tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/507" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#523
No description provided.