Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/rules/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ also supports `--only KEY` for a focused benchmark check.
Nullius handles automatically; being technically accurate is not enough.
- **Names, not keys**: an option that does not read carries a `label`;
acronyms in capitals. Never cut a name: it wraps.
- **Launch, run, trial, task** each mean one thing (`docs/concepts.md`). A
count says which.
- **Generic names for groups** ("Any agent", "Every agent"), never one
vendor's name standing for all.
- **Every choice is a card** (`tile()`, the catalogue's shape), one size per
Expand Down
6 changes: 3 additions & 3 deletions app/templates/runs/_execution.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span class="chip {{ 'st-runs' if shown == 'done' else 'st-blocked' if shown == 'failed' else 'st-lane' }}" id="execution-state">{{ shown }}{% if not own and ex.step and ex.state in ('preparing', 'running') %} · {{ ex.step }}{% endif %}</span>
<span class="small">on <strong>{{ ex.plan.host.label if ex.plan.host else 'this machine' }}</strong></span>
{% if ex.error and not own %}<span class="small bad" id="execution-error">{{ ex.error }}</span>{% endif %}
<span class="small muted" id="execution-run"{% if not own or ex.state == shown %} hidden{% endif %}>· the run: {{ ex.state }}{% if ex.error %} · {{ ex.error }}{% endif %}</span>
<span class="small muted" id="execution-run"{% if not own or ex.state == shown %} hidden{% endif %}>· the launch: {{ ex.state }}{% if ex.error %} · {{ ex.error }}{% endif %}</span>
{% if ex.state in ('preparing', 'running', 'paused') %}<button type="button" class="btn sm ghost" id="execution-stop">Stop</button>{% endif %}
{#- a launch goes as one, from the Runs page: never this job alone #}
{% if deletable %}<a class="small run-delete" href="{{ url_for('index', view='launch', delete=deletable, _anchor=deletable|replace(':', '-')) }}">Delete its launch…</a>{% endif %}
Expand All @@ -37,7 +37,7 @@
</div>
{# a part downloading: its file, how much of it, as a bar #}
<div class="execution-progress" id="execution-progress" hidden><progress id="execution-bar" max="1" value="0"></progress><span class="small mono" id="execution-progress-text"></span></div>
<details class="execution-log" {% if waiting %}open{% endif %}><summary class="small">Run log</summary><pre id="execution-lines"></pre></details>
<details class="execution-log" {% if waiting %}open{% endif %}><summary class="small">Launch log</summary><pre id="execution-lines"></pre></details>
</section>
<script>
(() => {
Expand Down Expand Up @@ -99,7 +99,7 @@
retry = alive;
if (own) { // this arm has ended: its chip stays, the run's state goes beside it
const run = document.getElementById('execution-run');
run.hidden = j.state === own; run.textContent = '· the run: ' + j.state + (alive && j.step && j.state !== 'paused' ? ' · ' + j.step : '') + (j.error ? ' · ' + j.error : '');
run.hidden = j.state === own; run.textContent = '· the launch: ' + j.state + (alive && j.step && j.state !== 'paused' ? ' · ' + j.step : '') + (j.error ? ' · ' + j.error : '');
} else {
state.textContent = j.state + (alive && j.step && j.state !== 'paused' ? ' · ' + j.step : '');
state.className = 'chip ' + (j.state === 'done' ? 'st-runs' : j.state === 'failed' ? 'st-blocked' : (j.state === 'paused' || j.state === 'stopping') ? 'st-branch' : 'st-lane');
Expand Down
21 changes: 12 additions & 9 deletions app/templates/runs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@
are shown as their launch's task checks. #}
<p class="subtitle" id="counts"
data-runs="{{ n_agent_runs }}" data-trials="{{ n_trials }}">
{{ n_agent_runs }} runs<span class="dot">·</span>{{ n_trials }} trials
{{ launches|length }} launch{{ '' if launches|length == 1 else 'es' }}<span class="dot">·</span>{{ n_agent_runs }} run{{ '' if n_agent_runs == 1 else 's' }}<span class="dot">·</span>{{ n_trials }} trial{{ '' if n_trials == 1 else 's' }}
</p>
<p class="runs-glance" id="glance">
{%- if workspace %}<span>in <b>{{ workspace.label }}</b></span>{% endif -%}
<span><b>{{ launches|length }}</b> launch{{ '' if launches|length == 1 else 'es' }}</span>
{%- for s, n in states|dictsort %}<span class="st-{{ s }}"><b>{{ n }}</b> {{ s }}</span>{% endfor -%}
<span title="Launches whose nop and oracle controls behaved on every task">task checks <b>{{ n_checked }}</b> of {{ launches|length }}</span>
</p>
Expand Down Expand Up @@ -137,7 +136,7 @@
<header class="launch-head">
<h2>{{ g.dataset_title if L.dataset else (L.name or g.dataset_title) }}{% if g.n_tasks %} · {{ g.n_tasks }} {% if words %}{{ words[0] if g.n_tasks == 1 else words[1] }}{% else %}task{{ '' if g.n_tasks == 1 else 's' }}{% endif %}{% endif %}</h2>
<span class="launch-id mono" title="{{ 'Launched together by one Run from the builder' if L.source == 'record' and not L.launch_ids else 'Shards of one launch, run on several machines' if L.launch_ids else 'Grouped: the same dataset, started within half an hour of the first' }}">{{ L.title }}</span>
<span class="launch-when">{% if L.started %}{{ L.started|dt }} · {% endif %}{{ L.job_ids|length + L.pending|length }} run{{ '' if (L.job_ids|length + L.pending|length) == 1 else 's' }}</span>
<span class="launch-when">{% if L.started %}{{ L.started|dt }} · {% endif %}{{ g.n_runs }} run{{ '' if g.n_runs == 1 else 's' }}{% if g.n_checks %} · {{ g.n_checks }} check{{ '' if g.n_checks == 1 else 's' }}{% endif %}</span>
</header>
{# a runner's launch without controls is checked by its own floor and ceiling, which are arms in its table #}
{% if g.controls or not by_runner %}
Expand All @@ -160,7 +159,7 @@ <h2>{{ g.dataset_title if L.dataset else (L.name or g.dataset_title) }}{% if g.n
</div>
{% endif %}
<footer class="launch-foot">
<span>{{ g.summary or 'controls only' }}</span>
<span>{{ g.summary or 'checks only' }}</span>
{% if g.paused %}<span class="launch-paused">Paused after a failure: <a href="{{ url_for('job', job_id=g.paused) }}">continue or stop</a></span>{% endif %}
<span class="header-spacer"></span>
{% if g.recipe %}<a href="{{ url_for('new_run', run=g.recipe) }}">Open this launch's recipe</a>{% endif %}
Expand Down Expand Up @@ -278,7 +277,7 @@ <h2>{{ g.dataset_title if L.dataset else (L.name or g.dataset_title) }}{% if g.n
{%- if j.is_preparing %} <span class="badge"
title="Launched: Harbor has written this run's configuration and nothing else yet. No trial has started; the row will change on its own.">preparing</span>
{%- elif j.is_running and ended[j.job_id] %} <span class="badge"
title="The run that wrote this job was {{ ended[j.job_id][0] }} at {{ ended[j.job_id][1].strftime('%H:%M:%S') }}Z; Harbor never closed it, so its record still names {{ j.n_running_trials }} running · {{ j.n_pending_trials }} pending — those trials will not run">{{ ended[j.job_id][0] }}</span>
title="This run was {{ ended[j.job_id][0] }} at {{ ended[j.job_id][1].strftime('%H:%M:%S') }}Z; Harbor never closed it, so its record still names {{ j.n_running_trials }} running · {{ j.n_pending_trials }} pending. Those trials will not run.">{{ ended[j.job_id][0] }}</span>
{%- elif j.is_running %} <span class="badge warn"
title="{{ j.n_running_trials }} running · {{ j.n_pending_trials }} pending — this run is not finished; its numbers are partial">running</span>{% endif %}</td>
<td data-col="agent"><span>{{ j.agent_label or '—' }}</span>
Expand Down Expand Up @@ -391,6 +390,7 @@ <h3 class="dataset-name">{{ d.info.title }}</h3>
const sent = new Map([...document.querySelectorAll('.launch')].map(l => [l.dataset.launch, l.outerHTML]));
sent.set('tbody', table.tBodies[0].innerHTML);
const counts = document.getElementById('counts');
let head = counts.innerHTML;
const note = document.getElementById('filter-note');
const emptyNote = document.getElementById('empty-note');
const clearBtn = document.getElementById('clear-filter');
Expand Down Expand Up @@ -493,10 +493,12 @@ <h3 class="dataset-name">{{ d.info.title }}</h3>
const filtered = active || Object.values(colFilters).some(Boolean);
clearBtn.hidden = !filtered;
emptyNote.hidden = shown > 0;
note.textContent = filtered ? `${shown} of ${rows.length} runs` : '';
counts.textContent = filtered
? `${shown} of ${counts.dataset.runs} runs shown`
: `${counts.dataset.runs} runs · ${counts.dataset.trials} trials`;
// agents only, as the header counts them
const runRows = rows.filter(r => !r.classList.contains('control-row'));
const agents = runRows.filter(r => !r.hidden).length;
note.textContent = filtered ? `${agents} of ${runRows.length} runs` : '';
if (filtered) counts.textContent = `${agents} of ${counts.dataset.runs} run${counts.dataset.runs === '1' ? '' : 's'} shown`;
else counts.innerHTML = head;
syncPicks(); // the header checkbox tracks visible rows only
}
// on the document: the bar and the chips are replaced as the runs move
Expand Down Expand Up @@ -680,6 +682,7 @@ <h3 class="dataset-name">{{ d.info.title }}</h3>
const now = fresh.getElementById('counts');
counts.dataset.runs = now.dataset.runs;
counts.dataset.trials = now.dataset.trials;
head = now.innerHTML;
}
let seen = {{ pulse | tojson }}, asking = false;
setInterval(async () => {
Expand Down
3 changes: 2 additions & 1 deletion app/ui_tests/test_controls_apart.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def test_a_control_that_failed_before_the_verifier_is_a_setup_failure(self):
def test_the_header_the_chips_and_the_mix_bar_count_the_agent_only(self):
html = self.get("/runs")
self.assertIn('data-runs="1" data-trials="4"', html)
self.assertIn("1 runs", text_of(re.search(r'<p class="subtitle" id="counts".*?</p>', html, re.S).group(0)))
self.assertIn("· 1 run · 4 trials", text_of(re.search(r'<p class="subtitle" id="counts".*?</p>', html, re.S).group(0)))
self.assertIn('class="dataset-count">1 run<span class="dot">·</span>4 trials', html)
legend = re.search(r'<div class="legend">.*?</div>', html, re.S).group(0)
chips = dict(re.findall(r'data-outcome="([a-z_]+)"[^>]*>[^<]*<b>(\d+)</b>', legend))
self.assertEqual(chips, {"resolved": "2", "failed_verification": "1", "rate_limited": "1"})
Expand Down
4 changes: 2 additions & 2 deletions app/ui_tests/test_launch_shards.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def fold_row(self, block, who):
def test_each_participant_is_one_row_of_its_shards_and_every_shard_keeps_its_row(self):
block = self.block()
# the header counts every shard; each has its row, under a folded row that says how many it holds
self.assertIn("· 8 runs</span>", block)
self.assertIn("· 4 runs · 4 checks</span>", block)
classes = rows_of(block)
self.assertEqual(sum("la-shard" in c for c in classes), 8)
self.assertEqual(sum("la-fold" in c for c in classes), 4)
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_a_participant_of_one_shard_is_its_plain_row(self):
self.addCleanup(response.close)
block = re.search(r'<section class="launch".*?</section>', response.get_data(as_text=True), re.S).group(0)
self.assertNotIn("la-fold", block); self.assertNotIn("la-shard", block)
self.assertIn("· 4 runs</span>", block)
self.assertIn("· 2 runs · 2 checks</span>", block)
self.assertEqual(len(rows_of(block)), 4)


Expand Down
2 changes: 1 addition & 1 deletion app/ui_tests/test_run_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def test_a_launch_with_a_job_from_elsewhere_has_no_delete(self):
self.assertNotIn("Delete launch", html)
self.assertNotIn("Delete its launch", self.get("/job/L1-shard-1of3").get_data(as_text=True))
r = self.delete(key)
self.assertIn("L1 has jobs Nullius did not run: it cannot be deleted here.", self.get(r.headers["Location"]).get_data(as_text=True))
self.assertIn("L1 has runs that Nullius did not start: it cannot be deleted here.", self.get(r.headers["Location"]).get_data(as_text=True))
self.assertTrue((self.tmp / "runs" / "s1").is_dir())

def test_a_launch_with_a_run_still_going_has_no_delete_and_is_refused(self):
Expand Down
4 changes: 2 additions & 2 deletions app/ui_tests/test_runs_by_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_a_run_of_several_is_running_one_part_and_the_rest_are_queued(self):
with patch.dict(execution.EXECUTIONS, {"r2": ex}, clear=True):
page = self.get("/job/exp-1008-codex") # its own page, before Harbor writes it
self.assertIn('id="execution-state">queued</span>', page)
self.assertIn("· the run: running", page)
self.assertIn("· the launch: running", page)

def test_a_standard_launch_draws_its_controls_whatever_their_state(self):
# A standard job carries a runner; its declared controls are still task checks, before and after they are written.
Expand Down Expand Up @@ -246,7 +246,7 @@ def standard(job, control=""):
with patch.dict(execution.EXECUTIONS, {"r5": ex}, clear=True):
html = self.get("/runs")
block = next(b for b in blocks(html) if 'data-launch="run:r5"' in b)
self.assertIn("· 3 runs</span>", block)
self.assertIn("· 1 run · 2 checks</span>", block)
self.assertEqual(block.count("<tr class="), 3) # every run counted is drawn
self.assertEqual(re.findall(r'<tr class="la-control st-([^"]+)" data-control="(\w+)"', block),
list(zip(states, ("nop", "oracle"))))
Expand Down
8 changes: 5 additions & 3 deletions app/web/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ def index():
used = {}
for j in jobs:
entry = used.setdefault(j.dataset, {"runs": 0, "trials": 0})
entry["runs"] += 1
entry["trials"] += len(j.trials)
if verdicts[j.job_id] is None: # agents only, as the header counts them
entry["runs"] += 1
entry["trials"] += len(j.trials)
datasets = [
{"name": name, "info": shared.dataset_info(name), **counts}
for name, counts in sorted(used.items(), key=lambda kv: -kv[1]["trials"])
Expand Down Expand Up @@ -293,6 +294,7 @@ def _launch_view(g, by_id, verdicts, ended) -> dict:
"launch": g, "checks": checks, "verdict": verdict,
"controls": controls, "checked": checked, "agents": rows,
"n_tasks": n_tasks, "compare": finished,
"n_runs": len(leaves(rows)), "n_checks": len(leaves(controls)),
"paused": next((i for i in g.job_ids + g.pending
if (execution.for_job(i) is not None and execution.for_job(i).state == "paused")), None),
"summary": " · ".join(f"{n} {s}" for s, n in sorted(counts.items(), key=lambda kv: _STATE_ORDER.get(kv[0], 9))),
Expand Down Expand Up @@ -527,7 +529,7 @@ def launch_delete(key):
abort(404)
runs = _runs_of(g)
if not runs:
flash(f"{g.title} has jobs Nullius did not run: it cannot be deleted here.", "error")
flash(f"{g.title} has runs that Nullius did not start: it cannot be deleted here.", "error")
return redirect(url_for("index", view="launch"))
try:
gone = execution.delete([e.plan.name for e in runs], shared.WS_HOME, runs[0].root, copies=set(request.form.getlist("host")))
Expand Down
11 changes: 7 additions & 4 deletions docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ nullius standard fit humaneval

Importing results needs no runner.

## Recipe, launch, job, trial
## Recipe, launch, run, trial, task

| Object | Holds | Where |
| --- | --- | --- |
| Recipe | Runner, benchmark, dataset, agents, models, limits, machines | The builder; saved in the browser or exported as JSON |
| Launch | The jobs one press of **Run** starts | Runs, *By launch* |
| Job | One benchmark, one dataset, one agent or capability | Runs |
| Trial | One attempt at one task | A job's page |
| Launch | The runs one press of **Run** starts | Runs, *By launch* |
| Run | One agent, or one check (`nop`, `oracle`), on the launch's tasks. Harbor calls it a job | Runs, one row |
| Trial | One task attempted by one run | A run's page |
| Task | One item of the dataset | A trial's page |

A count of runs leaves out the checks. The checks have a count of their own.

## Evidence

Expand Down
6 changes: 3 additions & 3 deletions docs/field-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Read a result, inspect its evidence, and compare runs on the same terms.

### Did it run?

Check the execution status and run log first. A failed launch is not a benchmark score. A stopped or failed run may contain only some planned trials.
Check the launch's state and the launch log first. A failed launch is not a benchmark score. A stopped or failed run may contain only some planned trials.

### What was measured?

Expand Down Expand Up @@ -89,15 +89,15 @@ A run Harbor never wrote (ATIF trajectories, an OpenTelemetry export), converted

`nullius/runs/parse.py`

One benchmark invocation. Aggregates its trials; owns solve rates and totals.
One benchmark invocation: a run on the Runs page. Aggregates its trials; owns solve rates and totals.

*Layer 2 · task*

### Trial

`nullius/runs/parse.py`

One agent against one task. Outcome, tests, phase timings, tokens, cost.
One task attempted by one run. Outcome, tests, phase timings, tokens, cost.

*Layer 3 · transcript*

Expand Down
Loading