diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4ec6d36..54a5488 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -69,7 +69,7 @@ jobs: run: | { cat README.md - for page in auto-approve ai-pr-review-bottleneck alternatives blast-radius policy configuration signals llm-judge \ + for page in auto-approve ai-pr-review-bottleneck bot-approval-required-reviews alternatives blast-radius policy configuration signals llm-judge \ llm-reviewers captain verification github-action cli-and-mcp calibration results \ limitations about; do printf '\n\n---\n\nSource: %s%s.html\n\n' "$SITE" "$page" diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..a7d2e02 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,20 @@ +cff-version: 1.2.0 +message: "If you use opendrs in research, please cite it as below." +title: "opendrs: PR risk score and blast radius for pull requests" +type: software +authors: + - name: "error-path" +repository-code: "https://github.com/error-path/opendrs" +url: "https://error-path.github.io/opendrs/" +license: MIT +abstract: >- + opendrs gives each pull request a calibrated 0-1 risk score from git history, the import graph, + size and tests, so low-risk pull requests can be approved without a person. It is an independent, + open-source implementation of the approach behind Meta's Diff Risk Score, and runs as a CLI, a + GitHub Action and an MCP server. +keywords: + - pull request risk + - blast radius + - just-in-time defect prediction + - diff risk score + - code review diff --git a/README.md b/README.md index ac462b9..de551e1 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ Flags, exit codes, MCP tools and the agent skill: [CLI, MCP server, Claude Code |---|---| | [Auto-approve low-risk PRs](docs/auto-approve.md) | set up a risk-based approval gate step by step | | [Reduce the review bottleneck for AI-generated PRs](docs/ai-pr-review-bottleneck.md) | compare the options and see where opendrs fits | +| [Why a bot approval does not count](docs/bot-approval-required-reviews.md) | fix a GitHub Actions or bot approval that required reviews or auto-merge ignore | | [GitHub Action reference](docs/github-action.md) | look up inputs, outputs, permissions, branch rules and the scheduled sweep | | [Policy and safety rails](docs/policy.md) | know exactly why a PR was or was not approved | | [Configuration reference](docs/configuration.md) | change `.opendrs.yml` | diff --git a/action.yml b/action.yml index c33a86b..7073824 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: opendrs PR Risk Score and Blast Radius -description: Diff Risk Score for pull requests. Comments a calibrated 0-1 risk score, labels the PR, and can approve low-risk PRs. +description: PR risk score and blast radius for pull requests. Comments a calibrated 0-1 score, labels the PR, and can auto-approve low-risk PRs. author: error-path branding: icon: shield diff --git a/bench/agent-seo/outreach-drafts.md b/bench/agent-seo/outreach-drafts.md index c6490a9..64a5379 100644 --- a/bench/agent-seo/outreach-drafts.md +++ b/bench/agent-seo/outreach-drafts.md @@ -333,3 +333,11 @@ product. Contact routes are only those published on the page or site; no persona > is the step it covers. On the public ApacheJIT benchmark it reaches AUC 0.823, on par with a > classic regression (0.821): https://github.com/error-path/opendrs/blob/main/docs/results.md > No pressure either way. + +## Newsletter notes (drafts, 22 Nov 2026; not sent) + +Console.dev: not needed; the maintainer emailed hello@console.dev on 12 Nov. + +**Changelog News** (changelog.com/news/submit; own work welcome, no commercial products): +title "opendrs: an open reproduction of Meta's Diff Risk Score for pull requests", with a +two-sentence summary like the one above and a link to docs/results.md. diff --git a/bench/agent-seo/seo-research-2026-11-22.md b/bench/agent-seo/seo-research-2026-11-22.md index 78f5931..17ff659 100644 --- a/bench/agent-seo/seo-research-2026-11-22.md +++ b/bench/agent-seo/seo-research-2026-11-22.md @@ -112,3 +112,52 @@ Prompted by the benchmark: Tavily found opendrs for 2 of 15 queries, Exa for 13 Adds to the maintainer list: one email to You.com asking YouBot to index the docs (a message sent on the maintainer's behalf, so not sent by the agent). + +## Round 4: six-angle audit (same day, after PRs #95-#97) + +Six parallel passes: a technical crawl of the live site, off-site directories, search demand, +platform pages (GitHub, npm, Marketplace, MCP registry), where competitors get cited, and what an +agent reads in each page's first screenful (checked with the local 7B model). + +**Technical crawl: the site is clean.** All 27 sitemap pages return 200 with no redirects; sitemap +URLs match canonicals exactly; unique titles and descriptions; valid JSON-LD; no noindex; a real +404. Nothing on the site explains Search Console's "Couldn't fetch". One broken internal link +(experiments.md to bench/verify) is fixed. +Known, accepted gap: the github.io root `robots.txt` is a 404, so its `Sitemap:` line is not read; +the sitemap is submitted directly in Search Console and Bing, and IndexNow runs on every deploy. + +**First screenful.** The local model merged opendrs with the LLM-based tools on the alternatives +page and read the bottleneck page as "opendrs automates review". The first mention of opendrs on +seven pages now says what it is and that it needs no LLM. + +**Search demand.** Autocomplete phrasings are about the mechanism ("auto approve pull request +github", "dependabot auto approve", "github auto merge not working"), not "risk score". Gaps: +why a bot approval does not count as a required review, auditing auto-approved PRs, and +Dependabot/Renovate behind a risk gate. Circuit Breaker (MSR 2026, review-effort triage for agent +PRs) is now in the alternatives table. + +**Platforms.** The Marketplace title, npm keywords and MCP registry text only refresh at a release, +so one release (0.7.0) fixes all three. The Action description now leads with "PR risk score and +blast radius". GitHub repo search is star-driven: opendrs is not in the top 30 for "blast radius" +or "pr risk score". npm: #1 for "diff risk score", #2 for "pr risk score". + +**Directories.** Listed: official MCP registry, punkpeye and TensorBlock awesome-mcp-servers, +glama.ai, mcpmarket.com, mcp.so, skillsdirectory.com (text cut off). Not listed: Anthropic plugin +directory, Cline marketplace, mcpservers.org, AlternativeTo, Smithery (needs an .mcpb bundle), +PulseMCP (submissions paused; ingests the official registry). + +**Where competitors get cited.** Mostly their own "best tools" lists and launches (cubic: YC +page, Launch HN). The most honest channel for opendrs is research: a DRS-OSS preprint ranks on +three engines; arxiv.org is the third-largest host in our raw results. Venues: an arXiv cs.SE +tool report, the FSE 2027 tool-demo track (due 26 Jan 2027), Changelog News, Console.dev (takes +pre-1.0 tools; already contacted on 12 Nov), one Show HN. + +### Recommendations from round 4 (maintainer decisions; none done by the agent) + +| Recommendation | Effort | Expected effect | +|---|---|---| +| Cut release 0.7.0 | 1 hour (release runbook) | Marketplace title and description, npm keywords and MCP registry text go live at once | +| GitHub repo topics: swap `ci-cd`, `devops`, `developer-tools` for `mcp-server`, `risk-assessment`, `pr-risk-score`; retitle the floating `v0` release | 10 min | Topic pages and release titles carry the searched terms | +| Submit to the Anthropic plugin directory, Cline marketplace, mcpservers.org (free), AlternativeTo; awesome-claude-code once it reopens | 15-30 min each | Listings where agents and developers look; no measured effect yet | +| Changelog News note (draft in outreach-drafts.md), then one Show HN | 15 min; 1 day answering comments | Third-party pages that agents cite; HN threads rank | +| Short arXiv cs.SE tool report on the Diff Risk Score reproduction, reused for the FSE 2027 tool-demo track (due 26 Jan 2027) | 2-4 days | Research pages rank on several engines (DRS-OSS precedent) | diff --git a/docs/_config.yml b/docs/_config.yml index 07a8fbf..55d3d29 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -45,6 +45,8 @@ nav: more: - title: Review bottleneck url: /ai-pr-review-bottleneck.html + - title: Bot approvals + url: /bot-approval-required-reviews.html - title: Research url: /research/ - title: Policy diff --git a/docs/ai-pr-review-bottleneck.md b/docs/ai-pr-review-bottleneck.md index d11bd45..f6b1478 100644 --- a/docs/ai-pr-review-bottleneck.md +++ b/docs/ai-pr-review-bottleneck.md @@ -8,7 +8,8 @@ description: "Ways to cut the human review queue when AI writes and reviews most When coding agents write most of the pull requests, the number of PRs grows faster than the number of people who can review them. The human review becomes the slowest step. There is no single fix. Teams usually combine a few of the options below, and each one helps with a different part of the -queue. +queue. opendrs, the tool these docs are for, is one of them: it scores each PR's risk from git +history without an LLM and can approve the low-risk ones; it does not leave review comments. ## The options diff --git a/docs/alternatives.md b/docs/alternatives.md index 919c2cb..54226c2 100644 --- a/docs/alternatives.md +++ b/docs/alternatives.md @@ -7,9 +7,10 @@ description: "Tools that auto-approve or auto-merge low-risk pull requests compa There are two kinds of tools for approving pull requests without a person. **Rule-based** tools approve or merge when conditions you write are met: the author is a bot, the checks passed, a label -is set. **Risk-scoring** tools estimate how risky each change is, from an LLM reading the diff or -from measurements of git history and the dependency graph, and approve only the low-risk ones. -opendrs is a risk-scoring tool. This page compares both kinds and says when each is the better +is set. **Risk-scoring** tools estimate how risky each change is and approve only the low-risk +ones. Most of them have an LLM read the diff. opendrs, the open-source tool these docs are for, is a +risk-scoring tool that needs no LLM: it measures git history and the dependency graph, in your CI. +This page compares both kinds and says when each is the better choice, including when opendrs is not. It was written by the opendrs maintainers from each project's public documentation in October and @@ -63,7 +64,8 @@ conditions you write. | [MergeShield Risk Check](https://github.com/mergeshield/risk-check) | Claude reads the change and scores six dimensions, 0-100 | No: passes or fails a check against a threshold | Calls the MergeShield API; needs an account and API key | | [Merge Steward](https://github.com/performer220/merge-steward-pr-review) | Gemini scores six dimensions 0-3, including blast radius | Yes: approves low-risk changes and can request auto-merge | GitHub Action; needs a Gemini API key | | [Blast-Radius](https://github.com/bipu-biz/Blast-Radius) | Dependency graph from the TypeScript AST plus an AI summary | No: analysis for reviewers | Hosted web app | -| [GitHub Copilot code review](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review) | An LLM reviews the diff and leaves comments | Optional: leaves a "Comment" review by default; approvals are off by default and, once turned on, count toward required approvals | GitHub; Copilot plan | +| [GitHub Copilot code review](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review) | An LLM reviews the diff and leaves comments | Optional: leaves a "Comment" review by default; approvals can be turned on, but they do not count toward required reviews | GitHub; Copilot plan | +| [Circuit Breaker](https://arxiv.org/abs/2601.00753) (MSR 2026 paper) | A model over simple cues known when the PR is opened (file types, patch size) predicts which agent-authored PRs will need heavy review; reports AUC 0.96 on 33,707 agent PRs | No: triage for reviewers; it predicts review effort, not defects | Research paper; no code linked from the arXiv page | | [DRS-OSS](https://arxiv.org/abs/2511.21964) | Fine-tuned Llama 3.1 8B classifier over the diff and commit message | Flags risky diffs in CI | Self-hosted model service with a REST API | | Meta's Diff Risk Score | Models trained on Meta's own incidents | Gates code at Meta | Internal to Meta; described in [papers](https://arxiv.org/abs/2410.06351), not released | diff --git a/docs/auto-approve.md b/docs/auto-approve.md index 3506e5d..048336f 100644 --- a/docs/auto-approve.md +++ b/docs/auto-approve.md @@ -12,7 +12,8 @@ up a gate that approves the low-risk ones on its own and sends everything else t > A PR whose risk score is below 0.3, that changes nothing on a blocked path, and whose AI review > passed is approved and goes to the merge queue. Everything else waits for a reviewer. -The score comes from [opendrs](./), which measures each PR's [blast radius](blast-radius.md), +The score comes from [opendrs](./), a free, open-source risk scorer that runs in your CI and needs +no LLM (the AI review is a separate check you can require). It measures each PR's [blast radius](blast-radius.md), file history, author experience, size and tests. Auto-approval is one of several ways to [reduce the review bottleneck for AI-generated PRs](ai-pr-review-bottleneck.md); that page compares them. @@ -137,3 +138,74 @@ Whatever the score: The full rule order and every option are in the [GitHub Action guide](github-action.md), and what each rail guards against is in [Policy and safety rails](policy.md). + +If the approval shows up but GitHub still says a review is required, or auto-merge never fires, +see [Why a bot approval does not count as a required review](bot-approval-required-reviews.md). + +## Audit what the gate approved + +A backtest tells you how the score did on past commits. Once the gate runs, check what it actually +let through, on a fixed schedule, for example monthly. + +1. **List the PRs opendrs approved.** Every opendrs approval is a review whose body starts with + ``, and it stays on the PR after merge: + + ```sh + gh pr list --state merged --limit 200 --json number,title,reviews --jq \ + '.[] | select(any(.reviews[]; .state == "APPROVED" and (.body | contains("opendrs-approval")))) | "\(.number) \(.title)"' + ``` + +2. **Look for what went wrong after merge:** a revert of the PR, a fix to the same files soon + after, or an incident traced to it. Record each one with + `opendrs feedback --pr --was-incident` (see + [Recording incidents](calibration.md#recording-incidents-with-opendrs-feedback)). That labels + the PR's commits as incident-linked for `calibrate` and `backtest`. +3. **Read the sampled PRs.** `sampleRate` sends a share of the PRs the gate would have approved to + a person. What reviewers find there is what the gate passes unseen on the rest. Keep + `sampleRate` above zero for this reason. +4. **Re-run `opendrs backtest`.** It leaves out the newest `history.labelHorizonDays` (60 by + default), because their bugs may not be found yet, so it trails the live list above. +5. **Tighten or stop.** Lower `thresholds.green` or `maxChangedLines`, add paths to + `paths.block`, tighten one source with `sources.` (a `trackRecord` stops approvals + for a source whose landed commits were reverted too often), or set + `enabled: false`; opendrs then withdraws its approvals on the next run. + +## Dependabot and Renovate PRs + +With the default config, opendrs never auto-approves a typical dependency update. The lockfile is +in `paths.ignore`, the manifest (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, +`requirements*.txt` and others) is in `paths.block`, an update to GitHub Actions changes +`.github/**`, and Renovate's own config files are blocked. A version bump brings in code that the +diff does not show, so opendrs's score cannot measure it. opendrs still scores and comments these +PRs and labels their source `bot`. + +To merge dependency updates without a person, use Renovate automerge, or GitHub's +[Dependabot recipe](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions) +with `dependabot/fetch-metadata`, which reports the semver `update-type`. To make the opendrs tier +one more condition, approve only when both agree, in the same job after the opendrs step: + +{% raw %} +```yaml + - uses: error-path/opendrs@v0 + id: opendrs + with: + sample-salt: ${{ secrets.OPENDRS_SAMPLE_SALT }} + - if: github.event.pull_request.user.login == 'dependabot[bot]' + id: metadata + uses: dependabot/fetch-metadata@v2 # pin to a commit, as GitHub's example does + - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' && steps.opendrs.outputs.tier == 'green' + env: { GH_TOKEN: "${{ github.token }}", PR_URL: "${{ github.event.pull_request.html_url }}" } + run: gh pr review --approve "$PR_URL" +``` +{% endraw %} + +The `tier` output comes from the score alone, so blocked paths do not change it, and ignored files are left out of it. For +a version bump it reflects the manifest's history, the size and the author, not the new +dependency's code. Use `tier`, never the `risk:green` label, which anyone with triage access can +add. + +Runs that Dependabot starts get a read-only `GITHUB_TOKEN` unless the workflow sets +`permissions:`, and see only Dependabot secrets +([GitHub](https://docs.github.com/en/code-security/dependabot/troubleshooting-dependabot/troubleshooting-dependabot-on-github-actions)). +The opendrs workflow above sets `permissions:`; add `OPENDRS_SAMPLE_SALT` (and an LLM key, if +you use one) as Dependabot secrets as well. diff --git a/docs/blast-radius.md b/docs/blast-radius.md index ab71b47..46fd795 100644 --- a/docs/blast-radius.md +++ b/docs/blast-radius.md @@ -10,8 +10,8 @@ a file that nothing imports has a small blast radius. The same line in a utility import, or in an exported function other services call, has a large one. Blast radius alone does not make a change risky. A large, well-tested change by someone who knows -the code is often safer than a small, untested change to fragile code. So opendrs reports blast -radius as two signals and combines them with the others into one score. +the code is often safer than a small, untested change to fragile code. So opendrs, an open-source +PR risk scorer that runs in your CI with no LLM, reports blast radius as two signals and combines them with the others into one score. ## How opendrs measures it diff --git a/docs/bot-approval-required-reviews.md b/docs/bot-approval-required-reviews.md new file mode 100644 index 0000000..4b93e6e --- /dev/null +++ b/docs/bot-approval-required-reviews.md @@ -0,0 +1,64 @@ +--- +title: "Why a bot or GitHub Actions approval does not count as a required review" +description: "Why an approval from GitHub Actions, a GitHub App or a coding agent does not satisfy a required review or let auto-merge go ahead: the repository setting, self-approval, code owners, last-push approval, stale approvals, Dependabot's read-only token, and what to do about each." +--- + +# Why a bot approval does not count as a required review + +You add a workflow step that approves pull requests, the approval shows up, and the PR still says +"Review required", or auto-merge never fires. GitHub checks who approved, what that account wrote, +and when, before it counts an approval. This page lists the causes, each with GitHub's own +documentation, and then how [opendrs](./) approves. + +## The causes, in the order to check them + +| Symptom | Cause | Fix | +|---|---|---| +| The approve call fails with 403 | The repository blocks workflows from approving PRs. Repositories in a personal account block it by default; repositories in an organization inherit the organization's setting ([GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository)). | **Settings > Actions > General > Workflow permissions:** enable *Allow GitHub Actions to create and approve pull requests*. If it is greyed out, the setting is inherited from the organization (or enterprise); an owner there has to allow it first. Give the job `pull-requests: write`. | +| The approve call fails on a PR the same bot opened | "Pull request authors cannot approve their own pull requests" ([GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/approving-a-pull-request-with-required-reviews)). A workflow that opens a PR with `GITHUB_TOKEN` and approves it with `GITHUB_TOKEN` is one account approving its own PR. The same holds for an agent's GitHub App approving a PR that app opened. | Approve with a different identity: a separate GitHub App token, or a person. | +| The approval shows, but the PR still needs a review | The approval came from GitHub Copilot. Its approvals are shown, but they "do not count toward those requirements" ([GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/approving-a-pull-request-with-required-reviews)). | Have a person, or an approver that counts, approve. | +| "Review required from code owners" | With *Require review from Code Owners*, "any pull request that affects code with a code owner must be approved by that code owner" ([GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)). A bot that is not the code owner for those files does not satisfy it. | Keep code owner review for the paths that need a person, or drop the requirement on paths you want a bot to approve. | +| The approval counted, then a bot pushed a commit and it stopped counting | With *Require approval of the most recent reviewable push*, the last push must be approved by someone other than the person who pushed it ([GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)). An autofix or formatting bot that pushes and then approves is approving its own push. | Approve from a different identity than the one that pushes. | +| The approval disappeared after a push | With *Dismiss stale pull request approvals when new commits are pushed*, a push that changes the diff dismisses the approval, and the PR "cannot be merged until someone approves the work again" ([GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)). | Expected: run the approving workflow on every push (`synchronize`), so it decides again for the new commit. | +| The approve step fails only on Dependabot PRs | Workflows triggered by Dependabot get a read-only `GITHUB_TOKEN` by default, and only Dependabot secrets, not Actions secrets ([GitHub](https://docs.github.com/en/code-security/dependabot/troubleshooting-dependabot/troubleshooting-dependabot-on-github-actions)). | Set `permissions:` in the workflow, and add the secrets the job needs as Dependabot secrets. | +| Approved, checks green, auto-merge does nothing | Auto-merge must be allowed in the repository settings, and it merges "after all required reviews and status checks pass" ([GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)). It is also turned off when someone without write access pushes to the head branch, or the base branch changes. | Enable *Allow auto-merge*, check that every required check has reported on the head commit, and turn auto-merge on again after such a push. | +| The PR does not join the merge queue | "The built-in `GITHUB_TOKEN` cannot add pull requests to the queue" ([GitHub](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)). | Use a GitHub App token or a personal access token with merge permission. | +| It merged, but nothing ran on `main` | Events caused by `GITHUB_TOKEN` do not start new workflow runs (the exceptions are `workflow_dispatch`, `repository_dispatch`, and `pull_request` runs that then wait for approval) ([GitHub](https://docs.github.com/en/actions/concepts/security/github_token)). | Merge with a GitHub App installation token or a personal access token. | + +Approvals that count toward a required review come from accounts with write permission +([GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)). +GitHub's documentation does not say in one sentence whether a `github-actions[bot]` approval +counts; with the repository setting above turned on, opendrs relies on it counting. + +## "Require review, but not for bots" + +Branch protection and rulesets have no "required reviews apply to humans only" option. The +closest is the ruleset bypass list: it accepts GitHub Apps and Dependabot, and *For pull requests +only* lets an actor merge its own PR past the rules without pushing to the branch directly +([GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository)). +A bypass skips every rule in that ruleset, though, including required status checks, and it +applies to every PR that actor opens, whatever it changes. Approving from a separate identity +keeps the rules in force and lets you decide per PR. + +## Which PRs a bot should approve + +The mechanics above decide whether an approval counts. They do not decide whether a PR should be +approved without a person. That is a policy question: which paths, how large a change, which +authors, and what has to pass first. + +opendrs answers it with a risk score and a fixed set of rails, then approves through the token you +give it: + +- It approves as the account behind its `github-token` input: `github-actions[bot]` by default, or + a GitHub App, as in opendrs's own [workflow](https://github.com/error-path/opendrs/blob/main/.github/workflows/opendrs.yml). + A PR opened by that same account cannot be approved by it, as above. +- It does not approve unless the base branch requires an approval and dismisses stale approvals on + push, so an approval never carries over to a later commit. See + [Required: dismiss stale approvals on push](github-action.md#required-dismiss-stale-approvals-on-push). +- It cannot satisfy *Require review from Code Owners*, because the bot is not a code owner. +- It never approves PRs that change CI workflows, CODEOWNERS, its own config, lockfiles, package + manifests, migrations or infrastructure files, PRs from forks, or drafts. The full list is in + [What is never auto-approved](auto-approve.md#what-is-never-auto-approved). + +To set it up, follow [Auto-approve low-risk pull requests](auto-approve.md). The settings it needs +are in [Repository settings for auto-approval](github-action.md#repository-settings-for-auto-approval). diff --git a/docs/calibration.md b/docs/calibration.md index 44e758d..94b8288 100644 --- a/docs/calibration.md +++ b/docs/calibration.md @@ -5,7 +5,8 @@ description: "Measure how well a PR risk score ranks your own past commits with # Calibration and backtesting -opendrs ships with hand-set prior weights. They rank obvious cases sensibly (a typo fix scores +opendrs, an open-source PR risk scorer that uses only your git history and code (no LLM), ships +with hand-set prior weights. They rank obvious cases sensibly (a typo fix scores low, a large untested change to a widely imported file scores high), but they have never seen your repository. `opendrs backtest` tells you how well a model ranks your past commits, and `opendrs calibrate` fits the weights to them. diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.md index d1bb0c2..71e91ed 100644 --- a/docs/cli-and-mcp.md +++ b/docs/cli-and-mcp.md @@ -5,7 +5,7 @@ description: "Every opendrs command and flag; the MCP server coding agents call # CLI, MCP server, Claude Code plugin and agent skill -opendrs runs as a command-line tool, as a Model Context Protocol server for coding agents, and as an agent skill that tells an agent when to use it. +opendrs, an open-source pull request risk scorer that needs no LLM, runs as a command-line tool, as a Model Context Protocol server for coding agents, and as an agent skill that tells an agent when to use it. ## CLI diff --git a/docs/experiments.md b/docs/experiments.md index b901da6..befe975 100644 --- a/docs/experiments.md +++ b/docs/experiments.md @@ -458,7 +458,7 @@ first, precision second — precision is not checked until recall clears.** or prompt fix before the pass ships** (spec implication 15) — not optional, not a re-run. **Where.** `bench/verify/run.ts`, `bench/verify/labels.json`, `bench/verify/README.md`; results -are written to [`bench/verify/results.md`](../bench/verify/results.md) (recall, the 18-fire +are written to [`bench/verify/results.md`](https://github.com/error-path/opendrs/blob/main/bench/verify/results.md) (recall, the 18-fire `coupling.missing` precision breakdown by detector class vs. verifier, the 2 WRONG fires, cost per PR and total, model + `promptHash`, and this decision rule applied as written). diff --git a/docs/github-action.md b/docs/github-action.md index b655d8b..a22d791 100644 --- a/docs/github-action.md +++ b/docs/github-action.md @@ -5,7 +5,8 @@ description: "Set up the opendrs GitHub Action: comment a 0-1 risk score on ever # The opendrs GitHub Action -The Action scores each pull request, upserts one PR comment, sets a `risk:green`, +The Action is free and needs no LLM or API key (the [LLM judge](llm-judge.md) is optional). It +scores each pull request, upserts one PR comment, sets a `risk:green`, `risk:yellow` or `risk:red` label, writes the job summary, and sets the outputs `score`, `tier` and `decision`. When you enable it, it also approves low-risk PRs and turns on auto-merge or adds them to the merge queue. @@ -131,7 +132,8 @@ entry, so an error never leaves an earlier approval in force. a job's check name depends on your workflow. If you require review from code owners, opendrs cannot satisfy it, because the bot is not a code -owner. +owner. For this and the other reasons GitHub ignores a bot's approval, see +[Why a bot approval does not count as a required review](bot-approval-required-reviews.md). ### Set sample-salt diff --git a/docs/llms.txt b/docs/llms.txt index dcbddb6..bbc1cb9 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -17,6 +17,7 @@ All of the pages below except the experiment log and research notes, in one file - [Auto-approve low-risk pull requests](https://error-path.github.io/opendrs/auto-approve.html): step-by-step setup of a risk-based approval gate with GitHub Actions - [Reduce the code review bottleneck for AI-generated pull requests](https://error-path.github.io/opendrs/ai-pr-review-bottleneck.html): the options (smaller PRs, AI reviewers, rule-based auto-merge, risk-based auto-approval, CODEOWNERS, merge queues), when each fits, and where opendrs does and does not fit +- [Why a bot approval does not count as a required review](https://error-path.github.io/opendrs/bot-approval-required-reviews.html): why a GitHub Actions, GitHub App or Copilot approval does not satisfy required reviews or start auto-merge (repository setting, self-approval, code owners, last-push approval, stale approvals, Dependabot's read-only token), with GitHub's docs for each - [Policy and safety rails](https://error-path.github.io/opendrs/policy.html): the ordered decision rules, hard blocks, safety rails, per-source policy, deferred review and landing delay; use it to explain why a PR was or was not approved - [Configuration reference](https://error-path.github.io/opendrs/configuration.html): every `.opendrs.yml` setting with defaults - [Risk signals](https://error-path.github.io/opendrs/signals.html): Meta's DRS features and the opendrs signal that computes each one