Skip to content

Doc: Add message call behavior descriptions for nested invocation scenarios#36

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-behavior-description-doc
Draft

Doc: Add message call behavior descriptions for nested invocation scenarios#36
Copilot wants to merge 2 commits intomainfrom
copilot/add-behavior-description-doc

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Users need clarity on CSM message behavior when calls are nested—e.g., sending async messages during sync execution, or nested sync calls forming chains.

Changes

Added "消息调用场景行为说明" section to docs/basic/communication.md covering:

  • 4 invocation scenarios with behavior mechanics:

    • Sync → Async: async posts immediately, "Async Message Posted" queued after sync response
    • Sync → Sync: forms call chain (A→B→C), timeouts accumulate, deadlock warning
    • Async → Sync: receiver blocks on sync call before returning async response
    • Async → Async: fully non-blocking, response order non-deterministic
  • Queue processing model: FIFO with priority lanes, execution flow visualization

  • Pitfalls: circular call deadlocks, timeout accumulation in chains, response ordering assumptions

Example

// Scenario: Sync call with nested async notification
API: GetData >> params -@ Database        // Blocks until response
API: UpdateProgress >> 50% ->| UI         // Posts immediately, queued

// Scenario: Nested sync chain
API: ProcessOrder >> data -@ ModuleB
  ├─ API: ValidateUser >> id -@ ModuleC   // B blocks on C
  └─ API: CheckInventory >> id -@ ModuleD // B blocks on D

140 lines added.

Original prompt

This section details on the original issue you should resolve

<issue_title>Doc: 添加消息调用不同场景的行为描述,更为清晰一些,例如:在同步消息执行时,发送了异步消息,会怎么样</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…enarios

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Copilot AI changed the title [WIP] Add behavior descriptions for message call scenarios Doc: Add message call behavior descriptions for nested invocation scenarios Feb 8, 2026
Copilot AI requested a review from nevstop February 8, 2026 04:58
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.

Doc: 添加消息调用不同场景的行为描述,更为清晰一些,例如:在同步消息执行时,发送了异步消息,会怎么样

2 participants