Skip to content

test: improve unit test coverage#363

Merged
tomasz-tomczyk merged 1 commit intomainfrom
improve-coverage-2
Apr 25, 2026
Merged

test: improve unit test coverage#363
tomasz-tomczyk merged 1 commit intomainfrom
improve-coverage-2

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Add ~2,900 lines of new tests across 9 files, improving coverage from 60.1% to 66.0% (+5.9pp)
  • Server handlers: handleCommits, handleBranches, handleBaseBranch, handleQR, handleEvents, handleFinish, handleConfig, handleSession, handleShareURL, handleReplyCRUD, and more
  • Session methods: GetSessionInfoScoped, availableScopes, computeScopedDiffHunks, mergeReviewCommentsFromDisk, BrowserConnect/Disconnect, Shutdown
  • Auth: requestDeviceCode, pollDeviceToken, pollForToken, saveAuthToken, revokeToken, fetchWhoami, showLoginHint, parseAuthLoginFlags
  • Daemon: sessionKey, session file round-trips, acquireSessionLock, isDaemonAlive, findSessionForCWDBranch, listSessionsForRepoRoot, cleanOrphanedSessions
  • Reviewed and deduplicated by independent Go expert agent (10 duplicates removed, 1 empty assertion fixed)

Review

  • Code review: passed (independent Go expert review)
  • Parity audit: N/A (test-only)

Test plan

  • go test -race ./... passes
  • gofmt -l . clean
  • go vet ./... clean

🤖 Generated with Claude Code

… daemon

Coverage improvement from 60.1% to 66.0% (+5.9pp). Focuses on HTTP handler
testing via httptest, session method coverage, auth flow testing with mock
servers, and daemon lifecycle tests. Reviewed and deduplicated by independent
Go expert agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.90%. Comparing base (2852e5d) to head (d106b2d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   62.57%   66.90%   +4.32%     
==========================================
  Files          18       18              
  Lines        7807     7807              
==========================================
+ Hits         4885     5223     +338     
+ Misses       2500     2192     -308     
+ Partials      422      392      -30     
Flag Coverage Δ
e2e 34.89% <ø> (ø)
unit 62.72% <ø> (+6.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk changed the title test: improve unit test coverage to 66% test: improve unit test coverage Apr 25, 2026
@tomasz-tomczyk tomasz-tomczyk merged commit 3361f14 into main Apr 25, 2026
6 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the improve-coverage-2 branch April 25, 2026 14:30
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.

1 participant