From ffd3acb7d9c0557b33aed3c63324d0b4990461ed Mon Sep 17 00:00:00 2001 From: Theodore Song Date: Sat, 22 Aug 2026 03:08:32 -0400 Subject: [PATCH] Defer Build 119 until Vercel quota resets --- .github/workflows/autonomous-cycle.yml | 3 +- .github/workflows/release-build-119.yml | 60 +++++++++++++++++++++++++ scripts/test-autonomous-runtime.mjs | 2 +- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release-build-119.yml diff --git a/.github/workflows/autonomous-cycle.yml b/.github/workflows/autonomous-cycle.yml index 6e0c4d1..5d3f9b9 100644 --- a/.github/workflows/autonomous-cycle.yml +++ b/.github/workflows/autonomous-cycle.yml @@ -35,7 +35,8 @@ jobs: - run: node scripts/run-autonomous-cycle.mjs env: ARENA_URL: https://polymarket-site-eta.vercel.app - EXPECTED_BUILD: "119" + # Keep Build 118 advancing until the Vercel free deployment quota resets. + EXPECTED_BUILD: "118" RUNTIME_BRANCH: runtime-state RUNTIME_STATE_PATH: runtime/state.json GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-build-119.yml b/.github/workflows/release-build-119.yml new file mode 100644 index 0000000..c2bed05 --- /dev/null +++ b/.github/workflows/release-build-119.yml @@ -0,0 +1,60 @@ +name: Release Build 119 after Vercel quota reset + +on: + schedule: + - cron: "15 8 23 8 *" + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: release-build-119 + cancel-in-progress: false + +jobs: + release: + runs-on: ubuntu-latest + timeout-minutes: 35 + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + - name: Trigger the deferred Vercel deployment + env: + ARENA_URL: https://polymarket-site-eta.vercel.app + run: | + if curl --fail --silent --show-error "${ARENA_URL}/?build_119_preflight=${GITHUB_RUN_ID}" | grep -q 'const BUILD_VERSION = 119;'; then + echo "Build 119 is already live." + exit 0 + fi + printf 'Build 119 deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .build-119-release-trigger + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add .build-119-release-trigger + git commit -m "Retry Build 119 production deployment" + git push origin HEAD:main + - name: Wait for Build 119 in production + env: + ARENA_URL: https://polymarket-site-eta.vercel.app + run: | + for attempt in $(seq 1 40); do + if curl --fail --silent --show-error "${ARENA_URL}/?build_119_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'const BUILD_VERSION = 119;'; then + echo "Build 119 is live." + exit 0 + fi + sleep 30 + done + echo "Build 119 did not become live; Build 118 remains the autonomous runtime target." + exit 1 + - name: Activate the Build 119 autonomous runner + run: | + git pull --ff-only origin main + perl -0pi -e 's/EXPECTED_BUILD: "118"/EXPECTED_BUILD: "119"/' .github/workflows/autonomous-cycle.yml + perl -0pi -e 's/assert\.match\(workflow, \/EXPECTED_BUILD: "118"\/\);/assert.match(workflow, \/EXPECTED_BUILD: "119"\/);/' scripts/test-autonomous-runtime.mjs + rm -f .build-119-release-trigger + git rm .github/workflows/release-build-119.yml + git add .github/workflows/autonomous-cycle.yml scripts/test-autonomous-runtime.mjs + git commit -m "Activate Build 119 autonomous cycles" + git push origin HEAD:main diff --git a/scripts/test-autonomous-runtime.mjs b/scripts/test-autonomous-runtime.mjs index 2bfb452..aa9c4fd 100644 --- a/scripts/test-autonomous-runtime.mjs +++ b/scripts/test-autonomous-runtime.mjs @@ -51,7 +51,7 @@ assert.match(api, /Buffer\.from\(file\.content/); assert.match(api, /searchParams\.set\("runtime", `\$\{Date\.now\(\)\}/); assert.match(workflow, /cron: "2,7,12,17,22,27,32,37,42,47,52,57 \* \* \* \*"/); assert.match(workflow, /contents: write/); -assert.match(workflow, /EXPECTED_BUILD: "119"/); +assert.match(workflow, /EXPECTED_BUILD: "118"/); assert.match(workflow, /actions: write/); assert.match(workflow, /cancel-in-progress: false/); assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/);