Skip to content

test(opencode): enable abort test once runtime abort semantics are stable #1400

@cropse

Description

@cropse

Context

PR #1384 (OpenCode provider) has a skipped abort test at \packages/providers/src/community/opencode/provider.test.ts:506.

Current State

\\ ypescript
// TODO(#1384): Enable once abort handling is stable in embedded runtime
test.skip('aborts session on signal', async () => { ... });
\\

Why Skipped

The embedded runtime's abort behavior is not yet deterministic under the current mock architecture, making the test flaky.

Acceptance Criteria

  • Mock the runtime stream and abort signal deterministically
  • Trigger \AbortController.abort()\ at a controlled point
  • Assert:
    • Expected pre-abort chunks emitted
    • Final error is 'OpenCode query aborted'\

    • untime.client.session.abort\ called with correct session payload
    • Stream cleanup occurs

Priority

Minor - test coverage improvement, not blocking production functionality.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority - Nice to have, consider closing if stalearea: clientsAI assistant clientschoreMaintenance (refactoring, CI, dependencies)effort/lowSingle file or function, one responsibility, isolated changetestingTest coverage and testing infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions