Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(pi): budget real filesystem work in bulk skills regression

DavidShen9b44f4c7f930
diff --git a/packages/maker-core/src/agents/pi/__tests__/pi-native-auto-compact.test.ts b/packages/maker-core/src/agents/pi/__tests__/pi-native-auto-compact.test.ts
index 72b9ea6770..9903d32ddf 100644
--- a/packages/maker-core/src/agents/pi/__tests__/pi-native-auto-compact.test.ts
+++ b/packages/maker-core/src/agents/pi/__tests__/pi-native-auto-compact.test.ts
@@ -390,6 +390,9 @@ describe("PiAgent native auto-compaction ownership", () => {
} finally {await handle.close();}
});
+ // This exercises 350 real skill directories, projection links and realpath
+ // checks, not a startup latency budget. Windows CI can exceed Vitest's 5s
+ // default while doing that I/O; retain the full fixture and every assertion.
it('keeps hundreds of long managed skill paths out of Windows argv and cleans only session links', async () => {
const skills = Array.from({ length: 350 }, (_, index) => {
const file = path.join(agentHome, 'approved', 'revision-'.repeat(12), String(index), 'SKILL.md');
@@ -414,7 +417,7 @@ describe("PiAgent native auto-compaction ownership", () => {
} finally { await handle.close(); }
await vi.waitFor(() => expect(existsSync(projection)).toBe(false));
expect(skills.every((skill) => existsSync(skill.path))).toBe(true);
- });
+ }, 30_000);
it.each(['discovery', 'realpath', 'mkdir', 'symlink'] as const)('cleans startup resources when managed Skill %s fails', async (operation) => {
const skill = path.join(agentHome, 'managed', 'learn', 'SKILL.md');