Skip to content

feat(lane D): full public bench of a newly crowned king → status/lane_d.json king.bench - #1042

Merged
tensorlink-dev merged 3 commits into
mainfrom
laned-king-full-bench
Dec 1, 2026
Merged

tensorlink-dev merged 3 commits into
mainfrom
laned-king-full-bench

Conversation

@tensorlink-dev

Copy link
Copy Markdown
Contributor

Owner 2026-12-01: "if someone is crowned [on lane D] we score them", on all public benchmarks.

Display only, main validator only. This never feeds the gate, the crown, pay, the signed report or any consensus value. External validators don't run it, because no bench host is wired there.

What it does

  • Box hook (cascade/validator/lane_d_wiring.py, LaneDStep._produce): after _publish → _request_publication → _publish_status, the new _schedule_king_bench(b, inp) gets the current KING_D. If it is a miner king with no stored complete bench, KingBench.schedule starts one sweep on a daemon thread. The step never waits for it.
  • Sweep (cascade/validator/lane_d_king_bench.py): runs SweepSession over the new SSHBenchHost.sweep_full on the lane D bench_hosts. It covers all four suites (gift, boom, time, fev) and uses lane A's DEC-CA-0063 sidecar settings (bench_settings) at the king's effective context.
  • Timing: the SSH allowance ends 60 min before the next boundary. That time comes from the boundary's on-chain timestamp plus effective_epoch_blocks × 12 s. If less than 15 min are left, the sweep doesn't start and is retried at the next settlement. Only one king sweep runs at a time.
  • Bench host (cascade/eval/lane_d_bench_sweep.py): the reply gains aggregates (suite_aggregates: the suite-level metrics, using the same aliases and coverage rule as extract_bench_scores, so the numbers compare with the lane A king's signed ones). The gate rows are unchanged and an old box ignores the new key. The bench host checkout has to carry this change before king numbers appear. Until then the reply has no aggregates, the sweep is logged as a failure and retried.
  • Persist: the result is stored at <lane D state dir>/lane_d_king_bench/<digest>.json.
  • Publish: status/lane_d.json gets king.bench, and each prior king keeps its stored bench. The result is also republished into the status as soon as the sweep finishes.

Status shape (king.bench)

{"schema":"lane-d-king-bench/1","digest":"…","boundary":N,"as_of":"2026-12-01T05:00:00Z",
 "gifteval_crps":…, "gifteval_mase":…, "boom_crps":…, "boom_mase":…, "time_crps":…, "time_mase":…, "fev_crps":…, "fev_mase":…,
 "bench_method":"observed_mask/3", "data_revisions":{"gift":"…",…}, "complete":true,
 "suites":{"gift":{"status","crps","mase","partial","n_items",…},…}}

The flat gifteval_crps / gifteval_mase keys are the first branch of giftPair() in index.html and stakeholders.html, and they follow lane A's BenchScores convention (readSix).

Failures

  • A failure (host down, timeout, reply without aggregates) is logged and retried at the next settlement. The report body and receipt are identical to a run without it (tested).
  • A sweep that completes but misses some suites is kept with complete: false and retried up to 4 times.
  • The house is never benched.

Known limit

When the allowance times out, the local ssh client is killed. The remote sidecar may keep running until it notices the closed channel.

Tests (torch-free; on base they fail by AssertionError)

  • tests/accept/w8b/test_w8b_king_full_bench.py:
    • a crowning schedules exactly one full sweep, with the allowance and context checked and no re-sweep after a restart;
    • king.bench is checked against the website's shape;
    • a failure leaves the settlement unchanged and is retried;
    • there is no bench call while the house holds the crown;
    • no sweep starts inside the hour before the next settlement.
  • tests/accept/w3b6a/test_w3b6a_king_full_bench.py:
    • the reply carries aggregates and the gate rows are unchanged;
    • sweep_full merges the aggregates, honours the context override and caps the allowance;
    • an older bench host still answers the gate.
  • Existing w3b6a host/pod, w8b settle/restart/publish/fail-closed and w12b status tests pass.

Labels: laned:W8b (wiring, main, new module in its PATHS) and laned:W3b6a (bench host and sweep).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe

… status king.bench

Owner 2026-12-01: "if someone is crowned [on lane D] we score them". After a
settlement is published, a miner KING_D without a stored bench gets ONE
display-only sweep on gift/boom/time/fev on the lane D bench host
(SweepSession over SSHBenchHost.sweep_full, lane A's sidecar settings), on
its own thread with an allowance ending an hour before the next boundary.
The bench host's reply now carries per-suite aggregate CRPS/MASE beside the
unchanged gate rows. The result is stored in the lane D state dir and
published in the unsigned status/lane_d.json as king.bench under lane A's
BenchScores keys (gifteval_crps/gifteval_mase, ... the website's keys);
prior kings keep theirs. Failures are logged and retried next settlement;
the house is never benched. Never gate, crown, pay, signed report or any
consensus value; main validator only (needs --lane-d-inputs bench_hosts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
@vercel

vercel Bot commented Dec 1, 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 Dec 1, 2026 4:15am UTC

Request Review

@tensorlink-dev tensorlink-dev added laned:W3b6a Lane D WP W3b6a laned:W8b Lane D plan WP W8b labels Dec 1, 2026
@tensorlink-dev
tensorlink-dev added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 49ea024 Dec 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

laned:W3b6a Lane D WP W3b6a laned:W8b Lane D plan WP W8b

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant