Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#4,909 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
2k
Fork
136
Merge medio
8h 34m
PR unite (30g)
620

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/xum

Tutte le issue di coder/xum

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.