From 95947c4df632509661bd734705e1eac28c37a5df Mon Sep 17 00:00:00 2001 From: Theodore Song Date: Fri, 21 Aug 2026 19:32:39 -0400 Subject: [PATCH] Preserve bundle audit telemetry in shared state --- .github/workflows/autonomous-cycle.yml | 2 +- README.md | 4 ++-- index.html | 8 ++++---- scripts/run-autonomous-cycle.mjs | 2 +- scripts/test-autonomous-runtime.mjs | 5 +++-- sw.js | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/autonomous-cycle.yml b/.github/workflows/autonomous-cycle.yml index b54b441..b45bf42 100644 --- a/.github/workflows/autonomous-cycle.yml +++ b/.github/workflows/autonomous-cycle.yml @@ -34,7 +34,7 @@ jobs: - run: node scripts/run-autonomous-cycle.mjs env: ARENA_URL: https://polymarket-site-eta.vercel.app - EXPECTED_BUILD: "98" + EXPECTED_BUILD: "99" RUNTIME_BRANCH: runtime-state RUNTIME_STATE_PATH: runtime/state.json GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 7d63bab..9318151 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 98 runs the headless GitHub Actions runtime every five minutes, continues +Build 99 runs the headless GitHub Actions runtime every five minutes, continues from the previous agent snapshot, and runs the next due paper cycle even when no browser is open. It writes a sanitized snapshot to the `runtime-state` branch and `/api/state` uses that as a @@ -41,7 +41,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 98 cycle also scans the 1,000 most-active Polymarket events for +Each Build 99 cycle also scans the 1,000 most-active Polymarket events for complete negative-risk bundles and logically nested threshold or deadline pairs. Only a positive worst-case payout margin after 0.5 cents of modeled cost per leg can enter the Value Discipline portfolio. The Suggestions view stores diff --git a/index.html b/index.html index 752f0db..7344218 100644 --- a/index.html +++ b/index.html @@ -363,7 +363,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
Personal research mode. This copy is for your own analysis, paper tracking, and manual trade research only. It does not pool money, onboard investors, custody funds, bypass eligibility rules, or place orders without your manual approval.
-
Build 98 active: The public paper agents run autonomously every five minutes while every user device is closed. Each cycle scans the 1,000 most-active events for complete negative-risk and same-event dominance bundles, and the shared Suggestions view reports the closest executable margin even when no bundle is profitable after modeled costs. Five aggressive agents can also take tightly bounded, safe non-Sports 50–55% NO positions in independently passing three-through-six-day settlement windows. Other unproven directional rules remain observation-only. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.
+
Build 99 active: The public paper agents run autonomously every five minutes while every user device is closed. Each cycle scans the 1,000 most-active events for complete negative-risk and same-event dominance bundles, and the shared Suggestions view reports the closest executable margin even when no bundle is profitable after modeled costs. Five aggressive agents can also take tightly bounded, safe non-Sports 50–55% NO positions in independently passing three-through-six-day settlement windows. Other unproven directional rules remain observation-only. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.
@@ -745,7 +745,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
@@ -774,7 +774,7 @@ const POLITICS_TREND_MIN_HOLD_HOURS = 72; const EXIT_CONFIRM_HOURS = 6; const AGENTS_KEY = "pma_agents_v2"; const SUG_KEY = "pma_suggestions_v5"; -const BUILD_VERSION = 98; +const BUILD_VERSION = 99; const AGENT_LEARNING_VERSION = 3; const SUGGESTION_ENGINE_VERSION = 59; const MAKER_STRATEGY_VERSION = 3; @@ -3968,7 +3968,7 @@ async function runDailyCycle(){ const marketLearningByAgent=Object.fromEntries(AGENTS.map(agent=>[agent.id,buildSignalCalibration(st.signal_ledger,agent.id)])); if(runMode==="live"){ sugs=sugs.map(s=>applyAgentSpecificPromotions(s,marketLearningByAgent)); - saveSuggestions(sugs,markets.length,analysisMarkets.length); + saveSuggestions(sugs,markets.length,analysisMarkets.length,bundleAudit); saveMarketCache(analysisMarkets,sugs,priceMap); } const cachePolicy=offlineCachePolicy(cacheAgeMs); diff --git a/scripts/run-autonomous-cycle.mjs b/scripts/run-autonomous-cycle.mjs index 3f10653..bf9719d 100644 --- a/scripts/run-autonomous-cycle.mjs +++ b/scripts/run-autonomous-cycle.mjs @@ -128,7 +128,7 @@ async function main() { const branch = process.env.RUNTIME_BRANCH || "runtime-state"; const pathname = process.env.RUNTIME_STATE_PATH || "runtime/state.json"; const arenaUrl = (process.env.ARENA_URL || "https://polymarket-site-eta.vercel.app").replace(/\/$/, ""); - const expectedBuild = Number(required("EXPECTED_BUILD", "98")); + const expectedBuild = Number(required("EXPECTED_BUILD", "99")); await ensureRuntimeBranch(repository, branch); const prior = await readRuntimeFile(repository, branch, pathname); if (prior.snapshot) validateRuntimeSnapshot(prior.snapshot, 0, { allowIncomplete: true }); diff --git a/scripts/test-autonomous-runtime.mjs b/scripts/test-autonomous-runtime.mjs index 7a22b14..1b89b6c 100644 --- a/scripts/test-autonomous-runtime.mjs +++ b/scripts/test-autonomous-runtime.mjs @@ -9,7 +9,7 @@ const runner = fs.readFileSync(new URL("./run-autonomous-cycle.mjs", import.meta const resolutionAudit = JSON.parse(fs.readFileSync(new URL("../research/resolution-week-no-audit.json", import.meta.url), "utf8")); const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]); -assert.equal(build, 98); +assert.equal(build, 99); assert.deepEqual([...ALLOWED_RUNTIME_KEYS].sort(), ["pma_agents_v2", "pma_suggestions_v5"]); assert.match(index, /function collectPublicRuntimeItems\(\)/); assert.match(index, /const PUBLIC_RUNTIME_KEYS=Object\.freeze\(\[AGENTS_KEY,SUG_KEY\]\)/); @@ -26,7 +26,8 @@ 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: "98"/); +assert.match(workflow, /EXPECTED_BUILD: "99"/); +assert.match(index, /saveSuggestions\(sugs,markets\.length,analysisMarkets\.length,bundleAudit\)/); assert.match(index, /const NEG_RISK_EVENT_SCAN_LIMIT=1000;/); assert.match(index, /bundleOpportunityTelemetry:true/); assert.match(runner, /MAX_STATE_BYTES = 900_000/); diff --git a/sw.js b/sw.js index 394631d..fdac878 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const CACHE_NAME = "polymarket-arena-build-98"; +const CACHE_NAME = "polymarket-arena-build-99"; const APP_SHELL = ["/", "/index.html", "/personal.html", "/cycle-worker.js"]; self.addEventListener("install", event => {