mirror of
https://github.com/theodore-song/polymarket-analyst.git
synced 2026-08-24 13:08:10 +00:00
Convert verified complete NO bundles immediately
This commit is contained in:
@@ -5,6 +5,7 @@ import { ALLOWED_RUNTIME_KEYS, compactRuntimeTransportSnapshot, validateRuntimeS
|
||||
const index = fs.readFileSync(new URL("../index.html", import.meta.url), "utf8");
|
||||
const api = fs.readFileSync(new URL("../api/state.js", import.meta.url), "utf8");
|
||||
const workflow = fs.readFileSync(new URL("../.github/workflows/autonomous-cycle.yml", import.meta.url), "utf8");
|
||||
const releaseWorkflow = fs.readFileSync(new URL("../.github/workflows/release-build-124.yml", import.meta.url), "utf8");
|
||||
const runner = fs.readFileSync(new URL("./run-autonomous-cycle.mjs", import.meta.url), "utf8");
|
||||
const resolutionAudit = JSON.parse(fs.readFileSync(new URL("../research/resolution-week-no-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"));
|
||||
@@ -13,8 +14,8 @@ const adaptiveAudit = JSON.parse(fs.readFileSync(new URL("../research/adaptive-s
|
||||
const sportsEvaluator = fs.readFileSync(new URL("./evaluate-sports-favorites.mjs", import.meta.url), "utf8");
|
||||
const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]);
|
||||
|
||||
assert.equal(build, 123);
|
||||
assert.match(index, /Adaptive strategy 64 · durable evidence · build 123/);
|
||||
assert.equal(build, 124);
|
||||
assert.match(index, /Adaptive strategy 65 · exact bundle conversion · build 124/);
|
||||
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\]\)/);
|
||||
@@ -70,6 +71,10 @@ assert.match(workflow, /cancel-in-progress: false/);
|
||||
assert.match(workflow, /next=\$\(\( \(now \/ 300 \+ 1\) \* 300 \+ 15 \)\)/);
|
||||
assert.match(workflow, /actions\/workflows\/autonomous-cycle\.yml\/dispatches/);
|
||||
assert.match(workflow, /--data '\{"ref":"main"\}'/);
|
||||
assert.match(releaseWorkflow, /name: Release Build 124 after Vercel quota reset/);
|
||||
assert.match(releaseWorkflow, /grep -q 'const BUILD_VERSION = 124;'/);
|
||||
assert.match(releaseWorkflow, /EXPECTED_BUILD: "124"/);
|
||||
assert.doesNotMatch(releaseWorkflow, /Build 123|build_123|build-123/);
|
||||
assert.match(index, /cloudRestartReconstructsOfflineCache:true/);
|
||||
assert.match(index, /saveSuggestions\(sugs,markets\.length,analysisMarkets\.length,bundleAudit\)/);
|
||||
assert.match(index, /const NEG_RISK_EVENT_SCAN_LIMIT=1000;/);
|
||||
@@ -96,6 +101,14 @@ assert.match(index, /immediatelyMergesBinaryCompleteSet:/);
|
||||
assert.match(index, /rejectsCrossMarketBinaryMerge:/);
|
||||
assert.match(index, /immediateMergeMetadataSurvivesSync:/);
|
||||
assert.match(api, /bundle_immediate_merge: s\.bundle_immediate_merge/);
|
||||
assert.match(index, /function convertCompleteNegativeRiskNoBundle\(p,bundleId\)/);
|
||||
assert.match(index, /discoversExactCompleteNoConversion:/);
|
||||
assert.match(index, /deductsAdapterFeeFromConversionPayout:/);
|
||||
assert.match(index, /atomicallyConvertsCompleteNoSet:/);
|
||||
assert.match(index, /blocksImmediateConversionOnMismatchedMetadata:/);
|
||||
assert.match(index, /doesNotInventConversionWithoutAdapterMetadata:/);
|
||||
assert.match(api, /bundle_immediate_convert: s\.bundle_immediate_convert/);
|
||||
assert.match(api, /neg_risk_market_id: s\.neg_risk_market_id, neg_risk_fee_bips: s\.neg_risk_fee_bips/);
|
||||
assert.match(index, /reservesBinaryComplementDepthChecks:/);
|
||||
assert.match(index, /function bundleVerificationShortlist\(candidates\)/);
|
||||
assert.match(index, /function prioritizeIndependentBundles\(candidates,limit=Infinity\)/);
|
||||
|
||||
@@ -34,7 +34,9 @@ else process.env.NEON_DATABASE_URL = originalNeonUrl;
|
||||
const compacted = compactSuggestion({
|
||||
market_id: "bundle:1:yes", side: "YES", signal_type: "bundle-arb", signal_confidence: 1,
|
||||
entry_candidate: true, adaptive_promotion: false, requires_live: true, bundle_id: "bundle:1:yes", bundle_event_id: "1",
|
||||
bundle_side: "YES", bundle_logic: "threshold-dominance", bundle_cost_per_unit: 0.95, bundle_payout_per_unit: 1,
|
||||
bundle_side: "NO", bundle_logic: "neg-risk-complete-no", bundle_immediate_convert: true,
|
||||
neg_risk_market_id: "0xmarket", neg_risk_fee_bips: 25, bundle_cost_per_unit: 1.95,
|
||||
bundle_payout_per_unit: 1.995, bundle_settlement_payout_per_unit: 2,
|
||||
bundle_net_profit_per_unit: 0.05, bundle_capital_efficiency: 0.0025, bundle_legs: [{ market_id: "1", side: "YES" }],
|
||||
fees_enabled: false, fee_schedule: { rate: 0, exponent: 1, takerOnly: true },
|
||||
depth_verified: true, fees_verified: true, fee_model: "verified-market-specific", execution_model: "live-order-book-vwap",
|
||||
@@ -43,9 +45,13 @@ const compacted = compactSuggestion({
|
||||
assert.equal(compacted.signal_type, "bundle-arb");
|
||||
assert.equal(compacted.entry_candidate, true);
|
||||
assert.equal(compacted.requires_live, true);
|
||||
assert.equal(compacted.bundle_side, "YES");
|
||||
assert.equal(compacted.bundle_side, "NO");
|
||||
assert.equal(compacted.bundle_event_id, "1");
|
||||
assert.equal(compacted.bundle_logic, "threshold-dominance");
|
||||
assert.equal(compacted.bundle_logic, "neg-risk-complete-no");
|
||||
assert.equal(compacted.bundle_immediate_convert, true);
|
||||
assert.equal(compacted.neg_risk_market_id, "0xmarket");
|
||||
assert.equal(compacted.neg_risk_fee_bips, 25);
|
||||
assert.equal(compacted.bundle_settlement_payout_per_unit, 2);
|
||||
assert.equal(compacted.bundle_capital_efficiency, 0.0025);
|
||||
assert.equal(compacted.bundle_legs.length, 1);
|
||||
assert.equal(compacted.fee_schedule.rate, 0);
|
||||
|
||||
Reference in New Issue
Block a user