mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-17 18:10:51 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
84
openclaw/qa/scenarios/channels/channel-chat-baseline.md
Normal file
84
openclaw/qa/scenarios/channels/channel-chat-baseline.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# Channel baseline conversation
|
||||
|
||||
```yaml qa-scenario
|
||||
id: channel-chat-baseline
|
||||
title: Channel baseline conversation
|
||||
surface: channel
|
||||
coverage:
|
||||
primary:
|
||||
- channels.group-messages
|
||||
secondary:
|
||||
- channels.qa-channel
|
||||
objective: Verify the QA agent can respond correctly in a shared channel and respect mention-driven group semantics.
|
||||
successCriteria:
|
||||
- Agent replies in the shared channel transcript.
|
||||
- Agent keeps the conversation scoped to the channel.
|
||||
- Agent respects mention-driven group routing semantics.
|
||||
docsRefs:
|
||||
- docs/channels/group-messages.md
|
||||
- docs/channels/qa-channel.md
|
||||
codeRefs:
|
||||
- extensions/qa-channel/src/inbound.ts
|
||||
- extensions/qa-lab/src/bus-state.ts
|
||||
execution:
|
||||
kind: flow
|
||||
summary: Verify the QA agent can respond correctly in a shared channel and respect mention-driven group semantics.
|
||||
config:
|
||||
mentionPrompt: "@openclaw explain the QA lab"
|
||||
```
|
||||
|
||||
```yaml qa-flow
|
||||
steps:
|
||||
- name: ignores unmentioned channel chatter
|
||||
actions:
|
||||
- call: waitForGatewayHealthy
|
||||
args:
|
||||
- ref: env
|
||||
- 60000
|
||||
- call: waitForQaChannelReady
|
||||
args:
|
||||
- ref: env
|
||||
- 60000
|
||||
- call: reset
|
||||
- call: state.addInboundMessage
|
||||
args:
|
||||
- conversation:
|
||||
id: qa-room
|
||||
kind: channel
|
||||
title: QA Room
|
||||
senderId: alice
|
||||
senderName: Alice
|
||||
text: hello team, no bot ping here
|
||||
- call: waitForNoOutbound
|
||||
args:
|
||||
- ref: state
|
||||
- name: replies when mentioned in channel
|
||||
actions:
|
||||
- call: waitForGatewayHealthy
|
||||
args:
|
||||
- ref: env
|
||||
- 60000
|
||||
- call: waitForQaChannelReady
|
||||
args:
|
||||
- ref: env
|
||||
- 60000
|
||||
- call: state.addInboundMessage
|
||||
args:
|
||||
- conversation:
|
||||
id: qa-room
|
||||
kind: channel
|
||||
title: QA Room
|
||||
senderId: alice
|
||||
senderName: Alice
|
||||
text:
|
||||
expr: config.mentionPrompt
|
||||
- call: waitForOutboundMessage
|
||||
saveAs: message
|
||||
args:
|
||||
- ref: state
|
||||
- lambda:
|
||||
params: [candidate]
|
||||
expr: "candidate.conversation.id === 'qa-room' && !candidate.threadId"
|
||||
- expr: liveTurnTimeoutMs(env, 60000)
|
||||
detailsExpr: message.text
|
||||
```
|
||||
52
openclaw/qa/scenarios/channels/dm-chat-baseline.md
Normal file
52
openclaw/qa/scenarios/channels/dm-chat-baseline.md
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# DM baseline conversation
|
||||
|
||||
```yaml qa-scenario
|
||||
id: dm-chat-baseline
|
||||
title: DM baseline conversation
|
||||
surface: dm
|
||||
coverage:
|
||||
primary:
|
||||
- channels.dm
|
||||
secondary:
|
||||
- channels.qa-channel
|
||||
objective: Verify the QA agent can chat coherently in a DM, explain the QA setup, and stay in character.
|
||||
successCriteria:
|
||||
- Agent replies in DM without channel routing mistakes.
|
||||
- Agent explains the QA lab and message bus correctly.
|
||||
- Agent keeps the dev C-3PO personality.
|
||||
docsRefs:
|
||||
- docs/channels/qa-channel.md
|
||||
- docs/help/testing.md
|
||||
codeRefs:
|
||||
- extensions/qa-channel/src/gateway.ts
|
||||
- extensions/qa-lab/src/lab-server.ts
|
||||
execution:
|
||||
kind: flow
|
||||
summary: Verify the QA agent can chat coherently in a DM, explain the QA setup, and stay in character.
|
||||
config:
|
||||
prompt: "Hello there, who are you?"
|
||||
```
|
||||
|
||||
```yaml qa-flow
|
||||
steps:
|
||||
- name: replies coherently in DM
|
||||
actions:
|
||||
- call: resetBus
|
||||
- call: state.addInboundMessage
|
||||
args:
|
||||
- conversation:
|
||||
id: alice
|
||||
kind: direct
|
||||
senderId: alice
|
||||
senderName: Alice
|
||||
text:
|
||||
expr: config.prompt
|
||||
- call: waitForOutboundMessage
|
||||
saveAs: outbound
|
||||
args:
|
||||
- ref: state
|
||||
- lambda:
|
||||
params: [candidate]
|
||||
expr: "candidate.conversation.id === 'alice'"
|
||||
detailsExpr: outbound.text
|
||||
```
|
||||
81
openclaw/qa/scenarios/channels/reaction-edit-delete.md
Normal file
81
openclaw/qa/scenarios/channels/reaction-edit-delete.md
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Reaction, edit, delete lifecycle
|
||||
|
||||
```yaml qa-scenario
|
||||
id: reaction-edit-delete
|
||||
title: Reaction, edit, delete lifecycle
|
||||
surface: message-actions
|
||||
coverage:
|
||||
primary:
|
||||
- channels.message-actions
|
||||
secondary:
|
||||
- channels.qa-channel
|
||||
objective: Verify the agent can use channel-owned message actions and that the QA transcript reflects them.
|
||||
successCriteria:
|
||||
- Agent adds at least one reaction.
|
||||
- Agent edits or replaces a message when asked.
|
||||
- Transcript shows the action lifecycle correctly.
|
||||
docsRefs:
|
||||
- docs/channels/qa-channel.md
|
||||
codeRefs:
|
||||
- extensions/qa-channel/src/channel-actions.ts
|
||||
- extensions/qa-lab/src/self-check-scenario.ts
|
||||
execution:
|
||||
kind: flow
|
||||
summary: Verify the agent can use channel-owned message actions and that the QA transcript reflects them.
|
||||
config:
|
||||
target: "channel:qa-room"
|
||||
seedText: "seed message"
|
||||
editedText: "seed message (edited)"
|
||||
reactionEmoji: "white_check_mark"
|
||||
```
|
||||
|
||||
```yaml qa-flow
|
||||
steps:
|
||||
- name: records reaction, edit, and delete actions
|
||||
actions:
|
||||
- call: reset
|
||||
- call: state.addOutboundMessage
|
||||
saveAs: seed
|
||||
args:
|
||||
- to:
|
||||
expr: config.target
|
||||
text:
|
||||
expr: config.seedText
|
||||
- call: handleQaAction
|
||||
args:
|
||||
- env:
|
||||
ref: env
|
||||
action: react
|
||||
args:
|
||||
messageId:
|
||||
expr: seed.id
|
||||
emoji:
|
||||
expr: config.reactionEmoji
|
||||
- call: handleQaAction
|
||||
args:
|
||||
- env:
|
||||
ref: env
|
||||
action: edit
|
||||
args:
|
||||
messageId:
|
||||
expr: seed.id
|
||||
text:
|
||||
expr: config.editedText
|
||||
- call: handleQaAction
|
||||
args:
|
||||
- env:
|
||||
ref: env
|
||||
action: delete
|
||||
args:
|
||||
messageId:
|
||||
expr: seed.id
|
||||
- call: state.readMessage
|
||||
saveAs: message
|
||||
args:
|
||||
- messageId:
|
||||
expr: seed.id
|
||||
- assert:
|
||||
expr: "message.reactions.length > 0 && message.deleted && message.text.includes('(edited)')"
|
||||
message: message lifecycle did not persist
|
||||
detailsExpr: message.text
|
||||
```
|
||||
79
openclaw/qa/scenarios/channels/thread-follow-up.md
Normal file
79
openclaw/qa/scenarios/channels/thread-follow-up.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# Threaded follow-up
|
||||
|
||||
```yaml qa-scenario
|
||||
id: thread-follow-up
|
||||
title: Threaded follow-up
|
||||
surface: thread
|
||||
coverage:
|
||||
primary:
|
||||
- channels.threads
|
||||
secondary:
|
||||
- channels.qa-channel
|
||||
objective: Verify the agent can keep follow-up work inside a thread and not leak context into the root channel.
|
||||
successCriteria:
|
||||
- Agent creates or uses a thread for deeper work.
|
||||
- Follow-up messages stay attached to the thread.
|
||||
- Thread report references the correct prior context.
|
||||
docsRefs:
|
||||
- docs/channels/qa-channel.md
|
||||
- docs/channels/group-messages.md
|
||||
codeRefs:
|
||||
- extensions/qa-channel/src/protocol.ts
|
||||
- extensions/qa-lab/src/bus-state.ts
|
||||
execution:
|
||||
kind: flow
|
||||
summary: Verify the agent can keep follow-up work inside a thread and not leak context into the root channel.
|
||||
config:
|
||||
prompt: "@openclaw reply in one short sentence inside this thread only. Do not use ACP or any external runtime. Confirm you stayed in-thread."
|
||||
```
|
||||
|
||||
```yaml qa-flow
|
||||
steps:
|
||||
- name: keeps follow-up inside the thread
|
||||
actions:
|
||||
- call: reset
|
||||
- call: handleQaAction
|
||||
saveAs: threadPayload
|
||||
args:
|
||||
- env:
|
||||
ref: env
|
||||
action: thread-create
|
||||
args:
|
||||
channelId: qa-room
|
||||
title: QA deep dive
|
||||
- set: threadId
|
||||
value:
|
||||
expr: "threadPayload?.thread?.id"
|
||||
- assert:
|
||||
expr: "Boolean(threadId)"
|
||||
message: missing thread id
|
||||
- call: state.addInboundMessage
|
||||
args:
|
||||
- conversation:
|
||||
id: qa-room
|
||||
kind: channel
|
||||
title: QA Room
|
||||
senderId: alice
|
||||
senderName: Alice
|
||||
text:
|
||||
expr: config.prompt
|
||||
threadId:
|
||||
ref: threadId
|
||||
threadTitle: QA deep dive
|
||||
- call: waitForOutboundMessage
|
||||
saveAs: outbound
|
||||
args:
|
||||
- ref: state
|
||||
- lambda:
|
||||
params: [candidate]
|
||||
expr: "candidate.conversation.id === 'qa-room' && candidate.threadId === threadId"
|
||||
- expr: "env.providerMode === 'mock-openai' ? 15000 : 45000"
|
||||
- assert:
|
||||
expr: "!state.getSnapshot().messages.some((candidate) => candidate.direction === 'outbound' && candidate.conversation.id === 'qa-room' && !candidate.threadId)"
|
||||
message: thread reply leaked into root channel
|
||||
- assert:
|
||||
expr: "!['acp backend','acpx','not configured'].some((needle) => normalizeLowercaseStringOrEmpty(outbound.text).includes(needle))"
|
||||
message:
|
||||
expr: "`thread reply fell back to ACP error: ${outbound.text}`"
|
||||
detailsExpr: outbound.text
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue