Fail fast on dataset bundle drift instead of silently swapping the eval mixture - #13
Open
Shumatsurontek wants to merge 1 commit into
Open
Fail fast on dataset bundle drift instead of silently swapping the eval mixture#13Shumatsurontek wants to merge 1 commit into
Shumatsurontek wants to merge 1 commit into
Conversation
…xture
The eval mixture is the measuring stick: delta_threshold is a fixed 0.0015,
so changing which corpora are sampled — or their weights — moves the bar
every challenger is judged against while the verdict still reads
"accepted: true".
_load_bundle_defaults() caught every exception on the manifest fetch, logged
a warning, and substituted a hardcoded 11-source list. One timeout scored
challengers against a different distribution and wrote the result into the
king chain permanently. The fallback was never equivalent — the live bundle
serves eu-central-1/us-east-1 endpoints, the fallback pointed at s3.
- no fallback mixture: 3 bounded retries with backoff, then raise
- pin the bundle by sha256 over raw bytes in chain.toml [dataset]
- malformed pin raises at import, so a typo can't read as "unpinned"
- resolve explicitly at server lifespan, not as an import side effect
- stamp {url, digest, pinned, origin} into every verdict for audit
An unreachable manifest now aborts eval-server startup. That is the intended
trade: the validator falls back to burn weights, which is honest and
reversible; a verdict against an unknown mixture is not.
bundle_digest is left empty — the fix works unpinned (no fallback, digest
recorded, loud warning) and enabling the pin is a deployment decision.
Current live digest: sha256:d2a08b90f5971b067b858df1a6bf55721008622b186b97ac09e9a89f027b5c95
Also adds the first tests: 55 covering bundle resolution, bootstrap_verdict,
reveal parsing, and the quasar auto_map remote-code gate.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
npy_sources._load_bundle_defaults()caught every exception on the manifest fetch, warned, and substituted a hardcoded 11-source listdelta_thresholdis a fixed 0.0015 nats — change the mixture and you move the bar every challenger is judged against, while the verdict still readsaccepted: trueeu-central-1/us-east-1, the hardcoded list pointed ats3Fix
chain.toml [dataset].bundle_digestensure_bundle_resolved()at lifespan — no network I/O on import{url, digest, pinned, origin}stamped intoverdict.dataset.bundleand/health, so a decision can be replayed against the exact source listscripts/pin_dataset_bundle.pyprints digest + weighted sources;--checkexits non-zero on driftTrade accepted
Pin ships empty
UNPINNEDwarning at startupTests
First in the repo — 55, under 1s, no GPU or network.
test_dataset_bundle.py(20) — fetch exhaustion raises, digest mismatch refuses, empty mixture refuses, retry-then-succeed, env override skips network, in-place mutationtest_verdict.py(9) — identical rejected, clearly-better accepted, better-but-under-δ rejected,accepted == (lcb > delta), seed determinismtest_reveal.py(18) — v3/v4 round-trips, malformed payloads, digest shape rejectiontest_custom_code_policy.py(8) —_validate_quasar_auto_maprejects hub-qualified and traversal module pathsThe in-place-mutation test guards a live trap:
eval_server_two_sourcesimportsDEFAULT_MANIFEST_URLSby value, so resolution mutates rather than rebinds — rebinding would leave/healthreporting a stale empty list.Flagged, not fixed
flais an undeclared dep —archs/quasar/modeling_quasar.py:23imports flash-linear-attention, absent frompyproject.toml, souv syncyields an install whereimport validatorfails. Stubbed intests/conftest.pyonly when missing, so GPU hosts hit the real arch moduleRUF100on# noqa: E402, identical tovalidator.py:31-32andminer.py:30-31uv.locknot included — separate call