Repository navigation
Print key-validator details in text mode; fix RunAuction doc and a duplicate floor test case - #96
Merged
Merged
Conversation
…plicate floor test case - key-validator's text output now lists ValidationDetails under a Details: heading, as auction-validator's does, so a failed check shows its reason without --format json. - The RunAuction doc no longer claims AuctionResult carries a full ranking; the type has no ranking field. - TestBidMeetsFloor's "decimal precision edge case - fails" duplicated the 2.4999 input of "very small difference - fails"; it now uses 2.49994, just below the 4-decimal rounding half-step, as the failing counterpart of 2.499999999.
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.
Summary
outputTextprinted the "Validation Results:" header and the boolean summary but neverresult.ValidationDetails, so a failed check in the default text mode showed onlyfalsewith no reason. It now prints aDetails:list after the summary, in the same place and form asauction-validator's text output; JSON mode already includeddetails.TestOutputTextPrintsDetailscaptures stdout and asserts the list, and fails if the loop is removed.RunAuctiondoc no longer mentions a "full ranking".AuctionResulthas no ranking field and never had one; the Returns line now lists winner, runner-up, eligible bids and rejected bids.TestBidMeetsFloorno longer has a duplicate case. "decimal precision edge case - fails" and "very small difference - fails" both used2.4999, 2.5, false. The decimal-precision case now uses2.49994, which is just below the half-step of the 4-decimal rounding and rounds down to2.4999, so it is the failing counterpart of2.499999999(which rounds up to the floor). Unlike2.4999, it fails ifBidMeetsFloorrounds up instead of to nearest.Example text output for an attestation with unknown PCRs, no certificate and a mismatched key:
Notes for reviewers
RunAuctiondoc block, so whichever lands second has a trivial conflict on the Returns line.Pre-merge checklist
go build ./...,go vet ./...)mise run //:lint,mise run //:tidy; CIlintand Ratchet Lint green)mise run //:test; CItestgreen)TestOutputTextPrintsDetailsfails with theDetails:loop removedTestBidMeetsFloorcase fails withRoundreplaced byRoundCeilinBidMeetsFloor, which the previous duplicate did not catchPost-deploy/apply verification
mainfor the merge commit is green, includingupdate-pcrs(Go 37852655284, Docker Build 37852709564 and EIF build 37853130748 all succeeded; Build EIF and Update PCR validation file jobs green; PCR commit 4eacd33)