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>
12 lines
329 B
Go
12 lines
329 B
Go
//go:build !unix
|
|
|
|
package squad
|
|
|
|
import "context"
|
|
|
|
// lockRunFile 在非 unix 平台退回进程内锁(由 SquadEngine.runLock 提供)。
|
|
// 跨进程互斥不可用;调用方不要假设两个进程能靠这把锁互相拒绝。
|
|
func lockRunFile(ctx context.Context, dir string) (func(), error) {
|
|
return func() {}, nil
|
|
}
|