Repository navigation
Conversation
The default benchmark study payload carried values the projection cannot emit: a runtime classification outside BenchmarkRuntimeClassification, a factorial contrast count with an empty contrast list, an in-flight count and arm run totals with no matching running runs, and observation counts for terminal runs that are never pending reconcile. Make the payload self-consistent (cross-checked against a throwaway projection run over the same rows) and pin the invariants with a test that reads the shipped file. Related to loopx-project#5203 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duang777 <duangjl007@gmail.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
打开 Benchmark Study 默认示例并在 Campaign、Arms、Cases 和 Runs 间核对的读者。 默认示例的手写 campaign 汇总和可见运行记录曾相互矛盾。 隔离上传 8 条合成运行、2 条 runtime observations 和 1 条公开洞察后,实际 CLI 的 campaign、matched contrasts、空 factorial 和两条 running 标识相同。桌面首屏实见 6/8、1/2、3、2。 两个文件 +71/-6。改变默认合成示例及其 invariant 测试。显式外部 dashboardUrl 仍走同一个既有解析器。 验证限于合成公开示例、隔离本地存储及 1200×888 本地 Dashboard。未执行实际 benchmark 或远端 CI。 这组跨视图矛盾在基线已存在,且候选新增测试也通过。候选修好了新增测试覆盖的计数条件,完整可生成性仍未达成。
改动思路 / Approach
使用有效的运行分类、补出两条 running 记录、同步 arm 行数,并移去无证据的 factorial contrast。 CLI 的 study dashboard 投影是展示字段的所有者。Web 页面读取并渲染同一个只读 packet。 两个文件 +71/-6。改变默认合成示例及其 invariant 测试。显式外部 dashboardUrl 仍走同一个既有解析器。
具体改动 / Changes
精确提交 13955dac4fd4690a7b043394f95ef8d585884153,基线 811c1a1f66652d3fc3b9830d467e14b45b7423c1。两个文件 +71/-6。改变默认合成示例及其 invariant 测试。显式外部 dashboardUrl 仍走同一个既有解析器。
- STUDY-RUNTIME。隔离上传 8 条合成运行、2 条 runtime observations 和 1 条公开洞察后,实际 CLI 的 campaign、matched contrasts、空 factorial 和两条 running 标识相同。桌面首屏实见 6/8、1/2、3、2。 验收契约
- STUDY-PROJECTION。默认示例 case-api-contract 的 goal_plain 单元选择 run-goal-api,却只有 duration_ms 且 insight=null。同一 packet 的 runs 有 42 steps、120000 tokens 和已脱敏洞察。实际 CLI 从这条 run 生成的 case 单元完整保留两个成本字段和洞察,arm 也计入 42 steps。无输入能让现有 reducer 对同一个选中 run 同时输出示例的这两份结果。 验收契约
关键代码讲解
- 无自定义来源时读取默认 JSON,经原解析器渲染。 BenchmarkStudyPage
- 选中同一 run 后直接把该行 effort 和同一洞察用于 case 单元。 build_benchmark_study_dashboard
- 检查枚举、总数和可数单元,未核对同一 run 跨视图的归属值。 test_shipped_dashboard_example_satisfies_projection_invariants
- 同一 run 的 case 单元缺 42 steps、120000 tokens 和已在 runs 中公开的洞察。 cases[].arms[]
对主干的风险 / Risks
[P2] 默认示例丢失同一选中 run 的成本和洞察。 默认示例 case-api-contract 的 goal_plain 单元选择 run-goal-api,却只有 duration_ms 且 insight=null。同一 packet 的 runs 有 42 steps、120000 tokens 和已脱敏洞察。实际 CLI 从这条 run 生成的 case 单元完整保留两个成本字段和洞察,arm 也计入 42 steps。无输入能让现有 reducer 对同一个选中 run 同时输出示例的这两份结果。 用现有 study-dashboard CLI 从固定公开输入生成示例,或在新增测试中比较同一选中 run 的 case、arm 和 run 消费值。 示例 case 单元 同一 run CLI 投影
Python 投影套件 28 项通过,Dashboard TypeScript contract smoke 和定向预合并 9 项通过。隔离 JSONL 的原生 CLI 读回重现差异。 这组跨视图矛盾在基线已存在,且候选新增测试也通过。候选修好了新增测试覆盖的计数条件,完整可生成性仍未达成。 验证限于合成公开示例、隔离本地存储及 1200×888 本地 Dashboard。未执行实际 benchmark 或远端 CI。
我的整体评价 / Verdict
REQUEST_CHANGES。 请求修改。计数已修复,默认示例的跨视图投影仍存在矛盾。 用现有 study-dashboard CLI 从固定公开输入生成示例,或在新增测试中比较同一选中 run 的 case、arm 和 run 消费值。 浏览器独立核对 1200×888 首屏,Campaign 显示 6/8 个可计分单元、1/2 个完整案例、3 个配对、2 个运行中任务。 验证限于合成公开示例、隔离本地存储及 1200×888 本地 Dashboard。未执行实际 benchmark 或远端 CI。
English verdict: REQUEST_CHANGES at 13955da. The campaign totals now match the native CLI output. The shipped default packet still disagrees with that reducer across views for run-goal-api: the selected case drops the same run’s effort and redacted insight. Regenerate the example or test cross-view parity.
Goal And Delivered Outcome
docs/architecture/rfcs/benchmark-study-upload-dashboard-v0.md), the default-payload defect @karenchuu recorded on 2026-09-28.apps/presentation/dashboard/public/benchmark-study.example.jsonshows values the projection cannot produce: aterminal_qualifiedruntime classification (not aBenchmarkRuntimeClassificationmember),factorial_contrast_count: 1with an emptyfactorial_contrastslist, andin_flight_run_count: 2with no running run (arm run totals summed to 7 against 6 rows).loopx_hintarm shows 1/2 terminal runs. A new test fails on the base file and passes on the head file.mainat811c1a1f6.Author Declaration
Implemented against
docs/architecture/rfcs/benchmark-study-upload-dashboard-v0.md§7 at811c1a1f6, plus the reducer definitions inloopx/capabilities/benchmark_toolkit/study_projection.py.runtime_observation_counttest_shipped_dashboard_example_satisfies_projection_invariantsfactorial_contrast_count/ countable count match the contrast listin_flight_run_count= running runs; armrun_count/terminal/protocol/revision counts match runsbuild_benchmark_study_dashboard; campaign, arms, contrasts and cases match the edited file.terminal_pending_reconcilewas deliberately not used as the replacement key: it means a terminal result awaiting reconcile, which is false for the four already-completed runs.Scope And Continuation
Validation
13955dac4unitpassedtests/capabilities/test_benchmark_study_projection.py: 28 passed; the new test fails on the base JSON (terminal_qualifiedextra key).integrationpassednpm run smoke:benchmark-studyandnpm run smoke:benchmark-study-browserin the dashboard app.staticpassednpx tsc --noEmitin the dashboard app.staticpassedloopx canary premerge --from-git-diff --git-diff-base origin/main: 9/9, 0 failures.manualpassed/benchmarks/studyat 1440px against a local Vite server, below.npm run buildand the repo-wide Python suite were not run (remote Python Tests is red on main for [Bug]: Python test-shards on main exceed the session deadline every run — suite never completes #9567).Frontend / Visual Evidence
13955dac4(local Vite dev server, default example payload): before · after. Only the Runtime Health section and theloopx_hintarm counts differ.Type of Change
LoopX Area
Shared-authority RFC fixture impact
N/A
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).🤖 Generated with Claude Code