Pair skipped tool calls and close the stdio and fetch gaps #8

Merged
weichen merged 4 commits from feature/agent-stack-r0-r1 into main 2026-10-03 12:47:35 +00:00
Owner

Why: A tool-budget stop left tool_call messages without results, host callbacks and MCP reads could overlap, the Anthropic and Google presets were not the OpenAI-compatible endpoints, and fetch re-resolved an address after the SSRF check.

Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./runtime/... ./adapters/native/... passed. Covers TestLoopBudgetToolCallCap, TestParallelHostCallbacksAreSerial, TestHooksDoNotRunConcurrently, TestStdioSlowCancelThenEcho, TestPresetsAndClientForChatCompletions, TestFetchResolveChangesToLoopbackRejected, TestFetchHostCheckRedirectStillRejectsPrivate.

Impact: Skipped tool calls get an error result and no tool event. One run serializes host callbacks. The stdio client has a single reader. ClientFor accepts only the OpenAI chat protocol. Fetch dials the address it already checked, and every redirect is checked again. deps/agent-intent is 3130190.

Refs: N1 N2 N3 N4 N13 N14

合入顺序:Intent → Native → Squad → Backend → Dev。本 PR 不合入。

本轮收尾(2026-10-03)

同样改写 CI。钉住 intent 7f7879b。头提交 91c1556。本地 vet、test、race 与 submodule-consistency 通过。

合入、发版、分支保护与 SUBMODULE_TOKEN 仍由所有者执行。

Why: A tool-budget stop left tool_call messages without results, host callbacks and MCP reads could overlap, the Anthropic and Google presets were not the OpenAI-compatible endpoints, and fetch re-resolved an address after the SSRF check. Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./runtime/... ./adapters/native/... passed. Covers TestLoopBudgetToolCallCap, TestParallelHostCallbacksAreSerial, TestHooksDoNotRunConcurrently, TestStdioSlowCancelThenEcho, TestPresetsAndClientForChatCompletions, TestFetchResolveChangesToLoopbackRejected, TestFetchHostCheckRedirectStillRejectsPrivate. Impact: Skipped tool calls get an error result and no tool event. One run serializes host callbacks. The stdio client has a single reader. ClientFor accepts only the OpenAI chat protocol. Fetch dials the address it already checked, and every redirect is checked again. deps/agent-intent is 3130190. Refs: N1 N2 N3 N4 N13 N14 合入顺序:Intent → Native → Squad → Backend → Dev。本 PR 不合入。 ## 本轮收尾(2026-10-03) 同样改写 CI。钉住 intent 7f7879b。头提交 91c1556。本地 vet、test、race 与 submodule-consistency 通过。 合入、发版、分支保护与 SUBMODULE_TOKEN 仍由所有者执行。
weichen added 1 commit 2026-10-03 02:21:58 +00:00
Pair skipped tool calls and close the stdio and fetch gaps
ci / vet-and-test (pull_request) Failing after 2s
ci / docker-checkout-hostgateway (pull_request) Successful in 2s
694b08cdbe
Why: a tool-budget stop left tool calls without results, host callbacks raced, a canceled MCP read stole the next response, and fetch re-resolved after the SSRF check.
Evidence: GOWORK=off go vet ./... && go test -count=1 ./... && go test -race ./runtime/... ./adapters/native/... passed, including TestLoopBudgetToolCallCap, TestParallelHostCallbacksAreSerial, TestStdioSlowCancelThenEcho, TestPresetsAndClientForChatCompletions, TestFetchResolveChangesToLoopbackRejected, and TestFetchHostCheckRedirectStillRejectsPrivate.
Impact: over-budget calls get an error result and no tool event; one Run serializes host callbacks; MCP dispatches by id; anthropic and google presets use OpenAI-compatible chat endpoints; fetch dials the address it just checked. deps/agent-intent is 3130190; error-code-system and logging-system are a3ee67b and 49b5d8b.
Refs: N1, N2, N3, N4, N13, N14
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:19:55 +00:00
Fetch CI submodules over HTTPS and run the race detector
ci / vet-and-test (pull_request) Failing after 31s
ci / docker-checkout-hostgateway (pull_request) Failing after 31s
0773a25ab9
Why: Checkout did not recurse, so go vet failed without deps/agent-intent, and the runner has no SSH key.
Evidence: Workflow uses recursive HTTPS checkout, setup-go 1.27, GOPROXY=https://goproxy.cn,direct, and PROJECT.md vet plus test plus race.
Impact: vet-and-test runs on ubuntu-latest. SUBMODULE_TOKEN must be set by the owner before checkout can succeed.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:20:16 +00:00
Pin agent-intent to the CI checkout fix
ci / vet-and-test (pull_request) Failing after 31s
ci / docker-checkout-hostgateway (pull_request) Successful in 22s
91c1556184
Why: Native must build the intent commit that fetches submodules over HTTPS.
Evidence: deps/agent-intent is 7f7879b06b053f0a62746309b79e0e1b9a00f42d.
Impact: The gitlink matches the open intent pull request head. Nested guideline pins are unchanged.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:31:42 +00:00
Clone the repo in CI without GitHub-hosted actions
ci / vet-and-test (pull_request) Successful in 48s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
56848f3cbd
Why: The runner cannot reach github.com, so cloning actions/checkout timed out before any test ran.
Evidence: The Go 1.27.1 tarball is available from mirrors.aliyun.com. Checkout uses the job token and GITHUB_SHA.
Impact: Submodule checkout still requires SUBMODULE_TOKEN. A missing secret fails the job with that message.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit b1f89bf969 into main 2026-10-03 12:47:35 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Native#8