Skip to content

[Critical] Add comprehensive BackgroundTasks test suite #7

@randomm

Description

@randomm

Problem

packages/opencode/src/core/tasks.ts (212 lines) has ZERO tests. This is a critical module for async tool execution.

Required Tests

  • Task lifecycle (start → running → completed)
  • Error handling in background tasks
  • Session cancellation
  • Concurrent limit enforcement
  • Auto-injection of results into context
  • Cleanup/garbage collection

Files

  • Create: packages/opencode/test/core/tasks.test.ts

Coverage Target

80%+ line coverage for tasks.ts

Branch

claude/simplify-agentic-loop-2jRSP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions