docs: add Qoder Cloud runtime integration best practice and demo - #6
Merged
anchenqlw merged 3 commits intoAug 14, 2026
Merged
Conversation
Signed-off-by: 时之 <yefengzi888@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds a zh-CN best-practice article plus a self-contained Go demo module illustrating how to integrate Qoder Cloud as a hosted runtime behind an existing orchestrator, focusing on SSE resume/dedup, requires_action batch execution with replay safety, and a fail-closed allowlisted custom-tool dispatcher.
Changes:
- New zh-CN best-practice article documenting the recommended integration pattern and its guarantee boundaries.
- New Go demo module implementing dispatcher + batch runner + SSE stream reader, with tests and runnable README.
- New demo
go.modfor a zero-dependency, standard-library-only build.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| demos/integrate-qoder-cloud-runtime/stream.go | Implements SSE reader with resume + dedup logic for the demo |
| demos/integrate-qoder-cloud-runtime/dispatcher.go | Implements allowlisted, scoped, strict JSON validation dispatcher for custom tools |
| demos/integrate-qoder-cloud-runtime/bridge.go | Implements buffered batch execution + replay-safe result caching (“exactly once within process”) |
| demos/integrate-qoder-cloud-runtime/bridge_test.go | Tests batch replay semantics and SSE resume/dedup behavior |
| demos/integrate-qoder-cloud-runtime/dispatcher_test.go | Tests dispatcher validation and scope enforcement |
| demos/integrate-qoder-cloud-runtime/README.md | Demo usage, verification steps, and security/cost notes |
| demos/integrate-qoder-cloud-runtime/go.mod | Declares standalone demo module and Go version |
| content/zh-CN/best-practices/integrate-qoder-cloud-runtime/index.md | Best-practice documentation (zh-CN) and demo link |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Buffer: ignore duplicate event IDs so the exactly-once key can't be hijacked - strictUnmarshal: reject trailing JSON tokens (require exactly one value) - stream: parse SSE incrementally so handle/stop apply on long-lived streams Signed-off-by: 时之 <yefengzi888@gmail.com>
…r-cloud-runtime Signed-off-by: 时之 <yefengzi888@gmail.com>
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.
Cookbook contribution
Summary
Sources and assets
All submitted code and text are original; the described protocol pattern is derived from Multica's public integration and its documented tool contract.Specialist review
Author checklist
##sections and no hand-written table of contents.demos/<slug>/matches the owner article, and the article contains the exact GitHub Demo link.Signed-off-bytrailer.mainis the publication event.Maintainer Demo review