Repository navigation
fix(automation): bound toolchain install downloads - #965
Merged
Merged
Conversation
✅ Deploy Preview for devsydev canceled.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 8 |
| Duplication | 0 |
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
## Problem The "Daily Desktop UI Polish" automation run `cd94e2d7` failed with `Timed out: No bash output found` (run started 13:00:44, hit the 1200s automation timeout at 13:20:44, `conversation_id=null` — no agent conversation ever started). Two earlier runs of the same automation completed successfully, so the failure was intermittent. Root cause is in the shared STEP 0 toolchain-install block generated by `hack/automations/main.go` (`goInstallBlock` / `nodeInstallBlock` / `ghActBlock`), which every daily agent fleet automation runs as its first bash command: - Every network download used `curl -sSL` / `curl -fsSL` with **no `--max-time` or `--connect-timeout`** (66MB Go tarball, golangci-lint release, nodesource `setup_24.x`, gh keyring, act installer). - `go install github.com/go-task/task/v3/cmd/task@latest` had **no timeout** and can stall on `proxy.golang.org`. - The nodesource install was `curl ... | sudo bash - >/dev/null 2>&1 ...` — output piped to bash and **swallowed to `/dev/null`**. - Only the final `go version && ... && node --version` line printed to stdout. So a transient network stall on any download left the whole `set -e` block producing zero stdout until the 1200s run timeout fired — exactly the observed "No bash output found" with no conversation started. A stalled TCP socket (default retransmit timeout ~15 min) alone is enough to blow the budget, and the total output suppression made it impossible to diagnose. ## Change In `hack/automations/main.go`, bound every network operation and emit progress so a stall can never hang silently: - Added a shared `curlFlags = "--retry 3 --retry-delay 5 --connect-timeout 30 --max-time 300 -sSL"` constant and applied it to all five curl downloads (Go, golangci-lint, nodesource, gh keyring, act). A stalled socket now fails fast in ≤30s connect / ≤300s total and retries 3×. - Wrapped `go install task` in `timeout 600` so a stuck module fetch cannot hang indefinitely. - Added `echo "installing <tool>"` progress lines before each install step, so the agent server observes bash output throughout (a stalled run now shows which step hung instead of a bare timeout). - Replaced the `curl | sudo bash` nodesource pipe with a bounded `curl -o /tmp/ns_setup.sh` followed by `sudo bash /tmp/ns_setup.sh`, so the download is time-bounded independently of the shell. Regenerated all 13 `.agents/agents/*/agent.md` files via `go run ./hack/automations` (agent prompts must be regenerated, never hand-edited). This benefits the whole agent fleet (ui-polish, agent-analytics, codefactor, lint-fixer, pkg-*, ci-optimizer, etc.), not just the one automation that failed. Added `TestToolchainDownloadsAreBounded` regression test asserting every STEP 0 curl sets `--max-time`, no unbounded `curl -sSL`/`curl -fsSL` downloads remain, and progress is echoed. ## Why it's safe / reviewable in <15 min - No behavioral or logic change to any production code path — only the daily-automation install preamble and its generator. - No new dependencies; `timeout` is coreutils (already present in the sandboxes), `curl` flags are additive. - `set -e` semantics, version pins (`go1.26.3`, `golangci-lint-2.12.2`), install guards (`if ! command -v`), and the final verify line are all preserved. - Diff is small and mechanical: one new constant, flag substitution on 5 curls, `timeout` on one `go install`, 5 `echo` lines, plus regenerated agent markdown and one test. ## Verification - `go run ./hack/automations` → regenerated all 13 agent.md files; `go run ./hack/automations -check` → exit 0 (in-sync). - `task cli:format` → exit 0. - `task cli:lint:ci` (CI-parity, `--new-from-patch` vs merge-base) → **0 issues**. - `go test ./hack/automations/...` → `ok`, including new `TestToolchainDownloadsAreBounded` (PASS). - Confirmed no open PR addresses this (checked `gh api repos/devsy-org/devsy/pulls`). This PR was created by an AI agent as part of an automated daily UI polish job.
Signed-off-by: GitHub <noreply@github.com>
skevetter
force-pushed
the
ui-polish/toolchain-install-timeout
branch
from
August 9, 2026 18:27
c33e0ff to
4b9ccbf
Compare
skevetter
enabled auto-merge (squash)
August 9, 2026 18:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The "Daily Desktop UI Polish" automation run
cd94e2d7failed withTimed out: No bash output found(run started 13:00:44, hit the 1200s automation timeout at 13:20:44,conversation_id=null— no agent conversation ever started). Two earlier runs of the same automation completed successfully, so the failure was intermittent.Root cause is in the shared STEP 0 toolchain-install block generated by
hack/automations/main.go(goInstallBlock/nodeInstallBlock/ghActBlock), which every daily agent fleet automation runs as its first bash command:curl -sSL/curl -fsSLwith no--max-timeor--connect-timeout(66MB Go tarball, golangci-lint release, nodesourcesetup_24.x, gh keyring, act installer).go install github.com/go-task/task/v3/cmd/task@latesthad no timeout and can stall onproxy.golang.org.curl ... | sudo bash - >/dev/null 2>&1 ...— output piped to bash and swallowed to/dev/null.go version && ... && node --versionline printed to stdout.So a transient network stall on any download left the whole
set -eblock producing zero stdout until the 1200s run timeout fired — exactly the observed "No bash output found" with no conversation started. A stalled TCP socket (default retransmit timeout ~15 min) alone is enough to blow the budget, and the total output suppression made it impossible to diagnose.Change
In
hack/automations/main.go, bound every network operation and emit progress so a stall can never hang silently:curlFlags = "--retry 3 --retry-delay 5 --connect-timeout 30 --max-time 300 -sSL"constant and applied it to all five curl downloads (Go, golangci-lint, nodesource, gh keyring, act). A stalled socket now fails fast in ≤30s connect / ≤300s total and retries 3×.go install taskintimeout 600so a stuck module fetch cannot hang indefinitely.echo "installing <tool>"progress lines before each install step, so the agent server observes bash output throughout (a stalled run now shows which step hung instead of a bare timeout).curl | sudo bashnodesource pipe with a boundedcurl -o /tmp/ns_setup.shfollowed bysudo bash /tmp/ns_setup.sh, so the download is time-bounded independently of the shell.Regenerated all 13
.agents/agents/*/agent.mdfiles viago run ./hack/automations(agent prompts must be regenerated, never hand-edited). This benefits the whole agent fleet (ui-polish, agent-analytics, codefactor, lint-fixer, pkg-*, ci-optimizer, etc.), not just the one automation that failed.Added
TestToolchainDownloadsAreBoundedregression test asserting every STEP 0 curl sets--max-time, no unboundedcurl -sSL/curl -fsSLdownloads remain, and progress is echoed.Why it's safe / reviewable in <15 min
timeoutis coreutils (already present in the sandboxes),curlflags are additive.set -esemantics, version pins (go1.26.3,golangci-lint-2.12.2), install guards (if ! command -v), and the final verify line are all preserved.timeouton onego install, 5echolines, plus regenerated agent markdown and one test.Verification
go run ./hack/automations→ regenerated all 13 agent.md files;go run ./hack/automations -check→ exit 0 (in-sync).task cli:format→ exit 0.task cli:lint:ci(CI-parity,--new-from-patchvs merge-base) → 0 issues.go test ./hack/automations/...→ok, including newTestToolchainDownloadsAreBounded(PASS).gh api repos/devsy-org/devsy/pulls).This PR was created by an AI agent as part of an automated daily UI polish job.