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
6 changes: 3 additions & 3 deletions app/nullius/runs/feasibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
}
DESCRIPTIONS = {
FEASIBLE: "The verifier rejected the empty solution and accepted the reference one. Both controls ran; the task is feasible.",
UNEXPECTED_REWARD: "The verifier accepted the empty solution. It rejects nothing, so a pass on this task means nothing — whatever the oracle did.",
TASK_BROKEN: "The empty solution failed tests that were passing before it. nop changes nothing, so the task was already broken as shipped, or its verifier is unstable — the failures are named. Not feasible, whatever the oracle did.",
UNEXPECTED_REWARD: "The verifier accepted the empty solution. It rejects nothing, so a pass on this task means nothing, whatever the oracle did.",
TASK_BROKEN: "The empty solution failed previously passing tests. Because nop changes nothing, the task is broken or its verifier is unstable. The failures are named. Not feasible, whatever the oracle did.",
REFERENCE_REJECTED: "Both controls reached the verifier, and it rejected the reference solution. The task cannot be passed as shipped.",
SETUP_FAILURE: "A control failed before the verifier ran — environment build, image, API or agent error — so the task was not exercised on that side.",
SETUP_FAILURE: "A control failed before verification because of an environment build, image, API or agent error. The task was not exercised on that side.",
MISSING: "A control has no recorded outcome for this task: it did not run, ran elsewhere, or recorded nothing. Not validated.",
}

Expand Down
4 changes: 2 additions & 2 deletions app/nullius/traces/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def note(self) -> str:
parts.append(
f"{self.excluded} of {self.total} spans "
f"{'has' if one else 'have'} no known duration and "
f"{'is' if one else 'are'} left out — a span with one known instant "
f"{'is' if one else 'are'} left out; a span with one known instant "
"is not a zero-length one."
)
if self.wrapped:
Expand Down Expand Up @@ -752,7 +752,7 @@ def _edges_for(samples: tuple, fallback: tuple) -> tuple:
def _kind_note(off: frozenset, visible: tuple) -> str:
"""What the legend has done to this chart, said underneath it; "" when nothing."""
if not visible:
return "Every kind is switched off — click a chip above to draw one again."
return "Every kind is switched off; click a chip above to draw one again."
if not off:
return ""
names = ", ".join(sorted(off))
Expand Down
4 changes: 2 additions & 2 deletions app/static/builder/command-builder-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
return 'harbor from ' + repoLabel(pin.url) + ' · ' + (pin.revisionKind === 'commit' ? 'commit ' + at : pin.revisionKind + ' ' + pin.revision + ' at ' + at) + ex;
}
function harborExecutable(r) {
if (r.harborDev) return {kind: 'development', executable: r.harborDev, command: path(r.harborDev), label: 'development · ' + r.harborDev + ' — not a release'};
if (r.harborDev) return {kind: 'development', executable: r.harborDev, command: path(r.harborDev), label: 'development · ' + r.harborDev + ' · not a release'};
const pin = harborPin(r);
if (pin) return {kind: pin.kind, executable: 'harbor', command: 'uvx --from ' + q(harborSpec(pin)) + ' harbor', label: harborLabel(pin), pin};
return {kind: 'path', executable: 'harbor', command: 'harbor', label: 'harbor from PATH'};
Expand Down Expand Up @@ -760,7 +760,7 @@
const rank = id => id === 'nop' ? 0 : id === 'oracle' ? 1 : agentById(id, r)?.control ? 2 : 3;
const order = [...r.agents].sort((a, b) => rank(a) - rank(b));
const runs = order.map(id => compiled.artifacts.find(a => a.id === 'run-' + id)).filter(Boolean);
const script = ['#!/usr/bin/env bash', '# ' + r.name + ' — generated by Nullius; NULLIUS_HARBOR, NULLIUS_TASKS, NULLIUS_JOBS and the credentials arrive as environment.',
const script = ['#!/usr/bin/env bash', '# ' + r.name + ': generated by Nullius; NULLIUS_HARBOR, NULLIUS_TASKS, NULLIUS_JOBS and the credentials arrive as environment.',
'set -uo pipefail', 'status=0', ...runs.map(a => '# ' + a.label + '\n' + a.text + ' || status=1'), 'exit "$status"'].join('\n\n') + '\n';
const parts = runs.map(a => ({id: a.id.slice(4), label: a.label, script: '#!/usr/bin/env bash\nset -uo pipefail\n' + a.text + '\n'}));
const jobs = order.map(id => ({name: r.name + (r.agents.length > 1 ? '-' + id : ''), agent: agentById(id, r)?.arg || id, dataset: r.source === 'local' ? r.path.replace(/\/$/, '').split('/').pop() : r.dataset}));
Expand Down
4 changes: 2 additions & 2 deletions app/static/catalogue/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
// Fill the prompt as it is typed: trim values and omit an empty Remark line.

const field = id => document.getElementById(id);
const out = field('std-add-prompt'), copy = field('std-add-copy'), hint = field('std-add-hint');
const out = field('std-add-prompt'), copy = field('std-add-copy');
const build = () => {
const tpl = d.querySelector(`template[data-add-kind="${field('std-add-kind').value}"]`).content.textContent;
const v = { name: field('std-add-name').value.trim(), source: field('std-add-source').value.trim(), remark: field('std-add-remark').value.trim() };
const lines = tpl.split('\n').filter(l => v.remark || l !== 'Remark: {remark}');
out.textContent = lines.join('\n').replace(/\{(name|source|remark)\}/g, (_, k) => v[k]);
const ready = !!(v.name && v.source);
copy.disabled = !ready; hint.hidden = ready;
copy.disabled = !ready;
};
['std-add-name', 'std-add-source', 'std-add-remark'].forEach(id => field(id).addEventListener('input', build));
field('std-add-kind').addEventListener('change', build);
Expand Down
1 change: 0 additions & 1 deletion app/static/catalogue/catalogue.css
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ dialog.std-how::backdrop { background: rgba(0, 0, 0, .45); }
.std-add-fields :is(input, textarea):focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.std-prompt pre { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }
.std-copy:disabled { opacity: .5; cursor: not-allowed; }
.std-add-hint { font-size: 12.5px; }
@media (max-width: 640px) { dialog.std-how { padding: 18px 16px; } .std-add-fields { grid-template-columns: 1fr; } .std-add-fields :is(input, textarea) { font-size: 16px; } }
/* What runs a benchmark, as bubbles - on its card, its page and the Add dialog - named as the filter chips name them. */
.run-tag { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 500; letter-spacing: .03em; padding: .12rem .55rem; border-radius: 5px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
Expand Down
1 change: 0 additions & 1 deletion app/static/onboarding.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ body.onb-open .shell { margin-right: 310px; }
.onb-subs li.done .onb-tick { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.onb-subs li.next button { font-weight: 500; }
.onb-opt { font-size: .7rem; color: var(--text-faint); font-weight: 400; }
.onb-hint { font-size: .76rem; color: var(--text-faint); border-top: 1px solid var(--border-soft); padding-top: .6rem; }
.onb-restart { border: 0; background: none; color: var(--text-faint); font-size: .76rem; cursor: pointer; text-decoration: underline; padding: 0; align-self: flex-start; }

.onb-todo { outline: 2px solid var(--accent) !important; outline-offset: 3px; border-radius: 6px; animation: onb-pulse 1.6s ease-in-out infinite; }
Expand Down
3 changes: 1 addition & 2 deletions app/static/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
${open ? `<ul class="onb-subs">${subs.map(x => `<li class="${isDone(x) ? 'done' : ''}${x === next ? ' next' : ''}"><button type="button" data-onb-sub="${s.id}:${x.id}"><span class="onb-tick" aria-hidden="true">${isDone(x) ? '✓' : ''}</span><span>${esc(x.text)}${x.optional ? ' <span class="onb-opt">optional</span>' : ''}</span></button></li>`).join('')}</ul>` : ''}
</div>`;
}).join('')}
<div class="onb-hint">Click a step: Nullius opens its page and points at what to do.</div>
<button class="onb-restart" type="button" data-onb="tour">Replay the tour</button>`;
}

Expand Down Expand Up @@ -135,7 +134,7 @@
const spot = document.createElement('div'); spot.className = 'onb-spot';
Object.assign(spot.style, {top: y0 + 'px', left: x0 + 'px', width: x1 - x0 + 'px', height: r.top + Math.min(r.height, innerHeight - r.top - 16) + pad - y0 + 'px'});
const pop = document.createElement('div'); pop.className = 'onb-pop'; pop.setAttribute('role', 'dialog'); pop.setAttribute('aria-label', s.k);
pop.innerHTML = `<span class="onb-k">${i + 1} of ${TOUR.length} · ${esc(s.k)}</span><h3>${esc(s.h)}</h3><p>${esc(s.p)}</p>
pop.innerHTML = `<span class="onb-k">${i + 1} of ${TOUR.length} · ${esc(s.k)}</span><h3>${esc(s.h)}</h3>${s.p ? `<p>${esc(s.p)}</p>` : ''}
<div class="onb-actions"><span class="onb-dots">${TOUR.map((_, j) => `<i class="${j === i ? 'on' : ''}"></i>`).join('')}</span>
<span class="onb-actions"><button class="btn ghost sm" type="button" data-t="skip">Skip tour</button><button class="btn sm" type="button" data-t="next">${i === TOUR.length - 1 ? 'Start the checklist' : 'Next'}</button></span></div>`;
document.body.append(spot, pop);
Expand Down
6 changes: 3 additions & 3 deletions app/static/runs/live-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@
stateLabel: state === 'finished' && s.ended_by ? s.ended_by[0].toUpperCase() + s.ended_by.slice(1) : STATE_LABEL[state] || state,
finished: state === 'finished',
// The footer says only what the board above does not: the stage a job is preparing, or that nothing has started.
status: state === 'preparing' ? `preparing${s.preparing && s.preparing.stage ? ' — ' + s.preparing.stage : ''}${s.preparing ? ' · ' + clock(s.preparing.elapsed_sec) + ' in this stage' : ''}`
: state === 'starting' ? `starting — ${C.total == null ? 'trials' : C.total + ' trial' + (C.total === 1 ? '' : 's')} queued, none has entered a phase yet`
status: state === 'preparing' ? `preparing${s.preparing && s.preparing.stage ? ': ' + s.preparing.stage : ''}${s.preparing ? ' · ' + clock(s.preparing.elapsed_sec) + ' in this stage' : ''}`
: state === 'starting' ? `starting: ${C.total == null ? 'trials' : C.total + ' trial' + (C.total === 1 ? '' : 's')} queued, none has entered a phase yet`
: '',
head: renderHead(s, state),
meta: renderMeta(s),
Expand Down Expand Up @@ -367,7 +367,7 @@
$('[data-lb-flight]').innerHTML = out.flight;
const drawer = $('[data-lb-drawer]'); drawer.innerHTML = out.drawer; drawer.hidden = !out.drawer;
board.classList.toggle('open', !!out.drawer);
const said = misses ? `feed unavailable (${misses}) — showing the last snapshot` : out.status;
const said = misses ? `feed unavailable (${misses}); showing the last snapshot` : out.status;
$('[data-lb-status]').textContent = said; $('[data-lb-foot]').hidden = !said;
// Trials that ended since the page loaded are not in its Results yet: the badge counts them, and the tab reads them again
const badge = doc.getElementById('results-badge'), shown = Number(badge?.dataset.trials || 0), done = (snap.counts || {}).completed || 0;
Expand Down
2 changes: 1 addition & 1 deletion app/templates/agents/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from '_page.html' import page_head %}
{% from "catalogue/use_bundle.html" import use_bundle %}
{% set plural = 'Agents' if kind == 'agent' else 'Modules' %}
{% block title %}{{ title }} — Nullius{% endblock %}
{% block title %}{{ title }} · Nullius{% endblock %}
{% block crumb %}/ <a href="{{ url_for('agents_page' if kind == 'agent' else 'features_page') }}">{{ 'agents' if kind == 'agent' else 'Modules' }}</a> / {{ e.d.key }}{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">{% endblock %}
{% block body %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/agents/kits.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{% block title %}{{ entry.label ~ ' kit' if entry else 'Kits' }} — Nullius{% endblock %}
{% block title %}{{ entry.label ~ ' kit' if entry else 'Kits' }} · Nullius{% endblock %}
{% block crumb %}/ <a href="{{ url_for('kits_page') }}">kits</a>{% if entry %} / {{ entry.label }}{% endif %}{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">
{% if not entry %}<script src="{{ url_for('static', filename='tables.js') }}"></script>{% endif %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/agents/standard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from '_page.html' import page_head %}
{% set plural = 'Agents' if kind == 'agent' else 'Modules' %}
{% set one, many = ('agent', 'agents') if kind == 'agent' else ('Module', 'Modules') %}
{% block title %}{{ plural }} — Nullius{% endblock %}
{% block title %}{{ plural }} · Nullius{% endblock %}
{% block crumb %}/ {{ 'agents' if kind == 'agent' else 'Modules' }}{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">
<script src="{{ url_for('static', filename='tables.js') }}"></script>{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
{'url': url_for('settings_page'), 'sel': '.nav-item[href="' ~ url_for('settings_page') ~ '"]', 'k': 'Settings', 'h': 'Keys, hosts and judges',
'p': 'Model providers, the machines that run benchmarks, and the two judges. Keys stay in a file on this machine.'},
{'url': url_for('settings_page'), 'sel': '#onb-panel', 'k': 'First steps', 'h': 'What is left to do',
'p': 'Click a step: Nullius opens its page and points at what to do next. Hide it any time; it stays in the rail.'},
'p': ''},
] %}
{% if not embedded %}
<script src="{{ url_for('static', filename='onboarding.js') }}" data-state="{{ url_for('onboarding_state') }}" data-tour="{{ onb_tour|tojson|forceescape }}"></script>
Expand Down
3 changes: 1 addition & 2 deletions app/templates/builder/new_run.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{% from 'catalogue/_tasks_list.html' import tasks_list, tasks_state %}
{% block title %}Run builder — Nullius{% endblock %}
{% block title %}Run builder · Nullius{% endblock %}
{% block crumb %}/ run builder{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">{# the Agent step's cards #}
<link rel="stylesheet" href="{{ url_for('static', filename='runs/launches.css') }}">{# the Delete question's dialog #}
Expand Down Expand Up @@ -33,7 +33,6 @@
<form id="nb-save-form">
<div class="nb-kicker">Your experiment</div>
<h2 id="nb-save-title">Give this recipe a name.</h2>
<p class="nb-note">A name you will recognise in your saved recipes.</p>
<label class="nb-field" for="nb-recipe-title">Recipe name
<input id="nb-recipe-title" type="text" required maxlength="80" autocomplete="off" placeholder="driver vs reference">
</label>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/builder/recipes.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% from '_tables.html' import table, cell, greyed %}
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{% block title %}Recipes — Nullius{% endblock %}
{% block title %}Recipes · Nullius{% endblock %}
{% block crumb %}/ recipes{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='runs/launches.css') }}">{# its dialog #}
Expand Down
1 change: 0 additions & 1 deletion app/templates/catalogue/add_dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<pre><code id="std-add-prompt" aria-live="polite"></code></pre>
</div>
{% for key, prompt in prompts.items() %}<template data-add-kind="{{ key }}">{{ prompt }}</template>{% endfor %}
<p class="std-add-hint" id="std-add-hint">Fill in the name and the source to copy it.</p>
</section>

<section id="std-pane-hand" role="tabpanel" aria-labelledby="std-tab-hand" class="std-pane" hidden>
Expand Down
9 changes: 4 additions & 5 deletions app/templates/catalogue/benchmark.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{% from "catalogue/use_bundle.html" import use_bundle %}
{% block title %}{{ b.title }} — Nullius{% endblock %}
{% block title %}{{ b.title }} · Nullius{% endblock %}
{% block crumb %}/ <a href="{{ url_for('benchmarks_page') }}">benchmarks</a> / {{ b.key }}{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">{% endblock %}
{% block body %}
Expand All @@ -28,7 +28,7 @@
{% endset %}
{{ page_head(b.title, sub=tags, actions=actions, mark=mark) }}
{% if b.domain %}<p class="bench-domain">{{ b.domain }}</p>{% endif %}
{% if b.blocker %}<p class="bench-blocked" role="note">No usable route — {{ b.blocker }}</p>{% endif %}
{% if b.blocker %}<p class="bench-blocked" role="note">No usable route: {{ b.blocker }}</p>{% endif %}

<div class="bench-body">
<div class="bench-main">
Expand Down Expand Up @@ -73,7 +73,6 @@ <h2 id="overview-title">Overview</h2>
{#- One version's proofs: its pin, each dataset's checks, and the form that runs them on it. -#}
{% macro proofs(s) -%}
{% if s.upstream.repository %}<p class="mono bench-runner-repo" title="The upstream it runs: the release tag or the branch, and the commit it was checked at">{{ s.upstream.repository|replace('https://github.com/', '') }} @ {% if s.upstream.tag %}{{ s.upstream.tag }} · {% elif s.upstream.branch %}{{ s.upstream.branch }} · {% endif %}{{ s.upstream.tested[:7] }}</p>{% endif %}
<p class="bench-ds-note">Null and reference controls check each task's environment and scorer; stability and leak checks, the tasks themselves.</p>

<table class="std-prooftable">
<tbody>
Expand Down Expand Up @@ -118,7 +117,7 @@ <h2 id="overview-title">Overview</h2>
{% endif %}
{%- endmacro %}
<section class="bench-section std-proofs" id="standard" aria-labelledby="standard-title">
<h2 id="standard-title">Proofs</h2>
<h2 id="standard-title" title="Null and reference controls check each task’s environment and scorer; stability and leak checks check the tasks.">Proofs</h2>
{% for x in views %}
<div{{ vattr(x) }}>
{{ proofs(x.std) }}
Expand Down Expand Up @@ -152,7 +151,7 @@ <h3 class="std-optname">{{ o.label }}{% if o.datasets %} <small>{{ y.std.dataset
{% for h, r in y.std.host.items() %}
<div class="std-hostreq" id="setup-{{ h }}{{ sfx }}">
<h3 class="std-optname">Setup: {{ r.label }}</h3>
<p class="bench-ds-note">{{ r.summary }} Checked by {{ r.check|join(', ') }} on PATH, on each machine a run uses; the builder's Where step checks it{% if r.install %} and can install it{% endif %}.</p>
<p class="bench-ds-note">{{ r.summary }} Required on each run machine: {{ r.check|join(', ') }}.</p>
{% if r.install %}<div class="std-code"><div class="std-code-head"><span>install, on each machine</span><button type="button" class="std-copy">Copy</button></div><pre><code>{{ r.install|join('\n') }}</code></pre></div>{% endif %}
</div>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/catalogue/benchmarks.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{% block title %}Benchmarks — Nullius{% endblock %}
{% block title %}Benchmarks · Nullius{% endblock %}
{% block crumb %}/ benchmarks{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">
<script src="{{ url_for('static', filename='tables.js') }}"></script>{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/catalogue/new.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% from '_page.html' import page_head %}
{#- one form, two uses: `editing` is the key of the entry being changed, or none to add one #}
{% block title %}{{ 'Edit ' ~ values.get('title', editing) if editing else 'Add a Harbor benchmark' }} — Nullius{% endblock %}
{% block title %}{{ 'Edit ' ~ values.get('title', editing) if editing else 'Add a Harbor benchmark' }} · Nullius{% endblock %}
{% block crumb %}/ <a href="{{ url_for('benchmarks_page') }}">benchmarks</a> / {% if editing %}<a href="{{ url_for('benchmark_page', key=editing) }}">{{ editing }}</a> / edit{% else %}add{% endif %}{% endblock %}
{% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">{% endblock %}
{% block body %}
Expand Down
Loading