Persist step approvals and guard squad HTTP entry points #7

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

Why: A step confirmation cancelled the whole run, approvals vanished on restart, and the HTTP server accepted anonymous and oversized requests.

Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./squad/... passed. scripts/submodule-consistency.sh ok. Covers TestStepApprovalApproveExecutes, TestStepApprovalSkipDoesNotCancel, TestApprovalSurvivesRestart, TestInterruptedRunningStepStaysHeld, TestTwoEnginesOneRunIsBusy, TestWakeupDoesNotApprovePermission, TestMissingTokenIsUnauthorized, TestPathTraversalRejected, TestOversizedBodyIs413.

Impact: Approve and skip apply to one step. runstate.json and a unix flock survive restart. Wakeup does not approve permission holds. serve defaults to 127.0.0.1:8090 and requires a token off loopback unless --insecure. Non-unix builds keep only the in-process lock. deps/agent-native is 694b08c and deps/agent-intent is 3130190.

Refs: Q1 Q2 Q3 Q4 Q5 Q8 Q9 Q14 Q15 Q16

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

本轮收尾(2026-10-03)

并行组每个成员先过审批和权限;确认、权限、质检的自由文本写入 steering 并保持挂起;分派失败时恢复 pending。补了 AtomicWrite 与 listenGuard 测试。CI 去掉错误的 Agent-Native/go.mod 断言。钉住 native 91c1556、intent 7f7879b。头提交 e928ea3。

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

Why: A step confirmation cancelled the whole run, approvals vanished on restart, and the HTTP server accepted anonymous and oversized requests. Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./squad/... passed. scripts/submodule-consistency.sh ok. Covers TestStepApprovalApproveExecutes, TestStepApprovalSkipDoesNotCancel, TestApprovalSurvivesRestart, TestInterruptedRunningStepStaysHeld, TestTwoEnginesOneRunIsBusy, TestWakeupDoesNotApprovePermission, TestMissingTokenIsUnauthorized, TestPathTraversalRejected, TestOversizedBodyIs413. Impact: Approve and skip apply to one step. runstate.json and a unix flock survive restart. Wakeup does not approve permission holds. serve defaults to 127.0.0.1:8090 and requires a token off loopback unless --insecure. Non-unix builds keep only the in-process lock. deps/agent-native is 694b08c and deps/agent-intent is 3130190. Refs: Q1 Q2 Q3 Q4 Q5 Q8 Q9 Q14 Q15 Q16 合入顺序:Intent → Native → Squad → Backend → Dev。本 PR 不合入。 ## 本轮收尾(2026-10-03) 并行组每个成员先过审批和权限;确认、权限、质检的自由文本写入 steering 并保持挂起;分派失败时恢复 pending。补了 AtomicWrite 与 listenGuard 测试。CI 去掉错误的 Agent-Native/go.mod 断言。钉住 native 91c1556、intent 7f7879b。头提交 e928ea3。 合入、发版、分支保护与 SUBMODULE_TOKEN 仍由所有者执行。
weichen added 1 commit 2026-10-03 02:21:58 +00:00
Persist step approvals and guard squad HTTP entry points
ci / vet-and-test (pull_request) Failing after 1s
ci / docker-checkout-hostgateway (pull_request) Failing after 3s
8e987bf535
Why: A step confirmation cancelled the whole run, approvals and repair budget vanished on restart, and the HTTP server accepted anonymous and oversized requests.
Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./squad/... passed. scripts/submodule-consistency.sh ok.
Impact: Approve and skip apply to one step; runstate.json and unix flock survive restart; wakeup leaves permission holds pending; serve defaults to loopback and requires a token off-loopback.
Refs: Q1 Q2 Q3 Q4 Q5 Q8 Q9 Q14 Q15 Q16
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:15:44 +00:00
Hold parallel groups and choice replies until dispatch succeeds
ci / vet-and-test (pull_request) Failing after 6m59s
ci / docker-checkout-hostgateway (pull_request) Failing after 4s
73b8d09545
Why: A parallel group only checked the first step, free text cancelled confirmation and permission holds, and a failed reply deleted the pending request before the decision ran.
Evidence: GOWORK=off go vet ./...; go test -count=1 ./squad/ ./cli/; go test -race -count=1 ./squad/. New tests cover the second parallel member, free-text holds, restored pending, AtomicWrite, and listenGuard.
Impact: Any member that needs approval or bash permission keeps the whole group suspended. Free text on confirmation, permission, and quality review is stored as steering and the same request stays pending. A dispatch error restores pending.json.
Refs: feature/agent-stack-r0-r1
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 drop the host checkout assertion
ci / vet-and-test (pull_request) Failing after 30s
ci / docker-checkout-hostgateway (pull_request) Failing after 31s
cda1fd7c70
Why: SSH submodule checkout failed on the runner, and the docker job required a path this repo does not have.
Evidence: vet-and-test uses recursive HTTPS checkout, setup-go 1.27, GOPROXY, and GOWORK=off vet, test, and race. The docker job only checks go.mod.
Impact: 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:23 +00:00
Pin agent-native and agent-intent to the CI heads
ci / vet-and-test (pull_request) Failing after 4s
ci / docker-checkout-hostgateway (pull_request) Successful in 2s
e928ea3c0f
Why: Squad must execute the native and intent commits that this batch is asking to merge.
Evidence: deps/agent-native is 91c155618487e21edeb4f1d3cc27e985aae2b0d2 and deps/agent-intent is 7f7879b06b053f0a62746309b79e0e1b9a00f42d.
Impact: Both gitlinks match the open pull request heads. 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:43 +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
6c8810029d
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 8dc2c54adf into main 2026-10-03 12:47:36 +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-Squad#7