Skip to content

feat(batch): stratified sample selection (#791) - #815

Open
casoon wants to merge 1 commit into
mainfrom
claude/791-stratified-sample-e4d803
Open

casoon wants to merge 1 commit into
mainfrom
claude/791-stratified-sample-e4d803

Conversation

@casoon

@casoon casoon commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Part of #791 (does not close it).

What

  • --sample-strategy first-n|stratified (default first-n, unchanged behaviour). stratified groups batch URLs by URL structure (language prefix, first path section, non-HTML extension) and draws deterministically round-robin, with --max-pages as total budget; picks inside a stratum are evenly spaced, output keeps input order. Needs a batch input and --max-pages.
  • sample.selection = "stratified" plus sample.strata[] (key, discovered, selected); schema, OUTPUT_CONTRACT, PDF scope text (de/en) and changelog updated. Still only a sample; failed pages stay in summary.coverage.
  • Tests: all strata covered, deterministic, budget respected, within-stratum spread, first-n default unchanged, args validation.

Still open in #791

  • --perf-runs N (repeated performance measurement with min/median/max): touches the canonical and throttled performance passes in the pipeline; not done half-way here.
  • Selection by page type/template beyond URL structure, and critical process states.
  • Fixture-based verification of performance repeats.

Checks: cargo clippy --all-features --all-targets -- -D warnings, cargo test (incl. doctests), cargo check --all-features.

This branch has not been deployed

No deployments
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