chore(test): merge experiment MAX/MIN/AVG property metric tests#66374
Draft
gantoine wants to merge 1 commit into
Draft
chore(test): merge experiment MAX/MIN/AVG property metric tests#66374gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
`test_property_max_metric`, `test_property_min_metric`, and `test_property_avg_metric` were byte-identical except for the aggregation type and the expected sums. Fold them into one `test_property_aggregation_metric` parameterized over both the math type and the existing `use_precomputation` axis (6 cases). Regenerated snapshots: the SQL bodies are unchanged, only the snapshot names move. Each case still runs `@snapshot_clickhouse_queries`, so the per-aggregation SQL coverage is preserved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Reviews (1): Last reviewed commit: "chore(test): merge experiment MAX/MIN/AV..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
test_property_max_metric,test_property_min_metric, andtest_property_avg_metricintest_mean_metric.pywere copy-paste identical — same fixtures, same journeys, same query plumbing — differing only in themathaggregation type and the two expected sums. Each was already parameterized overuse_precomputationand ran@snapshot_clickhouse_queries, so three near-duplicate ClickHouse-backed methods were paying for the same setup three times.Changes
test_property_aggregation_metricparameterized over(name, use_precomputation, math_type, expected_control_sum, expected_test_sum)— 6 cases total (MAX/MIN/AVG × direct/precomputed)..ambrsnapshots.The
use_precomputationaxis is kept (it exercises a genuinely different query path). The regenerated snapshots show only the# name:headers changing — the per-aggregation SQL bodies are byte-identical to before, so no SQL coverage is lost.How did you test this code?
I'm an agent. Ran locally:
First run (before regenerating): 22 passed, the 6 "failures" were purely the renamed snapshots, and every value assertion (
control_variant.sum == expected, etc.) passed — confirming the merge preserves the computed results. After--snapshot-update: 28 passed, 6 snapshots generated, 6 unused deleted. The other 20 snapshots in the file passed byte-identical, confirming the environment matches CI and no unrelated snapshot churn occurred.🤖 Agent context
Autonomy: Fully autonomous
Part of a monorepo test-suite cleanup targeting high CI-wall-time tests. Adversarial check: MAX/MIN/AVG share one query-builder code path differing only by the emitted aggregation function, which the snapshot still pins per case — so collapsing them loses no regression coverage. Tool: Claude Code (Opus 4.8).
Requesting review from: Experiments