Skip to content

test: close the final coverage gap to >85%#13

Merged
aksOps merged 2 commits intomainfrom
feat/coverage-close-final-gap
May 1, 2026
Merged

test: close the final coverage gap to >85%#13
aksOps merged 2 commits intomainfrom
feat/coverage-close-final-gap

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 1, 2026

Summary

Last tests needed to clear the 85% project-coverage target.

Coverage uplift

File Before After
ui/src/App.tsx 0% 92.75% lines / 100% branches
ui/src/components/QuotaStrip.tsx 0% 100%
internal/session/state.go 62.8% 82.0%
internal/serve/api/feed_history.go 72.8% 85.3%
internal/serve/server.go 82.5% 86.3%

Verification

  • 918 Go tests pass (was 869).
  • 206 UI tests pass (was 183).

Expected effect

  • Project coverage: 82.8% → >85% ✅ goal.
  • All four targets met: coverage>85%, security=0, dup~0%, reliability=A.

🤖 Generated with Claude Code

aksOps and others added 2 commits May 1, 2026 09:39
…ry, server

Final tests to push project coverage past 85%.

UI:
- ui/src/App.test.tsx (12 tests) — App.tsx 0% → 92.75% lines / 100%
  branches. Covers route resolution, provider mounting, login gate,
  QueryClient retry path. Mocks SSE/route-heavy children consistent
  with the existing repo pattern.
- ui/src/components/QuotaStrip.test.tsx (11 tests) — QuotaStrip.tsx
  0% → 100% (lines, branches, funcs). Covers all quota-band states
  and time-formatting branches with frozen system time.

Go:
- internal/session/state_extra_test.go — state.go 62.8% → 82.0%.
  UpdateHealth, UpdateAttached, UpdateMode, Names, Delete, Rename
  (incl. conflict + invalid name), Backup-on-empty, DeleteAll edge
  cases.
- internal/serve/api/feed_history_extra_test.go — feed_history.go
  72.8% → 85.3%. extractTS variants, nestedBool branches,
  summariseHistoryInput / summariseHistoryResponse paths,
  truncateHistory, splitIDExt + idLessThanExt + synthEvent.
- internal/serve/server_more_test.go — server.go 82.5% → 86.3%.
  costSourceAdapter Range/Totals errors, logsUUIDResolver guards,
  ResolveName / ResolveUUID workdir-fallback paths,
  sessionSourceAdapter LastCheckpointAt with a real git fixture,
  New defaults branches with a sandboxed HOME, port-in-use-by-non-ctm
  detection.

Skipped (still integration-bound, won't be tested as units):
- Spawn / SendInitialPrompt (live tmux + claude subprocess).
- quotaEnricher Attention/Tokens success branches (need ingest +
  attention engine event-loop integration).
- Run loop's 30s ticker / orphan-UUID adoption details (timing-
  dependent + project-mounted fs walks).

Verification:
- 918 Go tests pass across 27 packages with -tags sqlite_fts5
  (was 869).
- 206 UI tests pass (was 183).

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

sonarqubecloud Bot commented May 1, 2026

@aksOps aksOps merged commit 3d6cae9 into main May 1, 2026
11 checks passed
@aksOps aksOps deleted the feat/coverage-close-final-gap branch May 1, 2026 09:53
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