TUI: saveResult.queue.test.ts hard-codes POSIX paths, so coverage:tui fails on Windows (not covered by #2748)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 90/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
El archivo de prueba clients/tui/tests/saveResult.queue.test.ts codifica de forma rígida rutas POSIX; edítalo para importar resolve desde node:path y usarlo en las cuatro assertions. Ejecuta npx vitest run __tests__/saveResult.queue.test.ts en clients/tui y npm run check. Hecho cuando ambas pruebas pasan en Windows mientras el comportamiento POSIX permanece sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which version line?
v2 — current (@modelcontextprotocol/inspector@latest)
Which client?
TUI
Inspector version
2.12.0 (v2/main at 72126af)
Node version
v24.14.0
Operating system (and browser, for the web client)
Windows 11 Home 10.0.26200 (PowerShell and Git Bash); npm 11.9.0 (CI pins 11.20.0)
Transport
Not applicable / never connected
MCP server under inspection
Not applicable. This is a unit-test failure; no server is involved.
Steps to reproduce
- On Windows 11 with Node 24:
git clone --branch v2/main https://github.com/modelcontextprotocol/inspector.git, thencd inspector && npm ci cd clients/tuinpx vitest run __tests__/saveResult.queue.test.ts(ornpm run coverage:tuifrom the repo root)
Expected behavior
Both tests in saveResultToFile queueing (#2571) pass on every platform, because coverage:tui is a stage of npm run local:gate.
Actual behavior
2 of 2 tests fail. saveResultToFile resolves its target with node:path resolve(cwd, path), so with cwd = "/d" the mocked writeFile receives D:\d\a.json, but the test asserts the literal "/d/a.json":
starts each write only after the previous one has settled:AssertionError: expected [ 'D:\d\a.json' ] to deeply equal [ '/d/a.json' ]a failed save does not hold up the ones queued after it:AssertionError: expected [] to have a length of 1 but got +0. This one is a consequence, not a second bug: the first test throws before it settles its mocked write, the module-scopesaveQueueinsrc/utils/saveResult.tsstays blocked behind it, andwritesis empty in the second test.
Full npm run coverage:tui on Windows: 1 failed file, 2 failed tests of 639. #2748 lists test:scripts, coverage:web and coverage:mcpdo as the Windows failures; this stage is not in it, and the gate chain aborts before reaching it.
Logs, errors, or screenshots
AssertionError: expected [ 'D:\d\a.json' ] to deeply equal [ '/d/a.json' ]
AssertionError: expected [] to have a length of 1 but got +0
Already prototyped a fix?
Prompt (reconstructed: the change was made interactively with Claude Code on my clone, not from one stored prompt; this prompt reproduces it):
In clients/tui/tests/saveResult.queue.test.ts the expected paths are POSIX literals ("/d/a.json", "/d/b.json", "/d/x.json", "/d/y.json") but saveResultToFile in clients/tui/src/utils/saveResult.ts builds its target with node:path resolve(cwd, path), so on Windows the mocked writeFile receives "D:\d\a.json" and both tests fail. Change only the test: import { resolve } from "node:path", add const inD = (name: string) => resolve("/d", name), and use inD("a.json") etc. in the four assertions. Do not change the source, do not skip on win32, do not mock node:path. Then run
npx vitest run __tests__/saveResult.queue.test.tsandnpm run checkin clients/tui, andnpm run coverage:tuifrom the root.
Verified: before, npm run coverage:tui on Windows 11 / Node 24.14 gave 2 failed of 639. After: 48 files, 640 tests pass; coverage S 97.51 / B 94.75 / F 97.68 / L 97.83; npm run check in clients/tui exits 0. On POSIX resolve("/d", "a.json") is "/d/a.json", so the assertions are unchanged there (I could not run Linux locally). The change is 12 insertions and 4 deletions in the one test file. For reference only, it is on my fork (I am not opening a PR, per CONTRIBUTING): https://github.com/modelcontextprotocol/inspector/compare/v2/main...Sonica-B:inspector:v2/fix/tui-save-queue-test-windows-paths
AI disclosure (MCP AI_POLICY.md): this report and the fix were produced primarily with Claude Code running on my machine: the Windows test runs, the root-cause analysis, the 16-line test change, and the drafting of this issue.
Before you submit
- I searched existing issues and this is not a duplicate.
- This is not a security vulnerability report (those go through the private advisory process).
- Lenguaje dominante
- TypeScript
- Estrellas
- 11.2k
- Forks
- 1.6k
- Merge medio
- 4 h 56 min
- PR fusionados (30 d)
- 155
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/inspector
-
local:gate cannot pass on Windows — pre-existing failures in test:scripts, coverage:web and coverage:mcpdoPosiblemente ocupada @olaservo la tomó hace 2 días. Abiertobug v2
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
modelcontextprotocol/inspector#2748 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
blocked chore v2
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
modelcontextprotocol/inspector#2548 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
blocked chore v2
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
modelcontextprotocol/inspector#2547 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Create the GitHub App for board writes and security-alert reads, and store its credentials as org secretsPosiblemente ocupada @cliffhall la tomó hace 7 días. Abiertochore v2
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
modelcontextprotocol/inspector#2544 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
chore v2
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
modelcontextprotocol/inspector#2543 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/inspector
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
galaxyproject/loom#616 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
eknowledger/toolbench#266 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
devdotfast/whiteboard#1415 · 1 comentario ·
Los mantenedores suelen responder en 1 día