Skip to content

enhancement(ground-truth): add parallel test runner#1358

Closed
thieman wants to merge 3 commits intomainfrom
thieman/ground-truth-parallel-runner
Closed

enhancement(ground-truth): add parallel test runner#1358
thieman wants to merge 3 commits intomainfrom
thieman/ground-truth-parallel-runner

Conversation

@thieman
Copy link
Copy Markdown
Contributor

@thieman thieman commented Apr 13, 2026

Summary

  • Replaces all individual sequential Makefile targets with a single test-correctness target that discovers and runs all correctness test cases in parallel
  • Adds run-all subcommand to ground-truth that mirrors how panoramic manages integration tests: uses stream::iter + buffer_unordered for semaphore-free concurrency limiting, with a default parallelism of 4
  • Adds run subcommand to ground-truth for single test case invocation (replaces old bare positional arg); updates GitLab CI jobs accordingly
  • New test cases are automatically picked up without any Makefile or CI changes

Details

ground-truth previously took a single config file path as a positional argument. It now has two subcommands:

  • run <config.yaml> — runs a single test case (existing behavior, used by GitLab CI jobs)
  • run-all -d <dir> [-p <parallelism>] — discovers all config.yaml files in subdirectories and runs them in parallel (default parallelism: 4)

The Makefile gains:

  • make test-correctness — runs the full suite via run-all (parallelism overridable with GROUND_TRUTH_PARALLELISM=N)
  • make test-correctness-case CASE=<name> — escape hatch for a single named case

Motivated by tobz's note in #1344.

Test plan

  • cargo build --package ground-truth compiles cleanly
  • make test-correctness runs all cases in parallel
  • make test-correctness GROUND_TRUTH_PARALLELISM=8 overrides parallelism
  • make test-correctness-case CASE=dsd-plain runs a single case
  • Adding a new test case directory is auto-discovered without Makefile/CI changes

🤖 Generated with Claude Code

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 13, 2026

Binary Size Analysis (Agent Data Plane)

Target: 644871f (baseline) vs cde8485 (comparison) diff
Analysis Type: Stripped binaries (debug symbols excluded)
Baseline Size: 26.60 MiB
Comparison Size: 26.60 MiB
Size Change: +0 B (+0.00%)
Pass/Fail Threshold: +5%
Result: PASSED ✅

Changes by Module

Module File Size Symbols

Detailed Symbol Changes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 13, 2026

Regression Detector (Agent Data Plane)

Regression Detector Results

Run ID: c0eff7b9-8d65-435f-9715-61910be36b11

Baseline: 644871f
Comparison: cde8485
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
otlp_ingest_logs_5mb_throughput ingress throughput +0.01 [-0.12, +0.13] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -1.94 [-6.74, +2.86] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_memory memory utilization -5.04 [-5.48, -4.60] 1 (metrics) (profiles) (logs)

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
otlp_ingest_traces_5mb_cpu % cpu utilization +1.76 [-0.47, +3.99] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_cpu % cpu utilization +0.79 [-56.68, +58.27] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_memory memory utilization +0.58 [+0.24, +0.92] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_throughput ingress throughput +0.57 [+0.44, +0.70] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_cpu % cpu utilization +0.51 [-1.85, +2.86] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_memory memory utilization +0.42 [+0.17, +0.66] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_cpu % cpu utilization +0.37 [-1.13, +1.86] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_heavy memory utilization +0.26 [+0.12, +0.39] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_cpu % cpu utilization +0.26 [-5.50, +6.02] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_memory memory utilization +0.13 [-0.04, +0.29] 1 (metrics) (profiles) (logs)
dsd_uds_500mb_3k_contexts_memory memory utilization +0.12 [-0.05, +0.29] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_memory memory utilization +0.09 [-0.08, +0.26] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_throughput ingress throughput +0.01 [-0.04, +0.05] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_throughput ingress throughput +0.01 [-0.12, +0.13] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_memory memory utilization +0.01 [-0.24, +0.26] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_throughput ingress throughput +0.00 [-0.05, +0.06] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_filtering_5mb_throughput ingress throughput -0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_5mb_throughput ingress throughput -0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_throughput ingress throughput -0.00 [-0.02, +0.02] 1 (metrics) (profiles) (logs)
dsd_uds_512kb_3k_contexts_throughput ingress throughput -0.00 [-0.06, +0.05] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_throughput ingress throughput -0.01 [-0.13, +0.12] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_throughput ingress throughput -0.01 [-0.15, +0.14] 1 (metrics) (profiles) (logs)
dsd_uds_1mb_3k_contexts_cpu % cpu utilization -0.01 [-53.22, +53.20] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory utilization -0.02 [-0.14, +0.11] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory utilization -0.06 [-0.25, +0.13] 1 (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory utilization -0.06 [-0.25, +0.12] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_memory memory utilization -0.07 [-0.25, +0.11] 1 (metrics) (profiles) (logs)
quality_gates_rss_idle memory utilization -0.15 [-0.18, -0.12] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_memory memory utilization -0.40 [-0.58, -0.22] 1 (metrics) (profiles) (logs)
dsd_uds_100mb_3k_contexts_cpu % cpu utilization -1.00 [-7.43, +5.42] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_cpu % cpu utilization -1.94 [-6.74, +2.86] 1 (metrics) (profiles) (logs)
dsd_uds_10mb_3k_contexts_cpu % cpu utilization -3.08 [-33.70, +27.54] 1 (metrics) (profiles) (logs)
otlp_ingest_traces_ottl_transform_5mb_cpu % cpu utilization -3.72 [-5.89, -1.54] 1 (metrics) (profiles) (logs)
otlp_ingest_metrics_5mb_memory memory utilization -4.40 [-4.60, -4.20] 1 (metrics) (profiles) (logs)
otlp_ingest_logs_5mb_memory memory utilization -5.04 [-5.48, -4.60] 1 (metrics) (profiles) (logs)

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed observed_value links
quality_gates_rss_dsd_heavy memory_usage 10/10 113.74MiB ≤ 140MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_low memory_usage 10/10 34.61MiB ≤ 50MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_medium memory_usage 10/10 54.42MiB ≤ 75MiB (metrics) (profiles) (logs)
quality_gates_rss_dsd_ultraheavy memory_usage 10/10 171.56MiB ≤ 200MiB (metrics) (profiles) (logs)
quality_gates_rss_idle memory_usage 10/10 21.72MiB ≤ 40MiB (metrics) (profiles) (logs)

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@dd-octo-sts dd-octo-sts Bot added the area/ci CI/CD, automated testing, etc. label Apr 13, 2026
thieman and others added 2 commits April 13, 2026 14:03
Replaces the series of individual per-test-case Makefile targets with a
single `test-correctness` target that uses the new `run-all` subcommand.
`run-all` discovers all `config.yaml` files in the correctness test
directory and runs them in parallel under a semaphore, matching how
`panoramic` manages integration tests. Individual cases can still be run
with `make test-correctness-case CASE=<name>` or by using the `run`
subcommand directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thieman thieman force-pushed the thieman/ground-truth-parallel-runner branch from 9570f93 to 0ae3b97 Compare April 13, 2026 18:04
…ution

Replaces the spawn-all-then-semaphore approach with stream::iter +
buffer_unordered, matching how panoramic limits concurrency. Also bumps
the default parallelism from 2 to 4 to match panoramic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thieman thieman changed the title enhancement(correctness): add parallel test runner to ground-truth enhancement(ground-truth): add parallel test runner Apr 13, 2026
Copy link
Copy Markdown
Member

@tobz tobz left a comment

Choose a reason for hiding this comment

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

I like that this makes things go a little faster, but the output is a bit hard to comb through because it's all interleaved without any identifying information about which log lines belong to which test case, etc.

I do think we really ought to strive to model this more on how panoramic does it, where it's got a nice TUI mode that hides a lot of the details at info level but then has a non-TUI mode for CI. It would also be interesting to explore just merging the two together, so that panoramic runs everything, and we just have two classes of tests it supports (and the ability to add more in the future), etc...

@thieman
Copy link
Copy Markdown
Contributor Author

thieman commented Apr 13, 2026

👍 I'll look more closely at the panoramic model

@thieman
Copy link
Copy Markdown
Contributor Author

thieman commented Apr 13, 2026

[Claude Sonnet 4.6] Closing in favor of a fuller merge of ground-truth into panoramic.

@thieman thieman closed this Apr 13, 2026
@thieman
Copy link
Copy Markdown
Contributor Author

thieman commented Apr 14, 2026

Tackled this here #1379

@tobz tobz deleted the thieman/ground-truth-parallel-runner branch April 17, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD, automated testing, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants