Reprocheck

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.2.0更新於 Oct 26, 2026

Red-first repro verifier: a fix counts only when the repro fails on the base and passes on the fix.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

在 base 與 head 兩個 git 參照的乾淨工作樹中執行同一份重現,依「先紅後綠」判定修正是否成立。

可以做什麼
  • 在 base 與 head 的乾淨分離工作樹中執行重現指令,並依兩次結束碼判定為 VERIFIED、NOT-REPRODUCED、STILL-FAILING、BROKEN-BY-HEAD 或 ERROR
  • 把新增的回歸測試檔複製進兩個工作樹,讓 base 上不存在的測試也能在那裡執行
  • 自動組出並執行 pytest 或 Go 原生測試指令,可指定單一測試名稱,並支援自動辨識執行器
  • 偵測本機儲存庫支援哪些原生測試執行器,附上檔案系統證據與找到的測試檔,且不執行目標程式碼
  • 回傳機器可讀報告,含紅綠憑證、各階段結束碼、耗時與輸出尾段
適用情境
適合讓助理證明某個變更確實修好了某個缺陷,而不是依賴兩邊都通過的測試。適用於使用 pytest 或 go test 的 Python 與 Go 儲存庫,也適用於任何能執行重現指令的儲存庫。
執行需求
以本機程序方式透過 npx 或 Docker 映像執行,需要 Node.js 或 Docker。需要本機 git 儲存庫且 base 與 head 參照可用,並需要重現指令所用的工具鏈(例如含 pytest 的 Python 或 Go)。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
重現指令與選用的安裝指令會在暫存工作樹中實際執行,因此會在你的機器上執行程式碼並安裝相依套件;只對信任的儲存庫與指令使用。工作樹建在系統暫存目錄並於結束時清除,工作區本身不會被修改,但所執行的指令本身可能有副作用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Reprocheck,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

reprocheck

"Fixed" is a claim. reprocheck makes you prove it, red first.

Every bug fix makes the same claim: this change fixes that bug. The honest proof has a specific shape, and it is the shape good reviewers ask for: a repro that fails on the code before the fix and passes on the code after it. A test that passes on both proves nothing. A fix whose repro still fails fixes nothing. And a change that turns a passing repro red broke something.

reprocheck runs that proof for you. Give it a repo, a base ref, a head ref, and a command. It creates clean detached worktrees of both refs, runs the command in each, and classifies the pair of exit codes:

verdictbaseheadwhat it means
VERIFIEDfailspassesThe change fixes what the repro demonstrates, and the repro demonstrably covers the bug
NOT-REPRODUCEDpassespassesThe repro does not demonstrate a bug on the base (already fixed there, or it misses the bug), so the head pass proves nothing
STILL-FAILINGfailsfailsThe change does not fix what the repro demonstrates
BROKEN-BY-HEADpassesfailsThe change introduced this failure
ERRORn/an/aSetup, git, or the run itself failed or timed out; the report names the stage

Exit codes are CI-friendly: 0 for VERIFIED, 1 for the other completed verdicts, 2 for ERROR.

The feature that makes it practical: --test-file

The standard red-first setup has an awkward step: the regression test is new, so it does not exist on the base. Copying it into a base checkout by hand is exactly the kind of manual step people skip. reprocheck does it for you: pass --test-file <path> and the file, read from your working tree (committed or not), is copied into both worktrees at the same relative path before the command runs.

Your working tree is never modified. Both runs happen in temporary worktrees under the OS temp dir, and they are removed on every exit path.

Native runners: pytest and Go

You do not have to hand write the test command for Python or Go repos. Pass --runner pytest, --runner go, or --runner auto and reprocheck detects the repo's test setup, builds the real command, and runs it in both worktrees:

  • pytest detection: a pytest config (pytest.ini, pyproject.toml, setup.cfg, tox.ini) or test_*.py / *_test.py files. The command is python3 -m pytest '<file>::<test name>' -q (file or whole suite when no name is given).
  • Go detection: a go.mod file or *_test.go files. The command is go test <package> -run '^<TestName>$' -count=1 -v, with -count=1 so the Go test cache can never turn a stale pass into evidence.
  • --test-name <name> targets one named test (test_add for pytest, TestAdd for Go). Detection finds which test file defines it.
  • Asking for the wrong runner, a test file that belongs to another runner, a test name that does not exist, or any runner in a repo with no tests at all fails before anything runs, with that specific error. Nothing is rounded up to a verdict it did not earn.
  • reprocheck detect --repo <path> (or the MCP detect_test_runners tool) reports the detected runners and the filesystem evidence for each, without running any target code.
bash
# Python: one named pytest test, red on main and green on HEADnpx @reneturcios/reprocheck run --repo . --base main --head HEAD \  --runner pytest --test-file test_calc.py --test-name test_add
# Go: one named test, package inferred from the test filenpx @reneturcios/reprocheck run --repo . --base main --head HEAD \  --runner go --test-file calc_test.go --test-name TestAdd
# See what a repo supports before choosingnpx @reneturcios/reprocheck detect --repo . --json

The receipt

Every report carries a machine readable red/green receipt: receipt in the --json output, with schemaVersion: 1, kind: "reprocheck.receipt", the verdict, the runner, and a red (base) and green (head) block holding ref, SHA, exit code, outcome (pass, fail, or did-not-run), timeout flag, and duration. Write just the receipt to a file with --receipt <path>, for example to attach it to a PR description or a CI artifact. A receipt is evidence, not a summary: it records exactly the two runs the verdict rests on.

Usage

CLI

bash
# Verify a fix on the current branch against main, using the new regression testnpx @reneturcios/reprocheck run \  --repo . --base main --head HEAD \  --test-file test/radar.test.ts \  --setup "npm install" \  --cmd "npx tsx --test test/radar.test.ts"
# Simpler: a committed repro script, no setupnpx @reneturcios/reprocheck run --repo . --base HEAD~1 --head HEAD --cmd "node repro.mjs"
# Machine readable output, with the receipt written to a filenpx @reneturcios/reprocheck run --repo . --base main --head HEAD --cmd "npm test" --json --receipt receipt.json

Example output (real dogfood, verifying Greenlight v0.15.1's radar precision fix, where the regression tests in test/radar.test.ts were written against the fixed behavior):

reprocheck: VERIFIED  command: npx tsx --test test/radar.test.ts  test file copied into both worktrees: test/radar.test.ts  setup: npm install --no-audit --no-fund  base (a33c55e3 @ a33c55e39010): exit 1 in 18512ms  head (9492844b @ 9492844bf6b6): exit 0 in 12015msThe repro fails on the base and passes on the head. The change fixes what the repro demonstrates, and the repro demonstrably covers the bug

MCP server

Add to your MCP client config:

json
{  "mcpServers": {    "reprocheck": {      "command": "npx",      "args": ["-y", "@reneturcios/reprocheck", "mcp"]    }  }}

Tools: run_repro_check (repoPath, baseRef, headRef, and either a raw command or a native runner of pytest, go, or auto, with optional testFile, testName, setupCommand, and timeoutSeconds; returns the full report as JSON, including the receipt, per-phase exit codes, durations, and output tails) and detect_test_runners (repoPath; returns the detected native runners with their evidence and test files).

Docker

The CLI works on local git repositories, so mount the repo you want to check:

bash
docker run -i ghcr.io/cloudcorprecords/reprocheck mcpdocker run --rm -v "$PWD:/repo" ghcr.io/cloudcorprecords/reprocheck \  run --repo /repo --base main --head HEAD --cmd "npm test"

Where reprocheck fits

reprocheck is the verification third of a small triad from the same author:

  • cidiff tells you which failing checks on a PR are actually the PR's fault.
  • reprocheck proves a specific fix fixes a specific bug, red first.
  • shipcheck verifies the finished release actually shipped on every surface.

All three come from the same discipline that runs Greenlight: evidence first, honest verdicts, no invented answers. A verdict reprocheck cannot support, it does not print.

Development

bash
npm installnpm run buildnpm test   # 27 tests: verdict classification, full runs against a real temp git repo, and native pytest / go runner detection, command building, and end to end fixture runs through the real binaries (skipped when a binary is unavailable)

License

MIT

來源:README.md,提交 17a3faf

工具

2

run_repro_check

Verify a fix the honest way: run the same repro in clean git worktrees of the base ref and the head ref. VERIFIED only when it fails on the base and passes on the head. NOT-REPRODUCED when it passes on the base too, STILL-FAILING when it fails on both, BROKEN-BY-HEAD when the change introduced the failure, ERROR when a run could not complete. Give either a raw command, or a native runner (pytest, go, or auto) with an optional testFile and testName, and reprocheck builds the real pytest or go test command itself. An uncommitted repro or regression test file can be copied into both worktrees with testFile. The report includes a machine readable receipt with the red (base) and green (head) evidence. The working tree is never modified.

輸入參數runnerbaseRef必填commandheadRef必填repoPath必填testFiletestNamesetupCommandtimeoutSeconds

detect_test_runners

Detect which native test runners a local repository supports (pytest and/or go test), with the filesystem evidence for each and the test files found. Runs no code from the target repository.

輸入參數repoPath必填

版本歷史

2
  1. v0.2.0最新Oct 26, 2026
  2. v0.1.0Oct 19, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分