feat: Research Confidence Dashboard & Historical Analytics#3
Open
dobosmarton wants to merge 1 commit intomainfrom
Open
feat: Research Confidence Dashboard & Historical Analytics#3dobosmarton wants to merge 1 commit intomainfrom
dobosmarton wants to merge 1 commit intomainfrom
Conversation
Adds a full analytics layer over historical experiment data:
- verdandi/models/analytics.py — frozen Pydantic models for all
analytics responses (OverviewStats, ProviderAnalytics, ScoreAnalytics,
PipelineAnalytics and supporting detail types)
- verdandi/analytics.py — analytics service using SQL aggregations via
SQLAlchemy 2.0 Core; no Python-side loops over large result sets:
* get_overview: status distribution, GO rate, avg score
* get_provider_analytics: per-source call counts derived from
deep_research search_results JSON + step_error log counts
* get_score_analytics: 5-bucket histogram, daily trend, decision counts
* get_pipeline_analytics: per-step completion counts, throughput
All functions accept optional date_from/date_to YYYY-MM-DD filtering.
- verdandi/api/routes/analytics.py — 4 FastAPI GET endpoints under
/api/v1/analytics/{overview,providers,scores,pipeline} with ?from=&to=
query parameters; router registered in app factory
- verdandi/cli.py — analytics group with overview, providers,
scores, and pipeline subcommands (human-readable tabular output)
- tests/test_analytics.py — 28 service unit tests (in-memory SQLite)
- tests/test_api/test_analytics.py — 25 FastAPI endpoint tests
All 486 tests pass (433 existing + 53 new).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
verdandi/models/analytics.py— frozen Pydantic response models (OverviewStats,ProviderAnalytics,ScoreAnalytics,PipelineAnalytics+ detail types)verdandi/analytics.py— analytics service using SQL aggregations via SQLAlchemy 2.0 Core (no Python loops over large result sets); date range filtering on all four functionsverdandi/api/routes/analytics.py— 4 FastAPI GET endpoints under/api/v1/analytics/{overview,providers,scores,pipeline}with?from=YYYY-MM-DD&to=YYYY-MM-DDsupport; registered in app factoryverdandi/cli.py—verdandi analyticscommand group withoverview,providers,scores, andpipelinesubcommands (human-readable tabular output)tests/test_analytics.py— 28 service unit tests against in-memory SQLitetests/test_api/test_analytics.py— 25 FastAPI endpoint testsAll 486 tests pass (433 pre-existing + 53 new).
API endpoints
/api/v1/analytics/overview/api/v1/analytics/providers/api/v1/analytics/scores/api/v1/analytics/pipelineCLI commands
Test plan
pytest tests/test_analytics.py— 28 service-level unit tests (empty DB, date filters, GO rate, provider source parsing, score buckets, pipeline step counts)pytest tests/test_api/test_analytics.py— 25 API endpoint tests (response shape, populated data, date filters, HTTP 200)pytest tests/— 486 tests pass, 0 failures🤖 Generated with Claude Code