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

推荐订阅源

SecWiki News
SecWiki News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
博客园 - 叶小钗
S
SegmentFault 最新的问题
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
L
Lohrmann on Cybersecurity
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
J
Java Code Geeks
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 三生石上(FineUI控件)
Attack and Defense Labs
Attack and Defense Labs
AI
AI
The Cloudflare Blog
T
Tailwind CSS Blog
S
Schneier on Security
爱范儿
爱范儿
PCI Perspectives
PCI Perspectives
Stack Overflow Blog
Stack Overflow Blog
S
Secure Thoughts
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
V2EX - 技术
V2EX - 技术
S
Securelist
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Help Net Security
Help Net Security
C
Cisco Blogs
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
K
Kaspersky official blog
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Simon Willison's Weblog
Simon Willison's Weblog

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(qa): close remaining mock qa e2e regressions · openclaw/openclaw@14198a1
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -937,6 +937,70 @@ describe("gateway startup reconciliation", () => {

937937

}

938938

});

939939
940+

it("reconciles disabled->enabled config changes without waiting for another agent turn", async () => {

941+

vi.useFakeTimers();

942+

clearInternalHooks();

943+

const logger = createLogger();

944+

const harness = createCronHarness();

945+

const onMock = vi.fn();

946+

const api: DreamingPluginApiTestDouble = {

947+

config: {

948+

plugins: {

949+

entries: {

950+

"memory-core": {

951+

config: {

952+

dreaming: {

953+

enabled: false,

954+

frequency: "0 2 * * *",

955+

timezone: "UTC",

956+

},

957+

},

958+

},

959+

},

960+

},

961+

},

962+

pluginConfig: {},

963+

logger,

964+

runtime: {},

965+

on: onMock,

966+

};

967+
968+

try {

969+

registerShortTermPromotionDreamingForTest(api);

970+

await triggerGatewayStart(onMock, {

971+

config: api.config,

972+

getCron: () => harness.cron,

973+

});

974+
975+

expect(harness.addCalls).toHaveLength(0);

976+
977+

api.config = {

978+

plugins: {

979+

entries: {

980+

"memory-core": {

981+

config: {

982+

dreaming: {

983+

enabled: true,

984+

frequency: "30 6 * * *",

985+

timezone: "America/New_York",

986+

},

987+

},

988+

},

989+

},

990+

},

991+

} as OpenClawConfig;

992+
993+

await vi.advanceTimersByTimeAsync(constants.RUNTIME_CRON_RECONCILE_INTERVAL_MS);

994+
995+

expect(harness.addCalls).toHaveLength(1);

996+

expectCronSchedule(requireAddCall(harness, 0).schedule, "30 6 * * *", "America/New_York");

997+

} finally {

998+

await triggerGatewayStop(onMock).catch(() => undefined);

999+

vi.useRealTimers();

1000+

clearInternalHooks();

1001+

}

1002+

});

1003+
9401004

it("reconciles cadence/timezone updates against the active cron service after startup", async () => {

9411005

clearInternalHooks();

9421006

const logger = createLogger();

Original file line numberDiff line numberDiff line change

@@ -695,6 +695,7 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

695695

let lastRuntimeConfigKey: string | null = null;

696696

let lastRuntimeCronRef: CronServiceLike | null = null;

697697

let startupCronRetryTimer: ReturnType<typeof setTimeout> | null = null;

698+

let runtimeCronReconcileTimer: ReturnType<typeof setInterval> | null = null;

698699

let startupCronRetryAttempts = 0;

699700

let disposed = false;

700701

@@ -723,6 +724,10 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

723724

const disposeStartupCronRetry = (): void => {

724725

disposed = true;

725726

clearStartupCronRetry();

727+

if (runtimeCronReconcileTimer) {

728+

clearInterval(runtimeCronReconcileTimer);

729+

runtimeCronReconcileTimer = null;

730+

}

726731

gatewayContext = null;

727732

resolveStartupCron = null;

728733

};

@@ -856,6 +861,18 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

856861

}, STARTUP_CRON_RETRY_DELAY_MS);

857862

};

858863
864+

const startRuntimeCronReconcileTimer = (): void => {

865+

if (runtimeCronReconcileTimer) {

866+

return;

867+

}

868+

runtimeCronReconcileTimer = setInterval(() => {

869+

void reconcileManagedDreamingCron({ reason: "runtime" }).catch((err) => {

870+

api.logger.error(`memory-core: dreaming cron reconcile failed: ${formatErrorMessage(err)}`);

871+

});

872+

}, RUNTIME_CRON_RECONCILE_INTERVAL_MS);

873+

runtimeCronReconcileTimer.unref?.();

874+

};

875+
859876

api.on("gateway_start", async (_event, ctx) => {

860877

disposed = false;

861878

// Store the gateway context for runtime cron resolution retries.

@@ -866,6 +883,7 @@ export function registerShortTermPromotionDreaming(api: OpenClawPluginApi): void

866883

startupConfig: ctx.config,

867884

startupCron: () => resolveCronServiceFromGatewayContext(ctx),

868885

});

886+

startRuntimeCronReconcileTimer();

869887

scheduleStartupCronRetry();

870888

} catch (err) {

871889

api.logger.error(

@@ -933,6 +951,7 @@ export const testing = {

933951

DEFAULT_DREAMING_MIN_RECALL_COUNT: DEFAULT_MEMORY_DREAMING_MIN_RECALL_COUNT,

934952

DEFAULT_DREAMING_MIN_UNIQUE_QUERIES: DEFAULT_MEMORY_DREAMING_MIN_UNIQUE_QUERIES,

935953

DEFAULT_DREAMING_RECENCY_HALF_LIFE_DAYS: DEFAULT_MEMORY_DREAMING_RECENCY_HALF_LIFE_DAYS,

954+

RUNTIME_CRON_RECONCILE_INTERVAL_MS,

936955

STARTUP_CRON_RETRY_DELAY_MS,

937956

STARTUP_CRON_RETRY_MAX_ATTEMPTS,

938957

},

Original file line numberDiff line numberDiff line change

@@ -3034,6 +3034,101 @@ describe("qa mock openai server", () => {

30343034

expect(requireRecord(await debug.json(), "debug request").imageInputCount).toBe(1);

30353035

});

30363036
3037+

it("answers image prompts when media context is the latest text part", async () => {

3038+

const server = await startQaMockOpenAiServer({

3039+

host: "127.0.0.1",

3040+

port: 0,

3041+

});

3042+

cleanups.push(async () => {

3043+

await server.stop();

3044+

});

3045+
3046+

const response = await fetch(`${server.baseUrl}/v1/responses`, {

3047+

method: "POST",

3048+

headers: { "content-type": "application/json" },

3049+

body: JSON.stringify({

3050+

stream: false,

3051+

model: "mock-openai/gpt-5.5",

3052+

input: [

3053+

{

3054+

role: "user",

3055+

content: [

3056+

{ type: "input_text", text: "Image understanding check: what do you see?" },

3057+

{

3058+

type: "input_image",

3059+

source: {

3060+

type: "base64",

3061+

mime_type: "image/png",

3062+

data: QA_IMAGE_PNG_BASE64,

3063+

},

3064+

},

3065+

{

3066+

type: "input_text",

3067+

text: "[media attached: media://inbound/red-top-blue-bottom.png (image/png)]",

3068+

},

3069+

],

3070+

},

3071+

],

3072+

}),

3073+

});

3074+

expect(response.status).toBe(200);

3075+

const payload = (await response.json()) as {

3076+

output?: Array<{ content?: Array<{ text?: string }> }>;

3077+

};

3078+

const text = payload.output?.[0]?.content?.[0]?.text ?? "";

3079+

expect(text.toLowerCase()).toContain("red");

3080+

expect(text.toLowerCase()).toContain("blue");

3081+

});

3082+
3083+

it("lets image prompts beat stale exact marker directives from chat history", async () => {

3084+

const server = await startMockServer();

3085+
3086+

const response = await fetch(`${server.baseUrl}/v1/responses`, {

3087+

method: "POST",

3088+

headers: { "content-type": "application/json" },

3089+

body: JSON.stringify({

3090+

stream: false,

3091+

model: "mock-openai/gpt-5.5",

3092+

input: [

3093+

makeUserInput("Control UI bridge check. Marker exact marker: `ui bridge armed`"),

3094+

{

3095+

role: "assistant",

3096+

content: [{ type: "output_text", text: "ui bridge armed" }],

3097+

},

3098+

{

3099+

role: "user",

3100+

content: [

3101+

{

3102+

type: "input_text",

3103+

text: "Image understanding check: describe the top and bottom colors.",

3104+

},

3105+

{

3106+

type: "input_image",

3107+

source: {

3108+

type: "base64",

3109+

mime_type: "image/png",

3110+

data: QA_IMAGE_PNG_BASE64,

3111+

},

3112+

},

3113+

{

3114+

type: "input_text",

3115+

text: "[media attached: media://inbound/red-top-blue-bottom.png (image/png)]",

3116+

},

3117+

],

3118+

},

3119+

],

3120+

}),

3121+

});

3122+

expect(response.status).toBe(200);

3123+

const payload = (await response.json()) as {

3124+

output?: Array<{ content?: Array<{ text?: string }> }>;

3125+

};

3126+

const text = payload.output?.[0]?.content?.[0]?.text ?? "";

3127+

expect(text.toLowerCase()).toContain("red");

3128+

expect(text.toLowerCase()).toContain("blue");

3129+

expect(text).not.toBe("ui bridge armed");

3130+

});

3131+
30373132

it("handles deeply nested image input shapes without recursive traversal failure", async () => {

30383133

const server = await startQaMockOpenAiServer({

30393134

host: "127.0.0.1",

Original file line numberDiff line numberDiff line change

@@ -1036,6 +1036,12 @@ function buildAssistantText(

10361036

if (isHeartbeatPrompt(prompt)) {

10371037

return "HEARTBEAT_OK";

10381038

}

1039+

if (/roundtrip image inspection check/i.test(allInputText) && imageInputCount > 0) {

1040+

return "Protocol note: the generated attachment shows the same QA lighthouse scene from the previous step.";

1041+

}

1042+

if (/image understanding check/i.test(allInputText) && imageInputCount > 0) {

1043+

return "Protocol note: the attached image is split horizontally, with red on top and blue on the bottom.";

1044+

}

10391045

if (/\bmarker\b/i.test(allInputText) && exactReplyDirective) {

10401046

return exactReplyDirective;

10411047

}

@@ -1118,12 +1124,6 @@ function buildAssistantText(

11181124

"- Re-open the copied file for final verification.",

11191125

].join("\n");

11201126

}

1121-

if (/roundtrip image inspection check/i.test(prompt) && imageInputCount > 0) {

1122-

return "Protocol note: the generated attachment shows the same QA lighthouse scene from the previous step.";

1123-

}

1124-

if (/image understanding check/i.test(prompt) && imageInputCount > 0) {

1125-

return "Protocol note: the attached image is split horizontally, with red on top and blue on the bottom.";

1126-

}

11271127

if (

11281128

/interrupted by a gateway reload/i.test(prompt) &&

11291129

/subagent recovery worker/i.test(allInputText)

@@ -1565,6 +1565,7 @@ async function buildResponsesPayload(

15651565

extractExactReplyDirective(prompt) ?? extractExactReplyDirective(allInputText);

15661566

const exactMarkerDirective =

15671567

extractExactMarkerDirective(prompt) ?? extractExactMarkerDirective(allInputText);

1568+

const imageInputCount = countImageInputs(input);

15681569

const firstExactMarkerDirective = extractLabeledMarkerDirective(

15691570

allInputText,

15701571

"first exact marker",

@@ -1651,6 +1652,16 @@ async function buildResponsesPayload(

16511652

if (/fanout worker beta/i.test(prompt)) {

16521653

return buildAssistantEvents("BETA-OK");

16531654

}

1655+

if (/roundtrip image inspection check/i.test(allInputText) && imageInputCount > 0) {

1656+

return buildAssistantEvents(

1657+

"Protocol note: the generated attachment shows the same QA lighthouse scene from the previous step.",

1658+

);

1659+

}

1660+

if (/image understanding check/i.test(allInputText) && imageInputCount > 0) {

1661+

return buildAssistantEvents(

1662+

"Protocol note: the attached image is split horizontally, with red on top and blue on the bottom.",

1663+

);

1664+

}

16541665

if (QA_REASONING_ONLY_RECOVERY_PROMPT_RE.test(allInputText)) {

16551666

if (!scenarioToolOutput) {

16561667

return buildToolCallEventsWithArgs("read", { path: "QA_KICKOFF_TASK.md" });

Original file line numberDiff line numberDiff line change

@@ -50,26 +50,38 @@ steps:

5050

- set: sessionKey

5151

value:

5252

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)}`"

53+

- try:

54+

actions:

55+

- call: runAgentPrompt

56+

args:

57+

- ref: env

58+

- sessionKey:

59+

ref: sessionKey

60+

message:

61+

expr: config.prompt

62+

timeoutMs:

63+

expr: liveTurnTimeoutMs(env, 90000)

64+

- call: waitForCondition

65+

saveAs: outbound

66+

args:

67+

- lambda:

68+

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

69+

- expr: liveTurnTimeoutMs(env, 180000)

70+

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

71+

- assert:

72+

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

73+

message:

74+

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

75+

catchAs: fallbackError

76+

catch:

77+

- set: fallbackDebugRequests

78+

value:

79+

expr: "env.mock ? [...(await fetchJson(`${env.mock.baseUrl}/debug/requests`))].slice(-20).map((request) => ({ plannedToolName: request.plannedToolName ?? null, plannedToolArgs: request.plannedToolArgs ?? null, prompt: String(request.prompt ?? '').slice(0, 280), allInputText: String(request.allInputText ?? '').slice(0, 280), toolOutput: request.toolOutput ? String(request.toolOutput).slice(0, 280) : null })) : []"

80+

- set: fallbackTasks

81+

value:

82+

expr: "(await runQaCli(env, ['tasks', 'list', '--json', '--runtime', 'subagent'], { timeoutMs: liveTurnTimeoutMs(env, 60000), json: true }).catch((error) => ({ error: String(error?.message ?? error) })))"

83+

- throw:

84+

expr: "`subagent fallback marker missing: ${fallbackError?.message ?? fallbackError}; outbound=${recentOutboundSummary(state, 8)} tasks=${JSON.stringify(fallbackTasks)} requests=${JSON.stringify(fallbackDebugRequests)}`"

7385

- if:

7486

expr: "Boolean(env.mock)"

7587

then:

@@ -89,7 +101,7 @@ steps:

89101

args:

90102

- lambda:

91103

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)

104+

- expr: liveTurnTimeoutMs(env, 60000)

93105

- 250

94106

- assert:

95107

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

Original file line numberDiff line numberDiff line change

@@ -94,7 +94,8 @@ steps:

9494

expr: "!env.mock || Boolean((await fetchJson(`${env.mock.baseUrl}/debug/requests`)).find((request) => request.plannedToolName === 'image_generate' && String(request.prompt ?? '').includes(config.generatePromptSnippet)))"

9595

message: expected image_generate call before roundtrip inspection

9696

- assert:

97-

expr: "!env.mock || (((await fetchJson(`${env.mock.baseUrl}/debug/requests`)).find((request) => String(request.prompt ?? '').includes(config.inspectPrompt))?.imageInputCount ?? 0) >= 1)"

98-

message: expected generated artifact to be reattached on follow-up turn

97+

expr: "!env.mock || (await fetchJson(`${env.mock.baseUrl}/debug/requests`)).some((request) => String(request.prompt ?? '').includes(config.inspectPrompt) && (request.imageInputCount ?? 0) >= 1)"

98+

message:

99+

expr: "`expected generated artifact to be reattached on follow-up turn; recentRequests=${JSON.stringify((await fetchJson(`${env.mock.baseUrl}/debug/requests`)).slice(-12).map((request) => ({ prompt: String(request.prompt ?? '').slice(0, 240), imageInputCount: request.imageInputCount, allInputText: String(request.allInputText ?? '').slice(0, 240) })))}`"

99100

detailsExpr: "`MEDIA:${mediaPath}\\n${outbound.text}`"

100101

```

Original file line numberDiff line numberDiff line change

@@ -88,7 +88,7 @@ steps:

8888

- lambda:

8989

async: true

9090

expr: "(() => readDoctorMemoryStatus(env).then((payload) => payload.dreaming?.phases?.deep?.managedCronPresent === true ? payload : undefined))()"

91-

- 30000

91+

- expr: liveTurnTimeoutMs(env, 90000)

9292

- 500

9393

- call: listCronJobs

9494

saveAs: jobs

@@ -108,6 +108,12 @@ steps:

108108

expr: "managed.id"

109109

catchAs: enableError

110110

catch:

111+

- set: enableFailureStatus

112+

value:

113+

expr: "(await readDoctorMemoryStatus(env).catch((error) => ({ error: String(error?.message ?? error) })))"

114+

- set: enableFailureJobs

115+

value:

116+

expr: "(await listCronJobs(env).catch((error) => [{ error: String(error?.message ?? error) }]))"

111117

- call: patchConfig

112118

args:

113119

- env:

@@ -127,7 +133,7 @@ steps:

127133

- ref: env

128134

- 60000

129135

- throw:

130-

expr: enableError

136+

expr: "`managed dreaming cron missing: ${enableError?.message ?? enableError}; status=${JSON.stringify(enableFailureStatus)} jobs=${JSON.stringify(enableFailureJobs)}`"

131137

detailsExpr: "JSON.stringify({ enabled: status.dreaming?.enabled ?? false, managedCronPresent: status.dreaming?.phases?.deep?.managedCronPresent ?? false, nextRunAtMs: status.dreaming?.phases?.deep?.nextRunAtMs ?? null })"

132138
133139

- name: runs the sweep after repeated recall signals and writes promotion artifacts