Skip to content

Shared report charts, failure-first inventories and detail navigation across tracks - #400

Merged
lanyue-llk merged 5 commits into
mainfrom
report/drill
Nov 25, 2026
Merged

lanyue-llk merged 5 commits into
mainfrom
report/drill

Conversation

@lanyue-llk

Copy link
Copy Markdown
Contributor

Purpose

Reader review findings A6, A7, A8, A10 and A13 (issue #397): give every track's home page a readable chart, one drill-down path from inventory to evidence, scrollers that shrink to their content, and detail pages that keep the reader's place.

flowchart LR
  subgraph reporting["harness/reporting (shared)"]
    C["charts.py<br/>ranked_bars · dumbbell · check_charts"]
    E["explorer.py<br/>inventory_attributes · inventory_notice<br/>diagnosis_button/dialog · detail_navigation<br/>INVENTORY_SCRIPT · check_inventory"]
    P["presentation.check_presentation<br/>(runs check_charts + check_inventory)"]
  end
  C --> H["Home pages<br/>Web Fetch · WCXB · Web Search · Web Extract<br/>Browser Use · Replay (WebArena, curated, public)"]
  E --> I["Result inventories<br/>failures first → fallback to all with notice<br/>pages of 100 · filters in URL · diagnosis dialog"]
  I -->|"row link records visible order"| D["Detail pages<br/>back (filters kept) · previous · next<br/>exact error in the verdict"]
  P --> R["Track release checks"]
Loading

What changed

Shared layer

  • New reporting/charts.py: HTML/CSS ranked bar (rate with n/N) and two-rate dumbbell. Text keeps the page font size; at ≤640 px the label wraps above its bar instead of shrinking (B11). Every mark carries its raw value; check_charts rejects a mark, value text or order that disagrees with the numbers.
  • reporting/explorer.py gains the shared inventory path. A track keeps its filter controls and script and marks the inventory with inventory_attributes. The shared script then:
    • opens on failures and, when the first view is empty, switches once to the fallback with a visible notice (A7);
    • shows 100 rows at a time with a "Show more" button (A13);
    • keeps filters in the URL (?f.<control>=…);
    • records the visible order when a row's detail link opens.
  • detail_navigation renders back (to the recorded filtered URL), previous and next within that order (A10). diagnosis_button and diagnosis_dialog give one keyboard-closable dialog whose content is an inert per-row template. check_inventory enforces the failure default, notice, pager and dialog. check_presentation now runs both checks, so every track's existing release gate covers them.

Tracks

  • Web Fetch / Codex
    • The home page leads with a pass-rate chart and a request-success-versus-task-pass dumbbell.
    • Analysis and provider inventories gain diagnosis dialogs, the fallback and the pager.
    • Attempt pages gain back, previous and next, and the verdict card shows the failure reason and the exact error line.
  • WCXB
    • The home page leads with a mean-F1 chart.
    • The "Inspect" default falls back to all results with a notice, so the default view is no longer "0 results / 24".
    • Case pages gain navigation.
  • Web Search
    • The default home page shows known-page hit rates and a nonempty-versus-hit dumbbell.
    • The level comparison opens on "At least one selected method misses" and falls back to all relations.
    • The fixed 410 px relation box becomes max-height.
    • The results inventory always opens on failures through the shared fallback.
    • Detail pages show the failure reason and exact error in the summary, with back, previous and next.
  • Web Extract
    • The home page leads with a structured-output chart.
    • The inventory gets the fallback and pager.
    • Case pages gain navigation, and result summaries carry the exact error.
  • Browser Use
    • The home page leads with a pass-rate chart.
    • The inventory gets the fallback, pager and max-height.
    • Result pages gain back, previous and next.
  • Trajectory Replay (WebArena)
    • Fixed 620/610/560 px inventories become max-height.
    • The inventory gets the fallback and pager, and the home page gets a pass-rate chart.
    • Result pages gain previous and next beside the existing back link, and the verdict line carries the exact finding.
  • Trajectory Replay (curated and public)
    • Execution cards join the shared inventory, and .record-grid is capped at 70vh.
    • Detail pages gain back, previous and next.
    • Home pages show result-correct and result-versus-process charts.
  • Lexbench: the failure-first inventory falls back to every task with a notice when no task failed.

Kept as the review marked good: reference-versus-output evidence, same-task cards and stage strip, attempt locator, keyboard-correct dialogs, fail-default inventories and Codex back navigation (now shared).

Baselines

Every track's snapshot was refreshed with WEBSTONE_UPDATE_BASELINES=1 because the page bytes, report.js and the style hashes changed. Outside file hashes, the only text changes are in the Web Fetch analysis and provider inventories:

  • each failed row's failure-class cell gains a "Diagnose" (定位) button;
  • one extra h2 entry comes from the dialog template; its text sits inside a <template>, so the snapshot records it as empty.

No score, count, rate, latency or row was added or removed. The scorer identity is unchanged (lexbench-webfetch version reports scoring_source_sha256 0fe89317…169e before and after).

Architecture allowlists are unchanged: no instance literal was added to shared code.

Verification

  • uv run --frozen --all-extras python -m pytest -n 8 --dist worksteal -q tests: 21673 passed, 78 skipped, 2 xfailed. This includes the baselines, the architecture tests and the new tests below.

  • make lint-check: clean.

  • New tests and negative controls:

    • tests/test_report_charts.py covers chart rendering and rejects a wrong bar width, wrong value text, wrong rank order, a wrong dumbbell position, missing text and a missing required chart.
    • tests/test_report_explorer.py covers the inventory contract and rejects an "all" default, a missing notice or pager, and diagnosis buttons without the dialog.
    • tests/test_report_browser_interactions.py::test_shared_inventory_falls_back_pages_keeps_filters_and_walks_details drives a real browser through:
      • the fallback notice and the pager;
      • the dialog opening and closing with Escape;
      • URL filters;
      • previous and next on a detail page;
      • back restoring the filter.
  • Release checks: check_presentation, which every track's check already calls, now runs check_charts and check_inventory. The Replay check now requires a max-height inventory and rejects a fixed height.

  • Visual check: every fixture report was built and the key routes were captured with Playwright. Routes covered:

    • home, inventory, failed detail and dialog;
    • zh and en;
    • 1440 and 390 px;
    • light and dark.

    No horizontal page overflow and no new console errors (the 404 on Web Extract's English results page also occurs on main). Chart text stays at body size at 390 px. Inventories shrink to their rows: the 620 px Replay box and the 410 px Search relation box are gone.

Not done here

  • One language per DOM (A13): Web Fetch and Browser Use still render English through data-report-en and a post-render pass inside the Chinese DOM. The language switch is shell-owned (Reports: one shell, navigation, theme, table and label system across tracks #396).
  • The 8.36 MB attribution report and the bilingual single-file Web Fetch article are published artifacts that no renderer in this repository produces.
  • Web Search's level-view home (render_level_summary) and Lexbench's client-rendered home have no chart yet.

Part of #397 (the remaining items are listed under "Not done here").

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · ff70055

This review found 13 issue(s), including 13 blocking issue(s).

Comment on lines +2537 to 2538
+ "</div>"
+ "".join(dialogs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The diagnosis dialogs remain outside the inventory wrapper, so following the failed row's “Open diagnosis” → evidence link never records an inventory trail. INVENTORY_SCRIPT records it only for clicks inside the wrapper on the row's first link. On this main failure-investigation path, the new detail navigation therefore has no previous/next links and its back link loses the active filters (or uses a stale trail). Record the row's trail when opening its diagnosis dialog, or explicitly wire the dialog's detail links to the same trail-recording logic.

? T.analysisIntro
: population();
let filters = `<div class="filters"><label>${T.search}<input id="query" type="search" placeholder="${esc(T.search)}"></label><label>${T.stratum}<select id="stratum"><option value="">${T.all}</option>${M.strata.map((s) => `<option value="${s}">${esc(T.strata[s] || s)}</option>`).join("")}</select></label><label>${T.relation}<select id="relation"><option value="">${T.all}</option><option value="failure" ${kind === "results" ? "selected" : ""}>${esc(T.filterFail)}</option>${["bothPass", "gain", "bothFail", "loss", "mixed"].map((s) => `<option value="${s}">${esc(T[s])}</option>`).join("")}</select></label></div><div class="subtle" id="count"></div>`;
let filters = `<div class="filters"><label>${T.search}<input id="query" type="search" placeholder="${esc(T.search)}"></label><label>${T.stratum}<select id="stratum"><option value="">${T.all}</option>${M.strata.map((s) => `<option value="${s}">${esc(T.strata[s] || s)}</option>`).join("")}</select></label><label>${T.relation}<select id="relation"><option value="">${T.all}</option><option value="failure" ${kind === "results" ? "selected" : ""}>${esc(T.filterFail)}</option>${["bothPass", "gain", "bothFail", "loss", "mixed"].map((s) => `<option value="${s}">${esc(T[s])}</option>`).join("")}</select></label></div><p class="inventory-notice" id="inventory-fallback" role="status" hidden>${esc(message("no_failures_showing_all"))}</p><div class="subtle" id="count"></div>`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · high
message() reads T.messages[key] and throws when the key is missing, but the new no_failures_showing_all entry is at the locale root in both languages. This unconditional call therefore throws whenever an inventory is rendered, including dataset and analysis views—not just the all-passing fallback. Read T.no_failures_showing_all here, or move both entries into their locale's messages object.

Comment thread src/harness/reporting/charts.py Outdated
for holder, mark in marks:
value = holder.get("data-chart-value", "")
drawn = _style_percent(mark, "width" if figure["data-chart"] == "ranked-bar" else "left")
expected = 0.0 if value == "" else round(100 * float(value), 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The renderer computes positions/text from the original float but stores data-chart-value rounded to six decimals, so this second rounding can reject valid generated charts. For example, Bar("A", 0.0025001) renders width:0.3% and text 0.3%, but stores 0.002500; the checker computes round(0.25, 1) == 0.2 and raises. Continuous quality_f1 scores feed these bars, and check_presentation now invokes this check on reports. Preserve round-trip precision in both bar and dumbbell data attributes, or use one consistently rounded value for rendering and validation; cover boundary values in tests.

Comment thread src/harness/reporting/explorer.py Outdated
const rowsOf=root=>{const r=[...root.querySelectorAll('[data-inventory-row]')];return r.length?r:[...root.querySelectorAll('tbody tr')]};
const linkOf=row=>row.querySelector('a[data-inventory-detail]')||row.querySelector('a[href]');
function paginate(root,extra){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=extra?root._limit+size:size;let shown=0,left=0;rowsOf(root).forEach(r=>{if(r.hidden){r.style.removeProperty('display');return}if(shown<root._limit){shown++;r.style.removeProperty('display')}else{left++;r.style.display='none'}});if(more){more.hidden=!left;more.dataset.remaining=left;more.setAttribute('aria-label',more.textContent.trim()+' ('+left+')')}return shown}
function save(root,controls){const url=new URL(location.href);[...url.searchParams.keys()].filter(k=>k.startsWith('f.')).forEach(k=>url.searchParams.delete(k));controls.forEach((c,i)=>{const v=c.type==='checkbox'?(c.checked?'1':'0'):c.value;if(v)url.searchParams.set('f.'+key(c,i),v)});history.replaceState(history.state,'',url)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Persist empty filter values too. Web Fetch and Browser Use use value="" for “All” but render a failure default. Selecting All, opening a detail, and following Back therefore reloads the failure default because the URL omits that selection. With another saved filter, restored=true also prevents the empty-view fallback. Set the parameter even for an empty string (restoration already distinguishes "" from null), and add a back-navigation regression test for All with both passing and failing rows.

Comment thread src/harness/reporting/explorer.py Outdated
root.querySelector('[data-inventory-more]')?.addEventListener('click',()=>paginate(root,true));
const shown=paginate(root,false),result=root.querySelector(root.dataset.inventoryResult||'[data-inventory-result-control]'),fallback=root.dataset.inventoryFallback||'';
if(!restored&&!shown&&rowsOf(root).length&&result&&result.value!==fallback){result.value=fallback;fire(result);paginate(root,false);const notice=root.querySelector('[data-inventory-notice]');if(notice)notice.hidden=false}
root.addEventListener('click',e=>{const a=e.target.closest('a[href]'),row=a&&a.closest('[data-inventory-row],tbody tr');if(!row||!root.contains(row)||a!==linkOf(row))return;const items=rowsOf(root).filter(r=>!r.hidden).map(linkOf).filter(Boolean).map(x=>x.href);try{sessionStorage.setItem(TRAIL,JSON.stringify({back:location.href,items:[...new Set(items)]}))}catch(_){}})}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The element-identity check skips other links to the same detail page. WebArena rows have a marked participant link and a separate “Evidence page” link to the same URL; Web Extract similarly has a case-ID link and a marked evidence link. Opening these unmarked links does not record the trail, so previous/next and the filtered Back link are missing (or use a stale trail). Accept links whose resolved href matches the row's canonical detail link, rather than requiring the exact same anchor element.

search = cid + " " + truth[cid]["url"] + " " + error
inventory.append(
f'<tr data-case="{cid}" data-status="{"pass" if ok else "fail"}" data-method="{r["method"]}" data-stage="{r["failure_stage"]}" data-outcome="{"correct" if correct and ok else "wrong"}" data-search="{esc(search, quote=True)}" {data_fields}><td>{esc(names.get(r["method"], r["method"]))}</td><td><a href="{url}"><code>{cid[:12]}</code></a></td><td>{status}</td>{field_cells}<td>{r.get("http_status") or "—"}</td><td data-sort="{r.get("elapsed_seconds", "")}">{elapsed}</td><td><button data-call-log-open="diagnosis" data-src="{evidence}"{evidence_key}{label_attr}>{lab[9]}</button> · <a href="{url}">'
f'<tr data-case="{cid}" data-status="{"pass" if ok else "fail"}" data-method="{r["method"]}" data-stage="{r["failure_stage"]}" data-outcome="{"correct" if correct and ok else "wrong"}" data-search="{esc(search, quote=True)}" {data_fields}><td>{esc(names.get(r["method"], r["method"]))}</td><td><a href="{url}"><code>{cid[:12]}</code></a></td><td>{status}</td>{field_cells}<td>{r.get("http_status") or "—"}</td><td data-sort="{r.get("elapsed_seconds", "")}">{elapsed}</td><td><button data-call-log-open="diagnosis" data-src="{evidence}"{evidence_key}{label_attr}>{lab[9]}</button> · <a data-inventory-detail href="{url}">'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Adding data-inventory-detail only to the “Full result” link makes the case-ID link bypass navigation tracking: the shared click handler records the trail only when the clicked anchor equals linkOf(row), which now selects the marked link. Opening the same detail via its case ID therefore leaves previous/next hidden (or uses a stale trail), and Back loses the current filters. Allow both links to record the row's canonical detail trail; merely marking both is insufficient because linkOf returns only the first match.

Comment thread src/harness/web_fetch/report.py Outdated
passed=sum(succeeded(r,cases[r['case_id']], ctx=ctx) for r in rs)
called=[r for r in rs if r.get('report_invocation_status') != 'adapter_rejected']
bars.append(charts.Bar.rate(label,passed,n,f'providers/{name}.html'))
pairs.append(charts.Pair(label,sum(bool(r['ok']) for r in called)/len(called) if called else None,passed/n if n else None,f'providers/{name}.html'))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The two rates can use different populations, so their gap does not necessarily represent returned responses that failed task requirements. comparison_population removes evaluation exclusions, but retains undecidable results (rule_review_status == 'unresolved', nullable acceptance checks, or file results without a boolean verdict). These count in called but not in n. For example, one measured passing call and one unsuccessful undecidable call produce 50% request success versus 100% task pass. Use the same decidable, invoked population for both endpoints if the gap is intended to measure task failures after a successful request; otherwise explicitly describe the differing denominators and remove that interpretation.

const criteria=c=>{const x=c.criteria;return '<div class="compare-criteria" data-task-criteria><strong>'+esc(L.criteria)+'</strong>'+(c.quality_excluded?'<p data-quality-excluded>'+esc(L.quarantined)+'</p>':'')+(x.answer!=null?'<p>'+esc(L.referenceAnswer)+': <b>'+esc(x.answer)+'</b></p>':'')+(x.urls.length?'<p>'+esc(L.referenceUrls)+'</p>'+x.urls.map(u=>'<a href="'+esc(u)+'" target="_blank" rel="noopener noreferrer">'+esc(u)+'</a>').join(''):'')+(x.official_sources&&Object.keys(x.official_sources).length?'<details><summary>'+esc(L.sourceRules)+'</summary><p>'+[...(x.official_sources.domains||[]),...(x.official_sources.url_prefixes||[])].map(esc).join('<br>')+'</p>'+x.official_sources.sources.map(u=>'<a href="'+esc(u)+'" target="_blank" rel="noopener noreferrer">'+esc(u)+'</a>').join('')+'</details>':'')+(x.domains.length?'<p>'+esc(L.requestedSites)+': '+x.domains.map(esc).join(', ')+'</p>':'')+((x.paper_ids.length||x.repositories.length||Object.keys(x.aliases).length)?'<details><summary>'+esc(L.equivalents)+'</summary><pre>'+esc(JSON.stringify({aliases:x.aliases,papers:x.paper_ids,repositories:x.repositories},null,2))+'</pre></details>':'')+(!x.urls.length&&x.answer==null&&!x.domains.length?'<p>'+esc(L.unannotated)+'</p>':'')+'</div>'};
function matching(){let q=$('[data-output-query]').value.toLowerCase(),benchmark=$('[data-output-benchmark]').value,check=$('[data-output-check]').value;return data.cases.filter(c=>(benchmark==='all'||(benchmark==='excluded'?c.quality_excluded:c.benchmark===benchmark&&!c.quality_excluded))&&(check==='all'||c.check_types.includes(check))&&(!focusedId||c.id===focusedId)&&(!q||c.query.toLowerCase().includes(q)||c.id.toLowerCase().includes(q)))}
function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;if($('[data-compare-relation]').value==='all'||r===$('[data-compare-relation]').value)matches.push(c)}
function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;const chosen=$('[data-compare-relation]').value;if(chosen==='all'||r===chosen||chosen==='any_miss'&&r!=='all_pass'&&r!=='unknown')matches.push(c)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The new any_miss filter hides known failures whenever another selected method has no verdict: relation(false, [null]) returns unknown, which this condition excludes. This is supported by comparison_data, which emits null outputs for missing rows and null primary verdicts for methods outside the relevance cohort. It also excludes all cases when only the baseline remains selected, even if it fails. Compute any_miss directly from the selected verdicts using .some(v => v === false), independently of the relation classification.

function matching(){let q=$('[data-output-query]').value.toLowerCase(),benchmark=$('[data-output-benchmark]').value,check=$('[data-output-check]').value;return data.cases.filter(c=>(benchmark==='all'||(benchmark==='excluded'?c.quality_excluded:c.benchmark===benchmark&&!c.quality_excluded))&&(check==='all'||c.check_types.includes(check))&&(!focusedId||c.id===focusedId)&&(!q||c.query.toLowerCase().includes(q)||c.id.toLowerCase().includes(q)))}
function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;if($('[data-compare-relation]').value==='all'||r===$('[data-compare-relation]').value)matches.push(c)}
function render(){root.querySelectorAll('[data-compare-method]').forEach(x=>x.disabled=x.value===$('[data-compare-baseline]').value);let cases=matching(),metric=$('[data-compare-metric]').value,base=$('[data-compare-baseline]').value,others=selected(),counts={},matches=[];for(let c of cases){let r=relation(c.outputs[base]?.[metric],others.map(m=>c.outputs[m]?.[metric]));counts[r]=(counts[r]||0)+1;const chosen=$('[data-compare-relation]').value;if(chosen==='all'||r===chosen||chosen==='any_miss'&&r!=='all_pass'&&r!=='unknown')matches.push(c)}
if(!fallbackChecked){fallbackChecked=true;if(!matches.length&&cases.length&&$('[data-compare-relation]').value==='any_miss'){$('[data-compare-relation]').value='all';$('[data-relation-fallback]').hidden=false;return render()}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The fallback notice can make a false all-hit claim. An entirely unscored selection also reaches this branch, and once shown the notice remains visible after changing methods, metrics, or filters to a selection containing failures; no other code resets its visibility. Use a neutral 'No matching misses; showing all relations' message unless every selected verdict is confirmed true, and hide or recompute the notice when the selection changes.

Comment thread src/harness/web_search/report.py Outdated
hit = s["metrics"][hit_key]
hits = None if hit["mean"] is None else round(hit["mean"] * hit["n"])
bars.append(charts.Bar(esc(m["label"]), hit["mean"], f"{hits}/{hit['n']}" if hits is not None else ""))
pairs.append(charts.Pair(esc(m["label"]), s["nonempty"] / s["n"] if s["n"] else None, hit["mean"]))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The two rates can have different query populations. aggregate() counts all rows in n/nonempty, but excludes null anchor-hit metrics from hit['mean']; the scorer emits null for queries without reference anchors. For a mixed overview, the gap therefore does not measure queries returning results without the known page as the caption claims, and the hit rate can even exceed the nonempty rate. Compute both rates over the same anchor-annotated rows (and describe that scope), or present these as separate metrics without interpreting their difference.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

All 13 review findings are fixed in b8307ef:

  • Trail on every path (Browser Use dialog, WebArena evidence link and dialog, Web Extract case-ID link): any click inside an inventory row now records the visible order. A detail page matches it by URL (ignoring the fragment), so diagnosis buttons and alternate links get previous, next and filtered back.
  • "All" (empty value) round trip: every control is written to the URL, empty values included. Restoring it counts as the reader's choice, so it never reverts to the failure default.
  • Late track filtering (WebArena after fetch): the fallback runs on every repagination until the reader picks a filter, not just once at load.
  • Chart precision: data-chart-value keeps full float precision. A boundary test was added (0.0025001 → 0.3%).
  • Web Fetch dumbbell: request success and task pass now share the same decidable results; the caption says so.
  • Web Search home: the nonempty-vs-hit dumbbell is removed. The known-page hit bar uses the annotated queries as n.
  • Web Search any_miss: computed from the selected verdicts (some(v => v === false)), so failures stay visible with missing peers and with a baseline-only selection. The notice text is neutral and hides on any control change.
  • Lexbench: the message moved into each locale's messages map.

The browser test now covers late filtering, the diagnosis-path trail and the All round trip. Full suite: 21674 passed. Lint is clean. Baselines were refreshed.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · b8307ef

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/reporting/charts.py Outdated
Comment on lines +160 to +161
if value and f"{expected:.1f}%" not in row.select_one(".chart-value").get_text():
raise ValueError("Chart value text differs from its mark")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The dumbbell check does not associate displayed percentages with their series. For a pair (0.9, 0.75), changing the text to First 75.0% → Second 90.0% still passes because both expected percentages occur somewhere in the row. Removing all [data-chart-mark] elements also passes because the validation loop becomes empty. This lets misleading or missing drawings through check_presentation. Keep independent per-series values on the row and identifiable per-series text elements, then validate each series' text and required mark (allowing absent marks only for unavailable values). Add negative controls for swapped percentages and deleted marks.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Second round, fixed in d77a064:

  • Dumbbell series (charts.py:161): each series now has its own text span carrying its raw value. The check pairs each span with its own mark and requires a dash and no mark for an unavailable value. New negative controls cover swapped percentages and deleted marks.
  • CI browser-check failure (test_webfetch_bilingual_extension_navigation): the load-time fallback no longer writes filters into the URL. Only the reader's own changes are saved.

The earlier findings are carried over on unchanged lines and were already fixed in b8307ef (see the previous comment). Full suite: 21676 passed. Lint is clean.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · d77a064

This review found 1 issue(s), including 1 blocking issue(s).

if(typeof addEventListener==='function')addEventListener('hashchange',detail);
function start(){document.querySelectorAll('[data-inventory]').forEach(init);detail()}
// Run after the track's own scripts, which are deferred or wait for DOMContentLoaded.
if(document.readyState==='complete'||typeof addEventListener!=='function')setTimeout(start);else addEventListener('load',()=>setTimeout(start));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Initialize the shared inventory/navigation on report-ready as well as initial load. Web Fetch's packaged report loader replaces document.body asynchronously on each route and dispatches report-ready (assets/report-loader.js:142–144); its existing track script listens to that event, but this script runs start() only once. Consequently newly loaded inventories never get pagination, fallback, filter persistence or trail recording, and detail navigation is not initialized after the replacement. Register a post-render initialization hook (after the track filters), and ensure detail matching works with the loader's hash-based routes.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed the report-ready finding (explorer.py:243) in c167d35:

  • The shared script now also initializes on report-ready, after the track's own handler. Packaged reports therefore get pagination, the fallback, URL filters and trail recording on every routed body.
  • Detail matching treats a #page=… route as the page address, so hash-routed detail pages resolve their own previous/next.

New browser test test_shared_inventory_initializes_after_a_packaged_route_replaces_the_body. Full suite: 21677 passed.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · c167d35

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread src/harness/reporting/explorer.py Outdated
// visible order, so every path to that row's detail page gets previous/next and back.
root.addEventListener('click',e=>{const row=e.target.closest('[data-inventory-row],tbody tr');if(row&&root.contains(row))record(root)})}
function dialogFor(){const d=document.querySelector('[data-inventory-dialog]');if(!d||d._ready)return d;d._ready=true;d.querySelector('[data-dialog-close]')?.addEventListener('click',()=>d.close());d.addEventListener('close',()=>d._opener?.focus());return d}
document.addEventListener('click',e=>{const b=e.target.closest('[data-inventory-diagnosis]'),d=b&&dialogFor();if(!d)return;const t=b.nextElementSibling;if(!t||!t.matches('template[data-diagnosis-content]'))return;d._opener=b;d.querySelector('[data-dialog-body]').replaceChildren(t.content.cloneNode(true));d.showModal()});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · high
Diagnosis links break in packaged Web Fetch reports. diagnosis() supplies relative attempt URLs, but the package loader's fixLinks(page.body, ...) only visits DOM descendants, not template.content. Cloning the template here therefore exposes unconverted links such as ../attempts/…html; these navigate outside the package instead of opening its #page=… route (including the run-log link). Ensure template links are resolved against the source report page and converted by the package link rewriter before displaying the dialog.

Comment thread src/harness/reporting/explorer.py Outdated
if result is None:
raise ValueError("Inventory lacks its result control")
selected = result.select_one("option[selected]") or result.select_one("option")
if selected is None or selected.get("value") in ("", root.get("data-inventory-fallback")):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
This does not enforce the failure-first contract: a selected value="pass" (or any other nonempty, non-fallback value) passes validation. For example, check_inventory(inventory_fixture(selected="pass")) succeeds with the existing test fixture, so the release gate misses a pass-only default. Validate against an explicitly declared failure value or supported failure values, and add a pass-default negative test.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed both findings in dbb8783:

  • explorer.py:238 (packaged diagnosis links): the dialog content is now ordinary hidden DOM (<div hidden data-diagnosis-content>) rather than a <template>. The package loader's fixLinks (root.querySelectorAll('a[href]')) and the English pass therefore rewrite its links and text, and the dialog clones that already-rewritten content.
  • explorer.py:260 (failure-first check): inventories declare their failure value (data-inventory-failure, default fail), and check_inventory requires the selected default to equal it. A pass-default negative control was added.

Full suite: 21678 passed. Lint is clean. Baselines were refreshed.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · dbb8783

No findings in this incremental review.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 29eeb04

This review found 7 issue(s), including 7 blocking issue(s).

Comment thread src/harness/lexbench/template/app.js Outdated
Comment on lines +676 to +677
if (route() !== "dataset" && relation?.value === "failure" && M.cases.length &&
M.cases.every((c) => pairStatus(c) === "bothPass")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The fallback checks all cases rather than the initial filtered inventory. wireInventory() first restores stratum from the hash, so opening a stratum whose tasks all pass still shows an empty failure inventory if any other stratum contains a failure. Check for failures within the active initial filters, then clear only the relation filter when that view has no failures (and adjust the notice to describe the filtered scope).

Comment thread src/harness/reporting/explorer.py Outdated
const rowsOf=root=>{const r=[...root.querySelectorAll('[data-inventory-row]')];return r.length?r:[...root.querySelectorAll('tbody tr')]};
const linkOf=row=>row.querySelector('a[data-inventory-detail]')||row.querySelector('a[href]');
function paginate(root,extra){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=extra?root._limit+size:size;let shown=0,left=0;rowsOf(root).forEach(r=>{if(r.hidden){r.style.removeProperty('display');return}if(shown<root._limit){shown++;r.style.removeProperty('display')}else{left++;r.style.display='none'}});if(more){more.hidden=!left;more.dataset.remaining=left;more.setAttribute('aria-label',more.textContent.trim()+' ('+left+')')}return shown}
function save(root,controls){const url=new URL(location.href);[...url.searchParams.keys()].filter(k=>k.startsWith('f.')).forEach(k=>url.searchParams.delete(k));controls.forEach((c,i)=>url.searchParams.set('f.'+key(c,i),c.type==='checkbox'?(c.checked?'1':'0'):c.value));history.replaceState(history.state,'',url)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Multi-select filters lose selections on the detail/back round trip. Web Extract's participating inventory contains select[multiple][data-comparison-methods], but c.value serializes only its first selected option, and assigning c.value in init deselects the others. Consequently, returning to the inventory changes the compared methods and matching results. Serialize all selected options for multiple selects and restore their selected states before dispatching filter events; add a regression with at least two selected competitors.

Comment thread src/harness/reporting/explorer.py Outdated
function refresh(root,extra){paginate(root,extra);settle(root)}
function record(root){const items=rowsOf(root).filter(r=>!r.hidden).map(linkOf).filter(Boolean).map(x=>x.href);try{sessionStorage.setItem(TRAIL,JSON.stringify({back:location.href,items:[...new Set(items)]}))}catch(_){}}
function init(root){if(root._inventory)return;root._inventory=true;const controls=[...root.querySelectorAll('select,input:not([type=button])')].filter(c=>!c.closest('dialog')),params=new URL(location.href).searchParams;controls.forEach((c,i)=>{const v=params.get('f.'+key(c,i));if(v===null)return;if(c.type==='checkbox')c.checked=v==='1';else c.value=v;root._settled=true;fire(c)});
let queued=false;const observer=new MutationObserver(()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;refresh(root,false)})});rowsOf(root).forEach(r=>observer.observe(r,{attributes:true,attributeFilter:['hidden']}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Repaginate when inventory rows are reordered, not just when hidden changes. Web Extract's inventory is data-sortable; its header handlers reorder existing rows without changing hidden. After the shared pager hides everything beyond the first 100, sorting therefore keeps displaying the original 100 rows rather than the first 100 in the newly requested order (e.g. the largest latencies can remain hidden after sorting descending). Observe child-list changes on the row container or provide a refresh hook called by sorting, and test sorting with more than one page of matching rows.

)
grid_head = f'<div class="record-grid-head" aria-hidden="true"><span>{t("replay.column.task", "Task")}</span><span>{t("public.correctness.browser", "Browser")}</span><span>{t("public.suite.programmatic_acceptance", "Programmatic acceptance")}</span><span>{t("public.execution.tool_call", "Tool call")}</span><span>{t("replay.filter.error_category", "Error category")}</span><span>{t("public.metric.duration", "Trajectory execution duration")}</span></div>'
return f"""{filter_anchors}<section class="card" id="failure-review"><div class="section-heading"><h2>{t("public.results.failure_analysis", "Failure analysis")}</h2><a href="#execution-results">{t("public.review.view_records", "View execution records")}</a></div><p>{t("public.review.body", "Groups <strong>{count}</strong> failed results by direct evidence in error logs, BrowserTool traces and evaluator output.", count=final_failures)}</p>{review_table}<p class="muted">{t("public.review.note", "This is not a second scoring. Categories only summarize direct failure mechanisms; Element not visible, HAR not matched and the like do not automatically mean a browser-internal root cause.")}</p></section><section class="card" id="execution-results"><h2>{t("replay.detail.execution_records", "Execution records")}</h2><p>{t("public.review.records_body", "{count} task × browser results. Failed results show by default; open a task to see the actions, answers, verdicts, error stack and BrowserTool trace of the adopted result.", count=logical_executions)}</p>{filters}<div id="execution-list" class="record-grid" role="region" aria-label="{t("public.review.records_label", "Per-task execution records")}" tabindex="0">{grid_head}{_execution_details(manifest, summary, detail_pages)}</div><p id="execution-empty" class="empty-state" role="status" hidden></p>{script}</section>"""
return f"""{filter_anchors}<section class="card" id="failure-review"><div class="section-heading"><h2>{t("public.results.failure_analysis", "Failure analysis")}</h2><a href="#execution-results">{t("public.review.view_records", "View execution records")}</a></div><p>{t("public.review.body", "Groups <strong>{count}</strong> failed results by direct evidence in error logs, BrowserTool traces and evaluator output.", count=final_failures)}</p>{review_table}<p class="muted">{t("public.review.note", "This is not a second scoring. Categories only summarize direct failure mechanisms; Element not visible, HAR not matched and the like do not automatically mean a browser-internal root cause.")}</p></section><section class="card" id="execution-results"{explorer.inventory_attributes(result_control="#f-status")}><h2>{t("replay.detail.execution_records", "Execution records")}</h2><p>{t("public.review.records_body", "{count} task × browser results. Failed results show by default; open a task to see the actions, answers, verdicts, error stack and BrowserTool trace of the adopted result.", count=logical_executions)}</p>{filters}<div id="execution-list" class="record-grid" role="region" aria-label="{t("public.review.records_label", "Per-task execution records")}" tabindex="0">{grid_head}{_execution_details(manifest, summary, detail_pages)}</div><p id="execution-empty" class="empty-state" role="status" hidden></p>{explorer.inventory_notice(t("inventory.no_failures", "No result failed; showing all results."), t("inventory.show_more", "Show more"))}{script}</section>"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The shared inventory saves filters only on input/change events, but this page's existing “Show all” and “Reset to errors” handlers assign control values and call apply() without dispatching either event. After changing a filter (which creates f.* URL parameters), clicking either button and opening a detail records the old URL despite displaying the new row set. Back then restores the old filters rather than the inventory the reader left. Update those button handlers to notify the shared filter persistence after changing the controls, and cover this path with a navigation test.

detail_nav = (
f'<a href="{REPORT_STEM}-analysis.html#{_e(back_anchor)}">← {t("curated.back_to_analysis", "Back to per-task analysis")}</a>'
f'<a href="{REPORT_STEM}.html">{t("curated.shell.detail_title", "{engines} evaluation", engines=" / ".join(engine_label(engine) for engine in engines))}</a><span class="muted">{t("replay.run", "Run {run_id}", run_id=run_id)}</span>'
explorer.detail_navigation(f"{REPORT_STEM}-analysis.html#{back_anchor}", back=t("curated.back_to_analysis", "Back to per-task analysis"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The new back navigation does not preserve filters changed through the existing “show all” and “reset” buttons. In curated-execution-filter.js, f-all and f-reset assign control values and call apply() without emitting input/change; the shared inventory script only saves filters on those events. For example, select an engine, click show all, open another engine's result, then follow Back: the recorded URL still contains the old engine filter and restores the wrong inventory. Wire these button actions into the shared filter-state update (after all control values are set) so the recorded back URL matches the displayed rows.

bodies["index"] = home_chart + bodies["index"]
bodies["results"] += (
result_controls(methods, rows, names, lang)
"<div" + explorer.inventory_attributes(result_control='select[data-result-filter="status"]', fallback="all") + ">"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
For reports with more than two methods, this wrapper breaks filter restoration on returning from a detail page. The shared script saves all controls and restores each by dispatching change, including the comparison controls rendered by result_controls. Their existing handler in assets/report.js unconditionally resets status to all and method to an empty value. Because those controls are restored last, they overwrite the reader's restored failure/method filters even when comparison is off. Restore the controls atomically before filtering, or prevent comparison restore events from resetting the ordinary filters.

)
listing = (
origin_filter(profile, zh)
"<div" + explorer.inventory_attributes(result_control="select[data-filter]", fallback="all") + ">"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
The shared pagination does not cooperate with this inventory's existing column sorting. With more than 100 matching rows, it hides later rows using inline display:none; the sort handler in assets/report.js only reorders the rows, while the shared observer watches only hidden attribute changes. Sorting by latency therefore keeps showing the original 100-row subset rather than the first 100 rows in the new order (the slowest results can remain hidden even when sorting descending). Repaginate after sorting, or observe row-order changes, and add a browser test with more than 100 matching results.

…elect and button filters survive navigation, restore without track resets; Lexbench fallback within active filters
@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed all 7 findings from the review of 29eeb04 in 542ac67, with one shared change in explorer.py:

  • Paging (3, 7): paging now marks rows with its own data-inventory-paged attribute and no longer uses an inline style. A row counts as filtered out if it has hidden or an inline display:none from the track. A MutationObserver on the inventory watches hidden, style and row order, so the pager repaginates when a track sorts or filters, and keeps the current page after a re-sort.
  • Multi-select (2): all selected options are written to the URL and restored on return.
  • Show all / Reset buttons (4, 5): filters are saved after any track button inside the inventory, since those buttons change controls without firing events.
  • Restore (6): saved values are applied first, then events fire, and the values are re-applied after each event. While this runs, data-inventory-restoring is set, and Web Extract's comparison handler skips its status/method reset.
  • Lexbench (1): the fallback now checks for failures only within the initial filters, including a stratum taken from the link.

Real-browser tests: test_shared_inventory_follows_sorting_inline_filters_buttons_and_multi_select (sort + paging, inline filter, multi-select and Reset kept across a detail round trip), plus the existing inventory tests. Full suite: 21693 passed. Lint is clean.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 542ac67

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/reporting/explorer.py Outdated
// marks rows with its own attribute, so the two never overwrite each other.
const filtered=r=>r.hidden||r.style.display==='none';
// mode: 'reset' to the first page after a filter change, 'more' for the next page, 'keep' after a re-sort.
function paginate(root,mode){const size=+root.dataset.inventoryPageSize||100,more=root.querySelector('[data-inventory-more]');root._limit=mode==='more'?root._limit+size:mode==='keep'&&root._limit?root._limit:size;let shown=0,left=0;rowsOf(root).forEach(r=>{const paged=!filtered(r)&&shown>=root._limit;if(!filtered(r)&&!paged)shown++;if(paged)left++;r.toggleAttribute('data-inventory-paged',paged)});if(more){more.hidden=!left;more.dataset.remaining=left}return shown}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

performance · medium
When no more rows remain, every refresh assigns more.hidden = true, even if the attribute is already present. Setting that reflected attribute produces another mutation, and the observer watching hidden schedules another refresh on the next animation frame. This creates a perpetual full-inventory scan for small inventories and after reaching the final page. Only update more.hidden when its value changes (or exclude pager mutations from the observer). Add a browser regression asserting that mutations stop once rendering and final-page pagination settle.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · dd70805

No findings in this incremental review.

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.

1 participant