memory: hand-off test "does not let a writer that created the lock while a live one was aside run beside its holder" fails intermittently on Windows since #5623

Abierto
#5,635 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
backend, testing

Línea de trabajo

Start with file-lock.test.ts and the withFileLock hand-off test named in the issue, then trace the lock handling in src/memory/index.ts, especially the Windows rename and EPERM pending-delete path. Reproduce the intermittent failure on Windows and determine whether the timing assumption is in the test or the hand-off logic. Done means the test passes deterministically without retries, and the hand-off window is closed if the cause is in index.ts.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug server-memory v2

Problem

Since #5623 (the fix for #5565) merged into v2/main as 13725688, Test memory (Windows) fails intermittently on one of the tests it added:

file-lock.test.ts > withFileLock > hand-off windows (#5565) > does not let a writer that created the lock while a live one was aside run beside its holder

AssertionError: promise resolved "'breaker ran'" instead of rejecting

Seen three times in the first eight Windows runs after the merge, each on a change that does not touch src/memory/ code:

  • v2/main push at 77d1bf3f (job 135207834310)
  • v2/main push at 640a8c31 (job 135217697055)
  • PR #5629 at 9db3591f (job 135219828145)

The same test passed on #5623's own Windows legs before it merged, and on Linux and macOS it has not failed.

Why it matters

The assertion is the one the fix exists for: the breaker took a successor's live lock aside, a third writer created its own lock in the gap, and the breaker then ran its operation instead of timing out. That is either a timing assumption in the test that does not hold on Windows, or the hand-off window #5565 meant to close still opening on Windows (for example around the rename that restores the lock, or the Windows EPERM pending-delete path). Which one is not yet established.

Every PR runs every server's tests, so until this is resolved about one Windows run in three goes red for reasons unrelated to the PR.

Expected

The test passes deterministically on Windows, with no retry, and if the cause is in index.ts rather than the test, the hand-off window is closed there as well.

Lenguaje dominante
TypeScript
Estrellas
92k
Forks
12k
Merge medio
3 h 46 min
PR fusionados (30 d)
206

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/servers

Todos los issues de modelcontextprotocol/servers

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.