Repository navigation
Show what a review run cost in review text output - #1
Open
HarshitSharma14 wants to merge 2 commits into
Open
HarshitSharma14 wants to merge 2 commits into
HarshitSharma14 wants to merge 2 commits into
Conversation
The review API returns each run's charge (cost_microcredits), the share for review work (review_cost_microcredits) and what paid for it (cost_funding) to organization members, but the text output dropped all three. Only --json carried them, so a person on the free review month or a capped plan could not see what a review spent without reading raw JSON, and had nothing to size `scan --budget` against. Review text now prints one line below the review link, for example: Cost: 2.75 credits (review 2.5, walkthrough 0.25); paid by: free review month 2.75 - Amounts are exact decimal credits from integer microcredits, never rounded or converted through floats. - A pending or running review reports its cost "so far". - The walkthrough share appears only when it is positive; parts that paid nothing are left out. - A caller the server hides the cost from, or an older server, gets no line. A cost value the CLI cannot read is treated as absent, so it never fails the review read; --json keeps the API's value unchanged.
The split guard dropped a review share at or above the total, but not one below zero. A negative review_cost_microcredits then printed a negative review cost and a walkthrough cost larger than the total. Show the split only when the review share lies within the total; the total itself still prints.
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.
Review copy of prooflinedev#119, opened in this fork so Proofline can review the change.