Skip to content

fix(publisher): pay the KING curve the lane actually decided on - #239

Merged
ai-hpc merged 1 commit into
mainfrom
ai-hpc/sync-vendored-king-curve
Sep 10, 2026
Merged

ai-hpc merged 1 commit into
mainfrom
ai-hpc/sync-vendored-king-curve

Conversation

@ai-hpc

@ai-hpc ai-hpc commented Sep 10, 2026

Copy link
Copy Markdown
Member

The live publisher is not paying the decided curve. Found while clearing the held PRs.

What diverged

distill moved cybergym_tournament._award_shares to the KING model on 2026-09-04 (distill #181) — jared's spec: ranks 2–5 take the fixed runner-up shares (0.07 / 0.03 / 0.03 / 0.03) and the king takes the residual, so a thin field concentrates on the leader rather than scaling every rank up.

The publisher's vendored copy — the one the live weight path composes from — still had the old table and renormalized it:

winners publisher (live) distill (decided)
2 0.82 / 0.18 0.93 / 0.07
3 0.73 / 0.16 / 0.11 0.90 / 0.07 / 0.03
5 0.65 / 0.14 / 0.10 / 0.07 / 0.04 0.84 / 0.07 / 0.03 / 0.03 / 0.03

This PR re-syncs the vendored file from distill main (de916cf) and records that commit in the VENDORED header.

Why the drift wasn't caught

test_vendored_tournament_constants_match_the_mechanism pinned TOURNAMENT_SHARES. After #181 the two copies had different constantsRUNNER_UP_SHARES in distill, TOURNAMENT_SHARES in the vendored copy — rather than different values of one, so the guard kept passing against a name that no longer drove the payout.

test_vendored_award_shares_matches_distills_king_schedule now pins the schedule, rank by rank, for every field size, and asserts the lane pays out in full for any non-empty field. That is the thing that actually pays, and it is the same table distill's own golden test asserts.

Supersedes the held curve PRs

wallscaler's review of #146 asked for the header sha to be bumped to the distill commit being mirrored; done here (de916cf).

Risk

The CyberGym lane currently has no winners to pay — the v2 backend went live today and no miner has submitted — so this is the cheapest possible moment to correct the curve. 52 passed in the adapter suite locally; the rest of the publisher suite needs bittensor, which CI has.

The live publisher was not paying jared's decided curve. distill moved cybergym_tournament to the
KING model on 2026-09-04 (#181: ranks 2-5 take fixed runner-up shares 0.07/0.03/0.03/0.03, the king
takes the residual, so a thin field concentrates on the leader). The publisher's VENDORED copy --
which is what the live weight path composes from -- still renormalized the old 0.65/0.14/0.10/0.07/
0.04 table, so with two winners it paid 0.82/0.18 where the spec says 0.93/0.07.

The vendored file is re-synced from distill main (de916cf) and the header records that commit.

The existing constants guard did not catch the drift, because the two copies had DIFFERENT
CONSTANTS (TOURNAMENT_SHARES vs RUNNER_UP_SHARES) rather than different values of one, and the
guard pinned the name it knew. `test_vendored_award_shares_matches_distills_king_schedule` now pins
the SCHEDULE rank by rank for every field size, which is what actually pays, and asserts the lane
sums to 1 for any non-empty field.

Supersedes #146 (which vendored an older bottom-fill table) and its distill twin #161.
@ai-hpc

ai-hpc commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Self-review before merge (owner-directed: jared asked me to clear the held PRs and deploy).

  • Blast radius. The vendored file is imported only by mechanism_cybergym_adapter (epoch_score_base100, build_scoreboard, WINDOW, TournamentError); validator_thin never imports it, and Authority/FULL mode refuses v3 outright — so the curve is publisher-side at runtime. I checked every one of those names still exists on the synced file before committing.
  • Direction of the change. It moves the live publisher ONTO jared's decided spec, not off it. The old behaviour was the drift.
  • Timing. The lane has no winners right now (v2 backend went live today, no submissions), so no in-flight payout changes under anyone.
  • The guard that failed. I did not just update the constant — the reason the drift survived a passing guard was that the two copies pinned different names. The new golden pins the schedule itself, which is what pays, for every field size, plus the sum-to-1 invariant.
  • Not byte-identical to distill, by design: the six-line VENDORED header differs (it always has). Everything else is distill de916cf verbatim.

All checks green: Publisher suite, Python 3.11/3.12, Integration lane, Real validator release, AMD SEV-SNP contract.

@ai-hpc
ai-hpc merged commit e90b7fc into main Sep 10, 2026
9 checks passed
@ai-hpc
ai-hpc deleted the ai-hpc/sync-vendored-king-curve branch September 10, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant