Repository navigation
feat(gos): split Discipline B — retire alerting, decouple sample_p from countdown - #385
Merged
zzylol merged 1 commit intoJul 17, 2026
Conversation
…om countdown Discipline B's global-threshold alerting (Monitor::rebroadcast's CMY slack-countdown -> Action::Alert -> the control-plane violation sink) retires per ASAPCollector/docs/design-gos-unified-edge-telemetry.md §11: "Alerting and any other query-time decision is made entirely at the backend against [the reconstructed sketch state]; the edge no longer makes alerting decisions itself." A collector/edge must never be the thing that fires an alert. The whole-sketch ε-floor sampling law (p_i = 1/(1+ε²·rate_i)) was ALWAYS a pure per-edge function with no cross-edge coordination or global-estimate dependency, so decoupling it from the retired countdown is a genuine simplification, not a workaround: - Monitor drops known_value/departed_mass/alerted/tau/slack/gap entirely — just tracks each edge's last-reported rate. - on_report answers ONLY the reporting edge with a freshly computed grant (no more re-broadcast to every registered edge on every report — that fan-out existed only because slack sizing depended on the full edge set). - The retired "<2 edges => p=1" special case (needed only for the alert-fire safety proof under sampling noise) is gone: a lone high-rate edge is now sampled exactly like it would be in a larger edge set. Removes alert.rs (AlertSink/global_threshold_violation) and the now-dead ViolationKind::GlobalThresholdCrossed. MonitorConfig.tau / Grant.LocalSlack stay on the wire (vestigial) for compatibility with the Go edge side, which still sends them. Companion PR: ASAPCollector split/pr-retire-discipline-b-alerting — the edge side. Engine.Observe now reports its rate on its own periodic cadence (ReportEveryN observations), decoupled from any value/slack threshold. 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. 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 10, 2026
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.
Coordinator-side counterpart to ASAPCollector PR #532 (
split/pr-retire-discipline-b-alerting).Discipline B's global-threshold alerting (
Monitor::rebroadcast's CMY slack-countdown →Action::Alert→ the control-plane violation sink) retires perASAPCollector/docs/design-gos-unified-edge-telemetry.md§11: "Alerting and any other query-time decision is made entirely at the backend against [the reconstructed sketch state]; the edge no longer makes alerting decisions itself." A collector/edge must never be the thing that fires an alert.The whole-sketch ε-floor sampling law (
p_i = 1/(1+ε²·rate_i)) was always a pure per-edge function with no cross-edge coordination or global-estimate dependency, so decoupling it from the retired countdown is a genuine simplification, not a workaround:Monitordropsknown_value/departed_mass/alerted/tau/slack/gapentirely — just tracks each edge's last-reported rate.on_reportanswers ONLY the reporting edge with a freshly computed grant (no more re-broadcast to every registered edge on every report — that fan-out existed only because slack sizing depended on the full edge set).Removes
alert.rs(AlertSink/global_threshold_violation) and the now-deadViolationKind::GlobalThresholdCrossed.MonitorConfig.tau/Grant.LocalSlackstay on the wire (vestigial) for compatibility with the Go edge side, which still sends them.Companion PR: ASAPCollector #532 — the edge side.
Engine.Observenow reports its rate on its own periodic cadence (ReportEveryNobservations), decoupled from any value/slack threshold.Verified with a real cross-language run (Go
e2edriver↔ Rustmonitor_coordinator_harnessover live gRPC): the coordinator answers the edge's periodic rate report with a genuine computedsample_pgrant.Test plan
data_plane::monitor::coordinatorunit tests rewritten for the simplified per-edge model (registration grants nothing, report grants only the reporting edge, single-edge sampling, epoch reset, etc.)data_plane/tests/monitor_grpc.rsrewritten: dropped the two alert-firing tests, kept/added real gRPC round-trip tests for single-edge sampling, differentiated sample_p across edges, and report-scoped-to-reporter.monitor_coordinator_harnessto poll for a real coordinated-sampling grant instead of waiting for a retired alert; updateddeploy/mvp-multinode/scripts/monitor_e2e.shaccordingly.MONITOR_GRANT edge=e2e-edge agg_id=1 sample_p=0.9975....cargo build/cargo test -p data_planeclean.cargo test -p control_planehas one pre-existing unrelated failure (Durationnot in scope inoptimizer/cost/mod.rs) present on the base branch before this change — not touched here.🤖 Generated with Claude Code