schedule: honor runner budgets for manual fires - #354
Conversation
Centralizing the longest supported wake budget only helps if something enforces that it is actually the longest. Nothing did: wakeExecTimeout() could hand any adapter a budget above schedulepkg.MaxWakeExecTimeout and the manual fire client, which sizes its request and transport budgets from that constant, would silently go back to cutting a healthy wake short -- the exact failure #348 exists to fix. The risk is immediate, not hypothetical: #346 adds hermes-exec as its own literal. Adds an invariant test over every adapter resolveWakeAdapter can emit, plus a nesting assertion so tuning the 5s margins cannot invert the transport > request > wake ordering. Verified the guard actually bites by temporarily giving hermes-exec a 3-minute budget, which fails it with the drift named explicitly. go test ./... , go vet ./... , git diff --check, and the integration-tag suite all pass.
af9bbed to
9ca73ea
Compare
|
Independent adversarial review + rebase onto current master (which now contains #349). Pushed as 9ca73ea. Verified rather than trusted: Rebase. One conflict, in Taking your four challenges in order. Shared constant placement — correct, but it was unenforced, and I fixed that. The 5s margins — sound, and I made the ordering structural. 2m0s wake / 2m5s request / 2m10s transport is correctly nested, and the outer margin has to cover Fire-path detection — acceptable, with one caveat I would not block on. Re-parsing a path that
No correctness bug found. Marking ready for review. |
|
Added the literal delayed-response gate requested by #348 in |
Summary
claw api schedule firepass a two-minute-five-second request budget to claw-api local client mode--exec-timeoutoverrideTDD
The first focused test failed because the generated
docker compose execcommand had no-request-timeout; after implementation it proves both the inner request and outer transport budgets. Separate coverage proves list/get-style calls retain the 15-second outer default and an explicit--exec-timeoutstill wins.Verification
go test -count=1 ./...go vet ./...go build -o bin/claw ./cmd/clawgo test -tags integration -count=1 ./...go generate ./cmd/claw/...git diff --checkCloses #348