Skip to content

fix(hybrid): close synchronous Runtime responses - #258

Open
dajiaohuang wants to merge 1 commit into
bytedance:mainfrom
dajiaohuang:fix/257-close-runtime-response
Open

fix(hybrid): close synchronous Runtime responses#258
dajiaohuang wants to merge 1 commit into
bytedance:mainfrom
dajiaohuang:fix/257-close-runtime-response

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

  • close synchronous streamed Runtime responses in a finally block on every return and exception path
  • add focused regression coverage for both a successful SSE response and an HTTP error
  • mirror the lifecycle handling already used by the incremental streaming endpoint

Fixes #257

Tests

  • $env:PYTHONUTF8='1'; uv run --frozen --extra dev pytest -q tests/test_local_ui.py -k remote_ui (6 passed, 15 deselected)
  • $env:PYTHONUTF8='1'; uv run --frozen --extra dev pytest -q (76 passed, 4 failed: the known evaluator regression addressed separately by fix(hybrid): accept refusal contractions in evaluator #256, plus 3 Windows failures because this host has no usable Bash/WSL execution for shell-script tests)
  • uvx pre-commit run --show-diff-on-failure --color=never --files python/02-use-cases/hybrid_cloud_customer_service/local_ui.py python/02-use-cases/hybrid_cloud_customer_service/tests/test_local_ui.py

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.

Hybrid local UI leaves synchronous Runtime responses open

1 participant