惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
IT之家
IT之家
Y
Y Combinator Blog
T
Tailwind CSS Blog
B
Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
InfoQ
J
Java Code Geeks
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test(qa): cover subagent completion fallback · openclaw/o...
vincentkoc · 2026-04-26 · via Recent Commits to openclaw:main

@@ -0,0 +1,99 @@

1+

# Subagent completion direct fallback

2+3+

```yaml qa-scenario

4+

id: subagent-completion-direct-fallback

5+

title: Subagent completion direct fallback

6+

surface: subagents

7+

coverage:

8+

primary:

9+

- agents.subagents

10+

secondary:

11+

- runtime.delivery

12+

- channels.qa-channel

13+

objective: Verify a yielded parent still receives a successful subagent result through direct fallback delivery when the dormant announce turn produces no visible reply.

14+

successCriteria:

15+

- Parent launches a native subagent.

16+

- Parent yields instead of waiting in-turn.

17+

- Subagent completion result is delivered to the original QA DM without a thread id.

18+

- Durable task delivery is marked delivered, not failed.

19+

docsRefs:

20+

- docs/tools/subagents.md

21+

- docs/help/testing.md

22+

- docs/channels/qa-channel.md

23+

codeRefs:

24+

- src/agents/subagent-announce-delivery.ts

25+

- src/agents/subagent-registry-lifecycle.ts

26+

- src/agents/tools/sessions-yield-tool.ts

27+

- extensions/qa-lab/src/providers/mock-openai/server.ts

28+

execution:

29+

kind: flow

30+

summary: Reproduce yielded-parent subagent completion delivery and require frozen-result fallback to the QA DM.

31+

config:

32+

prompt: "Subagent direct fallback QA check: spawn one native subagent worker. The worker must finish with exactly QA-SUBAGENT-DIRECT-FALLBACK-OK. After spawning it, call sessions_yield and wait for the completion event. Do not use ACP."

33+

expectedMarker: QA-SUBAGENT-DIRECT-FALLBACK-OK

34+

expectedLabel: qa-direct-fallback-worker

35+

```

36+37+

```yaml qa-flow

38+

steps:

39+

- name: yielded parent receives child completion through direct fallback

40+

actions:

41+

- call: waitForGatewayHealthy

42+

args:

43+

- ref: env

44+

- 120000

45+

- call: waitForQaChannelReady

46+

args:

47+

- ref: env

48+

- 120000

49+

- call: reset

50+

- set: sessionKey

51+

value:

52+

expr: "`agent:qa:subagent-direct-fallback:${randomUUID().slice(0, 8)}`"

53+

- call: runAgentPrompt

54+

args:

55+

- ref: env

56+

- sessionKey:

57+

ref: sessionKey

58+

message:

59+

expr: config.prompt

60+

timeoutMs:

61+

expr: liveTurnTimeoutMs(env, 90000)

62+

- call: waitForCondition

63+

saveAs: outbound

64+

args:

65+

- lambda:

66+

expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound' && String(message.text ?? '').includes(config.expectedMarker)).at(-1)"

67+

- expr: liveTurnTimeoutMs(env, 60000)

68+

- expr: "env.providerMode === 'mock-openai' ? 100 : 250"

69+

- assert:

70+

expr: "String(outbound.text ?? '').trim().includes(config.expectedMarker)"

71+

message:

72+

expr: "`fallback completion marker missing from outbound QA DM: ${recentOutboundSummary(state)}`"

73+

- if:

74+

expr: "Boolean(env.mock)"

75+

then:

76+

- set: fallbackDebugRequests

77+

value:

78+

expr: "[...(await fetchJson(`${env.mock.baseUrl}/debug/requests`))]"

79+

- assert:

80+

expr: "fallbackDebugRequests.some((request) => !request.toolOutput && /subagent direct fallback qa check/i.test(String(request.allInputText ?? '')) && request.plannedToolName === 'sessions_spawn' && request.plannedToolArgs?.label === config.expectedLabel)"

81+

message:

82+

expr: "`expected sessions_spawn for yielded fallback scenario, saw ${JSON.stringify(fallbackDebugRequests.map((request) => ({ plannedToolName: request.plannedToolName ?? null, plannedToolArgs: request.plannedToolArgs ?? null })))}`"

83+

- assert:

84+

expr: "fallbackDebugRequests.some((request) => /subagent direct fallback qa check/i.test(String(request.allInputText ?? '')) && request.plannedToolName === 'sessions_yield')"

85+

message:

86+

expr: "`expected sessions_yield for yielded fallback scenario, saw ${JSON.stringify(fallbackDebugRequests.map((request) => request.plannedToolName ?? null))}`"

87+

- call: waitForCondition

88+

saveAs: deliveredTask

89+

args:

90+

- lambda:

91+

expr: "(async () => { const payload = await runQaCli(env, ['tasks', 'list', '--json', '--runtime', 'subagent'], { timeoutMs: liveTurnTimeoutMs(env, 60000), json: true }); return (payload.tasks ?? []).find((task) => task.label === config.expectedLabel && task.deliveryStatus === 'delivered' && task.status === 'succeeded') ?? null; })()"

92+

- expr: liveTurnTimeoutMs(env, 30000)

93+

- 250

94+

- assert:

95+

expr: "deliveredTask.deliveryStatus === 'delivered'"

96+

message:

97+

expr: "`expected delivered task status for ${config.expectedLabel}, got ${JSON.stringify(deliveredTask)}`"

98+

detailsExpr: "outbound.text"

99+

```