From 086380f5e045ae4a31e23725a32a52c07805ec9c Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Mon, 23 Feb 2026 01:58:14 -0500 Subject: [PATCH] test: cover /compact agentDir forwarding --- CHANGELOG.md | 1 + src/auto-reply/reply/commands.test.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3f68af312..779d56805ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Agents/Compaction: pass `agentDir` into manual `/compact` command runs so compaction auth/profile resolution stays scoped to the active agent. (#24133) thanks @Glucksberg. - Security/Skills: escape user-controlled prompt, filename, and output-path values in `openai-image-gen` HTML gallery generation to prevent stored XSS in generated `index.html` output. (#12538) Thanks @CornBrother0x. - Security/Skills: harden `skill-creator` packaging by skipping symlink entries and rejecting files whose resolved paths escape the selected skill root. (#24260, #16959) Thanks @CornBrother0x and @vincentkoc. - Security/OTEL: redact sensitive values (API keys, tokens, credential fields) from diagnostics-otel log bodies, log attributes, and error/reason span fields before OTLP export. (#12542) Thanks @brandonwise. diff --git a/src/auto-reply/reply/commands.test.ts b/src/auto-reply/reply/commands.test.ts index db4ba74db40..a402f8dd42b 100644 --- a/src/auto-reply/reply/commands.test.ts +++ b/src/auto-reply/reply/commands.test.ts @@ -389,6 +389,7 @@ describe("/compact command", () => { From: "+15550001", To: "+15550002", }); + const agentDir = "/tmp/openclaw-agent-compact"; vi.mocked(compactEmbeddedPiSession).mockResolvedValueOnce({ ok: true, compacted: false, @@ -397,6 +398,7 @@ describe("/compact command", () => { const result = await handleCompactCommand( { ...params, + agentDir, sessionEntry: { sessionId: "session-1", updatedAt: Date.now(), @@ -423,6 +425,7 @@ describe("/compact command", () => { groupChannel: "#general", groupSpace: "workspace-1", spawnedBy: "agent:main:parent", + agentDir, }), ); });