Skip to content

test: assert runtime.task.failed emission with taskId and reason (Issue #117) - #197

Open
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-117-task-failed-event
Open

test: assert runtime.task.failed emission with taskId and reason (Issue #117)#197
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-117-task-failed-event

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds test verifying that AgentRuntime.executeTask emits the runtime.task.failed event with correct taskId and non-empty reason when a tool throws, while still propagating the rejection to the caller.

Tests Added

  • runtime.task.failed event emitted exactly once on tool execution error
  • ✅ Event payload contains correct taskId
  • ✅ Event payload contains non-empty reason string
  • ✅ Error still propagates to caller (rejection preserved)

Verification

All 10 tests pass locally via npx vitest run tests/agent-runtime.test.ts.

Closes #117

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.

[Bounty: $20] Add test asserting runtime.task.failed is emitted on execution errors

1 participant