From f2bb5cef05e7dcb582581421c67e60f997c8dce3 Mon Sep 17 00:00:00 2001 From: Dudu-0223 Date: Tue, 25 Aug 2026 16:09:22 +0800 Subject: [PATCH] fix(snapshot): stabilize workflow prompt order --- packages/workflow/tool-workflow/tests/tool-workflow.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts b/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts index 959a3a3c8c..5026248c40 100644 --- a/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts +++ b/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts @@ -379,6 +379,10 @@ describe('dsh-tool-workflow', () => { const section = sections.find(s => s.name === 'tool:orchestrate') expect(section?.text).toContain('orchestrate') expect(sections.some(s => s.name === 'tool:workflow')).toBe(false) + ctx.systemPrompt.section({ name: 'tool:cordis-order-probe', order: 115.5, text: 'Cordis' }) + expect((await ctx.systemPrompt.assemble()).sections + .filter(s => s.name === 'tool:cordis-order-probe' || s.name === 'tool:orchestrate') + .map(s => s.name)).toEqual(['tool:cordis-order-probe', 'tool:orchestrate']) await fiber.dispose() expect(ctx.tools.get('orchestrate')).toBeUndefined() // …and gone with the fiber — a reload must not leak a stale section.