Repository navigation
[upstream #103] Terminate streams on exact bare done markers (55515dba) - #105
Merged
Merged
Conversation
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 关联任务 / Related Issue
🚀 变更类型 / Type of change
📝 变更描述 / Description
从指定基线
154b35e2be56e127dd06ce29d5afe98d99690592cherry-pick 上游补丁,仅修改relay/helper/stream_scanner.go和relay/helper/stream_scanner_test.go。先移除可选的
data:前缀并清理首尾空白,再精确匹配[DONE]。裸标记正确结束流;data: [DONE]extra保留为普通数据,裸[DONE]extra被忽略。测试覆盖裸标记、空白、带前缀及非精确匹配的七个场景,并检查结束原因和接收计数。未包含
7e6596728、#81/#82、原生 SSE 大包或 OAuth 变更。此 PR 仅交付待审分支,不执行合入。📸 运行证明 / Proof of Work
GOMAXPROCS=2 go test -count=1 -timeout=120s ./relay/helper -run 'Stream|Done|Scanner'→ exit 0,ok github.com/QuantumNous/new-api/relay/helper 2.626s。git diff --check和git diff --check HEAD^ HEAD→ exit 0,无输出。✅ 提交前检查项 / Checklist
55515dba的开放 PR,无重复结果。