feat(gos): split Discipline B — retire alerting, keep rate reporting (edge side) - #532
Merged
Merged
Conversation
…(edge side) Discipline B's global-threshold alerting (Engine.Observe's value-baseline>= slack trigger -> sendReportLocked) retires per design-gos-unified-edge- telemetry.md §11: "the edge no longer makes alerting decisions itself." This edge never decides to fire an alert. obsCount/rate-tracking (feeding the coordinator's SampleP grant negotiation) is a genuinely separate concern and is preserved, but no longer piggybacks on the alerting trigger: Engine.Observe now reports on its own periodic cadence (ReportEveryN observations, decoupled from any value/slack threshold) instead of gating on a coordinator-granted slack budget. Removed the now-dead roundBaseline/grantedSlack state; Grant.LocalSlack/Spec.Tau stay on the wire (vestigial) for compatibility with the coordinator side. Companion to the ASAPQuery-backend coordinator-side split (data_plane::monitor retires Action::Alert and the CMY slack-countdown entirely, answering each report with a per-edge coordinated-sampling grant computed straight from that edge's own rate). Verified with a real cross-language run (Go e2edriver <-> Rust monitor_coordinator_harness over live gRPC): the coordinator answers the edge's periodic rate report with a genuine computed sample_p grant. Part of the GOS per-family stack (base: split/pr-retire-cms-point-query / #531). 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Jul 17, 2026
…dOccurrence ingest.go: decode the 3 reserved wire attributes an SDK running AggregationRowSampledSketch stamps on an individually-admitted raw occurrence (admitted-rows bitmask, row count, sample_p), strip them before building series identity, and skip cold-archiving a row-sampled point (it's a raw occurrence, not an aggregate sample). warm_sketch.go: observe() takes rowSampled/admittedRows/sampleP and, when set, tags the ObservationValue so CMS/CountSketch route through Sketch.ApplyAdmittedOccurrence (the SDK's admission decision applied verbatim) instead of the plain insert path. Families with no *AtRows sketchlib primitive (DDSketch/KLL/HLL) drop rather than silently misapply an unrelated observer — this can only happen if the SDK's AggregationRouter and this collector's AggID disagreed about which family a PolicyFingerprint targets. Built fresh against current main's warm_sketch.go/ingest.go (not merged wholesale from feat/gos-unified-monitoring, which independently regressed the insert-time GOS wake/anisotropic-threshold work already merged here via #524-#532) — only the row-sampled-specific decode/ route logic was ported; the isotropic GOS priming, wakeCh wiring, and sub-window trigger logic already on main are unchanged. Extracted from #518 (stale base); depends on PR-A's aggID/config plumbing (split/pr-aggid-policyfingerprint) — based on that branch. 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.
Part of the GOS per-family stack (base: #531
split/pr-retire-cms-point-query).Discipline B's global-threshold alerting (
Engine.Observe'svalue-baseline>=slacktrigger →sendReportLocked) retires perdesign-gos-unified-edge-telemetry.md§11: "the edge no longer makes alerting decisions itself." This edge never decides to fire an alert.obsCount/rate-tracking (feeding the coordinator'sSamplePgrant negotiation) is a genuinely separate concern and is preserved, but no longer piggybacks on the alerting trigger:Engine.Observenow reports on its own periodic cadence (monitor.ReportEveryNobservations, decoupled from any value/slack threshold) instead of gating on a coordinator-granted slack budget. Removed the now-deadroundBaseline/grantedSlackstate;Grant.LocalSlack/Spec.Taustay on the wire (vestigial) for compatibility with the coordinator side.Companion PR: ASAPQuery-backend#split/pr-retire-discipline-b-alerting — the coordinator-side split.
data_plane::monitorretiresAction::Alertand the whole CMY slack-countdown state machine entirely, answering each report with a per-edge coordinated-sampling grant computed straight from that edge's own reported rate (no more re-broadcast to every registered edge — the ε-floor sampling law was always a pure per-edge function). Also removes the now-deadViolationKind::GlobalThresholdCrossed.Verified with a real cross-language run (Go
e2edriver↔ Rustmonitor_coordinator_harnessover live gRPC, both repos' worktrees): the coordinator answers the edge's periodic rate report with a genuine computedsample_pgrant.Test plan
asap-precompute-go/monitor: rewroteengine_test.gofor the new report-cadence model (first-observation report,ReportEveryNcadence, Poll forces an immediate report, per-key independence).monitor_linear_e2e_test.go: updated the LinearBuckets/Sum e2e tests to drive the new cadence instead of slack-crossing.deploy/mvp-multinode/scripts/monitor_e2e.sh+ manual verification against the matching worktree pair):MONITOR_GRANT edge=e2e-edge agg_id=1 sample_p=0.9975...observed over a live gRPC stream.asap-precompute-go.🤖 Generated with Claude Code