teleo-infrastructure/tests
m3taversal d60b6f8bf2 test(leaderboard): cover all four slicings + AND-prefix regression
Adds tests/test_leaderboard.py — 30 cases against
diagnostics/leaderboard_routes.py. Two reasons:

(1) Zero coverage on an endpoint Argus + Oberon are about to consume
    for the May 5 hackathon UI. Two bugs slipped through this morning
    (404 wiring missing in app.py; AND-prefix SQL syntax error on
    rolling-window). Tests prevent regression.

(2) Tests serve as living documentation for Oberon's frontend
    integration — each test names a contract guarantee
    (test_left_join_handles_missing_contributors_row,
    test_composed_window_kind_domain, test_role_breakdown_present).

Coverage:
  - _parse_window unit tests (10): all_time, Nd, Nh, caps, garbage,
    case-normalization, and explicit no-AND-prefix assertion
  - handle_leaderboard integration (18): every kind value, every
    window family, domain filter, composed filters, limit + has_more,
    invalid-input fallback, role breakdown shape, empty-window shape,
    LEFT JOIN COALESCE for handles missing from contributors
  - 2 contract assertions: LEADERBOARD_PUBLIC_PATHS membership +
    KIND_VALUES set

Run: 30/30 pass on VPS hermes venv (aiohttp 3.13.5, pytest 9.0.2).
Skips clean locally without aiohttp via pytest.importorskip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 15:46:47 +01:00
..
__init__.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
conftest.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
test_activity_classify.py test(diagnostics): activity_endpoint classify_pr_operation suite 2026-04-27 13:39:44 +01:00
test_attribution.py fix(attribution): --diff-filter=A + handle sanity filter + remove legacy fallback 2026-04-24 12:58:55 +01:00
test_contributor.py feat: external contributor pipeline — fork PR handling, attribution, prefix recognition 2026-04-16 18:14:01 +01:00
test_enrichment_dedup.py fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks 2026-03-31 13:18:23 +01:00
test_entity_queue.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_eval_actions.py refactor: Phase 4 — extract eval_actions.py, drop underscore prefixes in eval_parse 2026-04-16 12:57:51 +01:00
test_eval_parse.py refactor: Phase 4 — extract eval_actions.py, drop underscore prefixes in eval_parse 2026-04-16 12:57:51 +01:00
test_eval_pipeline.py fix: add telegram/ and tests/ to deploy pipeline, remove hardcoded API key 2026-04-20 17:15:55 +01:00
test_extraction_prompt.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_feedback.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_leaderboard.py test(leaderboard): cover all four slicings + AND-prefix regression 2026-04-27 15:46:47 +01:00
test_merge.py Replace rebase-retry with cherry-pick merge mechanism 2026-03-31 13:18:26 +01:00
test_post_extract.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
test_pr_state.py refactor: Phase 3 — fix close_pr ghost bug, wire stale_pr, extract eval_parse 2026-04-16 12:40:23 +01:00
test_research_backfill_idempotent.py test(attribution): prove research-backfill replay is idempotent 2026-04-27 12:50:17 +01:00
test_reweave.py feat: consolidate eval pipeline, reweave fixes, enrichment dedup, cherry-pick merge, TG batching 2026-03-31 13:21:59 +01:00
test_reweave_merge.py Phase 6a: extract frontmatter.py from merge.py — pure YAML helpers 2026-04-16 13:16:38 +01:00
test_search.py feat: two-pass retrieval with sort order and graph expansion 2026-03-28 22:34:45 +00:00
test_tg_batching.py fix: TG message batching — group by chat_id + time proximity 2026-03-31 13:19:35 +01:00
test_x_content_pipeline.py Add X content pipeline: output gates + tweet queue + pluggable approval 2026-04-15 17:02:08 +01:00