Skip to content

[obsolete — wrong base] fix(gateway): keep OctopError code and localized text in stream error envelopes - #2911

Closed
hefanbo wants to merge 10 commits into
TencentCloud:mainfrom
hefanbo:fix/stream-error-envelope
Closed

hefanbo wants to merge 10 commits into
TencentCloud:mainfrom
hefanbo:fix/stream-error-envelope

Conversation

@hefanbo

@hefanbo hefanbo commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR has been recreated as #2930

Summary

The ws/cli/chat fallback catches formatted failures with format_stream_error, dropping OctopError's code and localized message — machine-readable failures reached clients as generic text.

Extract the correct formatting into errors.stream_error() and use it at every catch site, replacing the private helper processor.py already carried.

Fixes #2908

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

Verified locally on this branch:

  • make all passes locally (5454 passed / 27 skipped)
  • Added/updated tests (tests/unit/gateway/test_processor_resource_errors.py)

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed) — not needed for this change

概要

ws/cli/chat 三处兜底 catch 用 format_stream_error 格式化失败,丢弃了 OctopError 的错误码与本地化文案——可机读的失败以通用文本送达客户端。

把正确的格式化提取为 errors.stream_error(),所有 catch 点统一改用,替换 processor.py 里的私有 helper。

修复 #2908

目标分支

  • Base 是 develop(feature / fix — 默认)
  • Base 是 main(仅 release/* 或 hotfix/*)

变更类型

  • 修复(Bug fix)
  • 新功能
  • 破坏性变更
  • 文档
  • 重构 / 杂务
  • 发版 / 热修

测试计划

已在本分支本地验证:

  • 本地 make all 通过(5454 passed / 27 skipped)
  • 新增/更新了测试(tests/unit/gateway/test_processor_resource_errors.py)

检查清单

  • 已更新 CHANGELOG.md(如涉及用户可见变更)
  • README / 文档已更新(如需要)——本次无需改动

mmhh256 and others added 10 commits November 6, 2026 10:07
…elop-after-1.0.3b4

chore: sync main into develop after 1.0.3b4
…d#2865)

GitHub retired the macos-14 runner on 2026-11-02, so the v1.0.3b4 desktop job was cancelled before a runner was assigned.
…ab failures (TencentCloud#2874)

* fix(models,bridge): keep pool preference out of chat and explain collab failures

The starred model is only a harness auto-route preference, so the chat picker shows an expert default or an explicit choice. Permanent cloud-collab rejections now fail immediately with a readable error instead of a raw close frame.

* docs: record preferred-model and bridge error fixes

* fix(db): close SQLite only after in-flight queries finish

Windows aborted the process when server shutdown closed the shared connection while the idle reclaim sweep was still reading agents.

* test(agents): initialize the reclaim sweep handle on stub managers

* test(bridge): wait for both listen frames before cancelling
…TencentCloud#2878)

Keep pauses, themes, citations, backups, and chat chrome from colliding, and show the templates that shipped before the expert market as the default featured set.
* feat(chat): share conversations on a shared expert

Owners can mark a thread as shared so anyone who can open that expert can read it, follow up, and handle pending approvals. Composer settings stay with the owner, and the chat expert menu can open the existing edit drawer.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(chat): satisfy mypy on shared-thread author and HITL lookup

Author ids from message JSON are narrowed before the profile map lookup, and a shared thread may resolve a pending approval without a user filter.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(chat): keep private threads private when the share flag is absent

Visibility checks treat a missing contributed flag as not shared, and dashboard tests read the author-stamped HumanMessage instead of a plain dict.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: describe projects alongside experts and teams

Record the agreed project shape: group visibility, owner-backed default context, and tasks that everyone who can open the project can see.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…encentCloud#2880)

An empty default model was discarded, chat chips hid which vendor a model came from, and a waiting frontend never reached people without update permission. PostgreSQL backup now explains a missing client instead of failing as an internal error.
…entCloud#2852)

The browser host's CDP client uses websockets.connect(), which raises
"python-socks is required to use a SOCKS proxy" when a SOCKS proxy env
var is set and the package is absent. The portable runtime's
site-packages are built from this repo's lockfile, and python-socks
was not a dependency — dev machines masked the gap because the
package happened to be manually installed in the dev venv.

Fixes TencentCloud#2836

Verification: uv lock --check consistent; uv export --frozen --no-dev
now emits python-socks==3.2.1.
… envelopes

The ws/cli/chat fallback catches formatted failures with
format_stream_error, dropping OctopError's code and localized message —
machine-readable failures reached clients as generic text. Extract the
correct formatting into errors.stream_error() and use it at every catch
site, replacing the private helper processor.py already carried.

Fixes TencentCloud#2908
@github-actions

Copy link
Copy Markdown
Contributor

请把这个变更重新提交到 develop。功能修改和问题修复都要指向 develop,不要直接指向 main。

Please open this change against develop instead of main.

@github-actions github-actions Bot closed this Nov 10, 2026
@hefanbo hefanbo changed the title fix(gateway): keep OctopError code and localized text in stream error envelopes [obsolete — wrong base] fix(gateway): keep OctopError code and localized text in stream error envelopes Nov 10, 2026
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.

[bug] Stream error envelopes drop OctopError code and localized text

5 participants