mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-23 20:48:08 +00:00
Retire stale deployment runners promptly
This commit is contained in:
@@ -35,7 +35,7 @@ jobs:
|
||||
- run: node scripts/run-autonomous-cycle.mjs
|
||||
env:
|
||||
ARENA_URL: https://polymarket-site-eta.vercel.app
|
||||
EXPECTED_BUILD: "116"
|
||||
EXPECTED_BUILD: "117"
|
||||
RUNTIME_BRANCH: runtime-state
|
||||
RUNTIME_STATE_PATH: runtime/state.json
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -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 116 targets five-minute slots with a serialized, self-chained GitHub Actions runtime.
|
||||
Build 117 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
|
||||
@@ -51,7 +51,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 116 cycle also scans the 1,000 most-active Polymarket events for
|
||||
Each Build 117 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
|
||||
@@ -70,7 +70,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 116 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with
|
||||
Build 117 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
|
||||
@@ -86,7 +86,7 @@ directional evidence under fee policy 2 and keeps those lanes observation-only
|
||||
until current independent 24-hour and 72-hour cohorts pass the existing
|
||||
promotion gate.
|
||||
|
||||
Build 116 retains Build 100's retirement of the old 3-6 day resolution-window
|
||||
Build 117 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
|
||||
@@ -206,7 +206,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 116 no longer allocates capital to that rule.
|
||||
reliable confidence bound, so Build 117 no longer allocates capital to that rule.
|
||||
|
||||
Strategy 62 instead uses the exact-fee settlement calibration's three-day Sports
|
||||
NO cohort as a bounded paper exploration lane. The corrected 5,000-market run
|
||||
|
||||
+4
-4
@@ -341,7 +341,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
<nav class="topnav">
|
||||
<div class="brand">
|
||||
<div class="logo">🏆</div>
|
||||
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 62 · verified-capacity bundles · build 116</div></div>
|
||||
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 62 · verified-capacity bundles · build 117</div></div>
|
||||
</div>
|
||||
<div class="tabs" id="tabs">
|
||||
<button class="tab" data-tab="overview">Overview</button>
|
||||
@@ -363,7 +363,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
<div class="personal-banner" id="personalBanner">
|
||||
<b>Personal research mode.</b> 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.
|
||||
</div>
|
||||
<div class="live-build-banner"><b>Build 116 active:</b> The public paper agents target five-minute slots with one serialized, self-chained GitHub Actions successor after every successful cycle and cron as recovery. The server preserves oldest-first pending evidence, exact fee schedules, agent promotion scopes, and bundle execution diagnostics from the already-bounded runtime snapshot, so cloud restarts and offline cycles do not silently lose learning context. Each fresh cloud browser reconstructs a bounded offline cache from the shared suggestions and open positions, allowing 90-minute cached entries and 24-hour mark-only continuity without persisting private account data; live-depth bundles still require a live connection. Each live cycle scans the 500 most-active eligible markets and 1,000 most-active events. Complete bundles are repriced across every ask level to the largest equal-leg quantity that remains profitable, depth-covered, fee-verified, and below $400, then portfolio sizing applies the agent's tighter cash and 4% caps. Strategy 62 also keeps the bounded sports-contest NO exploration lane under forward promotion or suspension. Intact guaranteed bundles are conservatively held at cost in portfolio accounting, while modeled profit remains unbooked until settlement. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
|
||||
<div class="live-build-banner"><b>Build 117 active:</b> The public paper agents target five-minute slots with one serialized, self-chained GitHub Actions successor after every successful cycle and cron as recovery. The server preserves oldest-first pending evidence, exact fee schedules, agent promotion scopes, and bundle execution diagnostics from the already-bounded runtime snapshot, so cloud restarts and offline cycles do not silently lose learning context. Each fresh cloud browser reconstructs a bounded offline cache from the shared suggestions and open positions, allowing 90-minute cached entries and 24-hour mark-only continuity without persisting private account data; live-depth bundles still require a live connection. Each live cycle scans the 500 most-active eligible markets and 1,000 most-active events. Complete bundles are repriced across every ask level to the largest equal-leg quantity that remains profitable, depth-covered, fee-verified, and below $400, then portfolio sizing applies the agent's tighter cash and 4% caps. Strategy 62 also keeps the bounded sports-contest NO exploration lane under forward promotion or suspension. Intact guaranteed bundles are conservatively held at cost in portfolio accounting, while modeled profit remains unbooked until settlement. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
|
||||
|
||||
<!-- ============ OVERVIEW ============ -->
|
||||
<section class="tabpanel" data-tab="overview">
|
||||
@@ -745,7 +745,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
Build 116 · Adaptive strategy 62 · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Verified-capacity complete bundles · Conservative intact-bundle accounting · Contest-deduplicated sports exploration · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
|
||||
Build 117 · Adaptive strategy 62 · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Verified-capacity complete bundles · Conservative intact-bundle accounting · Contest-deduplicated sports exploration · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
|
||||
<a class="market-link" href="https://github.com/theodore-song/polymarket-analyst" target="_blank" rel="noopener">Source on GitHub</a>
|
||||
</footer>
|
||||
</div>
|
||||
@@ -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 = 116;
|
||||
const BUILD_VERSION = 117;
|
||||
const AGENT_LEARNING_VERSION = 3;
|
||||
const SUGGESTION_ENGINE_VERSION = 62;
|
||||
const MAKER_STRATEGY_VERSION = 3;
|
||||
|
||||
@@ -118,6 +118,9 @@ async function waitForProductionBuild(page, arenaUrl, expectedBuild) {
|
||||
await page.waitForFunction(() => Boolean(window.PMA_AUTOMATION), null, { timeout: 20_000 }).catch(() => {});
|
||||
const status = await page.evaluate(() => window.PMA_AUTOMATION?.status?.() || null);
|
||||
if (Number(status?.build) === expectedBuild) return status;
|
||||
if (Number(status?.build) > expectedBuild) {
|
||||
throw new Error(`Production already advanced to Build ${status.build}; retiring stale Build ${expectedBuild} runner`);
|
||||
}
|
||||
await sleep(20_000);
|
||||
}
|
||||
throw new Error(`Production did not reach Build ${expectedBuild} before the autonomous cycle deadline`);
|
||||
@@ -128,7 +131,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", "116"));
|
||||
const expectedBuild = Number(required("EXPECTED_BUILD", "117"));
|
||||
await ensureRuntimeBranch(repository, branch);
|
||||
const prior = await readRuntimeFile(repository, branch, pathname);
|
||||
if (prior.snapshot) validateRuntimeSnapshot(prior.snapshot, 0, { allowIncomplete: true });
|
||||
|
||||
@@ -10,7 +10,7 @@ const resolutionAudit = JSON.parse(fs.readFileSync(new URL("../research/resoluti
|
||||
const sportsContestAudit = JSON.parse(fs.readFileSync(new URL("../research/sports-contest-no-exploration-audit.json", import.meta.url), "utf8"));
|
||||
const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]);
|
||||
|
||||
assert.equal(build, 116);
|
||||
assert.equal(build, 117);
|
||||
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\]\)/);
|
||||
@@ -40,7 +40,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: "116"/);
|
||||
assert.match(workflow, /EXPECTED_BUILD: "117"/);
|
||||
assert.match(workflow, /actions: write/);
|
||||
assert.match(workflow, /cancel-in-progress: false/);
|
||||
assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/);
|
||||
@@ -60,6 +60,7 @@ assert.match(index, /sizesToLargestVerifiedProfitableFill:/);
|
||||
assert.match(index, /stopsSizingAtShallowestBundleLeg:/);
|
||||
assert.match(index, /!s\.depth_verified\|\|!s\.fees_verified\|\|s\.verification_status!=="executable"/);
|
||||
assert.match(runner, /MAX_STATE_BYTES = 900_000/);
|
||||
assert.match(runner, /Production already advanced to Build \$\{status\.build\}; retiring stale Build \$\{expectedBuild\} runner/);
|
||||
assert.equal(resolutionAudit.strategy, "resolution-window-no-50-55-forward-shadow-v3");
|
||||
assert.deepEqual(resolutionAudit.selection.horizon_days_enabled, []);
|
||||
assert.deepEqual(resolutionAudit.selection.horizon_days_observed, [4]);
|
||||
|
||||
Reference in New Issue
Block a user