Skip to content

✅ test: add unit tests for TaskLifecycleService#13374

Open
lobehubbot wants to merge 1 commit intocanaryfrom
automatic/add-tests-taskLifecycleService-2026-03-29
Open

✅ test: add unit tests for TaskLifecycleService#13374
lobehubbot wants to merge 1 commit intocanaryfrom
automatic/add-tests-taskLifecycleService-2026-03-29

Conversation

@lobehubbot
Copy link
Copy Markdown
Member

Summary

  • Added unit tests for TaskLifecycleService
  • Total test files added/modified: 1
  • Test cases added: 21
  • Coverage focus: Task lifecycle state transitions triggered by topic completion

Changes

  • All tests pass successfully
  • Business logic coverage improved
  • Edge cases and error handling covered
  • Tests follow existing patterns

Module Processed

src/server/services/taskLifecycle/index.ts

Test Coverage

  • Functions tested: onTopicComplete (reason=done, reason=error), auto-review flow, handoff generation, checkpoint/pause logic
  • Coverage type: unit
  • Test approach: Mock all database models and external services; test each branch of the state machine (done/error), auto-review pass/fail/max-iterations, handoff generation success/failure, checkpoint pausing

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Error Error Mar 29, 2026 6:11am

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.94%. Comparing base (966f943) to head (6243447).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #13374     +/-   ##
=========================================
  Coverage   66.94%   66.94%             
=========================================
  Files        1903     1906      +3     
  Lines      153684   154024    +340     
  Branches    15534    17713   +2179     
=========================================
+ Hits       102889   103117    +228     
- Misses      50675    50787    +112     
  Partials      120      120             
Flag Coverage Δ
app 58.55% <ø> (+0.02%) ⬆️
database 96.66% <ø> (ø)
packages/agent-runtime 89.61% <ø> (ø)
packages/context-engine 86.47% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 66.68% <ø> (ø)
packages/model-bank 99.85% <ø> (ø)
packages/model-runtime 84.44% <ø> (ø)
packages/prompts 67.76% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.41% <ø> (ø)
packages/web-crawler 88.82% <ø> (ø)

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

Components Coverage Δ
Store 67.29% <ø> (ø)
Services 49.30% <ø> (ø)
Server 67.26% <ø> (-0.01%) ⬇️
Libs 51.03% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 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.

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