Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 76f441c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf68d7caf2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| `ignore must not exceed ${HOST_WALK_MAX_IGNORE_BYTES} bytes when encoded as JSON`, | ||
| ); | ||
| } | ||
| const timeoutMs = optionalInteger(params, 'timeoutMs', 1, HOST_WALK_MAX_TIMEOUT_MS); |
There was a problem hiding this comment.
Keep walks inside the RPC deadline
WorkspaceFsService.search() does not pass timeoutMs, so this leaves executor-side fs/walk unbounded. For a remote workspace whose local enumeration takes more than 60 seconds in total, even when each directory read is fast, RemoteExecConnection.call() expires the request at 60 seconds; the user receives a timeout and the executor keeps the walk and its in-flight slot running instead of returning a partial result with truncated: true. Apply a default walk budget strictly below the transport deadline, and use the same bound for local searches.
AGENTS.md reference: AGENTS.md:L111-L113
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4beb548315
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ignore: options.ignore, | ||
| timeoutMs: options.timeoutMs, | ||
| }) as FsWalkResult; |
There was a problem hiding this comment.
Keep remote walks on the caller's deadline
When no-rg completion runs against multiple independent remote workspace roots, the first root can consume most of the global 10-second budget and the next root still gets a fresh 10-second fs/walk: this payload forwards timeoutMs but never checks or races options.signal. A large second root can therefore keep suggestWithNode pending for nearly 20 seconds; grepWithNode has the same per-root reset with its 30-second budget. Short-circuit aborted signals and carry the remaining overall deadline into each RPC.
Useful? React with 👍 / 👎.
| "@moonshot-ai/kimi-code": patch | ||
| --- | ||
|
|
||
| Speed up file completion in remote environments without ripgrep. |
There was a problem hiding this comment.
Disclose the new walk truncation limits
When a nonempty search traverses more than 10,000 directories, 100,000 entries, about 8 MiB of inventory, or 55 seconds, this commit now returns partial results even for local and ACP workspaces, whereas the previous DFS had no corresponding global bounds. The changeset mentions only faster remote completion, so release notes omit the completeness users lose and the lack of an escape hatch; name that truncation explicitly.
AGENTS.md reference: AGENTS.md:L115-L117
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76f441c10d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| matched += 1; | ||
| top.push(this.displayCandidate(root, candidate)); | ||
| }); | ||
| }, { signal, timeoutMs: Math.max(1, remainingMs) }) || inventoryTruncated; |
There was a problem hiding this comment.
Return partial walk results before the caller aborts
When a no-rg suggestion spends its 10-second budget enumerating a large root, this gives hostFs.walk the entire remaining deadline even though the outer abort timer is already counting down. For remote walks the caller signal therefore wins raceWalkAbort before the executor's equal-or-later timeout and substitutes EMPTY_HOST_WALK_RESULT; for local walks the signal is already aborted before the newly buffered visitor runs. suggestWithNode consequently drops every candidate gathered before the deadline instead of returning the partial suggestions retained by the old DFS, and the identical full-budget call in grepWithNode can silently return zero scanned files rather than its zero-progress timeout. Give the walk an earlier internal deadline, or otherwise preserve its partial inventory, so it can be processed before the caller aborts.
AGENTS.md reference: AGENTS.md:L111-L113
Useful? React with 👍 / 👎.
|
Superseded by a redesign of walk deadline and cancellation semantics. |
Requirement or Bug
在 #4062 的远程执行环境上,文件搜索、补全和无 ripgrep 时的 grep 不应按目录数量放大 RPC 往返时间。
Bug Reproduction Steps
N/A
Root Cause
N/A
Code Changes
.gitignore、始终排除.git、隐藏文件、glob、symlink 和去重语义;目录 symlink 不递归,默认 POSIX 路径规则与本机平台解耦。FS_TOO_MANY_RESULTS。fs/walk与兼容回退。Behavior Changes and Affected Users
fs/readDirectoryfs/walkkimi exec-server的远程会话.gitignore的远程 workspacetruncated=true旧路径功能对应:根
.gitignore读取与缓存保留在ignoreFor,.git/在无 gitignore 模式也作为默认剪枝规则;隐藏文件 / glob 继续在 Workspace visitor 筛选;symlink 仍只作为条目访问、不递归;real-root 去重及多 root 展示路径不变;DFS 访问顺序由 parent 分组恢复;普通readdir失败继续跳过,超大目录错误仍抛出。测试覆盖:
agent-core-v2/test/remote/fs.test.ts:单 RPC、ignore 剪枝、旧 executor 能力缓存、超限规则回退、服务端参数拒绝。agent-core-v2/test/os/backends/node-local/hostFsService.test.ts:symlink、深度、条目 / 目录 / 响应预算、取消与超时、错误收集。agent-core-v2/test/workspace/workspaceFs/fsService.test.ts:忽略规则传递、truncated 传播、DFS 顺序、深层目录边界。agent-core-v2与acp-servertypecheck;ACP fs / terminal 11 项;远程 / Workspace / 本地 walk 130 项;type-aware lint 0 errors(既有 warnings)。loop.ts、loopService.ts、origin.ts3 条;本 diff 无新增违规。Checklist
gen-changesetsskill:patch,已写入。gen-docsskill:无需新增用户文档;远程协议 README 已更新。