Skip to content

fix(harness): align the portal web UI with the revamped harness run contract - #2408

Draft
jdye64 wants to merge 4 commits into
mainfrom
cursor/align-portal-with-harness-run-contract-770f
Draft

fix(harness): align the portal web UI with the revamped harness run contract#2408
jdye64 wants to merge 4 commits into
mainfrom
cursor/align-portal-with-harness-run-contract-770f

Conversation

@jdye64

@jdye64 jdye64 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Description

The Retriever harness was revamped (#2270 and follow-ups) into a benchmark-registry CLI: runs are launched with retriever harness run <benchmark> --mode {local,batch,service} and dotted --set overrides, and the legacy sweep / nightly / portal / runner / backfill CLI commands were removed. The harness portal web UI was never updated to match, so several "run things" paths are stale or broken. This PR realigns the portal's run-triggering surface with the current harness contract.

Harness ↔ portal differences that were breaking things

  1. Execution modes. The harness accepts local / batch / service (contracts.MODE_TO_RUN_MODE, where local → ingest.run_mode=inprocess). The portal only ever emitted run_mode=service and had no way to pick local or batch — even though the harness README requires batch for the large BEIR corpora (BO767, FinanceBench, Earnings, ViDoRe).
  2. _resolve_dataset_config signature drift. It now returns a 3-tuple (path, overrides, dataset_meta), but the MCP trigger_benchmark_run tool still unpacked two values, so triggering a run over MCP crashed at call time.
  3. Removed CLI commands referenced in the UI. The Runners and Runs empty-states pointed users at retriever harness runner start … and retriever harness backfill, which no longer exist.
  4. Invalid dataset options. The dataset form offered input_type=text (not a valid harness input type) and was missing doc / html / video / auto; the harness now supports auto/pdf/doc/txt/html/image/audio/video. It also lacked the pdf_page_modality BEIR doc-id field and defaulted new datasets to pdf_basename instead of the current DatasetSpec default pdf_page.

Changes

  • portal/app.py
    • Validate the requested execution mode against MODE_TO_RUN_MODE in /api/runs/trigger and always record it on the job (canonical mode, with run_mode kept as a legacy alias).
    • Add /api/harness-info exposing the current run contract — accepted modes and the code-owned benchmark/runset registry — using the lightweight benchmark_registry import so the UI has a single source of truth.
  • portal/mcp_tools.py — fix the 3-tuple unpack crash in trigger_benchmark_run, forward dataset_id/dataset_config_hash, and add an optional validated mode argument.
  • portal/static/views/trigger.jsx — add a Local/Batch/Service execution-mode selector (populated from /api/harness-info); service is now an execution mode rather than a pipeline type, and graph pipelines are disabled in service mode.
  • portal/static/views/datasets.jsx — correct the input-type list, add pdf_page_modality, default new datasets to pdf_page.
  • portal/static/views/runs.jsx, runners.jsx — replace references to removed CLI commands with current guidance.

Known follow-up (out of scope, needs the runner)

The portal still stores managed-dataset/preset config as flat keys (dataset_dir, embed_model_name, ocr_version, beir_loader, …). The current harness only accepts dotted --set namespaces (dataset.*, ingest.*, query.*, evaluation.*) and rejects unknown keys with exit code 2. The flat→dotted translation lives in the runner agent (external to this repo), which must be updated alongside these UI changes for end-to-end runs to succeed.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
Open in Web Open in Cursor 

cursoragent and others added 4 commits July 27, 2026 18:07
Align the portal trigger backend with the revamped harness run interface
(retriever harness run --mode {local,batch,service}). The portal only ever
emitted run_mode=service; local/batch could not be selected. Validate the
requested mode against contracts.MODE_TO_RUN_MODE and always record it on the
job so a runner can translate it into a valid --mode. Add /api/harness-info to
expose the current run contract (modes + benchmark/runset registry) so the UI
stays in sync with the harness.

Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
_resolve_dataset_config now returns a 3-tuple (path, overrides, dataset_meta),
but the MCP trigger tool still unpacked two values and crashed at call time.
Unpack the dataset_meta, forward dataset_id/config_hash onto the job, and add an
optional execution mode argument validated against the harness contract.

Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
Add a Local/Batch/Service execution-mode selector that maps to the harness
--mode flag, populated from /api/harness-info. Batch mode was previously
unreachable from the UI even though the harness requires it for large BEIR
corpora. Service pipeline is now an execution mode rather than a pipeline type;
graph pipelines are disabled in service mode.

Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
Update the dataset form input types to the harness-supported set
(auto/pdf/doc/txt/html/image/audio/video); the old 'text' value was invalid and
doc/html/video/auto were missing. Add the pdf_page_modality BEIR doc-id field
and default new datasets to pdf_page to match the current DatasetSpec. Replace
references to the removed 'retriever harness runner start' and
'retriever harness backfill' commands with current guidance.

Co-authored-by: Jeremy Dyer <jdye64@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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.

2 participants