mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 04:58:08 +00:00
Preserve bundle audit telemetry in shared state
This commit is contained in:
@@ -34,7 +34,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: "98"
|
EXPECTED_BUILD: "99"
|
||||||
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 }}
|
||||||
|
|||||||
@@ -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 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,
|
from the previous agent snapshot,
|
||||||
and runs the next due paper cycle even when no browser is open. It writes a
|
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
|
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
|
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 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
|
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
|
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
|
per leg can enter the Value Discipline portfolio. The Suggestions view stores
|
||||||
|
|||||||
+4
-4
@@ -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 98 active:</b> 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.</div>
|
<div class="live-build-banner"><b>Build 99 active:</b> 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.</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 98 · Adaptive strategy 59 · Five-minute autonomous scans · 1,000-event bundle audit · Resolution-window pilot 2 · Validated 3d–6d entries · Executable 50–55% NO pricing · Settlement-only exits · Per-horizon forward demotion · Autonomous runtime 1 · Offline runtime 2 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
|
Build 99 · Adaptive strategy 59 · Five-minute autonomous scans · Persistent 1,000-event bundle audit · Resolution-window pilot 2 · Validated 3d–6d entries · Executable 50–55% NO pricing · Settlement-only exits · Per-horizon forward demotion · Autonomous runtime 1 · Offline runtime 2 · 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 = 98;
|
const BUILD_VERSION = 99;
|
||||||
const AGENT_LEARNING_VERSION = 3;
|
const AGENT_LEARNING_VERSION = 3;
|
||||||
const SUGGESTION_ENGINE_VERSION = 59;
|
const SUGGESTION_ENGINE_VERSION = 59;
|
||||||
const MAKER_STRATEGY_VERSION = 3;
|
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)]));
|
const marketLearningByAgent=Object.fromEntries(AGENTS.map(agent=>[agent.id,buildSignalCalibration(st.signal_ledger,agent.id)]));
|
||||||
if(runMode==="live"){
|
if(runMode==="live"){
|
||||||
sugs=sugs.map(s=>applyAgentSpecificPromotions(s,marketLearningByAgent));
|
sugs=sugs.map(s=>applyAgentSpecificPromotions(s,marketLearningByAgent));
|
||||||
saveSuggestions(sugs,markets.length,analysisMarkets.length);
|
saveSuggestions(sugs,markets.length,analysisMarkets.length,bundleAudit);
|
||||||
saveMarketCache(analysisMarkets,sugs,priceMap);
|
saveMarketCache(analysisMarkets,sugs,priceMap);
|
||||||
}
|
}
|
||||||
const cachePolicy=offlineCachePolicy(cacheAgeMs);
|
const cachePolicy=offlineCachePolicy(cacheAgeMs);
|
||||||
|
|||||||
@@ -128,7 +128,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", "98"));
|
const expectedBuild = Number(required("EXPECTED_BUILD", "99"));
|
||||||
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 });
|
||||||
|
|||||||
@@ -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 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]);
|
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.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\]\)/);
|
||||||
@@ -26,7 +26,8 @@ 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: "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, /const NEG_RISK_EVENT_SCAN_LIMIT=1000;/);
|
||||||
assert.match(index, /bundleOpportunityTelemetry:true/);
|
assert.match(index, /bundleOpportunityTelemetry:true/);
|
||||||
assert.match(runner, /MAX_STATE_BYTES = 900_000/);
|
assert.match(runner, /MAX_STATE_BYTES = 900_000/);
|
||||||
|
|||||||
@@ -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"];
|
const APP_SHELL = ["/", "/index.html", "/personal.html", "/cycle-worker.js"];
|
||||||
|
|
||||||
self.addEventListener("install", event => {
|
self.addEventListener("install", event => {
|
||||||
|
|||||||
Reference in New Issue
Block a user