feat(inference): distinguish certified vs legacy measured power with quick filter | 推理图表:区分已认证与旧版实测功耗并新增快捷筛选 - #907
feat(inference): distinguish certified vs legacy measured power with quick filter | 推理图表:区分已认证与旧版实测功耗并新增快捷筛选#907edwingao28 wants to merge 5 commits into
Conversation
…filter | 推理图表:派生实测功耗认证层级并新增快捷筛选
Compute a per-entry power_tier ('certified' | 'legacy') in
rowToAggDataEntry from the producer verdict and whole-deployment energy
semantics, without changing which values render. Add a 'Measured Power'
quick-filter category (Certified/Legacy pills, i_power URL param) wired
through QuickFilters, InferenceContext, the dialog, and GPUGraph.
在 rowToAggDataEntry 中根据生产端验证结论与整体部署能耗语义派生
power_tier(certified/legacy),不改变任何渲染值。新增“实测功耗”
快捷筛选(已认证/旧版,URL 参数 i_power)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… axes | 推理图表:在实测能耗坐标轴上标记旧版功耗数据点 On the nine Measured Energy y-axes, draw a dotted ring around points whose telemetry lacks a producer validation verdict (official and overlay render paths), show a localized footer legend key when such points are on screen, state the tier in all three tooltip generators (EN/ZH), and append a tier note to the measured axis explanations. 在九个实测能耗 Y 轴上,为缺少生产端验证结论的数据点绘制虚线圆环 (官方与叠加渲染路径),当此类点可见时在图表底部显示本地化图例, 在三种工具提示中标注认证层级(中英文),并在实测指标说明中补充 层级说明。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…and tooltips | 测试:覆盖实测功耗层级派生、筛选、圆环与工具提示 Table-driven resolvePowerTier cases, tier derivation through rowToAggDataEntry/transformBenchmarkRows, quick-filter matching and availability, measured-energy key classification, decoration rendering per axis, tier tooltip lines (EN/ZH), and the i_power URL default. 覆盖 resolvePowerTier 表驱动用例、转换层层级派生、快捷筛选匹配与 可用性、实测能耗指标判定、按坐标轴的圆环渲染、中英文工具提示层级 行以及 i_power URL 默认值。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…与旧版实测功耗筛选 Deterministic intercepted fixtures (one certified, one legacy config) drive the measured-axis ring, footer legend key, Certified/Legacy quick filter pills, clear-filters reset, and i_power share-link restore. 使用确定性的拦截数据(一个已认证、一个旧版配置)验证实测坐标轴 圆环、底部图例、已认证/旧版快捷筛选、清除筛选以及 i_power 分享 链接恢复。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @edwingao28's task in 5m 24s —— View job Review: certified vs legacy measured power (PR #907)
🟢 LGTM — no blocking issues found. Static review. The tier is derived once in
Runtime (localhost, real DB — DeepSeek V4 Pro, Measured Avg Power axis):
Tests: comprehensive new coverage — Chinese copy: the new strings ( |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3aba294. Configure here.
| setQuickFilterFrameworks, | ||
| setQuickFilterDeployment, | ||
| setQuickFilterSpec, | ||
| setQuickFilterPower, |
There was a problem hiding this comment.
GPU chart missing power rings
Medium Severity
GPU comparison never draws the dotted legacy-power ring. ChartDisplay still shows LegacyPowerLegendKey whenever a Measured Energy axis has power_tier === 'legacy' points, including GPU comparison, so the footer advertises a ring that is not on the chart. Official and overlay scatter paths call renderLegacyPowerRing; GPUGraph only calls renderOffloadHalo.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3aba294. Configure here.
…ick-filter reset | 推理图表:图例快捷筛选计数与重置纳入实测功耗层级 ScatterGraph keeps its own copy of the quick-filter badge count and the legend "Reset filter" handler; both omitted the new power category, so a Certified/Legacy selection was invisible in the legend badge and survived the reset click. Mirror the GPUGraph edit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @edwingao28's task in 2m 50s —— View job Re-review: certified vs legacy measured power (PR #907)
Re-review since the prior LGTM. I focused on the two Cursor Bugbot findings (which were against the older commit Bugbot #1 — ScatterGraph reset omits power filter → ✅ already fixed. Commit Bugbot #2 — GPU chart missing power rings → 🟡 confirmed real (still open). CI: Lint ✅, Unit ✅, Code Quality ✅; E2E in progress at review time. Chinese copy: no new/changed user-visible Chinese strings since the prior review that covered them; nothing further to flag. The rest of the PR (tier derivation in |
| hasOffloadHalo || hasLegacyPowerPoints || isAgenticSequence || hasAtomSeries ? ( | ||
| <> | ||
| {hasOffloadHalo && <OffloadHaloLegendKey />} | ||
| {hasLegacyPowerPoints && <LegacyPowerLegendKey />} |
There was a problem hiding this comment.
🟡 WARNING: GPU comparison advertises a legacy-power ring it never draws.
Why it matters: hasLegacyPowerPoints (886-888) is isMeasuredEnergyConfigKey(selectedYAxisMetric) && footerPoints.some(p => p.power_tier === 'legacy') with no GPU-comparison carve-out, so this LegacyPowerLegendKey renders in comparison mode too. But GPUGraph.tsx's .dot-group.each onRender pass (around lines 907-911) only calls renderOffloadHalo — it never calls renderLegacyPowerRing like the official/overlay scatter paths (ScatterGraph.tsx:2624,3015). Measured-energy y-axes aren't filtered out of the selector in comparison mode, and legacy points dominate ~10:1 per the PR description, so a user comparing GPUs on a Measured Energy axis sees this footer key ("dotted ring = legacy") with no ring on any point. The offload halo doesn't have this problem because GPUGraph does render it in that same pass.
Fix: render the ring in GPUGraph.tsx alongside the halo, gated on the measured-energy axis (mirroring the scatter path) — add to the .dot-group.each callback:
renderLegacyPowerRing(
d3.select(this),
point,
isMeasuredEnergyConfigKey(selectedYAxisMetric),
'var(--foreground)',
);plus the renderLegacyPowerRing / isMeasuredEnergyConfigKey imports. Marking the points matches the intent and the offload halo already drawn there; alternatively gate this key out of GPU comparison. Fix this →
|
Superseded by #934 (branch renamed to feat/measured-power-tiering); identical diff. |


Problem (Gap G2)
The nine "Measured Energy" y-axes plot two telemetry populations as one. The transform deliberately admits legacy rows with no producer verdict (
power_validabsent) alongside rowsaggregate_power.pyexplicitly validated (power_valid=1), with no visual or filterable distinction. In production the legacy population dominates ~10:1 (~1192 no-verdict rows vs ~130 validated), so the flagship measured-power story silently mixes unvalidated historical measurements with certified ones.Tier rule
A per-entry
power_tieris computed once inrowToAggDataEntry(single source of truth:resolvePowerTierinsrc/lib/power-tier.ts) and flows to every rendered point — official, overlay, and GPU-comparison — via the existing entry spread:certified—power_valid === 1and whole-deployment energy semantics hold (!disagg || power_metric_schema_version === 2). Non-disagg rows never had a semantics change on the unprefixed joules fields, so a producer verdict alone certifies them; disagg rows additionally need schema v2 — mirroring the field gating the transform already trusts.legacy— measured telemetry renders but predates the validation contract: no verdict at all, or a disaggpower_valid=1row without schema v2.power_valid=0rows included; the explicit invalid verdict stays authoritative).Zero change to which values render — G2 is distinguish, not exclude. Rows lacking
power_valid(and the future PLAN-06/07 fieldspower_invalid_reasons/power_audit) transform and render unchanged.Surfaces
i_power; identical semantics to the existing categories (empty = no constraint, values OR'd, categories AND'd); pills auto-disable when no matching data exists; wired into every count/clear path (dialog clear, plus the legend "Reset filter" on both the main chart and GPU-comparison graphs).power_tier === 'legacy'points only while a Measured Energy axis is selected (official + overlay render paths), modeled on the KV-offload halo but nested outside it (POINT_SIZE + 7,1 3dasharray) so both can render on one point; localized footer legend key appears only when ringed points are on screen.Default: filter OFF
Legacy rows outnumber certified ~10:1 today; defaulting to certified-only would empty most measured charts and vanish historical data.
i_powerdefaults to''(no constraint) inPARAM_DEFAULTS.Follow-up (post PLAN-06 producer rollout): once single-node strict-v2 rows land at scale, flip the default by pre-seeding
i_power=certified— this must land as a coordinated default change becausePARAM_DEFAULTSstrips values equal to their default from share links (see theDEFAULT_Y_AXIS_METRICcaveat inurl-state.ts).Note: the public API's
powerValid=certifiedfilter (PLAN-04) deliberately keeps the strict all-rows-v2 rule; the UI-vs-API divergence is documented on both sides and intentional.Tests
bun run test:unitfully green (251 files / 4480 tests), including new coverage: table-drivenresolvePowerTier, tier derivation throughrowToAggDataEntry/transformBenchmarkRows, quick-filter matching/availability/parsing,MEASURED_ENERGY_METRIC_CONFIG_KEYSlockstep with the registry, per-axis ring rendering in the ScatterGraph harness, EN/ZH tooltip tier lines, and thei_powerURL default.tsc --noEmit+ oxlint + oxfmt green (lefthook pre-commit on every commit).cypress/e2e/certified-power-filter.cy.tsuses deterministic intercepted fixtures (one certified config, one legacy) to assert the ring, legend key, pills, filtering, clear-filters reset, andi_power=certifiedshare-link restore; registered intimings.json. Verified in CI: E2E chrome shard ran the spec 2/2 passing on this branch (run 33103582116); firefox shards green..env), so the spec'slegacy-power-rings/certified-only-filterscreenshots are not embedded here — reproduce withcd packages/app && ./node_modules/.bin/cypress run --spec cypress/e2e/certified-power-filter.cy.tson a node-equipped machine.Review
Two independent review passes over the implementation:
ScatterGraph.tsx— a third copy of the pattern alongsideQuickFiltersDialogandGPUGraph— omitted the new power category, so a Certified/Legacy selection was invisible in the legend badge and survived the legend reset. Fixed by mirroring the GPUGraph edit (quickFilters.power.lengthin the count,setQuickFilterPower([])in the reset); full unit suite re-run green..env, the e2e workflow uploads no screenshot artifacts, and GitHub's PR-body image upload has no public API — so the visual evidence cannot be attached from this environment. The spec's assertions (per-point.legacy-power-ring, legend-key visibility, pill filtering,i_powerrestore) are machine-verified green in CI; a maintainer with a node-equipped machine can run the spec above and drag the two screenshots into this body.Rollback
Revert this PR. No migrations, no artifact-schema changes;
i_powerin old links degrades to an ignored param.🤖 Generated with Claude Code