Execute shared exact dashboard readouts from the selected workload DAG - #516
Merged
Merged
Conversation
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.
Why
Complete the backend-local SUM/COUNT dashboard execution slice without a second semantic optimizer. Stacked on #515; upstream dependency: ProjectASAP/ASAPPlanner#356.
Before this PR
Nested SUM/count-over-time expressions and division fell back. SUM state discarded its observation count, preventing shared SUM/COUNT readouts.
After this PR
A registered SUM, observation COUNT, and sample-weighted mean share one raw producer. QueryPlan preserves exact reductions and default-match arithmetic from the selected post-ASAP DAG. Unknown legacy counts, unsupported expressions and incomplete windows fail closed. Distributed observation-count readouts remain explicitly unavailable until Collector conformance is demonstrated.
Verification
644 control-plane library tests; exact dashboard production-process test and existing compatibility matrix pass. The dashboard test checks uneven per-instance counts, two services, labels/timestamps, duplicate Remote Write ingestion, range steps and unaligned-window fallback. New unit tests cover count merging, scalar orientation, missing/ambiguous matches and zero denominators. A failing-then-passing regression also verifies fallback for non-additive entity reduction, different operand grouping/windows, shifted selectors and unsupported instant/temporal combinations. No independent review or automatic merge.
Scope
Native SUM/count accumulator packing is a physical implementation of Planner-selected operations, not a new semantic fusion rule. Workload cost comparison and distributed runtime acceptance remain separate migration gates.