mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 21:18:08 +00:00
Activate Build 124 autonomous cycles
This commit is contained in:
@@ -35,8 +35,7 @@ jobs:
|
||||
- run: node scripts/run-autonomous-cycle.mjs
|
||||
env:
|
||||
ARENA_URL: https://polymarket-site-eta.vercel.app
|
||||
# Keep Build 118 advancing until the Vercel free deployment quota resets.
|
||||
EXPECTED_BUILD: "118"
|
||||
EXPECTED_BUILD: "124"
|
||||
RUNTIME_BRANCH: runtime-state
|
||||
RUNTIME_STATE_PATH: runtime/state.json
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
name: Release Build 124 after Vercel quota reset
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Vercel's Hobby deployment quota is rolling. Retry across the reset
|
||||
# window, then remove this workflow as soon as Build 124 is live.
|
||||
- cron: "15 1-23/2 23 8 *"
|
||||
- cron: "15 1-13/2 24 8 *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: release-build-124
|
||||
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_124_preflight=${GITHUB_RUN_ID}" | grep -q 'const BUILD_VERSION = 124;'; then
|
||||
echo "Build 124 is already live."
|
||||
exit 0
|
||||
fi
|
||||
printf 'Build 124 deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .build-124-release-trigger
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .build-124-release-trigger
|
||||
git commit -m "Retry Build 124 production deployment"
|
||||
git push origin HEAD:main
|
||||
- name: Wait for Build 124 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_124_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'const BUILD_VERSION = 124;'; then
|
||||
echo "Build 124 is live."
|
||||
exit 0
|
||||
fi
|
||||
sleep 30
|
||||
done
|
||||
echo "Build 124 did not become live; Build 118 remains the autonomous runtime target."
|
||||
exit 1
|
||||
- name: Activate the Build 124 autonomous runner
|
||||
run: |
|
||||
git pull --ff-only origin main
|
||||
perl -0pi -e 's/EXPECTED_BUILD: "118"/EXPECTED_BUILD: "124"/' .github/workflows/autonomous-cycle.yml
|
||||
perl -0pi -e 's/assert\.match\(workflow, \/EXPECTED_BUILD: "118"\/\);/assert.match(workflow, \/EXPECTED_BUILD: "124"\/);/' scripts/test-autonomous-runtime.mjs
|
||||
rm -f .build-124-release-trigger
|
||||
git rm .github/workflows/release-build-124.yml
|
||||
git add .github/workflows/autonomous-cycle.yml scripts/test-autonomous-runtime.mjs
|
||||
git commit -m "Activate Build 124 autonomous cycles"
|
||||
git push origin HEAD:main
|
||||
@@ -5,7 +5,6 @@ import { ALLOWED_RUNTIME_KEYS, compactRuntimeTransportSnapshot, validateRuntimeS
|
||||
const index = fs.readFileSync(new URL("../index.html", import.meta.url), "utf8");
|
||||
const api = fs.readFileSync(new URL("../api/state.js", import.meta.url), "utf8");
|
||||
const workflow = fs.readFileSync(new URL("../.github/workflows/autonomous-cycle.yml", import.meta.url), "utf8");
|
||||
const releaseWorkflow = fs.readFileSync(new URL("../.github/workflows/release-build-124.yml", import.meta.url), "utf8");
|
||||
const vercelConfig = JSON.parse(fs.readFileSync(new URL("../vercel.json", import.meta.url), "utf8"));
|
||||
const runner = fs.readFileSync(new URL("./run-autonomous-cycle.mjs", import.meta.url), "utf8");
|
||||
const resolutionAudit = JSON.parse(fs.readFileSync(new URL("../research/resolution-week-no-audit.json", import.meta.url), "utf8"));
|
||||
@@ -72,18 +71,12 @@ 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: "118"/);
|
||||
assert.match(workflow, /EXPECTED_BUILD: "124"/);
|
||||
assert.match(workflow, /actions: write/);
|
||||
assert.match(workflow, /cancel-in-progress: false/);
|
||||
assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/);
|
||||
assert.match(workflow, /actions\/workflows\/autonomous-cycle\.yml\/dispatches/);
|
||||
assert.match(workflow, /--data '\{"ref":"main"\}'/);
|
||||
assert.match(releaseWorkflow, /name: Release Build 124 after Vercel quota reset/);
|
||||
assert.match(releaseWorkflow, /cron: "15 1-23\/2 23 8 \*"/);
|
||||
assert.match(releaseWorkflow, /cron: "15 1-13\/2 24 8 \*"/);
|
||||
assert.match(releaseWorkflow, /grep -q 'const BUILD_VERSION = 124;'/);
|
||||
assert.match(releaseWorkflow, /EXPECTED_BUILD: "124"/);
|
||||
assert.doesNotMatch(releaseWorkflow, /Build 123|build_123|build-123/);
|
||||
assert.match(index, /cloudRestartReconstructsOfflineCache:true/);
|
||||
assert.match(index, /saveSuggestions\(sugs,markets\.length,analysisMarkets\.length,bundleAudit\)/);
|
||||
assert.match(index, /const NEG_RISK_EVENT_SCAN_LIMIT=1000;/);
|
||||
|
||||
Reference in New Issue
Block a user