mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-22 23:25:28 +00:00
* feat(channels): stamp daemon sourceId with channel instance name on created sessions Channel workers tagged created sessions with sourceType 'channel' (#6991, refs #6962) but no sourceId, leaving sessions from different channel instances (e.g. dingtalk-main vs feishu-main) indistinguishable on the daemon data plane (session lists, transcripts, ?sourceType= filters). The session-source mechanism already supports a paired sourceId — scheduled tasks use it for the task id. Plumb the channel instance name through the creation path: SessionRouter.createLiveSession → bridge.newSession options (ChannelAgentBridgeSessionOptions.sourceId) → session-factory request → createOrAttach. loadSession deliberately never forwards it: loading an existing session never re-stamps its creation attribution, matching the issue's 'only newly created channel sessions should be tagged' rule and the daemon's single-attach source rule. Tests: channels/base suite (764) and cli daemon-worker suite (66) green. New cases cover router stamping, bridge new-vs-load forwarding, and the worker factory create-vs-load behavior. * fix(channels): declare sourceId in createOrAttach DI type and cover replacement-path stamping Review feedback on #7078: - DaemonSessionClientStaticLike.createOrAttach's request type declared sourceType but not sourceId; the field type-checked only via object-spread excess-property exemption. Declare sourceId?: string so the contract documents the request and direct-property edits keep compiling. - Add a sourceId assertion to the load-failure replacement test so the recovery path's per-instance attribution is regression-guarded. --------- Co-authored-by: 欢伯 <ri.xur@alibaba-inc.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| design | ||
| developers | ||
| e2e-tests | ||
| plans | ||
| superpowers | ||
| users | ||
| verification/abort-controller-refactor | ||
| _meta.ts | ||
| index.md | ||