feat: AggID = ASAPQuery-backend PolicyFingerprint, not fnv64(metric name) - #538
Merged
Merged
Conversation
…ame) Introduces PolicyFingerprint (byte-for-byte port of policy_fingerprint.rs's PolicyFingerprint::from_config), plus the AggregationIdentity/AggregationRouter SDK-side routing types. Wires warm_sketch.go's aggID() to compute the same content-addressed xxh64 hash the backend derives from its own AggregationConfig, replacing the old fnv64(metric) computation that silently desynced edge and backend identity for the same policy whenever anything besides the metric name (window, grouping labels, spatial filter, sketch params) differed. Adds MetricFamily.SpatialFilter so the edge can include the same normalized spatial predicate the backend hashes. Extracted from #518 (stale base) against current main; sourced from feat/gos-unified-monitoring where this fix is already wired end-to-end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Jul 17, 2026
The temporary /mydata/sketchlib-gos-combined replace target (used to build/test locally against sketchlib-go's still-unmerged GOS PRs) was committed by mistake instead of being reverted to the relative ../../sketchlib-go path main already uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
PolicyFingerprint(byte-for-byte port ofpolicy_fingerprint.rs'sPolicyFingerprint::from_config) plusAggregationIdentity/AggregationRouterSDK-side routing types.warm_sketch.go'saggID()to compute the same content-addressed xxh64 hash the backend independently derives from its ownAggregationConfig, replacing the oldfnv64(metric)computation. AggID used to silently desync between edge and backend for the same policy whenever anything besides the metric name (window, grouping labels, spatial filter, sketch params) differed — CDM and the sketch-DB's materialized-view identity are meant to be one system.MetricFamily.SpatialFilterso the edge can include the same normalized spatial predicate the backend hashes.Context
Split out of #518, whose base (
split/pr2-gos) predates the 6-family GOS redesign and the Discipline B split merged intomainsince. This PR is built fresh against currentmain. The identity fix itself is sourced fromfeat/gos-unified-monitoring, where it's already wired end-to-end and byte-identical for the SDK pieces — #518's own branch defines these types but never actually calls them.First of a 5-PR split (PR-A here; PR-B SDK sampling types, PR-C OTLP wire transport, PR-D collector-side decode, PR-E Rust mirror already open as #537) extracting #518's remaining unmerged scope. #518 will be closed once all land.
Test plan
go build ./... && go vet ./... && go test ./...inasap-precompute-go— passgo vet ./... && go test ./...in the processor (viarestore_all.sh) — pass, including updatedTestControlPlaneAppliesConfig/TestControlPlanePollLoop(now computeAggIDviaaggID(...)instead of the retiredfnv64)🤖 Generated with Claude Code