Skip to content

feat(gos): split Discipline B — retire alerting, keep rate reporting (edge side) - #532

Merged
zzylol merged 1 commit into
mainfrom
split/pr-retire-discipline-b-alerting
Jul 17, 2026
Merged

zzylol merged 1 commit into
mainfrom
split/pr-retire-discipline-b-alerting

Conversation

@zzylol

@zzylol zzylol commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Part of the GOS per-family stack (base: #531 split/pr-retire-cms-point-query).

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 (monitor.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 PR: ASAPQuery-backend#split/pr-retire-discipline-b-alerting — the coordinator-side split. data_plane::monitor retires Action::Alert and 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-dead ViolationKind::GlobalThresholdCrossed.

Verified with a real cross-language run (Go e2edriver ↔ Rust monitor_coordinator_harness over live gRPC, both repos' worktrees): the coordinator answers the edge's periodic rate report with a genuine computed sample_p grant.

Test plan

  • asap-precompute-go/monitor: rewrote engine_test.go for the new report-cadence model (first-observation report, ReportEveryN cadence, 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.
  • Real cross-language e2e (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.
  • build/vet/test clean in asap-precompute-go.

🤖 Generated with Claude Code

…(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
zzylol changed the base branch from split/pr-retire-cms-point-query to main July 17, 2026 15:48
@zzylol
zzylol merged commit 9b67723 into main Jul 17, 2026
@zzylol
zzylol deleted the split/pr-retire-discipline-b-alerting branch July 17, 2026 15:52
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>
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