Repository navigation
fix(execution): hand a run from the builder its provider's record - #332
pierreleca wants to merge 2 commits into
Conversation
A run started from the builder reads no saved settings (--from-run). It lost the record Settings holds for a preset provider (OPENROUTER: a name, a base and endpoints by protocol). An agent that speaks a protocol the record adds passed the builder's check, and the run then refused it. The launcher now exports the record of the run's preset provider when it validates, written again as the JSON that was checked, and run_env keeps that record alone. A record never holds a key: record_problem refuses one.
… exported A host's shell may hold provider records of its own. A standard run there reads no saved settings, and a record left in that shell would be read as the one the builder checked, or as one when the builder sent none. The launcher now unsets every preset provider's record before it exports the run's own.
cb1c53e to
839eba9
Compare
Closes #383 ## What Official providers now use only their fixed protocol endpoints. Previously, Settings offered editable extra protocols on preset cards; the builder could accept those additions while a launched run discarded them (#331, #332). Preset cards now show only supported endpoints, read-only. Saved and environment overrides cannot extend presets, and saving an override is rejected with a direction to use Custom. Custom retains all six editable protocol fields. Tests cover saving its endpoints, selecting judge protocols and URLs, and handing its named base and key to a run. This replaces the need for preset-record forwarding in #332; that PR should be updated and its original problem rechecked after this lands. ## Touches Backend provider registry and settings validation; Settings route; backend and route tests; provider documentation and generated settings example; UI evidence. ## Before and after OpenRouter card at the same 1280px viewport. Custom continues to expose all six editable protocol fields. | Before | After | | --- | --- | |  |  | ## Verified - Route suite after merging current main: 658 tests in 68 modules pass. - Backend suite after merging current main: 2,855 tests in 173 modules; one OSWorld2 proxy timing failure under parallel load. Its full 36-test module passes on isolated rerun; no code in that module was changed. GitHub tests and PR judge both passed on db69d14. - Focused Settings/provider registry tests: 35 pass, including rejection and reporting of existing saved preset overrides. - Browser checks: OpenRouter and Custom cards at 390px and 1280px, light and dark; no page JavaScript errors or horizontal overflow. Expanded cards visually reviewed. - `git diff --check` passes. - Not verified: paid provider calls or a remote-host benchmark run. ## Risk Existing user-added preset endpoints stop affecting protocol selection. Users requiring those endpoints must create a Custom provider. Their stored settings are retained and reported as unsupported. Revert restores the old behavior. Custom endpoint fields configure provider tests and judges; run relays continue forwarding agent paths below the base URL rather than rewriting them from those fields. That existing limitation is now documented. No preset configuration or secret is newly forwarded to a run.
|
#384 has merged into main as 9615496, after both CI checks passed. Official providers now use only their fixed endpoints. Settings exposes additional protocol fields only for Custom; saved or environment preset overrides no longer extend the preset's supported protocols. This removes the preset-extension case behind #331 rather than forwarding its record into a run. Please update this PR against current main and recheck whether the original builder/run mismatch still persists. If it does, please include the smallest reproducer using a supported preset configuration or a Custom provider, and narrow this PR to the remaining problem. Custom endpoint saving, judge endpoint selection, and launch base/key handoff were checked in #384. Custom run relays still forward the agent's paths beneath the base URL; endpoint fields do not rewrite those paths. That existing limitation is documented and should be distinguished from the original preset-record issue. |
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.
|
Rechecked on main at ee8b644. A test compared the builder's provider check with that of the run it launches, under the same saved settings. They now agree: an OpenRouter record adding |
Closes #331
What
A run started from the builder reads no saved settings (
--from-run). It lost the record Settings holds for a preset provider (OPENROUTER: a name, a base and endpoints by protocol). An agent that speaks a protocol the record adds passed the builder's check. The run then refused it with "OpenRouter does not serve what the agent speaks". The launcher now exports the record of the run's preset provider when it validates, written again as the JSON that was checked, andrun_envkeeps that record alone. On a host, the launcher first unsets every preset provider's record the host's shell holds, then exports the one the builder checked.Touches
backend · the standard · docs and site
Verified
mainpasses; both failtest_settingsalone (no.env.examplein the copy).run_envkeeps the provider's record alone.field_contract.py --writeandcatalogue_docs.py --writechange nothing;git diff --checkis clean; the judge's own checks pass offline.Risk
A record never holds a key:
providers.record_problemrefuses one with akeymember for a preset. If the export were wrong, a run from the builder would serve other protocols than Settings names. Reverting the two commits restores the earlier launch line.