diff --git a/integration-tests/cli/acp-integration.test.ts b/integration-tests/cli/acp-integration.test.ts index 9b8e6788937..83a062c0bb0 100644 --- a/integration-tests/cli/acp-integration.test.ts +++ b/integration-tests/cli/acp-integration.test.ts @@ -1145,84 +1145,6 @@ function setupAcpTest( await fakeServer.close(); } }); - - it('injects managed auto-memory into the first ACP model request', async () => { - const marker = 'ACP-MEMORY-ZEPHYR-4207'; - const prompt = 'What is the ACP zephyr codeword?'; - const fakeServer = await startFakeOpenAIServer(async ({ body }) => { - // Keep the model selector outside the initial Recall budget. The - // deterministic match must still reach the main streamed request. - if (body['stream'] !== true) await delay(250); - return { content: 'done' }; - }); - const rig = new TestRig(); - await rig.setup('acp managed auto-memory recall', { - settings: { - memory: { - enableManagedAutoMemory: true, - enableManagedAutoDream: false, - }, - }, - }); - const memoryDir = join(rig.testDir!, '.qwen', 'memory', 'project'); - mkdirSync(memoryDir, { recursive: true }); - writeFileSync( - join(memoryDir, 'acp-zephyr.md'), - [ - '---', - 'type: project', - 'name: ACP Zephyr Codeword', - `description: The ACP zephyr codeword is ${marker}.`, - '---', - '', - `The ACP zephyr codeword is ${marker}.`, - ].join('\n'), - 'utf8', - ); - - const { sendRequest, cleanup, stderr } = setupAcpTest(rig, { - env: { - OPENAI_API_KEY: 'fake-key', - OPENAI_BASE_URL: fakeServer.baseUrl, - OPENAI_MODEL: 'fake-model', - QWEN_MODEL: 'fake-model', - QWEN_CODE_MEMORY_LOCAL: '1', - NO_PROXY: '127.0.0.1,localhost', - no_proxy: '127.0.0.1,localhost', - }, - }); - - try { - await sendRequest('initialize', { - protocolVersion: 1, - clientCapabilities: { fs: { readTextFile: true, writeTextFile: true } }, - }); - await sendRequest('authenticate', { methodId: 'openai' }); - const newSession = (await sendRequest('session/new', { - cwd: rig.testDir!, - mcpServers: [], - })) as { sessionId: string }; - - await sendRequest('session/prompt', { - sessionId: newSession.sessionId, - prompt: [{ type: 'text', text: prompt }], - }); - - const mainRequest = fakeServer.requests.find( - ({ body }) => - body['stream'] === true && - JSON.stringify(body['messages']).includes(prompt), - ); - expect(mainRequest).toBeDefined(); - expect(JSON.stringify(mainRequest?.body['messages'])).toContain(marker); - } catch (error) { - if (stderr.length) console.error('Agent stderr:', stderr.join('')); - throw error; - } finally { - await cleanup(); - await fakeServer.close(); - } - }); }); (IS_SANDBOX ? describe.skip : describe)(