RFC-041: One source for each fact a reader works out¶
- Status: Accepted (owner, 2026-11-23: "a full-blown solution here for 081, the way it should be"); building in 0.8.1.
- Authors: Marko Dragoljevic
- Related RFCs: RFC-032 (one model, two surfaces: the same numbers and labels in every view), RFC-021 (the fingerprint's parts), RFC-026 (the spend cap), RFC-039 (the public reads)
- Code:
harness/scripts/_runs.py,_common.py,_spend.py,_visibility.py,model/runs.py,catalog_adapter.py,validate_tree.py, and the readers named below
Paths are relative to harness/scripts unless they start with harness/, docs/ or research/. Read 2026-11-23 in
the 0.8.1 worktree.
Abstract¶
Three projects upgraded to v0.8.0 on 2026-11-23 and each found one bug:
- homelab: a cap of $0 printed as "NONE".
- podcast eval-data: a measure its goal says is lower-is-better printed as "higher".
- fleet: a pass added back to an arm with
--purpose repeat --ofcounted as another arm.
Each was fixed where it showed. They have one cause: the harness does not hold the fact in one place. Each reader works it out again from clues (the value's truth, whether a run names a goal, a run id's suffix), and the readers drift apart. A search of the code for the same shape found eleven more (below).
This RFC names each fact, the one place that answers it, and what it reads: what was recorded or declared, never a convention. Every reader asks that place. A test fails when a reader works the fact out itself, where that can be checked from the code.
The facts¶
F1. Which way is better for a measure¶
Today. _runs.lower_is_better_on takes a goal's direction only through goal_direction, which counts only the
goals the runs name (m["goal"]). Two more derivations ignore goals entirely:
_common.verdict_for, used byevh run-compare(compare_runs.py:232), reads the name table only._study.lower_is_betterreads the goal only (callers add the study's owndirection). It knows neither the adapter nor the name table, so a study oncost_usdkeeps the trial that costs more.
Whether a measure is "neutral" is answered apart from its direction (is_neutral and lower_is_better side by side in
model/compare.py:544, catalog_build.py, model/metric_views.py, model/arm_views.py), so a goal that says
output_chars is lower-is-better gets "lower" on its goal page and "a count, neither better" in the pair test.
Checked: a goal saying der is lower gives lower = False when the runs name no goal.
The rule. One function, _runs.direction(metric, *, dataset=None, runs=(), goals=None, kinds=None), returns
"lower", "higher" or "neutral", by this precedence:
- A goal that declares the measure: as its primary measure (
success_criteria.primary) or as one of its axes (axes_of). For a question about one dataset, the goals that decide are, in this order (owner, 2026-11-23): - a goal that lists that dataset;
- a goal the runs name.
They are not equals. A goal that names the dataset speaks for it; a run's goal only says what the run was made for,
and the run may be on a dataset that goal does not decide. A goal on another dataset says nothing about this one, and
V14 notes when it disagrees with the answer. A goal with datasets: [] (checked by a gate, not measured on a
dataset; RUNBOOK 4c) lists no dataset, so it is never in the first tier: for a question about a dataset it is heard
only when a run names it. A question with no dataset (a measure no run records: metric-list, metric-show, its
metric page) is decided by any goal that declares it, a goal with datasets: [] included.
Goals that disagree on one dataset are a V14 failure, so a project never has two answers: two goals that both list the
dataset, or two that list none. A goal with datasets: [] beside a goal that lists a dataset does not clash with it.
2. What the runs record (metric_directions: the adapter's METRIC_DIRECTIONS, import-run --asc), then their
declared kinds (metric_kinds: descriptive is neutral).
3. The name table (_common: cost, speed, tokens; descriptive keys; error rates wer, cer, der lower).
4. The default: a measure nothing declares and no name says is read as higher (_runs.ASSUMED, "the default (nothing
declares it)"). The readers that rank on it print a NOTE; the result of every ranking on it is as before.
A declared direction wins over "neutral": a project that says which way a count goes has said it is not neutral.
lower_is_better_on, verdict_for, _study.lower_is_better, A.lower_is_better and A.is_neutral become thin
callers of it. The "better" word on the catalog's metric pages, metric-list, metric-show, the arm page and the
comparison comes from one function, _runs.better_word(direction). Today a goal page and the inspector can disagree on
the same arms.
Validation (V14).
- Fails when two goals declare opposite directions for one measure on one dataset.
- Notes, and does not fail (
evh validateprintsnote: V14 goal <id>: ...;goal-newandgoal-setsay the same words when they save the goal), when a goal'sdirectionis neitherlowernorhigher. The podcast project'sregression_detectionsaysnon_inferior, which is a decision rule, not a direction: it counts as no declaration, and the measure is read as the runs and the name table say. - Notes when a goal's primary measure is recorded by no run on any of its datasets, and names the measures they do
record. The podcast project's goals name
DERandWER vs human transcript (ascii-v1); its runs recordwer. - Notes each goal measure and each recorded
primary_metricwhose direction nothing declares (the default, higher:_runs.ASSUMED), so a ranking on it is a choice somebody made.
F2. Which runs make up an arm¶
Today.
- Repeat sets. A set made by
run --repeat Nis recognised by the run-id suffix_rN, in four copies:_runs.is_repeat_set,validate_tree.py:1033,promote_baseline.py:55andmodel/goals.py:133. A user's--run-id foo_r1andfoo_r2pass as a set. - Repeats of a run. A
--purpose repeat --of Xrun is read under the labelrepeats, a separate arm:ofis written and never read. The label exists so the oldruns-repeats/folder kept its views through the migration (m0004; RFC-032 "the same labels"). - The catalog and the commands. The catalog's arm (
catalog_adapter._index) keeps the runs scored against the latest run's reference.runs_on(leaderboard, cost-report) keeps every run, so one arm id can average different runs in two views.
The rule. One function, model.runs.arm_of(score_dir, rec), says which arm a scored run is read in, from what the
run recorded:
- A plain run (
purpose: run):<label>/<dataset>/<system>, as today. - A repeat with
of: the arm of the run it names whenmodel.runs.same_measurementsays the two are the same measurement taken again: the same system and dataset, and equal fingerprint parts for the data, the deployment and the settings, and an equal adapter. Each run's own fingerprint is read (a rescored or judged score's fingerprint has no hash). Otherwise it stays underrepeats, and the part that differs is named.evh run --purpose repeatsays which, before its first call and in its last line. - Not the whole
hash(owner, 2026-11-23). The hash's instrument part covers the harness's own code (harness_code_sha256), so every run made on 0.8.1 has a new hash, and a repeat of a 0.8.0 run would never join. And the hash is not unique to an arm: in one beta project, 13 imported systems share one hash on one dataset. A different harness build joins, and is named where the arm's runs are listed. ofnames a run of the same system and dataset, orevh runrefuses it, and validate fails it once committed (V29, for aretimeand apairrun as well as a repeat).- A repeat of a repeat follows
ofto the root, with a cycle guard. A missing link, or a link that did not join, leaves it underrepeats, with the reason; validate notes a missing link (V29, with the file that holds it) and fails only anofof another system or dataset. - No fingerprint, or another fingerprint version, on either side: under
repeats, with the reason. - A closed round's numbers never change. A repeat that joins after the round closed is listed in its
"since then". A round that recorded such a repeat under
repeats(a 0.8.0 round) reads it there; V29 notes it and does not fail it (owner, 2026-11-23). In an open round, a repeat of a retired arm's run is refused: todayadd_runbrings the arm back without a word. - A repeat with no
of: refused at write time (owner, 2026-11-23):evh run --purpose repeatwithout--ofstops withbad-argument, since a run that names nothing is joined to no arm. A throwaway--scratchpass is exempt. A repeat with noofthat is already recorded is read as before, underrepeats. retimeandpair: under their own labels, as today. Another machine and another configuration really are other measurements.
Set membership comes from what the run records:
repeat_index(written by--repeat N) or a joined repeat makes a run a member of its arm's set. The suffix no longer counts. An index that two runs of the arm both carry (twor1) comes from two--repeatinvocations, which are two sets and not one: none of the arm'srepeat_indexruns is a member by it (a joined repeat still is), and V8 fails them as it fails any two measurements of one system, or notes them whereduplicate_oklists the pair.is_repeat_set, V8,promote_baseline._repeatsand the goal's system names callmodel.runs.set_of(...).- Rounds (
model/rounds.py add_run) join the run to the armarm_ofnames.
The runs an arm is read from come from one function, model.runs.runs_of_arm(arm): the runs arm_of puts there, scored
against the reference of its latest run. Runs scored against another reference are named, never averaged in. The
catalog's _index and runs_on call it. Leaving git-ignored runs out stays a publishing rule of the catalog (evh
catalog --publish), applied on top.
The latest run is the one with the greatest (created_at, run_id), from one function, model.runs.latest(runs).
Today four readers pick it differently: by name prefix and string max (judge_validate._latest_run, which also
takes smoke_v1_* for system smoke), by run-id order (catalog_adapter._metrics, _kinds), and by created_at.
F3. Unknown, none and zero¶
The cap was one case. The same shape elsewhere:
| Where | Today | The rule |
|---|---|---|
_common.py:514 build.dirty = bool(dirt) |
git failing records false: clean |
null when git cannot say, as _fingerprint already does, recorded so it can be told apart from a run with no tree (EVAL_BUILD_REF, import-run, which also record null); only "git was asked and could not say" counts as not proven clean (promotion refuses it); runs-list shows ? for every null |
catalog_arms.py:418, catalog_views.py:87,711 cost cells |
a recorded cost of 0 shows —, as "not recorded" |
zero shows $0, as axes.fmt_usd writes every amount ($0 for none, two significant digits under a cent, four places up to a dollar, two above); — only when not recorded, as catalog_build.py:2931 already does |
workbench/live.js trial costs |
unknown shows $0.0000 |
unknown shows — |
_study.py:128 stop.usd and stop.wall_h |
usd: 0 refused as no stop rule, and a stop with one bound (usd alone) refused |
any one bound is a stop (trials, usd or wall_h, tested is not None), as open_study reads it (owner, 2026-11-23) |
run.py:1557 the identical-passes note |
an unset temperature read as 0 | the provider's default, from _providers |
The cap is printed by _spend.shown only, built in 0.8.1 (test_cap_shown.py reads the tokens of every command).
F4. Whether this is the public server¶
model/compare.py:25 says public when the server has public hosts or _visibility.public_env().
catalog_serve.py (item() and seven more) asks only the hosts. An in-process public MCP call is public by the first
rule and not by the second. Only a hand-kept list (public_dropped) keeps it from serving an item's text. And
_visibility.hidden shows a dataset's text when its file is missing or unreadable.
The rule. One function, _visibility.public(), which every reader calls. hidden fails closed: a dataset that
cannot be read is hidden on a public server.
F5. Which day it is¶
catalog_models.stale, ops/goals.py:109 and model/view_cache.py:209 use the local date.today(). Runs are stamped
in UTC, and the period filter compares created_at[:10]. One function, _common.today(), gives the UTC date, and
every reader takes it from there.
F6. The baseline on the datasets page¶
catalog_build.py:1008,1046 show baselines[-1], the latest promotion of any goal on that dataset, as "the" baseline.
The cell names the baseline per goal, as the goal pages do.
F7. The writers record the fact, or refuse¶
One source per fact is half the answer: a reader can only read what a writer recorded. Today the writers accept shapes the readers then assume away:
evh run --ofchecks only that the run exists (run.py:1375).--run-id foo_r1is accepted, and was read as a set.build.dirtyis writtenfalsewhen git cannot say.import-runwritespurpose: runanddirty: nullwhatever happened (import_run.py:182,200).
The rule. Each writer records the fact explicitly or refuses what it cannot know, and validate checks the link the readers rely on:
ofnames a run of the same system and dataset, and its relation to that run (joined, or which part differs) is stated.- A
repeat_indexset is whole and consistent. dirty: nullcomes with how the build was given.- A goal's measure is recorded by some run on its datasets (a note).
- Declared directions are
lowerorhigher(a note). - A score is a finite number, or the item failed.
evh runrecords an item whose score is NaN, an infinity or None as a failed item, scored as a failed item is (0 on most measures, or the adapter'sscore_failure);rescore,judge-score,sheet-importandimport-runrefuse such a score by name. A run recorded before this can hold one, and every reader reads it the same way: as a failed item scored 0, on read as on write (owner, 2026-11-23). The tests used to leave such an item out and say how many (non_finite), so the verdict on old data with such a score can move. - A cost is known or unknown, never read as zero: a run records no
total_cost_usdwhen no item reported a cost, andcost_coveragewhen only some did. The cost charts leave an arm whose cost is unknown off the cost axis and name it, where they read it as 0. run-promoterefuses a build recorded withdirty: nulland nosource(a run from before 0.8.0 recorded no telling) as it refuses one git could not read, aslabel-from-rundoes:--allow-dirtyoverrides (owner, 2026-11-23).evh leaderboard --goal Gwhere no run records the goal's measure refuses with exit 7 (it measured nothing), naming what the runs record; without--goalit ranks each arm on its own headline with oneNOTE.
evh run and import-run refuse at write time what validate would fail.
What moves¶
- This repository.
- F1: nothing (checked, exact names: 281 (dataset, metric) pairs, none differ).
- F2: one run moves.
triage_local_x3_nemotron_35_bolt_e4b_v1_20261030T201736Zrepeats…_20261030T192906Zwith equal data, deployment, settings and adapter parts. It joins that arm with its four scores (the first and three rescores): 673 arms become 669, and the arm reads two runs.- 355 of 1,909 exported files change, nearly all from the count "92 → 88 arms scored the same way".
research/internal/TRIAGE_RESULTS_LIVE.mdloses its "(later passes)" row, and the ranks after it renumber.- The three scifact repeats differ from their originals in deployment and adapter (
same_measurementnames both) and stay underrepeats. The eight triage--repeat 3sets (24 runs) name noof.
- F3 to F6: display, and promotion only for a run whose build git could not read. On this repository's export:
arms.htmlshows$0for 99 rows of local models (was—), anddatasets.htmlnames the goal beside each baseline. - fleet-eval-data. F2: 5 of 447 scores change arm: the nemotron run above, and
triage_v2_station_dc3315d_v1onorrery_triage_v1_labelled_v2, which goes from 2 runs to 3: its repeat has the same hash as_r1. This is the fix asked for. Its pair tests and goal page on that dataset can change. - podcast-scraper-eval-data. F1:
weroncurated_5feeds_dev_v1(68 arms) andcurated_5feeds_benchmark_v1(8 arms) is read as higher-is-better today, because nothing there declares it and the name table does not know it. Withwerin the name table it is lower. Every ranking onwerthere turns the right way up. The V14 notes name the goals whose measures no run records. - A study on a cost, speed or token measure with no
directionin its spec or goal: its keep/discard decisions were made the wrong way round. No study in the four projects is on such a measure (to check in step 1).
A patch release does not move a result unless the owner decides. The owner decided on 2026-11-23: these ship in 0.8.1, and the release notes list each move with the project it moves.
Tests, written first¶
Each fact gets a failing test before its fix:
- Its rule on an input that shows the bug.
- Its consistency: every reader gives the same answer on one fixture (the goal page, the leaderboard,
run-compare, the inspector,metric-listand the study on F1; the catalog arm, the leaderboard,pair-test,runs-listand the round on F2). - A source check, where the shape can be found in the code: no reader tests a cap's truth (built);
date.today()only in_common.today;lower_is_better(andis_neutral(only through_runs.direction; the_rNsuffix read only inmodel.runs.
The export check. This repository's export is identical file by file before and after (the footer's time masked) for F1, F2 and F3. Every difference is listed and explained.
The order of work¶
- F1 (direction), with its V14 checks and the podcast fixture.
- F2 (arm membership, sets, the runs of an arm, the latest run), with a fleet-shaped fixture (a
--repeat 3set with one pass lost and a repeat added with--purpose repeat --of). - F3, F4, F5 and F6.
- Docs:
- RUNBOOK §4 (repeats) and the would-overwrite refusal say what
--purpose repeat --ofnow does. - PRD-001, UXS-003 and
ops/run_jobs.pysay the same. - UPGRADING says what moves for whom.
- The full gates; the export check; each owner project read with the new code (read-only) and the moves listed.
Not covered¶
- Facts outside the eleven found: the search read the Python in
scripts/and part of the JavaScript. It did not readcatalog_assets/arms.js,overview.js,period.js,group.js,workbench/workbench.js,importers/,sweep.pyorrescore.py's cost reconciliation. - A goal's prose measure (
DER) is not matched to a recorded metric (der) by name or alias: V14 notes it, and the project renames it. A matching rule would guess. - Plain runs of one system on one dataset with equal hashes are not merged into a set: V8 still refuses two plain
measurements, as
duplicate_okallows on purpose.