rd0-jinx
Find the pull request that already does this.
Coding agents (Copilot, Codex, Devin, Claude Code, Cursor, Jules) open a lot of pull requests, and some of
them redo work that is already open. rd0-jinx checks a new PR against the open ones and, when it finds a
likely duplicate, tells you which PR it matches and why.
- Runs on CPU in about 6 ms per PR. No LLM, no API key, no network call.
- Explains every match: shared files, overlapping line ranges, identical added lines, the same linked issue.
- About 1.9 false alarms per 100 PRs that have no duplicate.
Full README, benchmark and papers: https://github.com/ReviewDebtZero/rd0-jinx
Install
pip install rd0-jinx # the `jinx` command
pip install "rd0-jinx[embed]" # optional local MiniLM text model (installs PyTorch)
Use it
jinx check new_pr.json --open-queue open_prs.jsonl --top 2
PR #44134: checked 19 open PRs in 12 ms. 1 likely duplicate(s) (score >= 0.50).
DUPLICATE? #44110 score 1.00 refactor(tvp): use capture_outputs for output tracing
- one PR links to the other (#44110)
- shares 1 of 1 changed files (src/transformers/models/tvp/modeling_tvp.py)
- 100% of changed line ranges overlap
- 100% of added lines are identical
- similar title/description after removing agent template text (0.92)
Input uses the GitHub API's JSON shape (number, title, body, user.login, created_at). Optional
fields are diff (unified diff text), files, agent and linked_issues. The queue can be a JSON list or
a JSON-lines file.
| Flag | What it does |
|---|---|
--top N |
List at most N candidates |
--threshold X |
Flag only scores >= X (default 0.5) |
--json |
Machine-readable output |
--embed |
Also use the local MiniLM text model (needs [embed]) |
--templates FILE |
Use templates learned from your own PRs |
Before you open a PR: jinx precheck
Run it on your branch (or as an agent's last step before gh pr create). It reads the open PRs of the
repository from the GitHub API (token from GITHUB_TOKEN, GH_TOKEN or gh auth token) and compares
git diff $(git merge-base origin/main HEAD) and your first commit subject with all of them, with the
same two-stage ranking as the Action.
jinx precheck # after coding: branch diff + commit subject
jinx precheck --issue 123 --exit-code # also counts PRs that link issue 123; exit 1 on a match
jinx precheck --no-diff --title "Add Granite 4 tool parser" --issue 123 # before coding: task text only
| Flag | What it does |
|---|---|
--repo owner/name |
Repository to read open PRs from (default: the origin remote) |
--base REF |
Branch the change starts from (default origin/main) |
--no-diff |
Before coding: compare only --title, --body and --issue |
--issue N |
Issue the change addresses (repeatable) |
--author LOGIN --skip-same-author |
Ignore your own open PRs |
--open-queue FILE |
Read open PRs from a file instead of the API |
--exit-code |
Exit 1 when a likely duplicate is found (2 if the open PRs cannot be read) |
Before coding there is no code to compare, so only titles, descriptions and links count; on the
large-repository benchmark this mode is weaker (see research/experiments/hotrepos/). A line for AGENTS.md:
Before opening a PR, run `jinx precheck --exit-code`. If it reports a likely duplicate, stop and
comment on that PR instead of opening a new one.
In Python
from rd0_jinx import PR, Detector
new = PR.from_dict(new_pr_json) # GitHub API JSON shape
queue = [PR.from_dict(d) for d in open_prs_json]
det = Detector() # ships with trained weights
for m in det.rank(new, queue, top=3):
if m.score >= det.threshold:
print(m.number, round(m.score, 2), m.reasons)
As a GitHub Action
- uses: ReviewDebtZero/rd0-jinx@v0.1.4
with:
threshold: "" # empty = bundled default (0.5)
max-open-prs: "10000" # open PRs listed and scored on text and links
shortlist: "20" # best matches whose files are fetched and compared
skip-same-author: "true" # default: ignores the author's own open PRs
License
MIT. The shipped weights were trained on AIDev (CC BY 4.0).
Metadata
Release files for rd0-jinx 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rd0_jinx-0.1.4.tar.gz | 129.3 kB | With provenance | Details for rd0_jinx-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rd0_jinx-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for rd0_jinx-0.1.4-py3-none-any.whl |
Total release size: 155.3 kB
Release files / rd0_jinx-0.1.4.tar.gz
| Download URL | rd0_jinx-0.1.4.tar.gz |
|---|---|
| Size | 129.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d314d7cf41156a52930902aa92c97ce0393456f1a982cf42ba04ce9004390dfb
|
|
BLAKE2b-256 checksum How to use checksums |
2b30042518f2dc552523ea26267bd7b75b8356714d073c3d1204883591328895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / rd0_jinx-0.1.4-py3-none-any.whl
| Download URL | rd0_jinx-0.1.4-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9adaafdd2440b8beb949ffaea2a36bb7a59b31f5d0f199694ef53b30167f809f
|
|
BLAKE2b-256 checksum How to use checksums |
8bc30ed76022264fbe8490c7362f0121cfce9b20531ffb1fd336303e1c52f06e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for rd0-jinx 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rd0_jinx-0.1.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.