Repository navigation
feat(docs-pr-review): use a decision model to filter findings and raise funds risk - #2167
Merged
Merged
Conversation
Contributor
Docs reviewRisk: Medium (one AI review with a larger model) ·
What to check:
Lower-level signals
No documentation pages changed in Advisory review from the Docs PR review workflow (run). It does not approve, block, or edit this PR. Add the |
soheimam
added this pull request to stack #2168
October 21, 2026 09:56
Collaborator
✅ Heimdall Review Status
|
youssefea
approved these changes
Oct 21, 2026
…se funds risk Adds decisions.mjs, a client for the LLM Gateway Decisions API (gpt-6-luna), with two narrow checks: - misleads: each non-blocking finding is scored on whether the text it is about would mislead a reader. Below 0.5 it stays in the summary under a collapsed "Minor suggestions" list and is not posted inline. Blocking findings are never scored. - funds_risk: each PR is scored on whether a wrong value in the added lines could cost readers funds. At 0.8 or above the risk level is raised to high. It never lowers a level. Both fail open: on any error or timeout the review posts as before.
…OpenAI guide A failed or refused call now leaves only that finding unscored (kept as it is) instead of skipping the filter for every finding. Adds the guide link and host note to the module header.
youssefea
force-pushed
the
feat/docs-pr-review-decisions
branch
from
October 21, 2026 10:55
d86af01 to
2f1e433
Compare
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.
What changed? Why?
Step 2 of the reviewer fixes from the BKB feedback: a decision model for the calls the reviewer gets wrong most often. Stacked on #2166, so this diff shows step 2 only. It will retarget to
masterwhen #2166 merges.New
scripts/docs-pr-review/decisions.mjscalls the LLM Gateway Decisions API (POST /v1/decisions,gpt-6-luna). It's a classifier that returns probabilities, at about 300 ms and about $0.0001 per call. It makes two checks:Both checks fail open. A missing key, HTTP error, refusal, bad answer or 15 s timeout logs a warning, and the review posts as it does today. The run notice now includes
minor=andfunds_risk=.Notes to reviewers
soheimamon the BKB PRs,roethkeon docs(base-chain): add fast bridges, aggregators, and messaging protocols to Bridge to Base #2159), 9 accepted and 9 rejected:decisions.mjs, to re-check against the eval set.llm-gateway.coinbase-corp.com), so no egress change. I verified access with a personal gateway key. The Action'sLLM_GATEWAY_API_KEYis first exercised on this PR's next review run; if it lacks access, the checks skip with a warning.{model, input, questions}body as its curl examples. Predicate questions carrytype,nameandinstructions, and answers are read bynameandprobability.How has it been tested?
npm test: 204 pass. Newdecisions.test.mjscovers the request shape, error, refusal and timeout handling, failing open, hunk selection, threshold logic,raiseRisk, and the collapsed list.Screenshots
N/A (no user-facing changes)
Generated with Toshi