Skip to content

Add Munder Difflin benchmark dashboard - #504

Open
saikiran6775 wants to merge 3 commits into
chaitanyagiri:mainfrom
saikiran6775:benchmark-dashboard
Open

Add Munder Difflin benchmark dashboard#504
saikiran6775 wants to merge 3 commits into
chaitanyagiri:mainfrom
saikiran6775:benchmark-dashboard

Conversation

@saikiran6775

Copy link
Copy Markdown

Summary

Adds a standalone in-repo benchmark dashboard for Munder Difflin — a Vite + React + TypeScript SPA under benchmark-dashboard/ that reads the hive run artifacts (log.jsonl, cost-ledger.jsonl, tasks.json, registry.json, fleet.json) from HIVE_ROOT and visualizes them. The Electron app is untouched (no changes to src/main, src/preload, or the renderer).

What's included

  • Four panels (Recharts):
    • Scores — task-completion rate from tasks.json (labeled as such, not an accuracy score; reads results.jsonl if present).
    • Cost & Latency — USD + token totals from cost-ledger.jsonl, plus an avg/median coordination-latency proxy (message→session ts deltas), clearly labeled as a proxy (not model TTFT).
    • Model Compare — per-model cost/token breakdown.
    • Trend — cost/tokens across successive runs, segmented by app-start events.
  • Read-only Vite dev-server middleware exposing /api/* for the hive files; HIVE_ROOT override in the top bar.
  • Root package.json scripts: dashboard:dev, dashboard:build.
  • benchmark-dashboard/README.md.

Security

The data middleware was reviewed and hardened against path traversal (commit c4f6872b): endpoint→filename is a fixed whitelist, paths are canonicalized with fs.realpathSync and containment-checked against the resolved HIVE_ROOT, and error bodies are generic (no path disclosure).

Validation

  • npm run dashboard:build (tsc + vite) passes clean.
  • Independently QA'd: all four panels render live data; HIVE_ROOT override works; empty/error states handled; run segmentation correct; traversal/absolute-path/symlink-escape/bogus-endpoint attempts all blocked with generic errors.

Run

npm run dashboard:dev

Defaults HIVE_ROOT to the local hive path; overridable in the top bar.

🤖 Generated with Claude Code

- Implement standalone Vite+React dashboard
- Load data from HIVE_ROOT via Vite middleware plugin
- Add Recharts for Cost/Latency/Model visualizations
- Build metrics panels per Architect's plan
- Enforce strict filename mapping for allowed endpoints.
- Canonicalize paths using fs.realpathSync to prevent directory escape.
- Suppress sensitive file paths in error responses.

Signed-off-by: engineer-mtul38ix
@github-actions

Copy link
Copy Markdown
Contributor

🚫 This PR is missing its before/after evidence

Every pull request here has to show its work. Screenshots or a short screen recording, before the change and after it.

  • Before — no image or video under that heading
  • After — no image or video under that heading

How to fix it: edit the description, keep the ### Before and ### After headings from the template, and drag an image or video under each. GitHub uploads it inline. This check re-runs the moment you save.

A bug fix with no visible surface still needs it: show the failing behaviour, then the same steps passing. A terminal recording is fine.

Genuinely nothing to show — a CI tweak, a typo, a dependency bump? A maintainer can apply the no-visual-change label. Please don't ask unless it truly has no observable effect.

📖 CONTRIBUTING.md → Evidence is mandatory

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