test: allow one unit of published precision when re-deriving weights - #56
Merged
Merged
Conversation
The live weight check re-derives each published weight from the published scores and attendance factors and demanded exact equality at six decimals. Those inputs are themselves published rounded to nine decimals, while the producer rounded its own unrounded result, so a re-derived weight can land a hair across a six-decimal boundary. Tolerate one unit of the published precision; a formula or input error is orders of magnitude larger. Signed-off-by: hobbyistz <293619914+hobbyistz@users.noreply.github.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.
The scheduled live gate re-derives each published seat weight from the published liveness score and attendance factor and required exact equality at six decimals. Those inputs are published rounded to nine decimals while the producer rounded its own unrounded result, so a re-derived weight can land a hair across a six-decimal boundary. Today's H100 07:15Z observation did exactly that for one seat: published 0.062529, re-derived 0.0625284999768938.
A scan of 6,992 published seat weights over the last two days across all four SKUs found that single disagreement, at 5e-7. The check now tolerates one unit of the published precision; a formula or input error is orders of magnitude larger and still fails it.
Validation: ruff passes; the test passes locally against the public front for all four SKUs, including the day with the boundary case.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.