Wire RecoveryProbeCompleted event (#746) - #879
Closed
ChrisJr404 wants to merge 1 commit into
Closed
Conversation
The event was defined but nothing ever fired it. Emit it from RecoveryProbe#recover so each yellow probe reports its outcome, latency and post-probe metrics, whatever color the probe resolves to. Duration is measured in YellowRunStrategy (it owns the clock) and threaded down; it's nil only when nobody was subscribed at the start of the probe, same as RunCompleted.
Review price tag🟢 103 effective lines — about 12–31 min of focused review (based on 200–500 lines/hour). This is within the range where reviewers find the most issues per line, and small changes usually receive feedback the fastest. Why these numbers?These minutes are what careful defect-finding costs at 200–500 lines/hour — the rate review studies report, not how long a skim takes. "Effective lines" already exclude generated files and lockfiles. Treat the rates and the 200/400 thresholds as guardrails, not laws. |
Author
|
Going to withdraw this one. These |
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.
Wires up
RecoveryProbeCompleted, which was defined back in the telemetry work but never actually emitted, so subscribers can see every yellow probe's outcome without it getting mixed into the generalRunCompletederror-rate stream.It fires from
RecoveryProbe#recover, right after the post-probe metrics snapshot and before the still-yellow early return, so it happens on every probe regardless of which color the probe resolves to. There's no dedup guard because it's a per-probe measurement, not a state transition.record_success/record_failurepass the outcome (:success/:failure), the tracked failure (nil on success), and the same snapshot used for the recovery decision asprogress.Duration is the one thing
RecoveryProbecan't see on its own, soYellowRunStrategymeasures it (it already has clock access from theRunCompletedwork) and threads it down. I typedduration_msasFloat?to matchRunCompleted#duration_ms— it's nil only when nobody was subscribed at probe start, same race. I also extended the clock-capture guard so it measures when the probe event is subscribed, not justRunCompleted; otherwise subscribing to onlyRecoveryProbeCompletedwould always give you a nil duration.Tests: added a
RecoveryProbeCompleted telemetrygroup inrecovery_probe_spec.rbcovering success, tracked failure, that it fires even when the light stays yellow, and that a nil duration passes through. Inyellow_run_strategy_spec.rbI added cases for the measured duration reaching the probe and for the probe-only-subscribed path, and updated the existing expectations for the newduration_ms:argument. RBS updated in lockstep.bundle exec rspecis green (791 examples, 0 failures, with Redis up),steep checkclean,rbs -I sig validateclean,standardrbclean.Closes #746.