Skip to content

The open-source app everyone uses to manage agents at work

Fix duplicate ACPX skills cleanup in test teardown (#16937)

Nicky Leach34be1b831bca
diff --git a/packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts b/packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts
index 193a126d9e..9de2b8c641 100644
--- a/packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts
+++ b/packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts
@@ -189,9 +189,9 @@ afterEach(async () => {
// Release every sealed skills tree before the plain `rm` below. `rm` does
// not restore write permission, so a tree still sealed at this point would
// otherwise fail with EACCES and hide the real test failure.
+ // Cancelled opens can reuse one home. Parallel cleanup must visit it once.
await Promise.all(
- materializedSkillsHomes
- .splice(0)
+ [...new Set(materializedSkillsHomes.splice(0))]
.map((skillsHome) => releaseMaterializedNativeRuntimeSkills(skillsHome)),
);
await Promise.all(