Skip to content

Fix #1651: [Bounty][$0][Lessons] 把 intake #1555(nano-gpt.com SSE 流式调用失败)转成课程 - #1841

Open
pamod-madubashana wants to merge 2 commits into
Ikalus1988:mainfrom
pamod-madubashana:opencode/issue-1651-35325400158
Open

pamod-madubashana wants to merge 2 commits into
Ikalus1988:mainfrom
pamod-madubashana:opencode/issue-1651-35325400158

Conversation

@pamod-madubashana

Copy link
Copy Markdown

Fixes #1651

PR Summary — Issue #1651: intake #1555 → lesson

What changed

Why it addresses the issue

Intake #1555 reports SSE streaming calls to nano-gpt.com via the OpenRouter
SDK failing with context deadline exceeded (deprioritized
Accept: text/event-stream;q=0, missing session_id gating), while
non-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:

  • Frontmatter complete, including provenance.issue: "#1555", English
    kebab-case filename, plus the repo-mandatory summary_plain / trigger /
    verify structured fields and evidence_refs: ["issue:#1555"].
  • ## Problem states symptoms and minimal repro conditions (which SDK /
    endpoint / stream-only failure, stream: false as control).
  • ## Root Cause separates case (a) proxy/gateway buffering SSE into one
    response from case (b) client parsing text/event-stream as a non-streaming
    body (bad Accept, whole-body reads, missing stream affinity), explains why
    both surface as hang-then-timeout, and gives the curl -N discrimination
    table (curl fails = server/middlebox side; curl streams = client side).
  • ## Solution is a copyable prescription: correct headers, incremental
    data:-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 on
    event streams), and a deliberate disable-streaming fallback branch.
  • ## Verification contains a runnable offline SSE-parser check and the live
    curl -N vs SDK comparison, with an honest statement that it was not
    live-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-only
    credential_exfil false positive on the first draft's verify line was
    cleared by rewording; final file is fully clean).
  • Lesson's own Verification snippet executed via python3 (extracted block 2
    from the file and ran it) → SSE parser check passed, exit 0.
  • git status --short confirms the PR contains only the new lesson plus the
    single lessons/index.md line; no generated files touched
    (data/lessons.json, docs/data/* untouched).
  • Live curl -N probe against nano-gpt.com was not run (no credentials /
    network dependency in this environment); the lesson states this explicitly.

…ano-gpt.com SSE 流式调用失败)转成课程
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to MisakaNet!

Thanks for your first PR!

🔏 Fix DCO First

Some commits are missing Signed-off-by:. Fix and force-push:

git commit --amend --signoff --no-edit   # latest commit
git push --force-with-lease

For several commits: git rebase --signoff HEAD~N && git push --force-with-lease

CI re-scans on every push (including force-pushes). Once all commits are signed, the needs-dco label auto-clears — do NOT push an empty commit.

⏳ First PR: CI waits for one-time maintainer approval

On your first PR from a fork, GitHub requires a maintainer to approve
workflow runs before CI can start (a safety gate). Until then checks may show
as waiting / greythat is expected, not a problem with your PR.
A maintainer usually approves within a day; after that, CI runs automatically
on every push (including force-pushes).

If you see a red needs-dco label or DCO check, fix it now so your PR is
already green once CI is approved (see above — the label auto-clears after
you amend + force-push; no empty commit needed).

Quick Links

Optional: Local Pre-commit Hook

For instant DCO validation before pushing:

pip install pre-commit
pre-commit install --hook-type commit-msg

For Agents & Crawlers

Found 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.

@pamod-madubashana
pamod-madubashana marked this pull request as ready for review September 18, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bounty][$0][Lessons] 把 intake #1555(nano-gpt.com SSE 流式调用失败)转成课程

2 participants