Reserve durable adaptive evidence capacity

This commit is contained in:
Theodore Song
2026-08-21 23:43:13 -04:00
parent 0084654f15
commit e3086ed5fb
6 changed files with 59 additions and 28 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
- run: node scripts/run-autonomous-cycle.mjs - run: node scripts/run-autonomous-cycle.mjs
env: env:
ARENA_URL: https://polymarket-site-eta.vercel.app ARENA_URL: https://polymarket-site-eta.vercel.app
EXPECTED_BUILD: "117" EXPECTED_BUILD: "118"
RUNTIME_BRANCH: runtime-state RUNTIME_BRANCH: runtime-state
RUNTIME_STATE_PATH: runtime/state.json RUNTIME_STATE_PATH: runtime/state.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+9 -5
View File
@@ -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 allowed for 90 minutes, older snapshots become mark-only, and all cached data
expires after 24 hours. expires after 24 hours.
Build 117 targets five-minute slots with a serialized, self-chained GitHub Actions runtime. Build 118 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 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 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 workflow dispatch waits for the next five-minute boundary; one concurrency group
@@ -32,6 +32,10 @@ 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 300 to keep cross-device loads small. The API preserves oldest-first pending
observations plus fee schedules, agent promotion scopes, and verified bundle observations plus fee schedules, agent promotion scopes, and verified bundle
capacity from the bounded runtime instead of applying its older lossy compactor. 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.
Paper accounts, passwords, email settings, Paper accounts, passwords, email settings,
investment allocations, chat history, wallet information, and live-money investment allocations, chat history, wallet information, and live-money
settings are explicitly excluded. While that fallback is active, ordinary settings are explicitly excluded. While that fallback is active, ordinary
@@ -51,7 +55,7 @@ Polymarket event key. Related Ethereum or Bitcoin contracts cannot create
several simultaneous copies of one move, and outcomes from the same underlying several simultaneous copies of one move, and outcomes from the same underlying
three-hour shock window count as one learner event. three-hour shock window count as one learner event.
Each Build 117 cycle also scans the 1,000 most-active Polymarket events for Each Build 118 cycle also scans the 1,000 most-active Polymarket events for
complete negative-risk bundles and logically nested threshold or deadline 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 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 reserve for markets declared fee-free. The closest 60 structures are then
@@ -70,7 +74,7 @@ The Suggestions view stores scan, depth, fee, actionable, and closest
executable-margin counts so an empty lane is evidence rather than an ambiguous executable-margin counts so an empty lane is evidence rather than an ambiguous
failure. failure.
Build 117 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with Build 118 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 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 separate half-cent round-trip slippage allowance. Fee-free markets pay only the
slippage allowance; an unavailable fee schedule gets a conservative four-cent slippage allowance; an unavailable fee schedule gets a conservative four-cent
@@ -86,7 +90,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 until current independent 24-hour and 72-hour cohorts pass the existing
promotion gate. promotion gate.
Build 117 retains Build 100's retirement of the old 3-6 day resolution-window Build 118 retains Build 100's retirement of the old 3-6 day resolution-window
capital permission. That audit clustered confidence by event but still averaged capital permission. That audit clustered confidence by event but still averaged
several correlated contracts inside each event, while production could choose several correlated contracts inside each event, while production could choose
only one. The corrected replay chooses the highest-volume eligible contract per event and only one. The corrected replay chooses the highest-volume eligible contract per event and
@@ -206,7 +210,7 @@ evidence proves an edge.
Run `npm run evaluate:sports-favorites` for the retired pregame favorite audit. 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 Its 12-hour, 60%-75% cohort had positive point estimates but did not establish a
reliable confidence bound, so Build 117 no longer allocates capital to that rule. reliable confidence bound, so Build 118 no longer allocates capital to that rule.
Strategy 62 instead uses the exact-fee settlement calibration's three-day Sports 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 NO cohort as a bounded paper exploration lane. The corrected 5,000-market run
+40 -17
View File
@@ -341,7 +341,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
<nav class="topnav"> <nav class="topnav">
<div class="brand"> <div class="brand">
<div class="logo">🏆</div> <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 117</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 118</div></div>
</div> </div>
<div class="tabs" id="tabs"> <div class="tabs" id="tabs">
<button class="tab" data-tab="overview">Overview</button> <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"> <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. <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>
<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> <div class="live-build-banner"><b>Build 118 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 ============ --> <!-- ============ OVERVIEW ============ -->
<section class="tabpanel" data-tab="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> </section>
<footer> <footer>
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 · Build 118 · 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> <a class="market-link" href="https://github.com/theodore-song/polymarket-analyst" target="_blank" rel="noopener">Source on GitHub</a>
</footer> </footer>
</div> </div>
@@ -774,7 +774,7 @@ const POLITICS_TREND_MIN_HOLD_HOURS = 72;
const EXIT_CONFIRM_HOURS = 6; const EXIT_CONFIRM_HOURS = 6;
const AGENTS_KEY = "pma_agents_v2"; const AGENTS_KEY = "pma_agents_v2";
const SUG_KEY = "pma_suggestions_v5"; const SUG_KEY = "pma_suggestions_v5";
const BUILD_VERSION = 117; const BUILD_VERSION = 118;
const AGENT_LEARNING_VERSION = 3; const AGENT_LEARNING_VERSION = 3;
const SUGGESTION_ENGINE_VERSION = 62; const SUGGESTION_ENGINE_VERSION = 62;
const MAKER_STRATEGY_VERSION = 3; const MAKER_STRATEGY_VERSION = 3;
@@ -809,7 +809,7 @@ const CATEGORIES = ["All","Politics","Sports","Crypto","Economy","Pop Culture","
const SYNC_KEYS=[AGENTS_KEY,SUG_KEY,FOCUS_KEY,VIEW_KEY,PF_SORT_KEY,CHART_RANGE_KEY,INVEST_KEY,PAPER_KEY,LIVE_KEY,EMAIL_ALERT_KEY]; const SYNC_KEYS=[AGENTS_KEY,SUG_KEY,FOCUS_KEY,VIEW_KEY,PF_SORT_KEY,CHART_RANGE_KEY,INVEST_KEY,PAPER_KEY,LIVE_KEY,EMAIL_ALERT_KEY];
const PUBLIC_RUNTIME_KEYS=Object.freeze([AGENTS_KEY,SUG_KEY]); const PUBLIC_RUNTIME_KEYS=Object.freeze([AGENTS_KEY,SUG_KEY]);
const SYNC_LIMITS={closed:80,history:160,snapshots:240,suggestions:900,paperHistory:120,paperSnapshots:120,audit:120}; const SYNC_LIMITS={closed:80,history:160,snapshots:240,suggestions:900,paperHistory:120,paperSnapshots:120,audit:120};
const PUBLIC_RUNTIME_LIMITS=Object.freeze({...SYNC_LIMITS,suggestions:300}); const PUBLIC_RUNTIME_LIMITS=Object.freeze({...SYNC_LIMITS,history:80,suggestions:300});
const CAT_COLORS = {Politics:"#fb7185",Sports:"#34d399",Crypto:"#fbbf24",Economy:"#7c8cff", const CAT_COLORS = {Politics:"#fb7185",Sports:"#34d399",Crypto:"#fbbf24",Economy:"#7c8cff",
"Pop Culture":"#c77dff",Other:"#94a1bb",All:"#7c8cff"}; "Pop Culture":"#c77dff",Other:"#94a1bb",All:"#7c8cff"};
const CLOB = "https://clob.polymarket.com"; const CLOB = "https://clob.polymarket.com";
@@ -944,6 +944,7 @@ const SIGNAL_EVAL_HOURS = SIGNAL_EVAL_HORIZONS[0];
const SIGNAL_LEDGER_PENDING_LIMIT = 600; const SIGNAL_LEDGER_PENDING_LIMIT = 600;
const SIGNAL_LEDGER_OUTCOME_LIMIT = 1000; const SIGNAL_LEDGER_OUTCOME_LIMIT = 1000;
const PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES = 875000; const PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES = 875000;
const PUBLIC_SIGNAL_OUTCOME_RESERVE = 96;
const SIGNAL_LEDGER_RETRY_HOURS = SIGNAL_EVAL_HORIZONS[SIGNAL_EVAL_HORIZONS.length-1]+SIGNAL_EVAL_TOLERANCE_HOURS; const SIGNAL_LEDGER_RETRY_HOURS = SIGNAL_EVAL_HORIZONS[SIGNAL_EVAL_HORIZONS.length-1]+SIGNAL_EVAL_TOLERANCE_HOURS;
const SIGNAL_LEDGER_DUE_FETCH_LIMIT = 80; const SIGNAL_LEDGER_DUE_FETCH_LIMIT = 80;
const currentCycleHour = () => {const p=partsInLocalTime();return `${p.year}-${p.month}-${p.day}T${p.hour}:${p.minute}|s${SUGGESTION_ENGINE_VERSION}`;}; const currentCycleHour = () => {const p=partsInLocalTime();return `${p.year}-${p.month}-${p.day}T${p.hour}:${p.minute}|s${SUGGESTION_ENGINE_VERSION}`;};
@@ -1945,6 +1946,13 @@ function compactDecisionForPublic(decision){
} }
return out; return out;
} }
function compactMakerOutcomeForPublic(row){
if(!row||typeof row!=="object")return row;
return {quote_id:row.quote_id,market_id:row.market_id,event_key:row.event_key,category:row.category,
spread:row.spread,spread_band:row.spread_band,reward_yield_band:row.reward_yield_band,status:row.status,
pnl:row.pnl,shadow_only:row.shadow_only,deployed_capital:row.deployed_capital,reserved_capital:row.reserved_capital,
completed_at:row.completed_at,strategy_version:row.strategy_version,maker_strategy_version:row.maker_strategy_version};
}
function compactSuggestionForSync(s){ function compactSuggestionForSync(s){
if(!s||typeof s!=="object")return s; if(!s||typeof s!=="object")return s;
return { return {
@@ -2102,7 +2110,10 @@ function collectSyncItems(){const items={};SYNC_KEYS.forEach(k=>{const v=localSt
function collectPublicRuntimeItems(){ function collectPublicRuntimeItems(){
const st=compactAgentStateForSync(loadState(),PUBLIC_RUNTIME_LIMITS); const st=compactAgentStateForSync(loadState(),PUBLIC_RUNTIME_LIMITS);
st.signal_ledger=compactPublicSignalLedger(st.signal_ledger); st.signal_ledger=compactPublicSignalLedger(st.signal_ledger);
AGENTS.forEach(agent=>{if(st.agents&&st.agents[agent.id])st.agents[agent.id].lastDecision=compactDecisionForPublic(st.agents[agent.id].lastDecision);}); AGENTS.forEach(agent=>{if(st.agents&&st.agents[agent.id]){
st.agents[agent.id].lastDecision=compactDecisionForPublic(st.agents[agent.id].lastDecision);
st.agents[agent.id].maker_outcomes=(st.agents[agent.id].maker_outcomes||[]).map(compactMakerOutcomeForPublic);
}});
st.pending_sync=false; st.pending_sync=false;
st.runtime_managed=true; st.runtime_managed=true;
const suggestions=compactPublicSuggestionsForSync(loadSuggestions()); const suggestions=compactPublicSuggestionsForSync(loadSuggestions());
@@ -2116,22 +2127,31 @@ function fitPublicRuntimeSnapshot(snapshot){
snapshot.summary.signal_ledger={pending_retained:pending.length,pending_total:pending.length, snapshot.summary.signal_ledger={pending_retained:pending.length,pending_total:pending.length,
outcomes_retained:outcomes.length,outcomes_total:outcomes.length,byte_budget:PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES}; outcomes_retained:outcomes.length,outcomes_total:outcomes.length,byte_budget:PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES};
if(runtimeSnapshotByteLength(snapshot)<=PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES)return snapshot; if(runtimeSnapshotByteLength(snapshot)<=PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES)return snapshot;
ledger.outcomes=[]; const writeState=()=>{snapshot.items[AGENTS_KEY]=JSON.stringify(st);return runtimeSnapshotByteLength(snapshot)<=PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES;};
snapshot.items[AGENTS_KEY]=JSON.stringify(st); const reservedCount=Math.min(PUBLIC_SIGNAL_OUTCOME_RESERVE,outcomes.length);
if(runtimeSnapshotByteLength(snapshot)>PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES&&pending.length){ ledger.pending=[];ledger.outcomes=reservedCount?outcomes.slice(-reservedCount):[];
let low=0,high=pending.length; if(!writeState()&&reservedCount){
let low=0,high=reservedCount;
while(low<high){ while(low<high){
const mid=Math.ceil((low+high)/2);ledger.pending=pending.slice(0,mid);snapshot.items[AGENTS_KEY]=JSON.stringify(st); const mid=Math.ceil((low+high)/2);ledger.outcomes=mid?outcomes.slice(-mid):[];
if(runtimeSnapshotByteLength(snapshot)<=PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES)low=mid;else high=mid-1; if(writeState())low=mid;else high=mid-1;
} }
ledger.pending=pending.slice(0,low); ledger.outcomes=low?outcomes.slice(-low):[];writeState();
} }
let low=0,high=outcomes.length; let low=0,high=pending.length;
while(low<high){ while(low<high){
const mid=Math.ceil((low+high)/2);ledger.outcomes=outcomes.slice(-mid);snapshot.items[AGENTS_KEY]=JSON.stringify(st); const mid=Math.ceil((low+high)/2);ledger.pending=pending.slice(0,mid);
if(runtimeSnapshotByteLength(snapshot)<=PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES)low=mid;else high=mid-1; if(writeState())low=mid;else high=mid-1;
}
ledger.pending=pending.slice(0,low);writeState();
if(low===pending.length&&ledger.outcomes.length<outcomes.length){
let outcomeLow=ledger.outcomes.length,outcomeHigh=outcomes.length;
while(outcomeLow<outcomeHigh){
const mid=Math.ceil((outcomeLow+outcomeHigh)/2);ledger.outcomes=outcomes.slice(-mid);
if(writeState())outcomeLow=mid;else outcomeHigh=mid-1;
}
ledger.outcomes=outcomeLow?outcomes.slice(-outcomeLow):[];writeState();
} }
ledger.outcomes=low?outcomes.slice(-low):[];snapshot.items[AGENTS_KEY]=JSON.stringify(st);
snapshot.summary.signal_ledger.pending_retained=ledger.pending.length; snapshot.summary.signal_ledger.pending_retained=ledger.pending.length;
snapshot.summary.signal_ledger.outcomes_retained=ledger.outcomes.length; snapshot.summary.signal_ledger.outcomes_retained=ledger.outcomes.length;
return snapshot; return snapshot;
@@ -6932,6 +6952,8 @@ function runEngineSelfTest(){
recordMakerOutcome(makerDedupeBook,dedupeQuote,"unfilled",0,0);recordMakerOutcome(makerDedupeBook,dedupeQuote,"unfilled",0,0); recordMakerOutcome(makerDedupeBook,dedupeQuote,"unfilled",0,0);recordMakerOutcome(makerDedupeBook,dedupeQuote,"unfilled",0,0);
const makerCompactionBook=defaultPortfolio();makerCompactionBook.maker_quotes=[Object.assign({},makerQuote)];makerCompactionBook.maker_outcomes=[...profitableMakerBook.maker_outcomes]; const makerCompactionBook=defaultPortfolio();makerCompactionBook.maker_quotes=[Object.assign({},makerQuote)];makerCompactionBook.maker_outcomes=[...profitableMakerBook.maker_outcomes];
const compactedMakerBook=compactPortfolioForSync(makerCompactionBook); const compactedMakerBook=compactPortfolioForSync(makerCompactionBook);
const publicCompactedMakerBook=Object.assign({},compactedMakerBook,{maker_outcomes:compactedMakerBook.maker_outcomes.map(compactMakerOutcomeForPublic)});
const makerProfileBeforePublicCompaction=buildMakerProfile(compactedMakerBook),makerProfileAfterPublicCompaction=buildMakerProfile(publicCompactedMakerBook);
const sharedMakerState=defaultState();sharedMakerState.agents.value.maker_outcomes=[profitableMakerBook.maker_outcomes[0]]; const sharedMakerState=defaultState();sharedMakerState.agents.value.maker_outcomes=[profitableMakerBook.maker_outcomes[0]];
sharedMakerState.agents.momentum.maker_outcomes=[profitableMakerBook.maker_outcomes[1]]; sharedMakerState.agents.momentum.maker_outcomes=[profitableMakerBook.maker_outcomes[1]];
const sharedMakerFixture=buildSharedMakerProfile(sharedMakerState); const sharedMakerFixture=buildSharedMakerProfile(sharedMakerState);
@@ -7495,6 +7517,7 @@ function runEngineSelfTest(){
&&shadowHedgeBook.positions.length===0&&shadowHedgeBook.maker_quotes.length===0&&shadowHedgeBook.maker_outcomes[0].status==="hedged-lock"&&shadowHedgeBook.maker_outcomes[0].pnl>0, &&shadowHedgeBook.positions.length===0&&shadowHedgeBook.maker_quotes.length===0&&shadowHedgeBook.maker_outcomes[0].status==="hedged-lock"&&shadowHedgeBook.maker_outcomes[0].pnl>0,
outcomesAreDeduplicated:makerDedupeBook.maker_outcomes.length===1, outcomesAreDeduplicated:makerDedupeBook.maker_outcomes.length===1,
makerLearningSurvivesCompaction:compactedMakerBook.maker_quotes.length===1&&compactedMakerBook.maker_outcomes.length===24, makerLearningSurvivesCompaction:compactedMakerBook.maker_quotes.length===1&&compactedMakerBook.maker_outcomes.length===24,
publicMakerCompactionPreservesCalibration:JSON.stringify(makerProfileAfterPublicCompaction)===JSON.stringify(makerProfileBeforePublicCompaction),
sharedLedgerCombinesAgentEvidence:sharedMakerFixture.global.current_events===2&&sharedMakerFixture.global.current_locked_events===2, sharedLedgerCombinesAgentEvidence:sharedMakerFixture.global.current_events===2&&sharedMakerFixture.global.current_locked_events===2,
agentsReceiveDisjointShadowMarkets:distributedA.size===2&&distributedB.size===2&&[...distributedA].every(id=>!distributedB.has(id)), agentsReceiveDisjointShadowMarkets:distributedA.size===2&&distributedB.size===2&&[...distributedA].every(id=>!distributedB.has(id)),
noHypotheticalRewardCredited:makerStage.staged===1&&Math.abs(makerBook.cash-(10000+makerExpectedProfit))<=0.02, noHypotheticalRewardCredited:makerStage.staged===1&&Math.abs(makerBook.cash-(10000+makerExpectedProfit))<=0.02,
+1 -1
View File
@@ -131,7 +131,7 @@ async function main() {
const branch = process.env.RUNTIME_BRANCH || "runtime-state"; const branch = process.env.RUNTIME_BRANCH || "runtime-state";
const pathname = process.env.RUNTIME_STATE_PATH || "runtime/state.json"; const pathname = process.env.RUNTIME_STATE_PATH || "runtime/state.json";
const arenaUrl = (process.env.ARENA_URL || "https://polymarket-site-eta.vercel.app").replace(/\/$/, ""); const arenaUrl = (process.env.ARENA_URL || "https://polymarket-site-eta.vercel.app").replace(/\/$/, "");
const expectedBuild = Number(required("EXPECTED_BUILD", "117")); const expectedBuild = Number(required("EXPECTED_BUILD", "118"));
await ensureRuntimeBranch(repository, branch); await ensureRuntimeBranch(repository, branch);
const prior = await readRuntimeFile(repository, branch, pathname); const prior = await readRuntimeFile(repository, branch, pathname);
if (prior.snapshot) validateRuntimeSnapshot(prior.snapshot, 0, { allowIncomplete: true }); if (prior.snapshot) validateRuntimeSnapshot(prior.snapshot, 0, { allowIncomplete: true });
+7 -3
View File
@@ -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 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]); const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]);
assert.equal(build, 117); assert.equal(build, 118);
assert.deepEqual([...ALLOWED_RUNTIME_KEYS].sort(), ["pma_agents_v2", "pma_suggestions_v5"]); assert.deepEqual([...ALLOWED_RUNTIME_KEYS].sort(), ["pma_agents_v2", "pma_suggestions_v5"]);
assert.match(index, /function collectPublicRuntimeItems\(\)/); assert.match(index, /function collectPublicRuntimeItems\(\)/);
assert.match(index, /const PUBLIC_RUNTIME_KEYS=Object\.freeze\(\[AGENTS_KEY,SUG_KEY\]\)/); assert.match(index, /const PUBLIC_RUNTIME_KEYS=Object\.freeze\(\[AGENTS_KEY,SUG_KEY\]\)/);
@@ -21,8 +21,12 @@ assert.match(index, /if\(!out\.trade_ready\)\{delete out\.clob_yes;delete out\.c
assert.match(index, /function compactPublicSignalLedger\(ledger\)/); assert.match(index, /function compactPublicSignalLedger\(ledger\)/);
assert.match(index, /st\.signal_ledger=compactPublicSignalLedger\(st\.signal_ledger\)/); assert.match(index, /st\.signal_ledger=compactPublicSignalLedger\(st\.signal_ledger\)/);
assert.match(index, /const PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES = 875000;/); assert.match(index, /const PUBLIC_RUNTIME_SNAPSHOT_BUDGET_BYTES = 875000;/);
assert.match(index, /const PUBLIC_SIGNAL_OUTCOME_RESERVE = 96;/);
assert.match(index, /history:80,suggestions:300/);
assert.match(index, /function compactMakerOutcomeForPublic\(row\)/);
assert.match(index, /publicMakerCompactionPreservesCalibration:/);
assert.match(index, /function fitPublicRuntimeSnapshot\(snapshot\)/); assert.match(index, /function fitPublicRuntimeSnapshot\(snapshot\)/);
assert.match(index, /ledger\.outcomes=low\?outcomes\.slice\(-low\):\[\]/); assert.match(index, /reservedCount=Math\.min\(PUBLIC_SIGNAL_OUTCOME_RESERVE,outcomes\.length\)/);
assert.match(index, /return fitPublicRuntimeSnapshot\(snapshot\)/); assert.match(index, /return fitPublicRuntimeSnapshot\(snapshot\)/);
assert.match(index, /publicCompactionPreservesForwardGrading:/); assert.match(index, /publicCompactionPreservesForwardGrading:/);
assert.match(index, /publicCompactionPreservesAgentCalibration:/); assert.match(index, /publicCompactionPreservesAgentCalibration:/);
@@ -40,7 +44,7 @@ assert.match(api, /Buffer\.from\(file\.content/);
assert.match(api, /searchParams\.set\("runtime", `\$\{Date\.now\(\)\}/); 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, /cron: "2,7,12,17,22,27,32,37,42,47,52,57 \* \* \* \*"/);
assert.match(workflow, /contents: write/); assert.match(workflow, /contents: write/);
assert.match(workflow, /EXPECTED_BUILD: "117"/); assert.match(workflow, /EXPECTED_BUILD: "118"/);
assert.match(workflow, /actions: write/); assert.match(workflow, /actions: write/);
assert.match(workflow, /cancel-in-progress: false/); assert.match(workflow, /cancel-in-progress: false/);
assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/); assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/);
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = "polymarket-arena-build-117"; const CACHE_NAME = "polymarket-arena-build-118";
const APP_SHELL = ["/", "/index.html", "/personal.html", "/cycle-worker.js"]; const APP_SHELL = ["/", "/index.html", "/personal.html", "/cycle-worker.js"];
self.addEventListener("install", event => { self.addEventListener("install", event => {