mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-22 15:34:06 +00:00
* docs(design): add daemon idle detection API design for machine reclamation When qwen daemon is deployed across multiple machines, an external scheduler needs a reliable signal to determine if a daemon is idle and the machine can be reclaimed. This design proposes enhancing GET /health?deep=true with activePrompts, connectedClients, channelAlive, lastActivityAt, and idleSinceMs fields. * feat(serve): add idle-detection fields to GET /health?deep=true * fix(test): add activePromptCount and lastActivityAt to fakeBridge Update the test helper to satisfy the expanded AcpSessionBridge interface so /health?deep=true tests pass with the new fields. * test(idle-detection): add unit tests for activePromptCount, lastActivityAt and /health?deep=true new fields * refactor(bridge): replace activePromptCount iteration with O(1) counter * fix(bridge): move idleSinceMs computation into bridge to eliminate race window * fix(idle-detection): keep daemon health state consistent Guard prompt teardown so activePromptCount only decrements once and compute deep health idle fields from the same activity snapshot. * fix(acp): prevent active prompt leak after channel crash Reject queued prompts after their session entry has been torn down so daemon health does not report phantom active prompts. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| 00-index.md | ||
| 01-architecture.md | ||
| 02-serve-runtime.md | ||
| 03-acp-bridge.md | ||
| 04-permission-mediation.md | ||
| 05-mcp-transport-pool.md | ||
| 06-mcp-budget-guardrails.md | ||
| 07-workspace-filesystem.md | ||
| 08-session-lifecycle.md | ||
| 09-event-schema.md | ||
| 10-event-bus.md | ||
| 11-capabilities-versioning.md | ||
| 12-auth-security.md | ||
| 13-sdk-daemon-client.md | ||
| 14-cli-tui-adapter.md | ||
| 15-channel-adapters.md | ||
| 16-vscode-ide-adapter.md | ||
| 17-configuration.md | ||
| 18-error-taxonomy.md | ||
| 19-observability.md | ||
| 20-quickstart-operations.md | ||
| _meta.ts | ||