Skip to content

fix(inference): let unofficial run overlays win the cross-engine AgentX guard / 修复:让非官方 run 的 overlay 在跨引擎 AgentX 互斥中优先显示#575

Merged
cquil11 merged 2 commits into
masterfrom
fix/unofficial-agentic-overlay-scope
Jul 14, 2026
Merged

fix(inference): let unofficial run overlays win the cross-engine AgentX guard / 修复:让非官方 run 的 overlay 在跨引擎 AgentX 互斥中优先显示#575
cquil11 merged 2 commits into
masterfrom
fix/unofficial-agentic-overlay-scope

Conversation

@cquil11

@cquil11 cquil11 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes ?unofficialrun=<id> overlays never rendering on agentic (AgentX) charts when the run's engine family conflicts with the active official selection — reported for run 29272097721 (benchmark PR SemiAnalysisAI/InferenceX#2153, lmcache/agentix, vLLM).

Root cause

The cross-engine AgentX STP exclusion (#549) resolves engine-family conflicts with a sticky set (resolveExclusionGroups(proposed, prev, …, 'keep-sticky')), and both resolution sites passed the official selection as prev:

  1. ChartDisplayresolvedScopedOverlayHwTypes resolved with officials-first previous, and its reconciliation effect then stripped the run's hw types from the UnofficialRunProvider (setActiveOverlayHwTypes), so the overlay was gone before the chart rendered.
  2. ScatterGraph — the unified official+overlay selection used rawOfficialHwTypes as the sticky set, dropping overlay:* keys at render time.

The run's legend entry is not a toggle, so there was no UI affordance to recover — the loaded run was permanently invisible (its "Points" dialog reported "No visible points for this series under the current filters").

Fix

An unofficial run is loaded to be seen: whenever overlay hw types are in scope, use the run's engine family as the sticky set in both resolution sites, falling back to the official selection otherwise. Consequences:

  • The overlay renders on load; conflicting official series deselect (dim in the legend).
  • Same-family officials can be re-enabled with a normal legend click (fallthrough, verified).
  • Clicking a conflicting dim official still hits the existing block toast explaining engine-specific benchmark implementations (verified).
  • Dismissing the run restores the official selection (mechanism unchanged).
  • With no overlay in scope, behavior is byte-identical to before (officials-sticky).

Tests

  • exclusion.test.ts: extended the sticky-resolution unit test to cover both official-sticky and overlay-sticky prev (documents the new caller contract).
  • scatter-graph.cy.tsx component specs:
    • flipped the fix(inference): block cross-engine AgentX STP comparisons / 阻止 AgentX STP 跨引擎对比 #549 guard test — the cross-engine overlay roofline now renders and the conflicting official hides (opacity: 0), with no reconciliation write-back;
    • new same-engine-family test — official and overlay both render;
    • new ChartDisplay table-mode test — the overlay row survives, the conflicting official row drops, and setActiveOverlayHwTypes is not called (guards the provider-strip regression).

tsc --noEmit, oxlint, oxfmt, vitest (2568 tests), and the full Cypress component suite (178 tests) all pass locally.

Overlay support

This change is entirely about the ?unofficialrun= overlay path — verified manually against a local dev server with the real run ?unofficialrun=29272097721: the lmcache/agentix vLLM roofline renders on the DeepSeek V4 Pro agentic chart, same-family official re-enable works, conflicting-family click shows the block toast. Will re-verify on the Vercel preview once it builds.

中文说明

修复当非官方 run(?unofficialrun=<id>)的引擎家族与当前官方选择冲突时,agentic(AgentX)图表上 overlay 永远不渲染的问题——由 run 29272097721(基准测试 PR SemiAnalysisAI/InferenceX#2153lmcache/agentix 分支,vLLM)报告。

根因#549 引入的跨引擎 AgentX STP 互斥规则在解析冲突时以官方选择作为粘性集合。ChartDisplay 的同步 effect 会把 run 的硬件类型从 provider 中剥离,ScatterGraph 的统一选择解析也会在渲染时丢弃 overlay:* 键;而 run 的图例项不是开关,用户没有任何方式恢复显示。

修复:只要 overlay 硬件类型在作用域内,两处解析均以 run 的引擎家族作为粘性集合,否则回退到官方选择。overlay 加载后立即渲染;冲突的官方系列被取消选择(图例中变暗),同家族官方配置可通过点击图例恢复,点击冲突家族仍会触发原有的拦截提示;关闭 run 即可恢复官方选择。无 overlay 时行为与之前完全一致。

测试:扩展了 exclusion.test.ts 的粘性解析单元测试;翻转了 #549 的组件测试预期并新增同家族用例;新增 ChartDisplay 表格模式测试,验证 overlay 行保留、冲突官方行剔除、且不会向 provider 写回剥离后的选择。本地 tscoxlintoxfmt、vitest(2568 项)与 Cypress 组件套件(178 项)全部通过,并已用真实 run ?unofficialrun=29272097721 在本地手动验证。

🤖 Generated with Claude Code


Note

Medium Risk
Changes legend/comparison selection and provider sync on agentic charts with unofficial overlays; behavior is unchanged when no overlay is in scope, but cross-engine conflicts now prefer overlays over officials.

Overview
Fixes unofficial run overlays never showing on agentic charts when the loaded run’s engine family conflicts with the active official selection (e.g. vLLM overlay vs SGLang official).

ScatterGraph adds exclusionStickySet: if any overlay hw types are in scope, resolveComparisonSelection uses overlay:* keys as the sticky prev instead of the official selection, so the run’s family wins and conflicting officials are deselected (dimmed) rather than dropping the overlay. Reset filter uses the same sticky preference so it does not flip back to officials and hide the run.

ChartDisplay mirrors that logic in resolvedScopedOverlayHwTypes and visibleComparisonRows, preventing the reconciliation effect from calling setActiveOverlayHwTypes to strip overlay keys before render. Table mode follows the same resolution (overlay row kept, conflicting official dropped).

Tests: exclusion.test.ts documents both official-sticky and overlay-sticky prev; Cypress specs flip the cross-engine guard expectation, add same-family coexistence, and guard the provider write-back regression.

Reviewed by Cursor Bugbot for commit 986e355. Bugbot is set up for automated code reviews on this repo. Configure here.

…tX guard

The cross-engine AgentX STP exclusion (#549) resolved conflicts with the
official selection as the sticky set, so an unofficial run loaded via
`?unofficialrun=` whose engine family conflicted with the active official
family was silently deselected — the overlay never rendered, and the run's
legend entry offers no toggle to bring it back. ChartDisplay's reconciliation
effect then stripped the run's hw types from the provider entirely.

An unofficial run is loaded to be seen: make the run's engine family the
sticky set in both resolution sites (ScatterGraph's unified selection and
ChartDisplay's overlay scoping / table rows) whenever overlay hw types are in
scope, falling back to the official selection otherwise. Conflicting official
series deselect instead (restorable by dismissing the run or re-toggling
same-family officials); explicit conflicting adds still hit the block toast.

中文:跨引擎 AgentX STP 互斥规则(#549)在解决冲突时以官方选择作为粘性集合,
导致通过 `?unofficialrun=` 加载的非官方 run 若引擎家族与当前官方家族冲突,
会被静默取消选择——overlay 永远不渲染,且 run 的图例项没有开关可以恢复。
ChartDisplay 的同步 effect 还会把该 run 的硬件类型从 provider 中彻底剥离。
本修复让 run 的引擎家族在两处解析(ScatterGraph 统一选择与 ChartDisplay 的
overlay 作用域/表格行)中优先作为粘性集合;无 overlay 时回退到官方选择。
冲突的官方系列改为被取消选择(可通过关闭 run 或重新点选同家族官方配置恢复),
显式添加冲突配置仍会触发拦截提示。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cquil11
cquil11 requested a review from adibarra as a code owner July 14, 2026 00:00
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment Jul 14, 2026 12:07am

Request Review

@cquil11

cquil11 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Note: the Vercel preview deployment is protected by Vercel Authentication and a share link could not be generated, so the ?unofficialrun=29272097721 verification was done against a local dev server running this exact commit (real read-only DB + real GitHub artifacts): the lmcache/agentix vLLM overlay roofline renders on the DeepSeek V4 Pro agentic chart, same-family official re-enable works via legend click, and clicking a conflicting-family official shows the block toast. / 说明:Vercel 预览部署受 Vercel Authentication 保护、无法生成共享链接,因此 ?unofficialrun=29272097721 的验证是在运行本 commit 的本地 dev server(真实只读数据库 + 真实 GitHub 产物)上完成的:lmcache/agentix 的 vLLM overlay 曲线在 DeepSeek V4 Pro agentic 图表上正常渲染,同引擎家族官方配置可通过图例点击恢复,点击冲突家族官方配置会触发拦截提示。

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2b38d36. Configure here.

Comment thread packages/app/src/components/inference/ui/ChartDisplay.tsx
Address Bugbot review: visibleComparisonRows derived its overlay-preferring
sticky set from the provider's activeOverlayHwTypes, which lags one render
behind after an overlay scope change — the fallback to officials could drop
the overlay row from table mode even though the upstream resolver kept it.
Use the already-resolved overlayKeys (from resolvedScopedOverlayHwTypes)
instead, matching the other resolution site.

中文:响应 Bugbot 审查意见:visibleComparisonRows 原先基于 provider 的
activeOverlayHwTypes 构建 overlay 优先的粘性集合,而该状态在 overlay 作用域
切换后会滞后一次渲染,回退到官方选择时可能把 overlay 行从表格模式中丢弃。
现改用已解析的 overlayKeys(来自 resolvedScopedOverlayHwTypes),与另一处
解析逻辑保持一致。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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