From 52fbc82b82603e0f891c2b666b897af6b0e19ef3 Mon Sep 17 00:00:00 2001 From: Hippocampus Date: Thu, 5 Nov 2026 09:25:06 +0000 Subject: [PATCH 1/2] fix(ci): wait for SDK versions on npm before updating core dependencies The SDK dispatches sdk-release right after publishing, so the update ran before npm served the new versions and bun failed to resolve them. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y7T5QJLkq1sBdV5nuUtPfE --- .github/workflows/auto-update-core.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/auto-update-core.yml b/.github/workflows/auto-update-core.yml index 6dd6e80a..660b919b 100644 --- a/.github/workflows/auto-update-core.yml +++ b/.github/workflows/auto-update-core.yml @@ -20,6 +20,29 @@ jobs: - name: Setup Repo uses: ./tools/github/setup-repo + # The SDK dispatches right after publishing, before npm serves the new versions. + - name: Wait for published versions on npm + shell: bash + env: + PACKAGES: ${{ toJson(github.event.client_payload.packages) }} + run: | + for row in $(echo "$PACKAGES" | jq -c '.[]'); do + PKG=$(echo "$row" | jq -r '.name') + VER=$(echo "$row" | jq -r '.version') + + for attempt in $(seq 1 40); do + if [ "$(npm view "$PKG@$VER" version 2>/dev/null)" = "$VER" ]; then + echo "✅ $PKG@$VER is available" + continue 2 + fi + echo "⏳ $PKG@$VER not on npm yet (attempt $attempt/40)" + sleep 15 + done + + echo "::error::$PKG@$VER was not available on npm after 10 minutes" + exit 1 + done + - name: Update @swapkit/* dependencies shell: bash run: | From c7894f8b526960df491ab8083d66c7636730c91d Mon Sep 17 00:00:00 2001 From: Hippocampus Date: Thu, 5 Nov 2026 09:31:48 +0000 Subject: [PATCH 2/2] fix(ci): retry every 30 seconds for up to 5 minutes while waiting for npm Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Y7T5QJLkq1sBdV5nuUtPfE --- .github/workflows/auto-update-core.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-update-core.yml b/.github/workflows/auto-update-core.yml index 660b919b..74370d42 100644 --- a/.github/workflows/auto-update-core.yml +++ b/.github/workflows/auto-update-core.yml @@ -30,16 +30,16 @@ jobs: PKG=$(echo "$row" | jq -r '.name') VER=$(echo "$row" | jq -r '.version') - for attempt in $(seq 1 40); do + for attempt in $(seq 1 10); do if [ "$(npm view "$PKG@$VER" version 2>/dev/null)" = "$VER" ]; then echo "✅ $PKG@$VER is available" continue 2 fi - echo "⏳ $PKG@$VER not on npm yet (attempt $attempt/40)" - sleep 15 + echo "⏳ $PKG@$VER not on npm yet (attempt $attempt/10)" + sleep 30 done - echo "::error::$PKG@$VER was not available on npm after 10 minutes" + echo "::error::$PKG@$VER was not available on npm after 5 minutes" exit 1 done