Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions integration-tests/interactive/file-system-interactive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Interactive file system', () => {
const { ptyProcess } = rig.runInteractive();

// Wait for the app to be ready
const isReady = await rig.waitForText('Type your message', 15000);
const isReady = await rig.waitForText('Type your message');
expect(
isReady,
'CLI did not start up in interactive mode correctly',
Expand All @@ -47,10 +47,10 @@ describe('Interactive file system', () => {
await type(ptyProcess, readPrompt);
await type(ptyProcess, '\r');

const readCall = await rig.waitForToolCall('read_file', 30000);
const readCall = await rig.waitForToolCall('read_file');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] Removing the explicit 30000 timeout makes this call fall through to getDefaultTimeout(), which returns 15 000 ms locally — halving the previous 30 s budget for a model-dependent tool-call wait. The same applies to waitForAnyToolCall at line 70. — Failure scenario: a developer running the test locally against a slow or rate-limited model endpoint sees a false timeout at 15 s where the test previously allowed 30 s.

Note: every other waitForToolCall/waitForAnyToolCall call site in the suite already uses the default (15 s locally), so the old 30 s was an outlier. If 15 s is intentionally sufficient, this is fine; if not, consider Math.max(30000, rig.getDefaultTimeout()) to preserve the floor.

中文说明

[Suggestion] 移除显式的 30000 超时后,此调用会回退到 getDefaultTimeout(),在本地环境下返回 15 000 ms——将之前模型相关的工具调用等待的 30 秒预算减半。第 70 行的 waitForAnyToolCall 也存在同样的情况。—— 失败场景:开发者在本地对慢速或限速的模型端点运行测试时,会在 15 秒时看到误报超时,而此前测试允许 30 秒。

注意:套件中所有其他 waitForToolCall/waitForAnyToolCall 调用点已在使用默认值(本地 15 秒),因此原来的 30 秒是一个异常值。如果 15 秒已足够,这没有问题;如果不够,可以考虑使用 Math.max(30000, rig.getDefaultTimeout()) 来保留下限。

— qwen3.7-max via Qwen Code /review

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declined — the PR's purpose is to normalize hardcoded timeouts to the env-aware default. The old 30 s was an outlier: every other waitForToolCall/waitForAnyToolCall call site in the suite already uses the default (15 s locally, 60 s in CI). Adding Math.max(30000, …) would re-introduce the hardcoded floor this PR removes and make this file inconsistent with the rest of the suite again.

中文说明

已拒绝——本 PR 的目的是将硬编码超时统一为环境感知的默认值。原来的 30 秒是一个异常值:套件中所有其他 waitForToolCall/waitForAnyToolCall 调用点已在使用默认值(本地 15 秒、CI 60 秒)。添加 Math.max(30000, …) 会重新引入本 PR 要移除的硬编码下限,并使此文件再次与套件其余部分不一致。

expect(readCall, 'Expected to find a read_file tool call').toBe(true);

const containsExpectedVersion = await rig.waitForText('1.0.0', 15000);
const containsExpectedVersion = await rig.waitForText('1.0.0');
expect(
containsExpectedVersion,
'Expected to see version "1.0.0" in output',
Expand All @@ -61,10 +61,7 @@ describe('Interactive file system', () => {
await type(ptyProcess, writePrompt);
await type(ptyProcess, '\r');

const toolCall = await rig.waitForAnyToolCall(
['write_file', 'edit'],
30000,
);
const toolCall = await rig.waitForAnyToolCall(['write_file', 'edit']);

if (!toolCall) {
printDebugInfo(rig, rig._interactiveOutput, {
Expand Down
Loading