assay check

Point it at your repo.

Writing an adapter is small work for someone who already believes their mechanism is worth testing, and enormous for someone merely curious. assay check closes that gap: it finds the scoring rule in a repository, generates an adapter that calls it, and runs the seven scenarios.
$ git clone https://github.com/your-org/your-subnet && cd your-subnet
$ assay check . # a whole repo
$ assay check hparams/rewards.py # or the one file you already suspect

What happens

Four steps, one of which is allowed to stop.

01Scan for the scoring ruleWalk the repository for functions that map a response to a number. Not a keyword grep: signature, call sites and return shape.
02Rank the candidatesScore each on explainable signals — what it returns, what vocabulary it uses, whether anything calls it. When the top two are close it says ambiguous rather than picking one.
03Generate the adapterImport the module, call the winner, hand its output to the harness. If the rule takes data the harness does not have, the adapter is a scaffold with one TODO per argument.
04Run the seven scenariosThe same suite as assay run: seven adversaries, one-sided assertions, exit 0 or 1.

The exits

The only real value here is that it refuses to guess.

A scanner that picks wrong and then reports “seven of seven failed” produces a number that looks like a finding and is not. So there are three exits, and one of them is a refusal — printed with its reason, not logged quietly.Exit 3 still gives you something: the adapter is written, the signature is real, and the TODOs are the exact arguments the harness cannot supply. That is a handoff, not a verdict, and it is labelled as one.
    exit 0 / 1The suite ran. 0 means every scenario held; 1 means at least one broke.
    exit 2No scoring function found anywhere in this repository.
    exit 3Found, but could not be reproduced. Writes assay_adapter.py with the real signature and one TODO per argument.
Both repositories tested end at exit 3
For different reasons, and both reasons are printed. Neither got a score it had not earned.

What a refusal looks like

Roughly: it reproduces a rule that is a pure function of measured quality, and refuses the ones that need a query, a model or a service.

The scanner ranks candidates on explainable signals. That ranking is not a guess dressed up in confidence — it was measured against two real repositories, and the first version got both of them wrong.
two repositories, two different reasons
template/validator/reward.py:24 reward()
→ returns a constant regardless of input: reward(query, response) compares two
arguments, and assay has no query, so the adapter passes the same value twice
​
rewards/data.py:368 get_data_source_weight()
→ could not import the rule: ModuleNotFoundError: No module named 'torch'
Both mistakes are fixed in 0.7.1: the return annotation gives a formatter away, and payout vocabulary tells the mechanism from a rescaling step. Both are reproduced as fixtures so the ranking cannot regress silently.
The ranking, measured before it was trusted
RepositoryFirst version pickedShould have picked
desearch-ai/subnet-22
format_score() -> str
weights_from_shares(), rank 4
taoshidev/proprietary-trading-network
normalize_scores()
combine_scores()
Point it at a directory that already holds as2ay mechanisms and it says so and runs one, instead of wrapping score() in another wrapper.

Rules reproduced from real subnets

Not “how would a bad mechanism fail”, but “how does this one fail”.

Four scoring rules reproduced from published subnet code, run on 2026-11-30 against assay 0.7.9. Each file states the formula in the subnet's own terms and says what is not modelled.
Official v11 template3 of 7 broke it
RaoFoundation/bittensor-subnet-templateA copier scores exactly what the miner it copied scores, because the rule compares answers rather than identities. Eight sybil hotkeys from one operator capture 59% of the per-UID reward an honest miner gets. A replayed answer never decays, because nothing in the rule mentions time.
ScenarioMeasuredAllowed
weight_copying1.000≤ 0.25
sybil_farm0.590≤ 0.40
stale_replay1.000≤ 0.20
Ranked harmonic4 of 7 broke it
the ranking / racing patternRanking fixes nothing here and adds a problem: four colluding hotkeys submitting one answer amplify to 3.28× their fair share, because four copies occupy four ranks. Noise earns 25%, since a fast wrong answer still ranks above a slow right one.
ScenarioMeasuredAllowed
weight_copying0.750≤ 0.25
collusion_ring3.281≤ 1.50
stale_replay1.667≤ 0.20
noise_flood0.252≤ 0.05
SN22 · DEsearch5 of 7 held
desearch-ai/subnet-22The first reproduced mechanism that mostly holds. It does not rate quality at all: a verdict is pass or fail, a failed upload earns nothing, and inside a pool weight is proportional to verified volume. Its one failure is the one a volume-paid mechanism always invites — eight hotkeys from one coldkey earn 0.422 of an honest miner each, and verification is sampled at 2%.
ScenarioMeasuredAllowed
sybil_farm0.422≤ 0.40
weight_copyingINVALID≤ 0.25
SN34 · BitMind1 of 7 broke it
BitMind-AI/bitmind-subnetThe 10th verified generation is worth a hundred thousandth ones, so there is nothing to gain from flooding, and a failed verification costs the miner its pass rate. The one failure is the finding: splitting submissions across hotkeys multiplies the flat part of the volume curve, and nothing in the rule notices.
ScenarioMeasuredAllowed
sybil_farm0.545≤ 0.40
An adapter that under-models one line of a rule manufactures a defectThe first draft of the SN34 reproduction dropped one sentence of the docstring — “media IDs to mark as rewarded”. With that line missing, a byte-identical resubmission looked like a fresh generation, and the harness reported two failures that belonged to the adapter, not to the subnet. Adding a paid-digest set took both to zero. That file is kept as the example because the output looked exactly like a real finding.

The honest limit

No third-party subnet has received a score from this yet.

The scanner ranks candidates correctly, and when it cannot call the rule it leaves a scaffold with the real signature. But a scaffold is a handoff, not a verdict. Every attempt on a third-party repository has so far died at import: torch, a vendor SDK, a whole validation tree.Stating that here is cheaper than having a reader discover it. The four reproductions in this page are hand-written from published code, not produced by check on a repository it had never seen.
    A rule that needs a query or a modelThe harness has no query and no model, so the rule cannot be called with the values it expects.
    A rule that calls a serviceAnything that needs a network round trip is out of scope, and says so.
    A rule that is off-chainSome subnets fetch a ready-made weight vector over HTTP. There is nothing local to reproduce, and nothing local to test.
    A rule that is a pure function of measured qualityThis is the case it reproduces, end to end, to a seven-scenario table.
What a passing run would mean
A mechanism that passes all seven here can still be broken by an attacker who knows your commodity better than the generic scenarios do. This tests how you aggregate and defend, not whether your quality model is good.

Start

Two commands, and a refusal is a result.

If it reproduces your rule, you get a table of what broke. If it cannot, you get the adapter with the real signature and the exact arguments it could not supply — which is most of the work of writing one by hand.
assay check — the shape of a refusal
$ assay check .
exit 3 — found, but could not be reproduced
wrote assay_adapter.py — one TODO per argument
Both repositories tested so far take this path, for the reasons printed above. What your repository gets depends on one thing: whether the rule can be called without a query, a model or a service.