Repository navigation
Model routing: cut the experimental page to five essential views - #19014
SivaKesava1 with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Dashboard dead viewsDead element views (0):
|
There was a problem hiding this comment.
🔵 Needs a closer look
Correctness issues remain, and cross-backend rendering and performance validation are incomplete.
3 open issues
What changed in this PR
Simplifies CAO’s experimental Model routing dashboard to five declarative views for assessing routing behavior.
Changes:
- Replaces detailed analytics with health, model picks, cost trends, problems and runs.
- Removes unused queries while preserving scope filters and run drill-downs.
- Updates tests, documentation and generated agent metadata.
| File | Description |
|---|---|
specs/dashboard-data.md |
Documents the five-view evidence contract. |
server/internal/server/model_resolution_sql_test.go |
Retargets PostgreSQL checks to Problems. |
docs/dashboard-data-ingestion.md |
Updates resolution-failure presentation guidance. |
dashboard/site/test/unit/model-routing.test.js |
Tests health, picks, problems and cost sampling. |
dashboard/site/test/unit/model-resolution.test.js |
Updates failure coverage and preserves drill-down checks. |
dashboard/site/test/fixtures/model-routing-contract.json |
Updates expected views and queries. |
dashboard/site/test/e2e/model-routing.spec.js |
Updates responsive, cross-backend browser checks. |
dashboard/site/src/agent/catalog.generated.json |
Refreshes page and query metadata. |
dashboard/site/dashboard-fragments/model-routing.json |
Declares essential views and prunes queries. |
Review effort: Max
| "id": "routing-models", "title": "Models picked over time", "mark": "chart", "chart": "bar", "layout": "half", | ||
| "subject": "Proxy-selected runs by UTC ISO week and picked model.", | ||
| "objective": "Show what the router is choosing.", | ||
| "acceptance": "Only proxy selections with a known model and a recorded run clock count.", | ||
| "description": "Proxy selections only; harness-reported, configured-unrecorded and unrouted runs are not counted.", | ||
| "data": { "source": "routing-weekly-models", "query-context": false }, | ||
| "encoding": { "x": { "field": "week", "type": "ordinal", "title": "UTC ISO week start" }, "y": { "field": "runs", "type": "quantitative", "title": "Runs" }, "color": { "field": "pick-model", "type": "nominal", "title": "Picked model" } }, |
| "data": { "source": "routing-weekly-cost", "query-context": false }, | ||
| "encoding": { "x": { "field": "week", "title": "UTC ISO week start" }, "y": { "field": "median-aic", "type": "quantitative", "title": "Median AIC per complete run", "unit": "aic" }, "color": { "field": "routing-state", "type": "nominal", "title": "Routing state" } }, |
| The Model routing page currently provides five views. Routing health by | ||
| workflow answers whether routing is on and working: per repository and workflow |
|
these changes are bing integrated in another session |
Integrate the reviewed page reduction from #19014 while preserving run-scoped accounting correlation, authored detail bounds and canonical Audit-index execution. Regenerate query catalogs and retarget contracts to health, models, costs, problems and routing runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Optimize slow dashboard pages through declarative shared queries Consolidate the six deployed-data performance workstreams into one reviewed implementation. Share page-bound dependency graphs and campaign declarations; retain scoped canonical reads, evidence quality, authored limits, previews, pagination and reactive lifetimes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Simplify Model routing to five essential views Integrate the reviewed page reduction from #19014 while preserving run-scoped accounting correlation, authored detail bounds and canonical Audit-index execution. Regenerate query catalogs and retarget contracts to health, models, costs, problems and routing runs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Peli de Halleux <4175913+pelikhan@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Superseded by #19015, which consolidates the dashboard performance work and Model routing simplification and is now merged. |

The experimental Model routing page had 24 views and 82 queries, so it was hard to tell whether routing works. This PR cuts it to five views that answer that question, all declared in Dashboard Language. The run page (
routing-run), adapter, canonical/IndexedDB/PostgreSQL schemas, the Routing scope form and the navigation entry are unchanged.Page
model-routingrouting-health(table, locked)routing-healthrouting-models(bar, by pick model)routing-weekly-modelsrouting-cost-trend(line, per routing state)routing-weekly-cost, unchangedrouting-problems(table, locked)routing-problemsrouting-runsHealth: one row per repository and workflow with a routed run (
selected,selection_failed,harness_reported,configured_unrecorded). Columns:selected;failure-count > 0orrouting-degraded. The view says no separate fallback field exists;A zero denominator or missing cost shows as unknown (
quotientreturns null), never 0.Models picked: counts only proxy-
selectedruns that have a known pick model and a recorded clock, per UTC ISO week. Runs without a recorded effort still count.Cost per run:
minimum-sample(null median) are gaps. Bar charts would draw a stub.weekas non-temporal. The models chart usesordinalfor the same reason.Problems: a union of per-run aggregates, giving one row per run and kind:
deviatedwhen none are recorded;Each row joins
routing-runsfor the run link, repository, workflow and time. Order: timed rows newest first, untimed rows last, then run descending.Locked tables: Health and Problems are
locked, because the validator (DLS-E013) allows only one unlocked table per page.Known limitation: the cost view's table mode cannot show sample status and complete-run count without JavaScript. The underlying rows still carry
sample-statusandcomplete-runs.Removals
routing-adoption,routing-decisions,routing-costand all 20 supplemental views.Tests
viewsandqueriesupdated;detail-viewsandstatesunchanged.model-routing.test.js:routing-weekly-costtest pinning both sample states (passes againstmain's query);routing-attributed-accounting;model-resolution.test.js: page-level coverage, status and alias tests replaced by the Problems resolution-failure rows (990000004 before 990000003, no time, removed by the Engine = codex filter). The run-page drill-down tests are kept.model-routing.spec.js):toPass, because the IndexedDB backend re-renders the page (and resets it to chart mode) after data publication.model_resolution_sql_test.go):routing-resolutions,routing-resolution-failure-recordsandrouting-problems;model_unavailablefailure;workflowPathso the Problems row has a workflow.Spec, docs and generated files
specs/dashboard-data.md("Model routing evidence"):docs/dashboard-data-ingestion.md: the sentence about the Model resolution section is updated to match.src/agent/catalog.generated.jsonandqueries.generated.jsonare regenerated.Notes for review
npm run test:e2esuite,npm run test:performance, and the core dashboard document size comparison withmain. Please dispatch Dashboard CI on this branch.npm testhas one failure:tests/unit/landing-page-diagram.test.mjs(5 hero paragraphs, expected 4). This PR doesn't touch the landing page, but I haven't confirmed the test also fails onmain.