Skip to content

fix(api): compute history aggregates across all matches#95

Merged
KyleTryon merged 3 commits into
mainfrom
codex/fix-history-aggregate-stats
Jun 19, 2026
Merged

fix(api): compute history aggregates across all matches#95
KyleTryon merged 3 commits into
mainfrom
codex/fix-history-aggregate-stats

Conversation

@KyleTryon

Copy link
Copy Markdown
Contributor

Summary

  • execute full-query aggregate statistics for history responses instead of using only the current page
  • compute popular extractors with grouped database results across all matching rows
  • add a pagination regression test that keeps totals stable with limit=1

Validation

  • uv run black app/api/v1/endpoints/history.py tests/test_api/test_history.py
  • uv run ruff check app/api/v1/endpoints/history.py tests/test_api/test_history.py
  • uv run pytest tests/test_api/test_history.py tests/test_api/test_timeline.py tests/test_api/test_stats.py

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.19%. Comparing base (1ec3045) to head (142cae3).
⚠️ Report is 60 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   40.59%   49.19%   +8.60%     
==========================================
  Files         145      139       -6     
  Lines        7119     6860     -259     
  Branches     1206     1075     -131     
==========================================
+ Hits         2890     3375     +485     
+ Misses       4222     3478     -744     
  Partials        7        7              
Flag Coverage Δ *Carryforward flag
backend 65.69% <100.00%> (+8.52%) ⬆️
frontend 31.12% <ø> (+6.78%) ⬆️ Carriedforward from 3130715

*This pull request uses carry forward flags. Click here to find out more.

Components Coverage Δ
Frontend (hermes-app) 31.12% <71.71%> (+6.78%) ⬆️
Backend (hermes-api) 65.69% <90.90%> (+8.52%) ⬆️
Files with missing lines Coverage Δ
...ackages/hermes-api/app/api/v1/endpoints/history.py 77.01% <100.00%> (+59.23%) ⬆️

... and 13 files with indirect coverage changes

@KyleTryon KyleTryon marked this pull request as ready for review June 19, 2026 23:35
@KyleTryon KyleTryon merged commit 8f65950 into main Jun 19, 2026
9 checks passed
@KyleTryon KyleTryon deleted the codex/fix-history-aggregate-stats branch June 19, 2026 23:38
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