DeepSeek Harness 插件

dsh-reprolab

dsh-reprolab — a complete bug-to-proof workflow for DeepSeek Harness: frozen repro tests, RED/GREEN/REGRESSION gates, and replayable evidence.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
yuttfu/dsh-reprolab
最近更新
2026年8月16日
分类
自动化与任务
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/yuttfu/dsh-reprolab
插件名:dsh-reprolab
作者:yuttfu

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-reprolab

> A complete bug-to-proof workflow for DeepSeek Harness: frozen repro tests, RED/GREEN/REGRESSION gates, and replayable evidence.

dsh-reprolab (ReproLab) turns an issue, an error message or reproduction steps into auditable fix evidence:

baseline code + frozen repro test        → must fail     (RED)
candidate fix + the SAME frozen test     → must pass     (GREEN)
regression check                         → no new failures (REGRESSION)
evidence report                          → replayable, redacted (REPORT)

ReproLab is a deterministic bug-proof executor that complements session-level discipline plugins such as dsh-doublecheck. Your Harness session writes the tests and the fix; ReproLab isolates worktrees, freezes inputs, runs the quality gates and produces the evidence.

The nine tools

ToolPurposeKey result
reprolab_startResolve repo, freeze baseline, create control/candidate worktrees, optionally record the baseline regression failure setrunId, worktree paths, baseline, baselineRegression
reprolab_set_testFreeze the repro test patch + the target test commandtestPatch hash, command hash
reprolab_verify_redRun the frozen command in control and prove a genuine test failureverdict: valid_red, failure fingerprint
reprolab_set_fixFreeze the production-only fix patch from candidatefixPatch hash, changed files
reprolab_verify_greenRun the exact same frozen command in candidate and prove it passesverdict: valid_green
reprolab_verify_regressionCompare candidate failures with the recorded baseline setpass / pass_with_baseline_failures / regression / inconclusive
reprolab_statusStructured run state, frozen hashes, report staleness, next legal actionsnextActions — no prose to parse
reprolab_reportGenerate/refresh report.json + report.md from one shared modelreport path + recomputable sha256
reprolab_abortAbort and keep the scene for inspectionretained paths

A nonzero exit code alone is never RED: test-not-discovered, syntax errors, missing imports, timeouts, crashes and cancellations are all excluded, and RED/GREEN must use identical test-patch and command hashes.

Installation

DeepSeek Harness 0.1.0-rc.6, Node ^22.19.0 || >=24.0.0.

From a packed artifact (built dist/ included):

pnpm pack                                    # → dsh-reprolab-0.1.0.tgz
dsh plugin --profile <profile> add ./dsh-reprolab-0.1.0.tgz
dsh --profile <profile>

From the repository directory (dev):

dsh plugin --profile <profile> add ./dsh-reprolab

Both forms require the host's in-box tools and subprocess services (provided by dsh-base in every profile).

Configuration

All fields are optional and defaulted by the Schemastery schema. Bundle patch rows replace the whole config per row, so restate every key when overriding.

KeyTypeDefaultMeaning
runDirstring.reprolabDirectory (relative to repo root) for runs, worktrees, patches and reports
graceMsnumber (≥50)5000SIGTERM→SIGKILL grace when terminating child process trees
maxOutputBytesnumber (≥1024)1048576In-memory output cap per stream; overflow keeps the tail and spills the full stream
spillMaxBytesnumber (≥1 MiB)16777216Whole-stream spill cap per stream
lockStaleMsnumber (≥1000)300000Repo write-lock staleness threshold (stealing still requires a dead owner)

Permissions and external side effects

ReproLab writes only inside the target repository: runDir/ (default .reprolab/) with run state, patches, reports, and git worktree directories. Side effects:

  • Filesystem: creates runDir/runs/<run-id>/, runDir/worktrees/<run-id>-{control,candidate}/, baseline.patch, test.patch, fix.patch, report.json, report.md; reads repository files.
  • Processes: executes Git (structured argv, explicit cwd, no shell) and the test commands you declare (argv arrays only, never shell strings). Cancellation/timeout kills the whole process tree.
  • Git: creates/removes worktrees registered under runDir/worktrees; never resets, checks out, cleans or commits on your current branch. Cleanup is a separate explicit primitive (not a tool).
  • Network / telemetry / keys: none. The plugin makes no network calls, sends no telemetry and needs no API keys.
  • Credentials: child environments start from the host's scrubbed base (KEY/PASSWORD/SECRET/TOKEN names and DSH_* are stripped); output is redacted (tokens, Authorization, cookies, passwords, high-entropy strings) before records or reports are written.

Quick demo (node:test)

> reprolab_start { repoPath: "/path/to/repo", baselineCommand: { argv: ["node","--test"], framework: "node:test" } }
  → runId run_…, state baseline_checked, control + candidate worktree paths
# you write the repro test in the candidate worktree
> reprolab_set_test { runId, declaredTestFiles: ["bug.test.mjs"], command: { argv: ["node","--test","bug.test.mjs"], framework: "node:test" } }
  → state test_frozen, testPatch hash
> reprolab_verify_red { runId }
  → verdict valid_red, failure fingerprint, state red_verified
# you fix the production code in candidate
> reprolab_set_fix { runId }                          → state fix_frozen
> reprolab_verify_green { runId }                     → verdict valid_green
> reprolab_verify_regression { runId, command: { argv: ["node","--test"], framework: "node:test" } }
  → verdict pass (or pass_with_baseline_failures), state regression_verified
> reprolab_report { runId }                           → reportPath, reportHash (sha256 of report.json)
> reprolab_status { runId }                           → state reported, nextActions []

Report staleness: if any evidence input changes after reporting (e.g. the tests are re-frozen), reprolab_status reports report.stale: true.

Compatibility

ComponentVersion
DeepSeek Harness0.1.0-rc.6
@deepseek-ai/cordis^4.0.1 (peer)
@deepseek-ai/dsh-subprocess / dsh-tools / dsh-brand0.1.0-rc.6
@deepseek-ai/schemastery^3.18.1

All host contracts were verified first-hand against the installed official packages and the official docs snapshot.

Known limitations

  • One active (non-terminal) run per repository at a time; the write lock is fail-fast (RUN_ALREADY_ACTIVE), not queued.
  • pytest and jest classification is based on the documented output formats (no local pytest/jest installs were available); vitest and node:test formats were captured from real runs. Python projects use unittest + the generic classifier.
  • Test-runner cache artifacts (__pycache__, .pyc, .pytest_cache, .coverage, htmlcov, .vite, node_modules/.cache) are ignored by change detection — an allowlist, not an ignore-all.
  • The repository needs at least one commit (worktrees require a baseline commit).
  • dsh-windtunnel's scripted adapter is currently incompatible with DSH 0.1.0-rc.6 (third-party issue). Real-host lifecycle (install/enable/disable/uninstall/reinstall) was verified through the real dsh CLI on a clean headless profile.

Uninstall

dsh plugin --profile <profile> remove dsh-reprolab

This removes the bundle row and package. Run artifacts (runDir/ and worktrees) are not deleted by uninstall — remove them explicitly with git worktree remove after inspecting them. Active runs terminate their child processes on plugin unload (host subprocess service disposal).

Troubleshooting

Recovery guidance for every error code, worktree cleanup, stale locks and invalidated runs: [docs/troubleshooting.md](docs/troubleshooting.md). Security model: [docs/security.md](docs/security.md). Architecture: [docs/architecture.md](docs/architecture.md).

Development

pnpm install
pnpm run check            # lint + typecheck + build + verify:manifest
pnpm pack                 # → dsh-reprolab-0.1.0.tgz (dist/, cordis.patch.yml, README, LICENSE)

MIT License.