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

[Bug]: exec timeouts above the Node timer limit cancel almost immediately

Chiusa Adatta ai principianti
#441 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #448 di @yujiachen-y — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript
Ambito
cli

Direzione di ricerca

Parti da packages/tui/src/headless/invocation.ts (il parser del timeout attorno a L402-419), poi traccia policy.timeoutMs attraverso packages/tui/src/headless/runner.ts (L249-261) fino al setTimeout finale in packages/tui/src/application/run-coordinator.ts (L198-204). Decidi dove far rispettil il limite di 2147483647 ms di Node: rifiutare durate eccessive al momento del parsing o limitare/ciclare con intervalli di timer delimitati. Completato quando --timeout 2147483648ms e --timeout 600h non scadono più immediatamente e un test riproduce il comportamento di overflow segnalato e passa.

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

Descrizione

Product or interface

CLI - headless

Version

Source commit 4401b0edb0e6ad753d3952b75a31ec87807b6aab; Node.js 24.14.1; pnpm 11.7.0.

Platform

Windows x64, OS build 10.0.26200.

Issue area

Other — execution timeout handling.

Steps to reproduce

The headless parser accepts --timeout 2147483648ms and --timeout 600h
because both convert to positive safe integers. The value is forwarded as
policy.timeoutMs, then passed directly to Node's setTimeout:

A minimal check of the underlying Node behavior, with no provider or credentials:

const start = performance.now();
setTimeout(() => console.log('unexpected early expiry:', performance.now() - start), 2147483648);

I also tested the complete pinned invocation and coordinator executable bodies
after Node's TypeScript transformation, using real Node timers and a synthetic
conversation port that finishes after 40 ms. The port records abortSession
calls; no model, network, tool or stored session is used. Three repeats each:

Parsed timeout Coordinator result Abort reason
2h succeeded none
2147483647ms succeeded none
2147483648ms timeout timeout
600h timeout timeout

This is an isolated component reproduction, not a built-CLI, live-provider,
interactive-TUI or ACP acceptance test. No actual 25-day execution is needed.

Expected and actual behavior

Expected: reject unsupported durations before starting a run, or preserve the
requested deadline using bounded timer intervals.

Actual: larger accepted durations cancel the run almost immediately. Node
clamps values above 2147483647 to 1 ms, as documented in
its timer API.
The coordinator separately forwards a deadline about 25 days in the future,
so the immediate local cancellation contradicts that deadline.

This affects unusually large timeout values; ordinary hour-scale controls passed.

Redacted error summary
TimeoutOverflowWarning: 2147483648 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
Before submitting
  • I have searched existing issues.
  • I have included my version and removed sensitive information.
Lingua principale
TypeScript
Stelle
2k
Fork
250
Merge medio
7h 37m
PR unite (30g)
147

Preparare l'ambiente

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 MiniMax-AI/minimax-code

Tutte le issue di MiniMax-AI/minimax-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.