Skip to content

fix(marketcast): heartbeat the offload lease for the whole scoring run (#908) - #926

Merged
tensorlink-dev merged 3 commits into
mainfrom
fix/mkt-lease-heartbeat-908
Nov 25, 2026
Merged

tensorlink-dev merged 3 commits into
mainfrom
fix/mkt-lease-heartbeat-908

Conversation

@tensorlink-dev

@tensorlink-dev tensorlink-dev commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #908 (launch blocker for MarketCast judging). The validator touched <hosts>.request only before each round. A single round that forecasts for longer than the provisioner's mkt_request_stale_s (1800 s) had its pod torn down mid-run, and every retry died the same way. On testnet, a 1-entry round at 32k context on an RTX3090 took about 38 min; the provisioner logged mkt_idle=True, then worker closed the session.

MktLease.heartbeat(rid) keeps the request fresh from a daemon thread while the offload session is open. The existing per-round touch is kept. Fake leases without heartbeat fall back to a null context. MktLease.touch now writes a per-thread tmp file, so the heartbeat thread and the round loop never race on one tmp name (a lost replace would have aborted the run).

One combined PR (tests + code; replaces the split #927). Tests: tests/accept/w_cmp/test_w_cmp_mkt_lease_heartbeat.py — 3 new tests (lease heartbeat refreshes during a long body; stops after; the offloaded publisher keeps the request fresh WHILE a long round computes, then releases). All fail on BASE with an AssertionError, pass on HEAD. PATHS: cascade/validator/mkt_offload.py added to W-CMP. check-pr: MODE combined.

Exposure: _mkt_publish_remote / MktLease run only on the MAIN validator with a MarketCast offload host (mkt_eval_hosts). No computed value changes (lease file mtime only). Main-validator only, no external update.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BMT4D7eZUKUF2gocYLVFmj

tensorlink-dev and others added 2 commits November 25, 2026 01:32
#908)

The validator touched <hosts>.request only before each round, so one round that
forecast for longer than the provisioner's mkt_request_stale_s (1800 s) had its
pod torn down mid-run (testnet: a 1-entry round at 32k context on an RTX3090,
'worker closed the session') and was retried, forever. MktLease.heartbeat keeps
the request fresh from a daemon thread while the session is open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SG5aamoFze4bkhr1suMufY
@tensorlink-dev tensorlink-dev added laned:W-CMP plan rev6.25 W-CMP: declarative lane C competitions, standard pool, rule menu testnet Found in a testnet rollout run labels Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cascade Ignored Ignored Preview Nov 25, 2026 2:00am UTC

Request Review

…ouch tmp

Tests move into the W-CMP accept dir (one combined PR) and add a publisher
test: the request stays fresh WHILE a long round computes. MktLease.touch's
tmp file is now per thread, so the heartbeat thread and the round loop
never race on one tmp name (a lost replace would abort the run).
PATHS: cascade/validator/mkt_offload.py rides along.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BMT4D7eZUKUF2gocYLVFmj
@tensorlink-dev
tensorlink-dev added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 882f62a Nov 25, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

laned:W-CMP plan rev6.25 W-CMP: declarative lane C competitions, standard pool, rule menu testnet Found in a testnet rollout run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MarketCast offload: lease touched once per round, provisioner tears the pod down after 30 min mid-scoring (lane C never judges)

1 participant