From 06b047a0929369d5b8635b3651da115c8fcd53a7 Mon Sep 17 00:00:00 2001 From: Yunare Maia Date: Wed, 7 Oct 2026 13:26:25 -0300 Subject: [PATCH] fix(release): extend npm propagation window and improve diagnostics (#943) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(release): extend npm propagation window and improve diagnostics The release verification step polls npm for up to 20 minutes (80 attempts × 15s), but npm registry propagation can take longer. When the version doesn't appear within the window, the workflow fails even though the package was already published successfully. Changes: - Extend polling window from 20 to 30 minutes (120 attempts × 15s) - Add --force flag to npm view to bypass cache on each poll - Report full retry window in diagnostics (attempts × sleep time) - Distinguish propagation delay from CLI verification failure in error message Fixes #621 * fix(release): drop no-op --force from npm propagation polling npm view --force is accepted but only prints a protections warning on a read-only command; --prefer-online already forces fresh registry metadata on each poll. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5995f4c7e8..1addae3c3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,22 +135,26 @@ jobs: verification_root="$(mktemp -d)" trap 'rm -rf -- "${verification_root}"' EXIT cd "${verification_root}" - for attempt in $(seq 1 80); do + max_attempts=120 + sleep_seconds=15 + total_window_minutes=$((max_attempts * sleep_seconds / 60)) + for attempt in $(seq 1 "${max_attempts}"); do published_version="$(npm view --prefer-online "rea-agents@${version}" version --json 2>/dev/null || true)" if [ "${published_version}" = "\"${version}\"" ]; then - echo "rea-agents@${version} is visible on npm after attempt ${attempt}; verifying the published CLI." + echo "rea-agents@${version} is visible on npm after attempt ${attempt}/${max_attempts}; verifying the published CLI." npm exec --yes --package="rea-agents@${version}" -- rea --help npm exec --yes --package="rea-agents@${version}" -- rea --llms node "${GITHUB_WORKSPACE}/scripts/verify-published-package.mjs" "${version}" exit 0 else - echo "rea-agents@${version} is not visible on npm yet (attempt ${attempt}/80; up to 20 minutes)" >&2 + echo "rea-agents@${version} is not visible on npm yet (attempt ${attempt}/${max_attempts}; up to ${total_window_minutes} minutes)" >&2 fi - if [ "${attempt}" -lt 80 ]; then - sleep 15 + if [ "${attempt}" -lt "${max_attempts}" ]; then + sleep "${sleep_seconds}" fi done - echo "rea-agents@${version} did not become visible on npm within 20 minutes" >&2 + echo "rea-agents@${version} did not become visible on npm within ${total_window_minutes} minutes (${max_attempts} attempts × ${sleep_seconds}s)" >&2 + echo "This indicates npm registry propagation delay, not a CLI verification failure." >&2 exit 1 publish-mcp: