Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#441 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #448 của @yujiachen-y — đã merge

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu tại packages/tui/src/headless/invocation.ts (trình phân tích timeout quanh L402-419), sau đó lần theo policy.timeoutMs qua packages/tui/src/headless/runner.ts (L249-261) đến setTimeout cuối cùng trong packages/tui/src/application/run-coordinator.ts (L198-204). Quyết định nơi nào thi hành giới hạn 2147483647 ms của Node: từ chối các khoảng thời gian quá lớn tại thời điểm phân tích hay kẹp/lặp với các khoảng thời gian hẹn giờ có giới hạn. Hoàn thành khi --timeout 2147483648ms và --timeout 600h không còn hết hạn ngay lập tức, và một bài kiểm tra tái hiện hành vi tràn bộ nhớ đã báo cáo và pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
2k
Fork
250
Merge trung bình
7 giờ 40 phút
Pull request đã merge (30 ngày)
148

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MiniMax-AI/minimax-code

Tất cả issue của MiniMax-AI/minimax-code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.