Fix #1651: [Bounty][$0][Lessons] 把 intake #1555(nano-gpt.com SSE 流式调用失败)转成课程 - #1841
pamod-madubashana wants to merge 2 commits into
Conversation
…ano-gpt.com SSE 流式调用失败)转成课程
Welcome to MisakaNet!Thanks for your first PR! 🔏 Fix DCO FirstSome commits are missing git commit --amend --signoff --no-edit # latest commit
git push --force-with-leaseFor several commits:
⏳ First PR: CI waits for one-time maintainer approvalOn your first PR from a fork, GitHub requires a maintainer to approve If you see a red Quick Links
Optional: Local Pre-commit HookFor instant DCO validation before pushing: pip install pre-commit
pre-commit install --hook-type commit-msgFor Agents & CrawlersFound a missing lesson? Submit via MCP (no account needed): curl -sS https://misakanet.org/mcp \
-H 'Content-Type: application/json' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-H 'Origin: https://misakanet.org' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"misakanet_submit_intake","arguments":{"problem":"YOUR PROBLEM","source":"your-agent"}}}'After the one-time approval, CI checks run automatically on every push. |
Fixes #1651
PR Summary — Issue #1651: intake #1555 → lesson
What changed
lessons/contrib/sse-streaming-thirdparty-sdk-breakage.md(filenameexactly as prescribed by intake [Intake] Chamadas de streaming SSE para nano-gpt.com via SDK OpenRouter falhavam com cont #1555's acceptance criteria).
lessons/index.md(no other index lines touched).Why it addresses the issue
Intake #1555 reports SSE streaming calls to
nano-gpt.comvia the OpenRouterSDK failing with
context deadline exceeded(deprioritizedAccept: text/event-stream;q=0, missingsession_idgating), whilenon-streaming calls work. The corpus had HTTP/timeout/proxy lessons but no
dedicated lesson for "streaming SSE silently broken by a middle layer". The new
lesson closes that gap and meets every AC of #1651:
provenance.issue: "#1555", Englishkebab-case filename, plus the repo-mandatory
summary_plain/trigger/verifystructured fields andevidence_refs: ["issue:#1555"].## Problemstates symptoms and minimal repro conditions (which SDK /endpoint / stream-only failure,
stream: falseas control).## Root Causeseparates case (a) proxy/gateway buffering SSE into oneresponse from case (b) client parsing
text/event-streamas a non-streamingbody (bad
Accept, whole-body reads, missing stream affinity), explains whyboth surface as hang-then-timeout, and gives the
curl -Ndiscriminationtable (curl fails = server/middlebox side; curl streams = client side).
## Solutionis a copyable prescription: correct headers, incrementaldata:-frame parser with[DONE]handling, split timeouts(first-token / idle / total) plus backoff reconnects, proxy buffering
switch-off (
proxy_buffering off,X-Accel-Buffering: no, no gzip onevent streams), and a deliberate disable-streaming fallback branch.
## Verificationcontains a runnable offline SSE-parser check and the livecurl -Nvs SDK comparison, with an honest statement that it was notlive-tested against
nano-gpt.com.Verification
python3 scripts/lesson_gate.py lessons/contrib/sse-streaming-thirdparty-sdk-breakage.md→
OK: 1 file(s) passed the lesson quality gate.python3 scripts/injection_scan.py lessons/contrib/sse-streaming-thirdparty-sdk-breakage.md→
injection scan: 0 finding(s) — high=0 {}(one medium-onlycredential_exfilfalse positive on the first draft'sverifyline wascleared by rewording; final file is fully clean).
python3(extracted block 2from the file and ran it) →
SSE parser check passed, exit 0.git status --shortconfirms the PR contains only the new lesson plus thesingle
lessons/index.mdline; no generated files touched(
data/lessons.json,docs/data/*untouched).curl -Nprobe againstnano-gpt.comwas not run (no credentials /network dependency in this environment); the lesson states this explicitly.