From 1b6148526cd975569edcade67a88905ad0fb1cc9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Sep 2026 02:38:19 +0000 Subject: [PATCH 1/2] Initial plan From b799a4d02bda771883327abe54f61009982cff4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 4 Sep 2026 02:39:36 +0000 Subject: [PATCH 2/2] ci: make build audit resilient to npm audit timeouts Co-authored-by: isttiiak <98909379+isttiiak@users.noreply.github.com> --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f995a4b..12896a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,17 +32,33 @@ jobs: - run: pnpm test - name: pnpm audit run: | - # registry.npmjs.org's audit endpoint times out often enough on GitHub's - # runners that pnpm's own built-in retry (which this log already shows - # exhausting — 10s then 1min backoff) isn't always enough. Outer retry - # so a transient registry blip doesn't fail the whole build; a real - # vulnerability finding will still fail every attempt. + # registry.npmjs.org's audit endpoint is flaky on hosted runners. + # Keep failing for real audit findings, but don't fail build on + # repeated ERR_SOCKET_TIMEOUT from the upstream audit endpoint. for i in 1 2 3; do - pnpm audit && exit 0 - echo "pnpm audit attempt $i/3 failed, retrying in 30s..." - sleep 30 + set +e + output="$(pnpm audit 2>&1)" + status=$? + set -e + echo "$output" + + if [ "$status" -eq 0 ]; then + exit 0 + fi + + if echo "$output" | grep -Eq 'ERR_SOCKET_TIMEOUT|Socket timeout'; then + if [ "$i" -lt 3 ]; then + echo "pnpm audit attempt $i/3 hit registry timeout, retrying in 30s..." + sleep 30 + continue + fi + echo "pnpm audit timed out after 3 attempts; not failing build on transient registry outage." + exit 0 + fi + + exit "$status" done - exit 1 + exit 0 audit: if: github.event_name == 'schedule'