Skip to content

[Critical] Add Stream module unit tests #9

@randomm

Description

@randomm

Problem

packages/opencode/src/core/stream.ts (484 lines) has no dedicated tests.

Required Tests

  • Doom loop detection (same tool called 3x with identical input)
  • Tool result injection
  • Error recovery
  • Context overflow detection
  • Thinking block extraction
  • Abort handling during cleanup

Files

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

Coverage Target

80%+ line coverage for stream.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