From 630ddf925641462be9cc512ffb0311b8faf94808 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 16 Jul 2026 14:59:10 -0400 Subject: [PATCH] Revert "fix(mcp): handle resources absent from aggregate archive (#71694)" This reverts commit 2c6b8b84e7d5efc3bee46a43d1893929fc93514d. --- services/mcp/tests/integration/manifest.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/services/mcp/tests/integration/manifest.test.ts b/services/mcp/tests/integration/manifest.test.ts index 9affdffb24e5..d992fc1fb111 100644 --- a/services/mcp/tests/integration/manifest.test.ts +++ b/services/mcp/tests/integration/manifest.test.ts @@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest' import { fetchContextMillResources, loadManifestFromArchive } from '@/resources/internals' describe('Context-Mill Manifest Integration', () => { - it('should fetch, unzip, and validate available resources from GitHub releases', async () => { + it('should fetch, unzip, and validate the manifest from GitHub releases', async () => { const archive = await fetchContextMillResources() // Verify archive is not empty @@ -16,19 +16,19 @@ describe('Context-Mill Manifest Integration', () => { expect(validatedManifest.version).toBe('1.0') expect(Array.isArray(validatedManifest.resources)).toBe(true) - // The manifest may include resources that are not part of the aggregate archive. - const availableResources = validatedManifest.resources.filter((entry) => !entry.file || archive[entry.file]) + // Verify we have actual resources + expect(validatedManifest.resources.length).toBeGreaterThan(0) - // Verify the archive contains actual resources - expect(availableResources.length).toBeGreaterThan(0) - - // Verify each available resource has required fields - for (const entry of availableResources) { + // Verify each resource has required fields and its file exists in archive + for (const entry of validatedManifest.resources) { expect(entry.id).toBeTruthy() expect(entry.name).toBeTruthy() expect(entry.resource).toBeTruthy() expect(entry.resource.mimeType).toBeTruthy() expect(entry.resource.text).toBeTruthy() + if (entry.file) { + expect(archive[entry.file]).toBeTruthy() + } } }, 30000) })