Skip to content

feat: AggID = ASAPQuery-backend PolicyFingerprint, not fnv64(metric name) - #538

Merged
zzylol merged 2 commits into
mainfrom
split/pr-aggid-policyfingerprint
Jul 17, 2026
Merged

zzylol merged 2 commits into
mainfrom
split/pr-aggid-policyfingerprint

Conversation

@zzylol

@zzylol zzylol commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds PolicyFingerprint (byte-for-byte port of policy_fingerprint.rs's PolicyFingerprint::from_config) plus AggregationIdentity/AggregationRouter SDK-side routing types.
  • Wires warm_sketch.go's aggID() to compute the same content-addressed xxh64 hash the backend independently derives from its own AggregationConfig, replacing the old fnv64(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.
  • Adds MetricFamily.SpatialFilter so 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 into main since. This PR is built fresh against current main. The identity fix itself is sourced from feat/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 ./... in asap-precompute-go — pass
  • go vet ./... && go test ./... in the processor (via restore_all.sh) — pass, including updated TestControlPlaneAppliesConfig/TestControlPlanePollLoop (now compute AggID via aggID(...) instead of the retired fnv64)

🤖 Generated with Claude Code

…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>
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>
@zzylol
zzylol merged commit 160ad0f into main Jul 17, 2026
@zzylol
zzylol deleted the split/pr-aggid-policyfingerprint branch July 17, 2026 17:59
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