Skip to content

Add test coverage analysis with prioritized improvement areas#12

Open
fgilio wants to merge 2 commits intomainfrom
claude/analyze-test-coverage-6zLL2
Open

Add test coverage analysis with prioritized improvement areas#12
fgilio wants to merge 2 commits intomainfrom
claude/analyze-test-coverage-6zLL2

Conversation

@fgilio
Copy link
Copy Markdown
Owner

@fgilio fgilio commented Mar 13, 2026

Analyzes all 52 source files against 70+ test files to identify
coverage gaps. Key findings: 4 untested actions (ListProjectsAction
being highest priority), untested GitProcessService, missing command
tests, and several Livewire components without unit tests.

https://claude.ai/code/session_019cqejxmSiEK5WZr8PQwEQP

claude added 2 commits March 12, 2026 00:13
Analyzes all 52 source files against 70+ test files to identify
coverage gaps. Key findings: 4 untested actions (ListProjectsAction
being highest priority), untested GitProcessService, missing command
tests, and several Livewire components without unit tests.

https://claude.ai/code/session_019cqejxmSiEK5WZr8PQwEQP
…services, and commands

New test files:
- DiffTargetTest: factory methods, query methods, serialization (14 tests)
- GetProjectStatusAction: dirty/clean status, exception handling (4 tests)
- ResolveCommitAction: valid/invalid refs, root/merge commits (4 tests)
- UpdateProjectSettingAction: single/multi update, non-existent project (3 tests)
- ListProjectsAction: grouping, sorting, comment counts (6 tests)
- ReviewSession model: scopeKey logic, JSON casts (4 tests)
- Project model: boolean casts, unique constraint (3 tests)
- GitProcessService: command execution, exceptions, unicode (4 tests)
- RegisterProjectCommand: success and failure paths (2 tests)
- BenchmarkPerformanceCommand: command registration, option defaults (2 tests)

https://claude.ai/code/session_019cqejxmSiEK5WZr8PQwEQP
fgilio added a commit that referenced this pull request Apr 27, 2026
* Refresh test coverage analysis and fill remaining unit-test gaps

Rebase of #12 against current main: the original PR shipped tests that
have since landed (GetProjectStatusAction, ListProjectsAction,
DiffTarget, BenchmarkPerformanceCommand) or no longer match the schema
(Project / ReviewSession after the comment-pool migration). This refresh
re-audits the codebase, rewrites TEST_COVERAGE_ANALYSIS.md against
today's tree, and lands the four genuinely-missing unit tests it
identifies:

- GitProcessService — foundational git chokepoint
- ResolveCommitAction — null/root/merge parent paths
- UpdateProjectSettingAction — ALLOWED_ATTRIBUTES allow-list filter
- RegisterProjectCommand — Artisan happy + error paths

https://claude.ai/code/session_01Dz4S5YZqkHdYXfUstn6mXk

* Drop TEST_COVERAGE_ANALYSIS.md

Snapshot-style docs go stale the moment any test lands. The tests added
in the previous commit are the durable artifact; the gap list belongs
in the PR description.

https://claude.ai/code/session_01Dz4S5YZqkHdYXfUstn6mXk

* Cover the rest of the unit-test backlog

- GetFileCopyContentAction: pins the kind→service routing, oldPath
  fallback for renames, and working-directory ref resolution.
- OpenProjectFromPathAction: covers realpath/file-vs-dir guards and the
  swallow-and-return-null path when registration throws.
- BranchExplorer (⚡): mount stays inert; loadBranches / loadCommits /
  loadMore exercise the page-size + hasMore contract.
- MarkdownFormatter: unicode/emoji bodies, embedded fenced code blocks,
  whitespace-only global comment, empty diff-context fallback, null
  endLine, and newline-only body.
- CommentExporter: JSON escaping for quotes/backslashes, unicode
  round-trip, fenced-block preservation, multi-file diff-context
  ordering, empty-body resilience.

https://claude.ai/code/session_01Dz4S5YZqkHdYXfUstn6mXk

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants