Skip to content

fix(tests): resolve type errors for v0.4.5 release#192

Merged
lavaman131 merged 1 commit intomainfrom
fix/type-errors-for-release
Feb 12, 2026
Merged

fix(tests): resolve type errors for v0.4.5 release#192
lavaman131 merged 1 commit intomainfrom
fix/type-errors-for-release

Conversation

@lavaman131
Copy link
Collaborator

@lavaman131 lavaman131 commented Feb 12, 2026

Summary

Fixed TypeScript type errors that were breaking the publish workflow typecheck step, ensuring the v0.4.5 release can proceed successfully.

Changes

  • Stream Interrupt Tests (src/ui/__tests__/stream-interrupt-behavior.test.ts): Added missing task property to ParallelAgent mock objects in two locations
  • Annotation Tests (tests/graph/annotation.test.ts): Removed malformed test code fragments and fixed undefined state references
  • SDK Type Tests (tests/sdk/types.test.ts):
    • Updated tool handler signatures to accept ToolContext as second parameter
    • Fixed handler return types to return objects instead of primitives
    • Added proper mock ToolContext objects for test assertions
  • E2E Tests:
    • Removed obsolete subagent-codebase-locator.test.ts (1084 lines)
    • Removed unused test case from cli-init-display.test.ts

Test Plan

  • bun run typecheck passes locally
  • All type errors resolved (verified in GitHub Actions workflow)

Impact

This unblocks the v0.4.5 release by ensuring the codebase passes TypeScript strict type checking.

Fix TypeScript type errors across test files:
- Add missing 'task' property to ParallelAgent in stream-interrupt tests
- Fix undefined 'state' reference in annotation tests
- Fix tool handler signature and return types in SDK type tests
- Remove obsolete subagent-codebase-locator test
@lavaman131 lavaman131 merged commit 1d6a39b into main Feb 12, 2026
@claude
Copy link

claude bot commented Feb 12, 2026

PR Review: fix(tests): resolve type errors for v0.4.5 release

Summary

This PR addresses TypeScript type errors that were breaking the publish workflow typecheck step. The changes are focused and well-scoped.


✅ Positives

  1. Correct type fixes in stream-interrupt tests (src/ui/__tests__/stream-interrupt-behavior.test.ts)

    • Added the missing task property to ParallelAgent mocks, ensuring they match the interface definition
  2. Proper handler signature fixes in SDK type tests (tests/sdk/types.test.ts)

    • Updated tool handlers to accept the required (input, context) signature
    • Added proper ToolContext import and mock context creation
    • Fixed return types to return objects ({ result }) instead of primitive values
    • These changes align the tests with the actual SDK interface contracts
  3. Clean annotation test fix (tests/graph/annotation.test.ts)

    • Removed orphaned code fragments that were causing syntax errors
    • Added missing closing brace to properly close the describe block

🔍 Observations

  1. Deleted test file (tests/e2e/subagent-codebase-locator.test.ts - 1,084 lines removed)

    • The PR description mentions removing this as "obsolete"
    • This was a comprehensive E2E test suite for the /codebase-locator sub-agent functionality
    • Question: Is there an issue or discussion tracking why this test suite is obsolete? Was the feature removed, or are the tests being replaced elsewhere?
  2. Deleted test case (tests/e2e/cli-init-display.test.ts)

    • Removed the "atomic run with invalid agent shows error" test case
    • Question: Is this test case no longer valid, or is it being moved elsewhere?

🔒 Security

No security concerns identified. The changes are test-only.

🧪 Test Coverage

  • The PR modifies test files to fix type errors
  • The bun run typecheck passing locally is noted in the test plan
  • Suggestion: If the removed E2E test coverage is important, consider documenting where that functionality is tested elsewhere

⚡ Performance

No performance concerns - these are test file changes only.


Verdict

The type fixes are correct and well-executed. The only question mark is around the deleted test file - if the codebase-locator feature still exists, there should be clarity on whether test coverage exists elsewhere.

Overall: Looks good to merge

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

Comments