test: cover /compact agentDir forwarding

This commit is contained in:
Gustavo Madeira Santana
2026-02-23 01:58:14 -05:00
parent 19d1fd364d
commit 086380f5e0
2 changed files with 4 additions and 0 deletions

View File

@@ -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.

View File

@@ -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,
}),
);
});