Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
39f75ad
feat(standard): keep the computer port's count of steps in a progress…
pierreleca Nov 23, 2026
4d7f96f
feat(standard): send each running unit's steps and model calls to the…
pierreleca Nov 23, 2026
339bdf8
feat(runs): show a running trial's steps of its limit and its model c…
pierreleca Nov 23, 2026
24a651b
feat(traces): show a trial's steps by the benchmark's own count, of i…
pierreleca Nov 23, 2026
3874102
feat(standard): score a unit cut at a limit where its benchmark says so
pierreleca Nov 23, 2026
1d83f49
feat(runs): say what ended the agent's work beside a trial's outcome
pierreleca Nov 23, 2026
af3e051
feat(catalogue): score OSWorld1's tasks cut by time, by the cap of ca…
pierreleca Nov 23, 2026
c0abb4a
feat(runs): show a benchmark's own word for what ended a trial
pierreleca Nov 23, 2026
901851b
Merge remote-tracking branch 'origin/main' into feat/step-progress-sc…
pierreleca Nov 24, 2026
eae3e39
fix(traces): leave the steps and the end a trial's head shows out of …
pierreleca Nov 24, 2026
8832109
docs(standard): say step progress and scored cuts in a row or a sente…
pierreleca Nov 24, 2026
eb47f6c
refactor(traces): read a trial's steps of its limit through the parse…
pierreleca Nov 24, 2026
98e8689
test(runs): count what ended the work among a job document's trial fi…
pierreleca Nov 24, 2026
d33867f
Merge branch 'main' into feat/step-progress-scored-cuts
aitianshi Nov 24, 2026
daee472
feat(runs): give every trial one form, and correct scored cuts' late …
aitianshi Nov 24, 2026
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: 4 additions & 2 deletions app/nullius/catalogue/benchmarks/osworld1/benchmark.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"origin": "official",
"good_to_know": [
"With any agent but OSWorld's own, a task cut short by its time (2 hours), by the run's cap of model calls or after its end is scored as the desktop stands.",
"Original runs one of OSWorld's own agents, chosen by the Agent option (M3 by default), with a model it is published with.",
"Providers: OpenAI for OpenAI CUA; OpenAI-compatible for Muse Spark (Meta's API) and for EvoCUA, AutoGLM-OS and Mano (your model server); OpenRouter for the others.",
"At this version only the null control has run through Nullius. OSWorld's agents are the same code as in main (044bc33), where M3, PromptAgent and Qwen-CUA completed tasks.",
Expand Down Expand Up @@ -36,7 +37,7 @@
"The agent's python and upload calls do not mark OSWorld's desktop as used; each unit's desktop is reset once, before the agent's first call.",
"Only 12 of OSWorld's agents are offered; the others fail at the pinned commit or need services the relay cannot reach.",
"The VMs run only on Docker's default socket, not on rootless Docker or a Docker context. Podman is untested.",
"A task run by one of OSWorld's own agents and still running after 2 hours is stopped and gets no score. For an agent, the task's setup may take 1 hour, the agent's turn 2 hours and the scoring 10 minutes; past any of them the task gets no score.",
"No score past: 2 hours with OSWorld's own agents; 1 hour of setup or 10 minutes of scoring with any other agent.",
"Its evaluator fixes, key repeat turned off in the VM and one retired task make its scores comparable only with this version's, not with the paper's or main (044bc33)'s."
],
"datasets": [
Expand All @@ -57,6 +58,7 @@
"versions": {
"044bc33": {
"good_to_know": [
"With any agent but OSWorld's own, a task cut short by its time (2 hours), by the run's cap of model calls or after its end is scored as the desktop stands.",
"Original runs one of OSWorld's own agents, chosen by the Agent option (M3 by default), with a model it is published with.",
"Providers: OpenAI for OpenAI CUA; OpenAI-compatible for Muse Spark (Meta's API) and for EvoCUA, AutoGLM-OS and Mano (your model server); OpenRouter for the others.",
"Only M3, PromptAgent and Qwen-CUA have completed tasks through Nullius. The other agents were checked up to their first model call.",
Expand All @@ -77,7 +79,7 @@
"The agent's python and upload calls do not mark OSWorld's desktop as used; each unit's desktop is reset once, before the agent's first call.",
"Only 12 of OSWorld's agents are offered; the others fail at the pinned commit or need services the relay cannot reach.",
"The VMs run only on Docker's default socket, not on rootless Docker or a Docker context. Podman is untested.",
"A task run by one of OSWorld's own agents and still running after 2 hours is stopped and gets no score. For an agent, the task's setup may take 1 hour, the agent's turn 2 hours and the scoring 10 minutes; past any of them the task gets no score."
"No score past: 2 hours with OSWorld's own agents; 1 hour of setup or 10 minutes of scoring with any other agent."
],
"datasets": {
"osworld1": {
Expand Down
21 changes: 16 additions & 5 deletions app/nullius/catalogue/benchmarks/osworld1/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
asks for the agent's first step, setup answers the prompt (the
instruction, a blank line and the desktop user's password line),
the MCP server computer (the port's pipe, joined to the runner's
socket) and the agent's time. The options max_steps and pause are
the loop's
socket), the agent's time and, as progress, the port's progress
file inside the trial. The options max_steps and pause are the
loop's
task_given - an agent's unit (driver.task_given): the agent is about to be
given its task. The runner is told on its lifeline, closes the
port's window before the task and says so; this answers then
Expand All @@ -44,7 +45,9 @@
folder, never the workspace, and only from a runner this driver
started that ended by itself with status 0, through folders opened
without following a link. It copies result.txt, the call log and the
record of prepare calls to the trial's verifier/osworld/.
record of prepare calls to the trial's verifier/osworld/, and its
detail says the steps taken, the budget and what ended the loop,
from the progress file.
For the null control, nop.py: the upstream's run_single_example
with an agent that answers DONE at its first step, its result.txt
read the same way
Expand Down Expand Up @@ -108,6 +111,7 @@
for e in AGENTS["agents"].values()}
VM =os.path.join(UP, "docker_vm_data", "Ubuntu.qcow2") # where the upstream's DockerVMManager puts it
RESULTS = "results"
PROGRESS = "progress.json" # the port's progress file, in an agent's runner folder
# VM starts on one machine, one after another: the upstream's docker provider creates each container under
# /tmp/docker_port_allocation.lck, and a start that waits there more than 10 s fails (LOCK_TIMEOUT)
START_LOCK = "/tmp/nullius-osworld1-vm-start.lck"
Expand Down Expand Up @@ -479,6 +483,7 @@ def _start_runner(unit, dir, instruction, until):
"--socket", os.path.join(sock_dir, "s"), "--ready", ready, "--lifeline", str(life_r),
"--steps", "100" if steps == "default" else steps, "--pause", str(_option("pause", "3.0", float)),
"--vm", vm, "--calls", os.path.join(where, "computer-calls.jsonl"), "--held", held,
"--progress", os.path.join(where, PROGRESS),
"--prepared", os.path.join(where, "computer-prepare.jsonl"),
"--given", os.path.join(sock_dir, "given.json")]
lock = open(START_LOCK, "a")
Expand Down Expand Up @@ -533,7 +538,7 @@ def _start_runner(unit, dir, instruction, until):
pipe = os.path.join(os.path.dirname(os.path.abspath(_port().__file__)), "computer_pipe.py")
return {"prompt": instruction + "\n\n" + PASSWORD_LINE.format(password=said.get("password") or ""),
"mcp": [{"name": "computer", "server": "computer", "args": [pipe, os.path.join(sock_dir, "s")]}],
"agent_seconds": AGENT_SECONDS}
"agent_seconds": AGENT_SECONDS, "progress": os.path.join(".work", "osworld", PROGRESS)}


def _has(log, text, start=0):
Expand Down Expand Up @@ -805,13 +810,19 @@ def _agent_score(where, dir, domain, eid):
except (OSError, RuntimeError):
pass
calls = kept["computer-calls.jsonl"]
try:
count = json.loads(_plain(trial, ".work", "osworld", PROGRESS))
count = count if isinstance(count, dict) else {}
except (OSError, RuntimeError, ValueError):
count = {}
out = os.path.join(trial, "verifier", "osworld")
os.makedirs(out, exist_ok=True)
for name, data in [("result.txt", result)] + sorted(kept.items()):
with open(os.path.join(out, name), "wb") as f:
f.write(data)
return {"reward": value, "detail": {"result": value, "by": "runner.py, run_single_example, DesktopEnv.evaluate",
"tool_calls": len(calls.splitlines())}}
"tool_calls": len(calls.splitlines()), "steps": count.get("steps"),
"steps_limit": count.get("steps_limit"), "ended": count.get("ended")}}


def _scored(where, how):
Expand Down
8 changes: 5 additions & 3 deletions app/nullius/catalogue/benchmarks/osworld1/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
they are, with the computer port's bridge as the loop's agent (nullius.standard.protocols.computer_port, agent.computer/v1).

runner.py --example TASK_JSON --result-dir DIR --socket PATH --ready FILE --lifeline FD --steps N --pause SECONDS
--vm VM_IMAGE --calls FILE [--held FOLDER] [--prepared FILE] [--given FILE]
--vm VM_IMAGE --calls FILE [--held FOLDER] [--progress PROGRESS] [--prepared FILE] [--given FILE]

The driver starts it in the unit's runner folder with the upstream and Nullius on its import path. It builds the upstream's DesktopEnv as the null control
does (nop.py), serves the MCP server computer at PATH (a Unix socket in a folder of the user's alone, which the driver
Expand All @@ -18,6 +18,7 @@
the runner then writes --given's file, {"ok": true}; its close stops the runner as SIGTERM does.
- FILE, the call log: one line per tool call, {tool, start, end, isError}; --prepared's, one line per prepare call.
- FOLDER, the run's folder of files sent once, when the driver gives one (computer_port.Held).
- PROGRESS, the progress file the bridge keeps, when the driver gives one: {steps, steps_limit, ended, open}.

A stop is taken once. The clean-up (the bridge's end and the server's close, then the desktop's close within
CLOSE_SECONDS) takes at most STOP_SECONDS; past it the runner exits 1 all the same. At every exit READY and the socket's folder are removed. The
Expand Down Expand Up @@ -129,7 +130,7 @@ def main(argv=None):
p = argparse.ArgumentParser()
for name in ("--example", "--result-dir", "--socket", "--ready", "--vm", "--calls"):
p.add_argument(name, required=True)
for name in ("--held", "--prepared", "--given"):
for name in ("--held", "--progress", "--prepared", "--given"):
p.add_argument(name)
p.add_argument("--lifeline", type=int, required=True)
p.add_argument("--steps", type=int, required=True)
Expand Down Expand Up @@ -175,7 +176,8 @@ def first(): # the loop asks for the agent's
os.makedirs(where, exist_ok=True)
desktop = Desktop(env, os.path.dirname(os.path.abspath(a.calls)))
bridge = port.Bridge(desktop, a.steps, a.pause, SCREEN, FOLDER, on_first=first,
held=port.Held(a.held) if a.held else None, window=bool(a.given), prepared=a.prepared)
held=port.Held(a.held) if a.held else None, progress=a.progress, window=bool(a.given),
prepared=a.prepared)
server = port.Server(bridge, a.socket, a.calls)
turn.bridge = bridge
lib_run_single.run_single_example(bridge, Watched(env, desktop), example, a.steps, example["instruction"],
Expand Down
7 changes: 6 additions & 1 deletion app/nullius/catalogue/benchmarks/osworld1/standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@
}
},
"limits": {
"setup_seconds": 3600
"setup_seconds": 3600,
"scored_cuts": [
"time",
"calls",
"end"
]
},
"datasets": [
{
Expand Down
7 changes: 5 additions & 2 deletions app/nullius/compare/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,17 @@ def key(selection, trial):
for trial in trials:
by_task.setdefault(key(selection, trial), [[] for _ in selected])[column].append(trial)

scored_only = [selection.job.scored_only for selection in selected]

def task_row(task_key, columns):
return TaskRow(*task_key, tuple(ts[-1] if ts else None for ts in columns), tuple(len(ts) for ts in columns),
tuple(task_attempts.Attempts(tuple(task_attempts.ordered(ts))) if ts else None for ts in columns))
tuple(task_attempts.Attempts(tuple(task_attempts.ordered(ts)), scored_only[i]) if ts else None
for i, ts in enumerate(columns)))

rows = [task_row(task_key, columns) for task_key, columns in by_task.items()]
rows.sort(key=lambda row: (-round(row.movement, 3), not row.rate_moved, not row.differs, row.dataset, row.task))
# pass@k from the rows' own tasks, so the summary and the table count alike
pass_k = tuple(task_attempts.for_tasks(row.tried[column].trials for row in rows if row.tried[column])
pass_k = tuple(None if scored_only[column] else task_attempts.for_tasks(row.tried[column].trials for row in rows if row.tried[column])
for column in range(len(selected)))
return Comparison(selected, cohort, tuple(jobs), tuple(rows), len(common - set_aside),
tuple(excluded), tuple(repeated), datasets_match, known, pass_k, tuple(aside))
Expand Down
23 changes: 15 additions & 8 deletions app/nullius/runs/attempts.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def ordered(trials) -> list:
# the benchmark gives a score and no pass or fail.
NO_VERDICT = frozenset({classify.UNKNOWN, classify.SCORED})

# Outcomes the benchmark's own check gave.
VERIFIED = frozenset({classify.RESOLVED, classify.FAILED_VERIFICATION, classify.PATCH_FAILED_TESTS, classify.PATCH_NOT_APPLIED,
classify.NO_PATCH})

# The numbers a task's row shows as a mean over its attempts.
MEANS = ("tokens", "dur_total", "dur_env", "dur_agent", "dur_verifier")

Expand All @@ -74,14 +78,17 @@ def ran(trials) -> tuple:

def has_verdict(trials) -> bool:
"""Whether an attempt that ran was passed or failed, so a pass count over
them means something."""
return any(t.outcome not in NO_VERDICT for t in ran(trials))
them means something. Never beside a score with no pass or fail: an attempt
that crashed there was not failed by the benchmark."""
graded = any(t.outcome == classify.SCORED and t.score is not None for t in ran(trials))
return any(t.outcome not in NO_VERDICT and not (graded and t.outcome not in VERIFIED) for t in ran(trials))


@dataclass(frozen=True)
class Attempts:
"""Every attempt at one task in one job, numbered from 1."""
"""Every attempt at one task in one job, numbered from 1; ``scored_only``, the job's."""
trials: tuple
scored_only: bool = False

@property
def n(self) -> int:
Expand All @@ -107,7 +114,7 @@ def n_passed(self) -> int:
def has_verdicts(self) -> bool:
"""False when no attempt that ran was passed or failed (all unknown,
scored or infra)."""
return has_verdict(self.trials)
return not self.scored_only and has_verdict(self.trials)

@property
def scores(self) -> list:
Expand Down Expand Up @@ -171,13 +178,13 @@ def _by_task_name(job) -> dict[str, list]:

def by_task(job) -> dict[str, Attempts]:
"""Every task of the job that was attempted more than once, by task name."""
return {task: Attempts(tuple(ordered(ts))) for task, ts in _by_task_name(job).items() if len(ts) > 1}
return {task: Attempts(tuple(ordered(ts)), job.scored_only) for task, ts in _by_task_name(job).items() if len(ts) > 1}


def of(job, trial) -> Attempts | None:
"""The attempts at this trial's task, or None when it was attempted once."""
same = [t for t in job.trials if t.task_name == trial.task_name]
return Attempts(tuple(ordered(same))) if len(same) > 1 else None
return Attempts(tuple(ordered(same)), job.scored_only) if len(same) > 1 else None


def grouped(job) -> list[tuple]:
Expand Down Expand Up @@ -237,5 +244,5 @@ def for_tasks(tasks: Iterable[Sequence]) -> dict | None:


def for_job(job) -> dict | None:
"""``for_tasks`` over a parsed job, its tasks by task name."""
return for_tasks(_by_task_name(job).values())
"""``for_tasks`` over a parsed job, its tasks by task name; None for a job with scores and no pass or fail."""
return None if job.scored_only else for_tasks(_by_task_name(job).values())
6 changes: 6 additions & 0 deletions app/nullius/runs/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def job_detail(job: parse.Job) -> dict:
data["mean_score_planned"] = job.mean_score_planned
for trial, raw in zip(job.trials, data["trials"]):
raw["outcome_label"] = trial.outcome_label
raw["ended_label"] = trial.ended_label
raw["is_infra"] = trial.is_infra
raw["is_regression"] = trial.is_regression
raw["has_trace"] = trial.has_trace
Expand All @@ -120,6 +121,7 @@ def _trial_record(trial: parse.Trial) -> dict:
derived ones the pages render, timestamps as ISO strings."""
raw = asdict(trial)
raw["outcome_label"] = trial.outcome_label
raw["ended_label"] = trial.ended_label
raw["is_infra"] = trial.is_infra
raw["is_regression"] = trial.is_regression
raw["has_trace"] = trial.has_trace
Expand Down Expand Up @@ -195,6 +197,8 @@ def _print_trial(job: parse.Job, trial: parse.Trial) -> None:
print(f" evidence: trajectory {'recorded' if t.has_trajectory else 'absent'} · "
f"trace {'recorded' if t.has_trace else 'absent'} · "
f"reward {'recorded' if t.reward is not None else 'absent'}")
if t.ended_by:
print(f" ended by: {t.ended_label} ({t.ended_by})")
if t.exception_type:
print(f" exception: {t.exception_type}: {_first_line(t.exception_message)}")
for name in t.p2p_failures:
Expand Down Expand Up @@ -325,6 +329,8 @@ def _show(args) -> int:
width = max((len(t.trial_name) for t in job.trials), default=0)
for t in job.trials:
line = f" {t.trial_name:<{width}} {t.outcome}"
if t.ended_by:
line += f" ended by {t.ended_by}"
if t.exception_type:
line += f" {t.exception_type}"
print(line)
Expand Down
18 changes: 16 additions & 2 deletions app/nullius/runs/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
preparation window instead of nothing (its ``stage`` names what is being
prepared; ``job.start`` keeps meaning "trials are about to be scheduled").
Payloads are read leniently — a missing counter is *absent*, never zero.
``trial.progress`` carries the counters of :data:`COUNTERS` and an
``activity`` line; the standard's runner also sends a running unit's
:data:`PROGRESS`: its step limit beside its ``step``, its agent's model calls
answered and the run's cap on them. A trial's snapshot holds these three only
once its feed reported one, so a feed without them folds as it always did.

Four rules are load-bearing, and each has a test:

Expand Down Expand Up @@ -74,6 +79,7 @@
"cancelled", "timeout", "budget")
ERROR_OUTCOMES = {"agent_error", "infra_error", "timeout", "budget"}
COUNTERS = ("step", "n_input_tokens", "n_cache_tokens", "n_output_tokens", "cost_usd")
PROGRESS = ("step_limit", "calls", "calls_limit")
TOKEN_FIELDS = ("n_input_tokens", "n_cache_tokens", "n_output_tokens")

RATE_WINDOW_SEC = 30.0
Expand Down Expand Up @@ -201,6 +207,9 @@ class TrialState:
timeout_sec: float | None = None
phases_done: list[str] = field(default_factory=list)
step: int | None = None
step_limit: int | None = None
calls: int | None = None
calls_limit: int | None = None
n_input_tokens: int | None = None
n_cache_tokens: int | None = None
n_output_tokens: int | None = None
Expand Down Expand Up @@ -247,7 +256,9 @@ def snapshot(self, now: datetime) -> dict:
"phase": self.phase, "since": _iso(self.since) if self.since else None,
"elapsed_sec": elapsed, "timeout_sec": self.timeout_sec,
"phases_done": list(self.phases_done),
"step": self.step, "n_input_tokens": self.n_input_tokens,
"step": self.step,
**({k: getattr(self, k) for k in PROGRESS} if any(getattr(self, k) is not None for k in PROGRESS) else {}),
"n_input_tokens": self.n_input_tokens,
"n_cache_tokens": self.n_cache_tokens, "n_output_tokens": self.n_output_tokens,
"cost_usd": self.cost_usd, "activity": self.activity, "last_line": self.last_line,
"outcome": self.outcome, "reward": self.reward, "durations": dict(self.durations),
Expand Down Expand Up @@ -605,7 +616,7 @@ def trial_of(e: Event) -> TrialState:
# but it was paid for, and the board's cost goes on counting it
if t.cost_usd is not None:
t.cost_before = (t.cost_before or 0.0) + t.cost_usd
for key in COUNTERS:
for key in (*COUNTERS, *PROGRESS):
setattr(t, key, None)
t._series = []
if t.phase and t.phase not in t.phases_done and t.phase != d["phase"]:
Expand All @@ -619,6 +630,9 @@ def trial_of(e: Event) -> TrialState:
for key in COUNTERS:
if key in d and d[key] is not None:
setattr(t, key, _num(d[key], int if key != "cost_usd" else float))
for key in PROGRESS:
if d.get(key) is not None:
setattr(t, key, _num(d[key], int))
if d.get("activity") is not None:
t.activity = d["activity"]
reported = {k: _num(d[k], int) for k in TOKEN_FIELDS if d.get(k) is not None}
Expand Down
Loading
Loading