Skip to content

feat(traces): show a benchmark's own detail and records on a trial's page - #338

Merged
aitianshi merged 10 commits into
ThinkFlowLab:mainfrom
pierreleca:feat/trial-detail-and-records
Nov 24, 2026
Merged

aitianshi merged 10 commits into
ThinkFlowLab:mainfrom
pierreleca:feat/trial-detail-and-records

Conversation

@pierreleca

@pierreleca pierreleca commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #337

What

A driver's score has a detail beside its reward, and a verifier may leave records of its own in the trial. Both stayed in the trial's folder.

A trial that fell short (not resolved, or scored below 1) has a Failure analysis tab, after User judge. evidence in benchmark.json names the rows of the detail it shows, with labels; the 11 bundled benchmarks name theirs. A benchmark that names none shows its whole detail, without execution metadata or numbers already in the header. The lists of failing and broken tests move there from Overview. A resolved trial, a full score, or a benchmark with nothing to show has no tab. User judge is unchanged.

Values are escaped and redacted, including credentials at nested depths. The score read is bounded and follows no links; long text is in a scrolling block.

A benchmark may declare its own records in benchmark.json: records, each a label and a path under verifier/, a file or a folder listed one level deep. The catalogue refuses any other path. The Artifacts tab lists those that exist after Nullius's, served through the same routes. A record is opened one folder at a time, no link followed; only a regular text file is listed; a folder lists at most 200 and says when it holds more; a name that is not printable is left out. A download's file name is now quoted, without control characters, with an ASCII fallback.

Touches

backend · routes · templates and static · catalogue · docs and site

Before and after

For a trial whose driver writes a detail and declares a folder of records: on its Failure analysis tab, the evidence; on its Artifacts tab, the benchmark's records after Nullius's.

Before (main) After (this branch)
Failed trial, Terminal-Bench (stand-in values)
terminal-bench-before

terminal-bench-after
Failed trial, SWE-bench Verified (recorded run)
swe-bench-before

swe-bench-after
Trial artifacts
02-trial-artifacts-before

02-trial-artifacts-after

Verified

  • Routes, on the merge with main: 688 tests pass. Backend, before that merge: 2,868 tests; every module passes but test_standard_check_safety, which hung in the local parallel run and was stopped; alone it passes (30 tests), as on the previous commit.
  • Tests cover: the tab only on a trial that fell short; named rows, nested paths, values left out, the last reply standing in, the whole detail as fallback; failing tests shown once; redaction and escaping at every depth; the catalogue's checks; declared records listed, read and bounded, with a link, a pipe, a binary file or an unprintable name refused; the download's header.
  • In a headless browser, 18 trials (four recorded runs of GSM8K, GAIA and SWE-bench Verified, stand-ins for the rest) at 1100 px dark and light and 390 px dark: no page error, no sideways scroll, no tab on a success, a full score or OSWorld1.
  • field_contract.py --write adds evidence; catalogue_docs.py --write changes nothing; git diff --check is clean.

Risk

A wrong rule could show a value that should stay hidden, or serve a file it should not; each is read redacted, from under the trial alone. A benchmark that declares no records and writes no detail sees only its failing tests move to the new tab. Revert the commits to undo.

@pierreleca
pierreleca force-pushed the feat/trial-detail-and-records branch from ddda25d to 2d36826 Compare November 24, 2026 11:11
aitianshi added a commit that referenced this pull request Nov 24, 2026
Closes #379

## What

Before a live feed exists, a run now opens on Logs. Launch stages and
log output live there; the first usable feed switches to Live within the
same document, without reloading. Explicit tab choices are respected.
Restarted stages drop stale timing/detail, terminal executions settle
stage state, and unknown unit totals use an indeterminate bar.

The full-run overview shows identity cards with Runner first, then
Benchmark/Dataset, Agent/Model, and Trials/Duration. Task and All
attempts pages keep their own status and metrics without repeating run
identity.

Task overview cards put timing and Tool calls on the left and Model
usage on the right, stacking on narrow screens. Model usage combines a
compact token bar with Prompt growth when multiple calls were recorded.
Its labels and segments are input, cache, output; input means uncached
input, as its tooltip explains. Cache hit is plain text. Saved trial
totals provide a fallback when trajectory accounting is absent, and
missing usage is stated explicitly.

## Touches

backend · routes · templates and static · tests · field guide

No equivalent open or closed issue/PR was found in the repository or
private fork. Related open work: #336 (run facts), #338 (trial details),
#340 (task step progress). These have shared-file overlap, but implement
separate behavior. After merging main, pairwise merge checks are clean
for #332, #336, #338, #340, #342 and #344. Unmerged #352 and #354 still
require coordination in app/templates/runs/job.html and app/web/runs.py;
their features are not included here.

## Before and after

Task overview: the earlier real-run capture and the approved final
layout from that same saved run. Run identity is now kept on the
full-run overview.

| Before | After |
| --- | --- |
| <img width="430" alt="Earlier task overview with separate growth and
tool sections"
src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/task-after.png">
| <img width="430" alt="Timing and Tool calls on the left, combined
Model usage on the right"
src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/model-usage-after.png">
|

Full-run identity cards and Live/Results/Logs:

<img width="860" alt="Full-run overview with Runner first and benchmark,
dataset, agent, model, count and duration cards"
src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/run-overview-after.png">

## Verified

- Backend suite: 2,856 tests in 173 modules passed after merging current
main outside the socket-restricted sandbox.
- Route suite: 660 tests in 68 modules passed after merging current
main.
- Focused progress and execution tests: 83 passed.
- Browser checks: desktop light/dark and narrow layout; automatic Logs →
Live retains the document and `performance.timeOrigin`; tab selection
and task metrics checked.
- Real τ³-bench Airline task using `meta/muse-spark-1.3-contributor`:
reward 1.0, 55.54 seconds agent time, 22 steps. Recorded uninterrupted
from cold setup through Logs → Live, Results and the task page. The
simulator and judge used `openai/gpt-4.1` because the configured dated
default alias was unavailable. The earlier refused attempt was not
counted as this successful run.
- Field-guide checks: 2 passed. Usage regression cases cover one call,
multiple calls, final metrics, trial totals, unreadable trajectories,
missing usage and output-only records.
- `git diff --check` passed.

## Risk

Feed readiness and polling changes could leave a preparing page on the
wrong tab; explicit choices must not be overridden. A terminal execution
now settles a remaining stage even if its final stage event was absent,
but does not manufacture a duration or unit count. Runs without launch
records have no Logs tab. The overview derives the benchmark from the
catalogue or a single recorded task source. The token summary preserves
existing trajectory cache accounting; partial per-call records can still
describe only the recorded subset. Revert to undo; no storage migration.
@aitianshi

Copy link
Copy Markdown
Collaborator

Tool calls and result are already shown at the top, so there is no need to repeat them here. What is the purpose of the "by" field?

@pierreleca
pierreleca force-pushed the feat/trial-detail-and-records branch from 2d36826 to 9d5b2fd Compare November 24, 2026 13:36
@pierreleca

Copy link
Copy Markdown
Contributor Author

Thanks. The panel no longer repeats the result and the count of tool calls. by named the code that produced the score: for OSWorld, the script that ran the task, then DesktopEnv.evaluate. It is the same on every trial of a run and says nothing about this one. I removed it too.

@pierreleca

Copy link
Copy Markdown
Contributor Author

To answer the question about by directly: this PR does not add it. The OSWorld drivers on main already write it into each score's detail. It records which code ran the task and called the checker: the runner for an agent, OSWorld's own script for a reference setup, nop.py for the null control. Its purpose is to tell those apart in the files. The panel showed it only because it listed every field of the detail. It is the same for every trial of a run. The panel no longer shows it, and the field stays in score.json. The panel also leaves out a score or a step count that the head already shows.

pierreleca and others added 7 commits November 24, 2026 18:03
A driver's score holds a detail of the trial beside its reward. Whatever a
benchmark records there (a partial score, a seed, the checks it ran) was in
the trial's folder and on no page. The Overview tab now shows it in a panel:
plain values as a short table under the driver's own names, each object of
plain values one level down as a list of flags held or not.

The score file is read without following a link and only up to a bound.
Every value is escaped and redacted, a value filed under a credential's name
is replaced at any depth, and a token count is not read as a credential. A
long value is cut, its whole text behind a disclosure. A trial whose score
has no detail has no panel.
A benchmark's verifier may leave records of its own in a trial (a log, a
copied folder) that no page shows. A benchmark may now declare them in its
benchmark.json (records: each a label and a path under verifier/, a file or
a folder whose files are listed, one level). The catalogue checks each
path. The Artifacts tab lists those that exist after Nullius's own, under
one heading row, and reads and serves them through the same routes.

A record is opened one folder at a time from the trial's own with no link
followed, and only a regular file that reads as text is listed. A folder
lists at most 200 text files and says when it holds more; a file whose name
is not printable is left out and its key refused.
A record's download wrote its file name between quotes as it was. A name
with a quote, a backslash or a control character broke the header, and a
name outside ASCII had no portable form. The name now has its control
characters removed and is quoted, with an ASCII fallback, and a name
outside ASCII is also sent as UTF-8 (filename*).
A driver's detail can repeat what the trial's page already shows. OSWorld's
result is the score in the page's head, and its count of tool calls is the
Tool calls panel's. Its `by` names the code that scored the trial, which is
the same on every trial of a run and says nothing of this one. The page now
leaves these three names out, and a detail with nothing else has no panel.
A driver's `result` is the score in the page's head only when it is a
number, as OSWorld's is. HumanEval's check writes text there, such as
"failed: ..." or "timed out", and the page says that nowhere else. The
page now leaves `result` out only when it holds a number.
…shows

The head of a trial's page shows its reward, its score and the steps of its
trajectory. A driver's `result`, `score` or `steps` repeated them, as
OSWorld's own scripts' runs write `steps` beside the result. Such a value is
now left out when it is a number the head shows. Text, or a count the head
does not show, stays in the panel.
@aitianshi
aitianshi force-pushed the feat/trial-detail-and-records branch from d96781d to 77838db Compare November 24, 2026 17:04
The benchmark's evidence and the failing tests leave Overview for a tab of
their own, present only when a trial fell short. A benchmark's entry names the
rows it shows; one that names none shows its whole detail.
@aitianshi
aitianshi merged commit b956571 into ThinkFlowLab:main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A benchmark's own detail of a trial, and the records its verifier leaves, reach no page

2 participants