Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 20 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions bench/agent-seo/outreach-drafts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
49 changes: 49 additions & 0 deletions bench/agent-seo/seo-research-2026-11-22.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/ai-pr-review-bottleneck.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 6 additions & 4 deletions docs/alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 |

Expand Down
74 changes: 73 additions & 1 deletion docs/auto-approve.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
`<!-- opendrs-approval -->`, 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 <number> --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.<human|bot|agent>` (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.
4 changes: 2 additions & 2 deletions docs/blast-radius.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading
Loading