From 4d4a4b6d4d3746cbabf1b8c6842db64c6826cad1 Mon Sep 17 00:00:00 2001 From: Theodore Song Date: Sat, 22 Aug 2026 04:42:05 -0400 Subject: [PATCH] Protect adaptive evidence in runtime snapshots --- ...se-build-119.yml => release-build-120.yml} | 34 ++++----- README.md | 23 +++--- index.html | 74 +++++++++++++++---- scripts/run-autonomous-cycle.mjs | 2 +- scripts/test-autonomous-runtime.mjs | 13 +++- sw.js | 2 +- 6 files changed, 104 insertions(+), 44 deletions(-) rename .github/workflows/{release-build-119.yml => release-build-120.yml} (58%) diff --git a/.github/workflows/release-build-119.yml b/.github/workflows/release-build-120.yml similarity index 58% rename from .github/workflows/release-build-119.yml rename to .github/workflows/release-build-120.yml index c2bed05..190a740 100644 --- a/.github/workflows/release-build-119.yml +++ b/.github/workflows/release-build-120.yml @@ -1,4 +1,4 @@ -name: Release Build 119 after Vercel quota reset +name: Release Build 120 after Vercel quota reset on: schedule: @@ -9,7 +9,7 @@ permissions: contents: write concurrency: - group: release-build-119 + group: release-build-120 cancel-in-progress: false jobs: @@ -25,36 +25,36 @@ jobs: 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." + if curl --fail --silent --show-error "${ARENA_URL}/?build_120_preflight=${GITHUB_RUN_ID}" | grep -q 'const BUILD_VERSION = 120;'; then + echo "Build 120 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 + printf 'Build 120 deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .build-120-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 add .build-120-release-trigger + git commit -m "Retry Build 120 production deployment" git push origin HEAD:main - - name: Wait for Build 119 in production + - name: Wait for Build 120 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." + if curl --fail --silent --show-error "${ARENA_URL}/?build_120_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'const BUILD_VERSION = 120;'; then + echo "Build 120 is live." exit 0 fi sleep 30 done - echo "Build 119 did not become live; Build 118 remains the autonomous runtime target." + echo "Build 120 did not become live; Build 118 remains the autonomous runtime target." exit 1 - - name: Activate the Build 119 autonomous runner + - name: Activate the Build 120 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 + perl -0pi -e 's/EXPECTED_BUILD: "118"/EXPECTED_BUILD: "120"/' .github/workflows/autonomous-cycle.yml + perl -0pi -e 's/assert\.match\(workflow, \/EXPECTED_BUILD: "118"\/\);/assert.match(workflow, \/EXPECTED_BUILD: "120"\/);/' scripts/test-autonomous-runtime.mjs + rm -f .build-120-release-trigger + git rm .github/workflows/release-build-120.yml git add .github/workflows/autonomous-cycle.yml scripts/test-autonomous-runtime.mjs - git commit -m "Activate Build 119 autonomous cycles" + git commit -m "Activate Build 120 autonomous cycles" git push origin HEAD:main diff --git a/README.md b/README.md index 44ddaf8..6c31a20 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ market snapshots. During an outage, cycles continue locally; cached entries are allowed for 90 minutes, older snapshots become mark-only, and all cached data expires after 24 hours. -Build 119 targets five-minute slots with a serialized, self-chained GitHub Actions runtime. +Build 120 targets five-minute slots with a serialized, self-chained GitHub Actions runtime. It continues from the previous agent snapshot and runs the next due paper cycle even when no browser is open. After each successful cycle, one repo-scoped workflow dispatch waits for the next five-minute boundary; one concurrency group @@ -32,10 +32,15 @@ contains only `pma_agents_v2` and `pma_suggestions_v5`, with suggestions capped 300 to keep cross-device loads small. The API preserves oldest-first pending observations plus fee schedules, agent promotion scopes, and verified bundle capacity from the bounded runtime instead of applying its older lossy compactor. -Public maker outcomes retain only calibration fields and action logs are bounded -to 80 entries per agent. If the 875 KB transport budget is reached, up to 96 of -the newest completed directional outcomes are reserved before the oldest -still-pending observations consume the remaining evidence space. +Public maker outcomes retain only calibration fields, action logs are bounded +to 48 entries per agent, and chart snapshots are evenly sampled once their +96-point public limit is reached so older dates remain represented. Repetitive +watch-only explanations are normalized without changing signal fields. If the +875 KB transport budget is reached, the compactor first protects 75 KB for +learning, reserves up to 144 of the newest completed directional outcomes, and +then gives the remaining evidence space to the oldest still-pending +observations. Only after display history reaches its documented floor can the +public suggestion list fall from 300 to its 240-item emergency floor. Paper accounts, passwords, email settings, investment allocations, chat history, wallet information, and live-money settings are explicitly excluded. While that fallback is active, ordinary @@ -55,7 +60,7 @@ Polymarket event key. Related Ethereum or Bitcoin contracts cannot create several simultaneous copies of one move, and outcomes from the same underlying three-hour shock window count as one learner event. -Each Build 119 cycle also scans the 1,000 most-active Polymarket events for +Each Build 120 cycle also scans the 1,000 most-active Polymarket events for complete negative-risk bundles and logically nested threshold or deadline pairs. Gamma's market-specific fee flag replaces the old blanket 0.5-cent fee reserve for markets declared fee-free. The closest 60 structures are then @@ -74,7 +79,7 @@ The Suggestions view stores scan, depth, fee, actionable, and closest executable-margin counts so an empty lane is evidence rather than an ambiguous failure. -Build 119 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with +Build 120 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with the market's Gamma fee schedule at both the entry and future checkpoint, plus a separate half-cent round-trip slippage allowance. Fee-free markets pay only the slippage allowance; an unavailable fee schedule gets a conservative four-cent @@ -95,7 +100,7 @@ Every probation position exits at the matching six-hour executable bid and keeps the 18% stop policy active. Normal directional sizing remains locked until the same cohort independently passes both the 24-hour and 72-hour promotion gates. -Build 119 retains Build 100's retirement of the old 3-6 day resolution-window +Build 120 retains Build 100's retirement of the old 3-6 day resolution-window capital permission. That audit clustered confidence by event but still averaged several correlated contracts inside each event, while production could choose only one. The corrected replay chooses the highest-volume eligible contract per event and @@ -215,7 +220,7 @@ evidence proves an edge. Run `npm run evaluate:sports-favorites` for the retired pregame favorite audit. Its 12-hour, 60%-75% cohort had positive point estimates but did not establish a -reliable confidence bound, so Build 119 no longer allocates capital to that rule. +reliable confidence bound, so Build 120 no longer allocates capital to that rule. Strategy 63 also uses the exact-fee settlement calibration's three-day Sports NO cohort as a bounded paper exploration lane. The corrected 5,000-market run diff --git a/index.html b/index.html index 24a4571..184bcad 100644 --- a/index.html +++ b/index.html @@ -341,7 +341,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color