Repository navigation
The review session API returns the checks the review ran, its model cost, and whether it goes on in parts - #965
Merged
Conversation
…ost, and whether it goes on in parts A review's session page could say what was decided but not what was verified or what it cost. The verification run existed only as markdown in the review body, and per-review spend wasn't kept anywhere. - common::review_session keeps the verification run as data (one row per command: passed, failed, couldnt_run or skipped, with a reason), the model cost in whole millionths of a dollar, and goes_on for a session that read one part of a large pull request. - common::usage gains a SpendTally task-local; every model call adds to it, whatever allowance it runs under. - The review dispatch runs each job under the tally. The worker records the run (or "off" when checks are turned off), adds the job's spend before its session closes, and marks a part that goes on. - GET /api/reviewer/session returns verification, cost_usd and goes_on; older sessions return null, null and false. openapi.json regenerated.
Contributor
|
💚 Post-merge health check passed: the deploy of
|
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
The review session API now returns what its page needs to say what a review checked and what it cost: the checks the review ran on the change (each command, its result and why it didn't pass), the review's model cost, and whether a session is one part of a review read in parts.
Pairs with the dashboard change CoderHelm/coderhelm#539 (already merged; its page treats these fields as missing until this lands). This replaces #961, which was merged into
plan-builds-every-repoafter #956 had already been squash-merged, so it never reachedmain. Same change, applied to currentmain.Changes
common::review_session: the verification run as data (VerificationRecord, oneCheckRunper command withpassed,failed,couldnt_runorskippedand a reason), the model cost in whole millionths of a dollar (ADD, so every invocation of a job adds to it), andgoes_onfor a session that read one part of a large pull request. Reads and writes are bounded and tested.common::usage: aSpendTallytask-local. Every model call that already counts against a run's allowance also adds to the tally, whatever allowance it runs under, so a review job can read what it spent.review_verify::judgeandVerification::not_runkeep the run as data next to the markdown they already wrote. The review records it on its session, recordsoffwhen the repository's reviews don't run checks, adds its spend before the session closes (and anything spent after, such as a reply), and marks a part that goes on. The last step of such a part now reads "Read this part; the review goes on in its next part: …".GET /api/reviewer/sessionreturnsverification(SessionVerificationwithSessionCheckrows),cost_usdandgoes_on. Older sessions returnnull,nullandfalse.docs/api/openapi.jsonis regenerated.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy --all-targets -p common -p worker -p gateway -- -D warningscargo test -p common -p worker -p gatewaypython3 .github/scripts/brand_spelling.py,python3 .github/scripts/domain_examples.pynullon older sessions).