Skip to content

feat: eval framework for benchmarking debate harness - #5

Merged
diyor28 merged 8 commits into
mainfrom
feat/eval-framework
Feb 13, 2026
Merged

diyor28 merged 8 commits into
mainfrom
feat/eval-framework

Conversation

@diyor28

@diyor28 diyor28 commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Engine.Run() — synchronous programmatic driver that loops through the action-dispatch cycle without TUI dependency
  • Add CachingAPI — content-addressable file-based cache wrapping OpenRouterAPI, making eval re-runs cheap (~$1–3 vs ~$7 full)
  • Add eval CLI (.eval/cmd/eval/) with parallelism, cost limits, caching, and answer extraction
  • Add dataset curation scripts for GSM8K (50), GPQA Diamond (50), MATH Level 5 (40)
  • Add Python scoring script with numeric/letter/sympy matching
  • Add Justfile recipes: eval, eval-nocache, score, eval-curate

Test plan

  • go test ./internal/engine/... — 5 Run() tests pass
  • go test ./internal/openrouter/... — 6 cache tests pass
  • go test ./.eval/cmd/eval/... — 20+ extraction tests pass
  • go test ./... — all existing tests still pass
  • just lint — 0 issues
  • Manual: python .eval/scripts/curate_gsm8k.py → produces dataset JSON
  • Manual: just eval --benchmark gsm8k --question-ids 0 → runs single question
  • Manual: just score .eval/results/<run>.json → scores results

Add programmatic eval pipeline to benchmark the debate engine against
datasets with known answers (GSM8K, GPQA Diamond, MATH Level 5).

Components:
- Engine Run() — synchronous driver that loops through the action-dispatch
  cycle without TUI dependency (internal/engine/run.go)
- CachingAPI — content-addressable file-based cache wrapping OpenRouterAPI,
  making re-runs cheap (~$1-3 vs ~$7 full) (internal/openrouter/cache.go)
- Eval CLI — Cobra entrypoint with parallelism, cost limits, and caching
  (.eval/cmd/eval/)
- Dataset curation scripts — one-time HuggingFace pulls for GSM8K (50),
  GPQA Diamond (50), MATH Level 5 (40) (.eval/scripts/)
- Scoring script — numeric/letter/sympy matching (.eval/scoring/)
- Justfile recipes — eval, eval-nocache, score, eval-curate
@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

Base automatically changed from claude/refactor-architecture-layers-U8mFG to main February 12, 2026 06:03
Use cheap mode automatically for benchmarks to reduce costs, and switch
dataset curation scripts to public HF mirrors (no auth token required).
Regex extraction operated on Round 5 vote responses (YES/NO), not the
actual computed answers. Now ExtractAnswer reads Round 0 research
responses and calls a flash model with JSON schema to extract the
answer. Regex is kept as fallback. Verified on gsm8k Q0: 125 ✓
Major refactoring to reorganize debate engine architecture:
- Remove old internal/debate and internal/engine packages
- Add new debate/ and internal/prompt/ packages for cleaner separation
- Extract provider logic to internal/openrouter/provider.go
- Add session writer utility for output management

Eval framework updates:
- Replace GSM8K dataset with MMLU Pro (50 samples)
- Update extraction and scoring logic
- Improve test coverage and runner implementation

TUI improvements:
- Simplify model.go by consolidating message handling
- Update view rendering for better clarity
- Refresh golden snapshots for sim tests
Rewrote all three docs files to be scannable narratives focused on
understanding the system, not implementation details. flow.md now
walks through every LLM interaction pattern chronologically.
Move eval command from .eval/cmd/eval to cmd/eval to follow Go
convention. Replace three separate benchmark datasets (GPQA, MATH,
MMLU-Pro) with a single curated warroom.json (15 hard questions).
Simplify extraction to type-based routing (multiple-choice vs
open-ended) instead of benchmark-specific prompts.
Run all 6 model calls concurrently in rounds that only depend on
prior-round data (Research, Challenge, Convergence, Synthesis).
Rounds with same-round dependencies (Pitch, Vote) remain sequential.

Adds BatchResult type, parallel dispatch in both sync runner and TUI,
Parallel flag on RoundConfig, and mutex protection for sim test RNG.
@diyor28
diyor28 marked this pull request as ready for review February 13, 2026 22:09
@diyor28
diyor28 merged commit 8f98a2a into main Feb 13, 2026
4 checks passed
@diyor28
diyor28 deleted the feat/eval-framework branch February 13, 2026 22:09
diyor28 pushed a commit that referenced this pull request Feb 15, 2026
Core resilience:
- #1: Add React ErrorBoundary wrapping the app — render errors now show
  a styled fallback with reload button instead of a white screen
- #2: Wire onUpdateDownloaded from preload into useDebate state so the
  renderer can display an update-available banner
- #4: Remove dead submitTopic from useDebate hook and DebatePage
- #5: Add backend crash detection — main process forwards Go exit event
  via IPC, preload exposes onBackendExited, useDebate sets connected=false
  and shows error banner when backend dies
- #8: Fix route param changes being silently ignored — remove stale
  connectedRef guard; useEffect now disconnects previous session and
  reconnects on topic/resume change
- #11: Fix O(n²) activity scan per stream tick — walk backwards and
  break on first match instead of .map + .slice().some() per element
- #19: Add beforeunload handler during active debates to prevent
  accidental window close / data loss

Accessibility:
- #6: Add ARIA attributes across all components — role="alert" on
  ErrorBanner, role="status" + aria-label on GlowDot, role="complementary"
  on ModelRoster, role="progressbar" on progress bars, aria-label on
  textarea and dialog, aria-checked on QuestionStep options
- #12: Add focus management to AskUserOverlay — saves previous focus,
  auto-focuses first interactive element on mount, restores focus on
  unmount, implements keyboard focus trap (Tab/Shift+Tab)
- #14: Surface JSON parse errors in AskUserOverlay — shows visible error
  state with dismiss button instead of silently fabricating a question
- #15: Fix partial answer submission — check raw answers array for
  all-empty instead of checking formatted string against "(no answer)"

UX polish:
- #3: Delete dead LoadingState component (zero imports)
- #7: Lower noise-overlay z-index from 50 to 1 to avoid stacking
  conflict with titlebar drag region
- #9: Add "Open Folder" button to SessionListPage using the existing
  but previously unused openSessionsFolder preload API
- #10: Extract renderTranscriptEvent and roleBadge as pure functions
  outside DebateDashboard component to avoid recreation on every render
- #13: Replace hardcoded Tailwind colors in StatusBadge with theme
  tokens (text-success, text-error, text-warning)
- #16: Add window.confirm() before shutdown to prevent accidental
  cancellation of in-progress debates
- #18: Add refresh() to useSessionList hook, wire refresh button and
  visibilitychange auto-refresh to SessionListPage
- #21: Remove defaultOpen from transcript Collapsibles in
  SessionDetailPage — long transcripts now load collapsed

https://claude.ai/code/session_01QPxpz4R7j4MFwGAqLEkwpb
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