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

world-vercel waitForTerminalStatus drops the abort signal on its fallback read

Aperta Adatta ai principianti
#4,643 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@bluepegasus123 ci sta già lavorando.

Dal 26/10/2026.

  • #5058 di @bluepegasus123 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Inizia da waitForWorkflowRunTerminalStatus e segui le chiamate di fallback a getWorkflowRun. Poi segui la chiamata fino a readRun per vedere come vengono passate le opzioni della richiesta. Controlla le letture di fallback dopo una risposta con uno stato non supportato, durante la finestra di stato non supportato e quando il budget è zero; il lavoro è completato quando un’attesa interrotta viene rifiutata prontamente in ogni percorso. Esegui i test pertinenti per l’attesa dello stato terminale e aggiungi test per il comportamento di interruzione.

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

Descrizione

waitForWorkflowRunTerminalStatus passes params.signal to the long-poll read of /v2/runs/:id/status, but its three fallback paths call getWorkflowRun(id, { resolveData }, config) without it: after the status route answers 404/405/501/504, during the five-minute unsupported window that follows, and when the budget clamps to zero. An aborted wait on those paths keeps its request open until the request timeout (60s by default) and keeps holding a connection from the default pool.

Versions: @workflow/world-vercel 5.0.1, same code on main at 2d2159e.

// node repro.mjs fallback|native
import http from 'node:http';
const mode = process.argv[2];
const server = http.createServer((req, res) => {
  if (req.url.includes('/status') && mode === 'fallback') res.writeHead(404).end();
  // otherwise never answer
});
await new Promise((r) => server.listen(0, '127.0.0.1', r));
process.env.VERCEL_WORKFLOW_SERVER_URL = `http://127.0.0.1:${server.address().port}`;
const { createStorage } = await import('@workflow/world-vercel');
const runs = createStorage({ token: 'fake-token' }).runs;
const t = Date.now();
const out = await runs
  .waitForTerminalStatus('wrun_01JZZZZZZZZZZZZZZZZZZZZZZZ', { timeoutMs: 30_000, signal: AbortSignal.timeout(1_000) })
  .then(() => 'resolved', (e) => `rejected ${e.name}`);
console.log(mode, out, `${Date.now() - t}ms`);
process.exit(0);
native rejected WorkflowWorldError 1007ms
fallback rejected WorkflowWorldError 60013ms

Expected: the wait rejects about 1s after the signal aborts on every path.
Actual: on the fallback read it rejects only when the 60s request timeout fires.

Possible fix: forward signal through getWorkflowRun to readRun on the fallback calls, and check signal.throwIfAborted() at entry.

Lingua principale
TypeScript
Stelle
2.5k
Fork
385
Merge medio
23h 29m
PR unite (30g)
162

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un 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 vercel/workflow

Tutte le issue di vercel/workflow

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.