Skip to content

fix(temporal): unblock Get/Events on run timeout and terminate workflows on close - #57

Merged
vinodvx merged 1 commit into
mainfrom
feat/agent-stream-approve
Jul 27, 2026
Merged

fix(temporal): unblock Get/Events on run timeout and terminate workflows on close#57
vinodvx merged 1 commit into
mainfrom
feat/agent-stream-approve

Conversation

@vinodvx

@vinodvx vinodvx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

  • Unblock Get / Events when a run hits WithTimeout or Stream/Run deadline (no per-call waiter deadlines required); emit a clear timeout error instead of hanging.
  • Stop stuck Temporal workflows on timeout (terminate) and on agent Close (parallel terminate with reason agent closed).
  • Keep Get / Events / reconnect ctx cancel as waiter-only; run cancel stays on Stream/Run ctx, WithTimeout, or explicit Cancel().
  • Move stream approvals to AgentStream.Approve (deprecates Agent.OnApproval); update docs and durable_agent scenario notes.

Test plan

  • go test ./internal/runtime/temporal/ ./pkg/agent/
  • durable_agent scenario 2: agent, no worker → fail-fast or context deadline exceeded (no hang / late canceled)
  • Stream with WithTimeout: Events on Background still gets terminal timeout error
  • Agent Close with active runs: workflows terminate; process exits within Close timeout

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / chore

Related issues

Checklist

  • I have run task check
  • I have run task examples:all
  • I have run task tidy if I added or removed dependencies
  • Commit messages follow conventional commits (e.g. feat:, fix:, docs:)
  • I have added/updated tests for my changes
  • Documentation is updated if needed

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.49153% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/runtime/temporal/stream_handle.go 61.70% 17 Missing and 1 partial ⚠️
internal/runtime/temporal/runtime.go 70.37% 13 Missing and 3 partials ⚠️
internal/runtime/temporal/run_handle.go 88.23% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@vinodvx
vinodvx merged commit 2941650 into main Jul 27, 2026
6 checks passed
@vinodvx
vinodvx deleted the feat/agent-stream-approve branch July 27, 2026 07:08
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