Repository navigation
Export the recent two-hour pace beside the conservative burn - #1090
Merged
1 commit merged intoNov 8, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
…1085) Each agent snapshot window gains recentBurn: the pace over only the last two hours, with its own units per hour, observed duration and sample count, null with too few recent readings. burn stays the conservative maximum the panel's warnings and Use next read.
Contributor
Author
|
Ready for the merge train Head: 303d887 |
Contributor
Author
|
Launchplane completed the merge-train step for this pull request.
Launchplane landed this pull request through protected batch PR #1091. Launchplane manages this comment and will update it as the train moves. |
shiny-code-app Bot
added a commit
that referenced
this pull request
Nov 8, 2026
…-05300c16f87fe7c2: merge PR #1090
This was referenced Nov 8, 2026
Contributor
Author
|
Ready for the merge train Head: 303d887 |
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.
Why
The Supervisor steers each account to its reset with a check every 30 minutes. The exported
burnis the higher of the last day's and last six hours' pace, so it kept reading 1.25%/h for two hours after an account stopped. That is right for the panel's "am I safe" warnings, and wrong for "what is the pace now".What changed
recentBurn, a sibling ofburnwith the same shape:{unitsPerHour, observedDurationHours, sampleCount}, or null. It measures only the last two hours.burnis unchanged. Use next, warnings and the pace forecast still read it.burn, it is never a whole-window average.AccountBurnRateEstimator.observedBurnRates(..., recentOnly:)), not a new estimator. It is filled on both the local and the shared-presentation export paths. It uses the same last-day history the reader already loads.burnconstructions now share oneBurn(_:)initializer that drops unmeasured rates.docs/provider-usage-access.md.Verification
swift build: clean.swift test --filter ContextPanelCoreTests: 1359 passed.burn2/h (unchanged) andrecentBurn0/h over 2 hours with 25 samples. With no readings in the last two hours,burnstands andrecentBurnis null. It fails if the recent pass uses the long lookback, if the shared path drops it, or ifburnreads the recent rate (3 mutations, all caught).Removed: the two inline
Burn(unitsPerHour:...)constructions, now one initializer.Net lines: Sources +29, Tests +39, docs +8.
Closes #1085