mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
test: defang two flaky tests on main CI
agent.integration "creates an autonomous live turn" — the prompt asked Claude to use a `Task` tool that doesn't exist in the SDK (Paseo synthesizes Task entries from sidechain notifications, but Claude can't invoke it). Haiku non-deterministically refused or complied. Switch to Bash with run_in_background, matching the deterministic claude-autonomous-wake-simple.real.e2e variant — same autonomous-wake mechanism is exercised. schedule/service "defaults new-agent modeId to provider's unattended mode" — afterEach raced AgentStorage's background snapshot persist, producing intermittent ENOTEMPTY rmdirs. Drain pending writes with agentStorage.flush() before rm.
This commit is contained in:
@@ -378,9 +378,9 @@ describe("ClaudeAgentSession integration", () => {
|
||||
streamSession(
|
||||
handle.session,
|
||||
[
|
||||
"Use the Task tool to start a background sub-agent.",
|
||||
"In that task, run the Bash command exactly: sleep 3 && echo BACKGROUND_DONE",
|
||||
"Do not wait for task completion.",
|
||||
"Use the Bash tool with run_in_background.",
|
||||
"Run exactly: sleep 3",
|
||||
"Do not wait for the task result.",
|
||||
"Reply immediately with exactly: SPAWNED",
|
||||
`When the background task completes later, reply with exactly: ${autonomousWakeToken}`,
|
||||
].join(" "),
|
||||
|
||||
@@ -27,6 +27,9 @@ describe("ScheduleService", () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Drain pending background persists before deleting the dir to avoid
|
||||
// ENOTEMPTY races when AgentManager flushes a snapshot mid-cleanup.
|
||||
await agentStorage.flush();
|
||||
await rm(tempDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user