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

🤖 bug: unlocked handle writers can still replace or drop concurrent workspace-turn handle writes (#5362 follow-up)

Aperta
#5,432 1 commento 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

Direzione di ricerca

Start at settleWorkspaceTurn and markWorkspaceTurnBackgroundWorkNotifyOnTerminal, then trace withWorkspaceTurnPublicationLock and the settlement callers; review refs #4926, #5362, and #5361 for locking assumptions. Done means settlement preserves an already-terminal record and attentionPolicy uses a publication-locked read-modify-write, so concurrent writes are not lost.

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

Descrizione

backlog

Problem

Follow-up from #5362. The owner's acceptance (markWorkspaceTurnAccepted) and a foreign explicit interrupt (interruptWorkspaceTurn) now read and write the handle under a per-handle cross-process publication lock, so neither overwrites a record the other wrote after its read.

settleWorkspaceTurn still reads the handle under the owner's in-process settlement lock only, then awaits before its upsert. If another backend's explicit interrupt writes interrupted in that window, the owner's settlement replaces it with its own terminal outcome (for example error). This is step 3 of #4926. The execution mirror stays consistent with the handle (#5361 fences the foreign mirror write), so the visible effect is a mislabeled terminal outcome, not a running/terminal mismatch.

A second unlocked writer has the same shape: markWorkspaceTurnBackgroundWorkNotifyOnTerminal writes attentionPolicy (with a new updatedAt) without the publication lock. If it lands between the owner acceptance's locked re-read and its upsert, the acceptance publishes running from the older record and the policy is lost, so the terminal background notification never fires. The same loss existed before #5362 (the acceptance then wrote back a read taken before its mirror-claim await). Found in review of #5433.

Possible fix

Take the same withWorkspaceTurnPublicationLock around settlement's read and write (keep the current record when it is already terminal) and around the attention-policy read-modify-write. The settlement path has many callers, so it needs its own review.

Refs #4926, #5362


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

Lingua principale
TypeScript
Stelle
2k
Fork
140
Merge medio
2h 27m
PR unite (30g)
873

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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.