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

推荐订阅源

H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
L
LangChain Blog
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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
fix(agents): wait for compaction before requester steerin...
alkor2000 · 2026-05-28 · via Recent Commits to openclaw:main

@@ -783,6 +783,121 @@ describe("deliverSubagentAnnouncement active requester steering", () => {

783783

);

784784

});

785785786+

it("waits through compaction and re-steers the active requester (86566)", async () => {

787+

const previousTestFast = process.env.OPENCLAW_TEST_FAST;

788+

process.env.OPENCLAW_TEST_FAST = "1";

789+

try {

790+

// First steer attempt observes a compacting run; once compaction ends the

791+

// same wake succeeds, so completion must stay on the steering path instead

792+

// of falling back to the direct requester-agent handoff.

793+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

794+

"compacting",

795+

true,

796+

]);

797+

const callGateway = await deliverSteeredAnnouncement({

798+

queueEmbeddedAgentMessageWithOutcome,

799+

requesterOrigin: {

800+

channel: "slack",

801+

to: "channel:C123",

802+

accountId: "acct-1",

803+

},

804+

});

805+806+

expect(callGateway).not.toHaveBeenCalled();

807+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledTimes(2);

808+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenNthCalledWith(

809+

2,

810+

"paperclip-session",

811+

"child done",

812+

{

813+

steeringMode: "all",

814+

debounceMs: 0,

815+

waitForTranscriptCommit: true,

816+

deliveryTimeoutMs: 120_000,

817+

},

818+

);

819+

} finally {

820+

if (previousTestFast === undefined) {

821+

delete process.env.OPENCLAW_TEST_FAST;

822+

} else {

823+

process.env.OPENCLAW_TEST_FAST = previousTestFast;

824+

}

825+

}

826+

});

827+828+

it("keeps retrying compaction past the backoff schedule until the delivery timeout (86566)", async () => {

829+

const previousTestFast = process.env.OPENCLAW_TEST_FAST;

830+

process.env.OPENCLAW_TEST_FAST = "1";

831+

try {

832+

// The backoff schedule has four entries, but a compaction that only

833+

// finishes after the schedule is exhausted should still be retried while

834+

// the run stays within the delivery timeout (120s here). Five compacting

835+

// outcomes (more than the schedule length) precede the queued success, so

836+

// the wake must keep retrying past the schedule instead of falling back.

837+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

838+

"compacting",

839+

"compacting",

840+

"compacting",

841+

"compacting",

842+

"compacting",

843+

true,

844+

]);

845+

const callGateway = await deliverSteeredAnnouncement({

846+

queueEmbeddedAgentMessageWithOutcome,

847+

requesterOrigin: {

848+

channel: "slack",

849+

to: "channel:C123",

850+

accountId: "acct-1",

851+

},

852+

});

853+854+

expect(callGateway).not.toHaveBeenCalled();

855+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledTimes(6);

856+

} finally {

857+

if (previousTestFast === undefined) {

858+

delete process.env.OPENCLAW_TEST_FAST;

859+

} else {

860+

process.env.OPENCLAW_TEST_FAST = previousTestFast;

861+

}

862+

}

863+

});

864+865+

it("does not retry non-compacting steer failures (86566)", async () => {

866+

// Only compacting is treated as transient; other wake failures keep their

867+

// existing single-attempt fallback behavior.

868+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

869+

"no_active_run",

870+

true,

871+

]);

872+

const callGateway = createGatewayMock();

873+

testing.setDepsForTest({

874+

callGateway,

875+

getRequesterSessionActivity: () => ({

876+

sessionId: "paperclip-session",

877+

isActive: true,

878+

}),

879+

queueEmbeddedAgentMessageWithOutcome,

880+

getRuntimeConfig: () =>

881+

({

882+

messages: { queue: { mode: "steer", debounceMs: 0 } },

883+

}) as never,

884+

});

885+886+

const result = await deliverSubagentAnnouncement({

887+

requesterSessionKey: "agent:eng:paperclip:issue:123",

888+

targetRequesterSessionKey: "agent:eng:paperclip:issue:123",

889+

triggerMessage: "child done",

890+

steerMessage: "child done",

891+

requesterIsSubagent: false,

892+

expectsCompletionMessage: false,

893+

directIdempotencyKey: "announce-no-active-run-no-retry",

894+

});

895+896+

// Non-compacting failure is not retried: the steer is attempted once.

897+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledOnce();

898+

expectRecordFields(result, { path: "none" });

899+

});

900+786901

it("does not report delivery when active requester steering is rejected", async () => {

787902

const queueEmbeddedAgentMessageWithOutcome = vi.fn(async (sessionId: string) => ({

788903

queued: false as const,

@@ -915,6 +1030,42 @@ describe("deliverSubagentAnnouncement completion delivery", () => {

9151030

expect(callGateway).not.toHaveBeenCalled();

9161031

});

91710321033+

it("waits through compaction on the completion handoff wake (86566)", async () => {

1034+

const previousTestFast = process.env.OPENCLAW_TEST_FAST;

1035+

process.env.OPENCLAW_TEST_FAST = "1";

1036+

try {

1037+

// The generated-completion active wake (expectsCompletionMessage) must also

1038+

// wait through a compacting run and re-steer the same wake instead of

1039+

// falling back to direct delivery.

1040+

const callGateway = createGatewayMock();

1041+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

1042+

"compacting",

1043+

true,

1044+

]);

1045+

const result = await deliverSlackThreadAnnouncement({

1046+

callGateway,

1047+

sessionId: "requester-session-1",

1048+

isActive: true,

1049+

expectsCompletionMessage: true,

1050+

directIdempotencyKey: "announce-compaction-completion",

1051+

queueEmbeddedAgentMessageWithOutcome,

1052+

});

1053+1054+

expectRecordFields(result, {

1055+

delivered: true,

1056+

path: "steered",

1057+

});

1058+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledTimes(2);

1059+

expect(callGateway).not.toHaveBeenCalled();

1060+

} finally {

1061+

if (previousTestFast === undefined) {

1062+

delete process.env.OPENCLAW_TEST_FAST;

1063+

} else {

1064+

process.env.OPENCLAW_TEST_FAST = previousTestFast;

1065+

}

1066+

}

1067+

});

1068+9181069

it("does not also direct-run a queued active completion", async () => {

9191070

const callGateway = createGatewayMock();

9201071

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeMock(true);