[Bug]: exec timeouts above the Node timer limit cancel almost immediately
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #448 来自 @yujiachen-y —— 已合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- cli
调研方向
从 packages/tui/src/headless/invocation.ts(L402-419 附近的超时解析器)开始,然后沿着 packages/tui/src/headless/runner.ts(L249-261)追踪 policy.timeoutMs,直到 packages/tui/src/application/run-coordinator.ts(L198-204)中的最终 setTimeout。决定在哪里强制执行 Node 的 2147483647 ms 限制:在解析时拒绝过大的时长,还是使用有界的时间器间隔进行截断/循环。当 --timeout 2147483648ms 和 --timeout 600h 不再立即过期,并且有一个测试能复现已报告的溢出行为且通过时,即为完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 2k
- 派生
- 250
- 平均合并
- 7 小时 37 分钟
- 30 天内合并 PR
- 147
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MiniMax-AI/minimax-code 的其他 Issue
-
bug cli documentation needs-triage
难度 2/5 1-3 小时 新手友好度 84/100
MiniMax-AI/minimax-code#299 · 3 条评论 ·
维护者通常 1 天内回复
-
bug cli needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
MiniMax-AI/minimax-code#128 · 2 条评论 ·
维护者通常 1 天内回复
-
bug desktop
难度 2/5 1-3 小时 新手友好度 82/100
MiniMax-AI/minimax-code#87 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
bug desktop needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
MiniMax-AI/minimax-code#80 ·
维护者通常 1 天内回复
-
bug desktop needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
MiniMax-AI/minimax-code#66 ·
维护者通常 1 天内回复
查看 MiniMax-AI/minimax-code 的全部 Issue
相似的 Issue
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked files未关闭
难度 2/5 1-3 小时 新手友好度 70/100
maniator/verticopolis#880 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
siyuan-note/siyuan#20353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
black-forest-labs/skills#17 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
Albert-Weasker/niubigeo#168 ·
维护者通常 1 天内回复