Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

🤖 bug: same-backend rename/remove can race an in-flight native terminal or editor open

Cerrado
#4,909 4 comentarios 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
typescript
Área
desktop

Línea de trabajo

Start by tracing TerminalService.openNativeAdmitted and WorkspaceService.recordExternalEditorOpenAdmitted, then read workspaceUseLeases.ts and the existing pendingNativeTerminalOpens/pendingExternalEditorRecordings handling. Verify how same-backend rename and removal are gated, and run the relevant existing tests if found. Done means mutation cannot race either launcher and the counts remain until the launcher returns.

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

Descripción

backlog

Problem

Follow-up from the review of #4907 (#4902). This backend's own rename and removal ignore its own terminal and editor use leases (by design: they tolerate or end this backend's terminals). So nothing on the same backend makes them wait for a native-terminal or external-editor open that is already past its gate probe:

  • TerminalService.openNativeAdmitted: after the last gate probe, the open still awaits the durable marker write and the launcher. A rename or removal started in that window can move or delete the checkout, and the terminal launches at the old namedWorkspacePath.
  • WorkspaceService.recordExternalEditorOpenAdmitted: after the lease, the marker write and the client round-trip are still in flight, and the launcher uses the path the client already has.

Other backends are not affected: their mutation gate refuses while this backend holds the lease (Dekker ordering in workspaceUseLeases.ts). There is no data loss; the terminal or editor opens at a path that no longer exists. This window existed before #4900 and #4907; those PRs only moved the probe.

Possible fix

Make same-backend rename and removal refuse (or wait) while pendingNativeTerminalOpens / pendingExternalEditorRecordings count an in-flight open for the workspace, as model-facing archive already does, and keep the count until the launcher returns.

Refs #4902, #4907


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lenguaje dominante
TypeScript
Estrellas
2k
Forks
139
Merge medio
6 h 58 min
PR fusionados (30 d)
774

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

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 coder/xum

Todos los issues de coder/xum

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.