Skip to content

test: prune and speed up tests/benchmarks - #361

Merged
lanyue-llk merged 3 commits into
mainfrom
tests/prune-bench
Nov 24, 2026
Merged

lanyue-llk merged 3 commits into
mainfrom
tests/prune-bench

Conversation

@lanyue-llk

Copy link
Copy Markdown
Contributor

Speeds up the tests/benchmarks/ scope: it now runs in a little over half the wall time and about a third less summed test time. No scoring rule, release gate or hash-binding check loses coverage.

flowchart LR
  A[Shipped Web Fetch catalog] -->|validated once| B[test_shipped_catalog_... slow]
  C[Synthetic catalog, stubbed validate] --> D[7 rejection controls]
  E[One module git checkout] --> F[publication tests]
  G[Shipped control registry] -->|run once per control| H[test_declared_acceptance_scenarios]
Loading

Before / after (tests/benchmarks, -n 8 --dist worksteal, same host load)

Before After
Tests 11,967 11,875
Lines 29,073 29,063
Summed durations 168.2 s 107.2 s
Wall time 36.3 s 20.2 s

Changes by reason

Reason Change What still covers it
shrunk test_release_versions: 4 xdist workers each validated the full shipped catalog (11–16 s setup each). It is now validated once in one test, marked slow. Rejection controls (omitted suite, count, reference, scorer, tag, extra suite, corrupt annotation cohort) run against a synthetic registry with stubbed validate. The shipped-catalog test is the release-data check; test_catalog_validation_reuse covers real file-hash rejection on a synthetic catalog
deleted test_current_scoring_controls::test_current_corrections_run... (re-ran all 4,227 controls) test_standalone_evaluation::test_declared_acceptance_scenarios (every active control); check_scoring_regressions behaviour is covered in test_catalog_validation_reuse and tests/test_scoring_regressions.py
deleted test_content_scopes::test_scope_component_controls... (re-ran 10 registry IDs) Same declared-scenario test
deleted test_checkout_entrypoint_precedence::test_complete_cli_help... (4 s subprocess) test_entrypoint_prioritizes_checkout_over_noneditable_wheel probes every script bootstrap
shrunk test_publication: one module-scoped Web Search checkout and release instead of one git repo per test; the version-label and viewer-filter matrices loop in one test Every case is still asserted
shrunk test_publication_blob_integrity: one module git checkout; 15 defect×boundary combinations cut to 7 (every defect through build, and changed through datasets/records; all three boundaries share datasets()) Same
shrunk test_article_literal_boundaries: cases 38/39/40/41/101 cut to 38 (x.com) and 101 (xueqiu), the two post-host families; the article fixture caches the shipped tasks.json instead of re-reading it per test test_article_post_coverage_integration still runs all five cases
shrunk Web Search CLI tests run main() in process; one module-scoped catalog_release(); the reference-correction test is merged into the installed-catalog test Same assertions

Heavy shipped-data validations (outside this scope)

fairness, risk-control, popular-sites, ground-truth and scoring-regressions live under tests/ root, which another lane owns. Note that tests/test_scoring_regressions.py::test_every_registered_false_verdict_control... re-scores every active control in one serial test (~7 s). That is the same work test_declared_acceptance_scenarios already does in parallel, so it could keep only the root-cause pairing check over the registry. tests/conftest.py::validated_catalog and tests/helpers.py::shipped_suite_validations no longer have any users.

Verification

  • pytest tests/benchmarks -n 8: 11,875 passed
  • tests/baselines plus both architecture tests: 35 passed, unchanged
  • make lint-check: passed
  • lexbench-webfetch version: scoring_source_sha256 0fe89317…169e, unchanged
  • No production code changed.

Part of #356

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Review skipped · 3201843

No reviewable content was selected for this run.

@lanyue-llk
lanyue-llk merged commit d53d927 into main Nov 24, 2026
10 checks passed
@lanyue-llk
lanyue-llk deleted the tests/prune-bench branch November 24, 2026 11:32
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